FD.io VPP  v18.07.1-13-g909ba93
Vector Packet Processing
VOM::interface_cmds::events_cmd Class Reference

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

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

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...
 

Detailed Description

A command class represents our desire to recieve interface events.

Definition at line 368 of file interface_cmds.hpp.

Constructor & Destructor Documentation

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.

Member Function Documentation

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

Issue the command to VPP/HW.

Implements VOM::cmd.

Definition at line 401 of file interface_cmds.cpp.

+ Here is the call graph for this function:

void VOM::interface_cmds::events_cmd::notify ( )
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.

+ Here is the call graph for this function:

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.

void VOM::interface_cmds::events_cmd::retire ( connection con)
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.

+ Here is the call graph for this function:

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

convert to string format for debug purposes

Implements VOM::cmd.

Definition at line 448 of file interface_cmds.cpp.


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