FD.io VPP
v18.01-8-g0eacf49
Vector Packet Processing
|
A command class represents our desire to recieve interface stats. More...
Public Member Functions | |
stats_enable_cmd (interface::stat_listener &el, const handle_t &handle) | |
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 stats. More... | |
std::string | to_string () const |
convert to string format for debug purposes More... | |
bool | operator== (const stats_enable_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_per_interface_combined_stats, vapi::Vnet_per_interface_combined_counters > | |
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::Want_per_interface_combined_stats > | |
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 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_per_interface_combined_stats &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_per_interface_combined_stats, vapi::Vnet_per_interface_combined_counters > | |
typedef vapi::Event_registration< vapi::Vnet_per_interface_combined_counters >::resp_type | event_t |
Typedef for the event type. More... | |
typedef vapi::Event_registration< vapi::Vnet_per_interface_combined_counters > | 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::Want_per_interface_combined_stats > | |
typedef vapi::Want_per_interface_combined_stats | msg_t |
convenient typedef More... | |
Protected Attributes inherited from VOM::event_cmd< vapi::Want_per_interface_combined_stats, vapi::Vnet_per_interface_combined_counters > | |
std::unique_ptr< vapi::Event_registration< vapi::Vnet_per_interface_combined_counters > > | 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::Want_per_interface_combined_stats > | |
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 command class represents our desire to recieve interface stats.
Definition at line 373 of file interface_cmds.hpp.
VOM::interface_cmds::stats_enable_cmd::stats_enable_cmd | ( | interface::stat_listener & | el, |
const handle_t & | handle | ||
) |
Constructor taking the listner to notify.
Interface statistics.
Definition at line 404 of file interface_cmds.cpp.
|
virtual |
Issue the command to VPP/HW.
Implements VOM::cmd.
Definition at line 419 of file interface_cmds.cpp.
|
virtual |
Called when it's time to poke the listeners.
Implements VOM::event_cmd< vapi::Want_per_interface_combined_stats, vapi::Vnet_per_interface_combined_counters >.
Definition at line 465 of file interface_cmds.cpp.
bool VOM::interface_cmds::stats_enable_cmd::operator== | ( | const stats_enable_cmd & | i | ) | const |
Comparison operator - only used for UT.
Definition at line 413 of file interface_cmds.cpp.
|
virtual |
Retires the command - unsubscribe from the stats.
Implements VOM::event_cmd< vapi::Want_per_interface_combined_stats, vapi::Vnet_per_interface_combined_counters >.
Definition at line 446 of file interface_cmds.cpp.
|
virtual |
convert to string format for debug purposes
Implements VOM::cmd.
Definition at line 471 of file interface_cmds.cpp.