bmv2
Designing your own switch target with bmv2
Public Types | Public Member Functions | List of all members
bm::DevMgr Class Reference
Inheritance diagram for bm::DevMgr:
Inheritance graph
[legend]

Public Types

using port_t = PortMonitorIface::port_t
 Representation of a port number. More...
 
using PortStatus = PortMonitorIface::PortStatus
 Represents the status of a port. More...
 
using PortStatusCb = PortMonitorIface::PortStatusCb
 Signature of the cb function to call when a port status changes. More...
 

Public Member Functions

void transmit_fn (port_t port_num, const char *buffer, int len)
 Transmits a data packet out of port port_num. More...
 
ReturnCode register_status_cb (const PortStatus &type, const PortStatusCb &port_cb)
 

Detailed Description

Base class for SwitchWContexts (and by extension Switch). It provides facilities to send and receive packets, as well as manage ports.

Member Typedef Documentation

◆ port_t

Representation of a port number.

◆ PortStatus

Represents the status of a port.

◆ PortStatusCb

Signature of the cb function to call when a port status changes.

Member Function Documentation

◆ register_status_cb()

ReturnCode bm::DevMgr::register_status_cb ( const PortStatus type,
const PortStatusCb port_cb 
)

Register a callback function to be called every time the status of a port changes.

◆ transmit_fn()

void bm::DevMgr::transmit_fn ( port_t  port_num,
const char *  buffer,
int  len 
)

Transmits a data packet out of port port_num.


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