FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
VOM::dhcp_client_cmds::events_cmd Class Reference

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

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

Public Member Functions

 events_cmd (dhcp_client::event_listener &el)
 Constructor. More...
 
 ~events_cmd ()
 
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 >, 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 HW::item< bool > &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 >, 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 >, 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< HW::item< bool > > m_promise
 The promise that implements the synchronous issue. More...
 

Detailed Description

A functor class represents our desire to recieve interface events.

Definition at line 128 of file dhcp_client_cmds.hpp.

Constructor & Destructor Documentation

◆ events_cmd()

VOM::dhcp_client_cmds::events_cmd::events_cmd ( dhcp_client::event_listener el)

Constructor.

Definition at line 132 of file dhcp_client_cmds.cpp.

◆ ~events_cmd()

VOM::dhcp_client_cmds::events_cmd::~events_cmd ( )

Definition at line 138 of file dhcp_client_cmds.cpp.

Member Function Documentation

◆ issue()

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

Issue the command to VPP/HW - subscribe to DHCP events.

Implements VOM::cmd.

Definition at line 150 of file dhcp_client_cmds.cpp.

◆ notify()

void VOM::dhcp_client_cmds::events_cmd::notify ( )
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 169 of file dhcp_client_cmds.cpp.

+ Here is the call graph for this function:

◆ operator==()

bool VOM::dhcp_client_cmds::events_cmd::operator== ( const events_cmd i) const

Comparison operator - only used for UT.

Definition at line 144 of file dhcp_client_cmds.cpp.

◆ retire()

void VOM::dhcp_client_cmds::events_cmd::retire ( connection con)
virtual

Retire the command - unsubscribe.

Implements VOM::event_cmd< vapi::Control_ping, vapi::Dhcp_compl_event >.

Definition at line 164 of file dhcp_client_cmds.cpp.

◆ to_string()

std::string VOM::dhcp_client_cmds::events_cmd::to_string ( ) const
virtual

convert to string format for debug purposes

Implements VOM::cmd.

Definition at line 200 of file dhcp_client_cmds.cpp.


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