FD.io VPP
v18.01.2-1-g9b554f3
Vector Packet Processing
|
A functor class represents our desire to recieve interface events. More...
Public Member Functions | |
events_cmd (dhcp_config::event_listener &el) | |
Constructor. More... | |
rc_t | issue (connection &con) |
Issue the command to VPP/HW - subscribe to DHCP events. More... | |
void | retire (connection &con) |
Retire the command - unsubscribe. 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 in the VAPI RX thread when data is available. More... | |
Public Member Functions inherited from VOM::event_cmd< vapi::Control_ping, vapi::Dhcp_compl_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 >, rc_t, vapi::Control_ping > | |
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 rc_t &d) |
Fulfill the commands promise. More... | |
rc_t | wait () |
Wait on the commands promise. More... | |
virtual vapi_error_e | operator() (vapi::Control_ping &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::Control_ping, vapi::Dhcp_compl_event > | |
typedef vapi::Event_registration< vapi::Dhcp_compl_event >::resp_type | event_t |
Typedef for the event type. More... | |
typedef vapi::Event_registration< vapi::Dhcp_compl_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 >, rc_t, vapi::Control_ping > | |
typedef vapi::Control_ping | msg_t |
convenient typedef More... | |
Protected Attributes inherited from VOM::event_cmd< vapi::Control_ping, vapi::Dhcp_compl_event > | |
std::unique_ptr< vapi::Event_registration< vapi::Dhcp_compl_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 >, rc_t, vapi::Control_ping > | |
HW::item< bool > & | m_hw_item |
A reference to an object's HW::item that the command will update. More... | |
std::promise< rc_t > | m_promise |
The promise that implements the synchronous issue. More... | |
A functor class represents our desire to recieve interface events.
Definition at line 116 of file dhcp_config_cmds.hpp.
VOM::dhcp_config_cmds::events_cmd::events_cmd | ( | dhcp_config::event_listener & | el | ) |
Constructor.
Definition at line 125 of file dhcp_config_cmds.cpp.
|
virtual |
Issue the command to VPP/HW - subscribe to DHCP events.
Implements VOM::cmd.
Definition at line 138 of file dhcp_config_cmds.cpp.
|
virtual |
called in the VAPI RX thread when data is available.
Implements VOM::event_cmd< vapi::Control_ping, vapi::Dhcp_compl_event >.
Definition at line 157 of file dhcp_config_cmds.cpp.
bool VOM::dhcp_config_cmds::events_cmd::operator== | ( | const events_cmd & | i | ) | const |
Comparison operator - only used for UT.
Definition at line 132 of file dhcp_config_cmds.cpp.
|
virtual |
Retire the command - unsubscribe.
Implements VOM::event_cmd< vapi::Control_ping, vapi::Dhcp_compl_event >.
Definition at line 152 of file dhcp_config_cmds.cpp.
|
virtual |
convert to string format for debug purposes
Implements VOM::cmd.
Definition at line 163 of file dhcp_config_cmds.cpp.