|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef __VOM_EVENT_CMD_H__
17 #define __VOM_EVENT_CMD_H__
38 template <
typename WANT,
typename EVENT>
75 void flush() {
m_reg->get_result_set().free_all_responses(); }
100 std::unique_ptr<vapi::Event_registration<EVENT>>
m_reg;
The VPP Object Model (VOM) library.
Class representing event registration - incoming events (messages) from vpp as a result of a subscrip...
vapi::Event_registration< EVENT > reg_t
A base class for all RPC commands to VPP.
vapi_error_e operator()(reg_t &dl)
typename M::shm_data_type resp_type
An Event command base class.
A representation of the connection to VPP.
typename std::vector< Msg< M >, typename Msg< M >::Msg_allocator >::const_iterator const_iterator
virtual void retire(connection &con)=0
Retire the command.
vapi::Event_registration< EVENT >::resp_type event_t
Typedef for the event type.
virtual ~event_cmd()
Default destructor.
std::unique_ptr< vapi::Event_registration< EVENT > > m_reg
The VAPI event registration.
HW::item< bool > & item()
return the HW item the command updates
void flush()
flush/free all the events thus far reeived.
std::mutex m_mutex
Mutex protection for the events.
virtual void notify()=0
Notify the command that data from VPP has arrived and been stored.
event_cmd(HW::item< bool > &b)
Default constructor.
vapi::Result_set< typename reg_t::resp_type >::const_iterator const_iterator