FD.io VPP
v18.07.1-13-g909ba93
Vector Packet Processing
|
A command class represents our desire to recieve interface events. More...
Public Member Functions | |
events_cmd (interface::event_listener &el) | |
Constructor taking the listner to notify. More... | |
rc_t | issue (connection &con) |
Issue the command to VPP/HW. More... | |
void | retire (connection &con) |
Retires the command - unsubscribe from the events. More... | |
std::string | to_string () const |
convert to string format for debug purposes More... | |
bool | operator== (const events_cmd &i) const |
Comparison operator - only used for UT. More... | |
void | notify () |
Called when it's time to poke the listeners. More... | |
Public Member Functions inherited from VOM::event_cmd< vapi::Want_interface_events, vapi::Sw_interface_event > | |
event_cmd (HW::item< bool > &b) | |
Default constructor. More... | |
virtual | ~event_cmd () |
Default destructor. More... | |
const_iterator | begin () |
const_iterator | end () |
void | lock () |
void | unlock () |
void | flush () |
flush/free all the events thus far reeived. More... | |
vapi_error_e | operator() (reg_t &dl) |
Public Member Functions inherited from VOM::rpc_cmd< HW::item< bool >, vapi::Want_interface_events > | |
rpc_cmd (HW::item< bool > &item) | |
Constructor taking the HW item that will be updated by the command. More... | |
virtual | ~rpc_cmd () |
Desructor. More... | |
HW::item< bool > & | item () |
return the HW item the command updates More... | |
const HW::item< bool > & | item () const |
return the const HW item the command updates More... | |
void | fulfill (const HW::item< bool > &d) |
Fulfill the commands promise. More... | |
rc_t | wait () |
Wait on the commands promise. More... | |
virtual void | succeeded () |
Called by the HW Command Q when it is disabled to indicate the command can be considered successful without issuing it to HW. More... | |
virtual vapi_error_e | operator() (vapi::Want_interface_events &reply) |
call operator used as a callback by VAPI when the reply is available More... | |
Public Member Functions inherited from VOM::cmd | |
cmd () | |
Default constructor. More... | |
virtual | ~cmd () |
Virtual destructor. More... | |
Additional Inherited Members | |
Public Types inherited from VOM::event_cmd< vapi::Want_interface_events, vapi::Sw_interface_event > | |
typedef vapi::Event_registration< vapi::Sw_interface_event >::resp_type | event_t |
Typedef for the event type. More... | |
typedef vapi::Event_registration< vapi::Sw_interface_event > | reg_t |
typedef vapi::Result_set< typename reg_t::resp_type >::const_iterator | const_iterator |
Public Types inherited from VOM::rpc_cmd< HW::item< bool >, vapi::Want_interface_events > | |
typedef vapi::Want_interface_events | msg_t |
convenient typedef More... | |
Protected Attributes inherited from VOM::event_cmd< vapi::Want_interface_events, vapi::Sw_interface_event > | |
std::unique_ptr< vapi::Event_registration< vapi::Sw_interface_event > > | m_reg |
The VAPI event registration. More... | |
std::mutex | m_mutex |
Mutex protection for the events. More... | |
Protected Attributes inherited from VOM::rpc_cmd< HW::item< bool >, vapi::Want_interface_events > | |
HW::item< bool > & | m_hw_item |
A reference to an object's HW::item that the command will update. More... | |
std::promise< HW::item< bool > > | m_promise |
The promise that implements the synchronous issue. More... | |
A command class represents our desire to recieve interface events.
Definition at line 368 of file interface_cmds.hpp.
VOM::interface_cmds::events_cmd::events_cmd | ( | interface::event_listener & | el | ) |
Constructor taking the listner to notify.
Definition at line 388 of file interface_cmds.cpp.
|
virtual |
Issue the command to VPP/HW.
Implements VOM::cmd.
Definition at line 401 of file interface_cmds.cpp.
|
virtual |
Called when it's time to poke the listeners.
Implements VOM::event_cmd< vapi::Want_interface_events, vapi::Sw_interface_event >.
Definition at line 442 of file interface_cmds.cpp.
bool VOM::interface_cmds::events_cmd::operator== | ( | const events_cmd & | i | ) | const |
Comparison operator - only used for UT.
Definition at line 395 of file interface_cmds.cpp.
|
virtual |
Retires the command - unsubscribe from the events.
Implements VOM::event_cmd< vapi::Want_interface_events, vapi::Sw_interface_event >.
Definition at line 425 of file interface_cmds.cpp.
|
virtual |
convert to string format for debug purposes
Implements VOM::cmd.
Definition at line 448 of file interface_cmds.cpp.