bmv2
Designing your own switch target with bmv2
Protected Member Functions | List of all members
bm::ActionPrimitive< Args > Class Template Referenceabstract

Inherits bm::ActionPrimitive_.

Protected Member Functions

Fieldget_field (const std::string &name)
 
Headerget_header (const std::string &name)
 Returns a reference to the Header with name name. More...
 
Packetget_packet ()
 

Detailed Description

template<typename... Args>
class bm::ActionPrimitive< Args >

This acts as the base class for all target-specific action primitives. It provides some useful functionality, like access to a header by name, or access to the Packet on which the primitive is executed.

Member Function Documentation

◆ get_field()

template<typename... Args>
Field& bm::ActionPrimitive< Args >::get_field ( const std::string &  name)
inlineprotected

Returns a reference to the Field with name name. name must follow the usual format "hdrA.f1".

◆ get_header()

template<typename... Args>
Header& bm::ActionPrimitive< Args >::get_header ( const std::string &  name)
inlineprotected

Returns a reference to the Header with name name.

◆ get_packet()

template<typename... Args>
Packet& bm::ActionPrimitive< Args >::get_packet ( )
inlineprotected

Returns a reference to the Packet instance on which the action primitive is being executed.


The documentation for this class was generated from the following file: