FD.io VPP  v18.04-17-g3a0d853
Vector Packet Processing
VOM::interface_cmds::stats_enable_cmd Class Reference

A command class represents our desire to recieve interface stats. More...

+ Inheritance diagram for VOM::interface_cmds::stats_enable_cmd:
+ Collaboration diagram for VOM::interface_cmds::stats_enable_cmd:

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...
 
void set (const rc_t &rc)
 (re)set status More...
 
interface::stat_listenerlistener () const
 get listener 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_tm_promise
 The promise that implements the synchronous issue. More...
 

Detailed Description

A command class represents our desire to recieve interface stats.

Definition at line 461 of file interface_cmds.hpp.

Constructor & Destructor Documentation

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 525 of file interface_cmds.cpp.

Member Function Documentation

rc_t VOM::interface_cmds::stats_enable_cmd::issue ( connection con)
virtual

Issue the command to VPP/HW.

Implements VOM::cmd.

Definition at line 540 of file interface_cmds.cpp.

+ Here is the call graph for this function:

interface::stat_listener & VOM::interface_cmds::stats_enable_cmd::listener ( ) const

get listener

Definition at line 586 of file interface_cmds.cpp.

void VOM::interface_cmds::stats_enable_cmd::notify ( )
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 598 of file interface_cmds.cpp.

+ Here is the call graph for this function:

bool VOM::interface_cmds::stats_enable_cmd::operator== ( const stats_enable_cmd i) const

Comparison operator - only used for UT.

Definition at line 534 of file interface_cmds.cpp.

void VOM::interface_cmds::stats_enable_cmd::retire ( connection con)
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 567 of file interface_cmds.cpp.

+ Here is the call graph for this function:

void VOM::interface_cmds::stats_enable_cmd::set ( const rc_t rc)

(re)set status

Definition at line 592 of file interface_cmds.cpp.

+ Here is the call graph for this function:

std::string VOM::interface_cmds::stats_enable_cmd::to_string ( void  ) const
virtual

convert to string format for debug purposes

Implements VOM::cmd.

Definition at line 604 of file interface_cmds.cpp.

+ Here is the call graph for this function:


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