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;
virtual void notify()=0
Notify the command that data from VPP has arrived and been stored.
virtual ~event_cmd()
Default destructor.
vapi_error_e operator()(reg_t &dl)
Error codes that VPP will return during a HW write.
void flush()
flush/free all the events thus far reeived.
std::mutex m_mutex
Mutex protection for the events.
Class representing event registration - incoming events (messages) from vpp as a result of a subscrip...
A representation of the connection to VPP.
HW::item< bool > & item()
return the HW item the command updates
A base class for all RPC commands to VPP.
vapi::Event_registration< EVENT >::resp_type event_t
Typedef for the event type.
vapi::Result_set< typename reg_t::resp_type >::const_iterator const_iterator
std::unique_ptr< vapi::Event_registration< EVENT > > m_reg
The VAPI event registration.
typename std::vector< Msg< M >, typename Msg< M >::Msg_allocator >::const_iterator const_iterator
vapi::Event_registration< EVENT > reg_t
The VPP Object Model (VOM) library.
typename M::shm_data_type resp_type
An Event command base class.
virtual void retire(connection &con)=0
Retire the command.
event_cmd(HW::item< bool > &b)
Default constructor.