16 #ifndef __VOM_DUMP_CMD_H__ 17 #define __VOM_DUMP_CMD_H__ 42 template <
typename MSG>
77 return (
m_dump->get_result_set().begin());
87 return (
m_dump->get_result_set().end());
95 std::future_status status;
96 std::future<rc_t> result;
99 status = result.wait_for(std::chrono::seconds(5));
101 if (status != std::future_status::ready) {
105 return (result.get());
virtual ~dump_cmd()
Destructor.
vapi_error_e operator()(MSG &d)
Call operator called when the dump is complete.
Error codes that VPP will return during a HW write.
virtual void retire(connection &con)
Retire/cancel a long running command.
const_iterator begin()
Constant iterator to the start of the records retunred during the dump.
A representation of the connection to VPP.
dump_cmd()
Default Constructor.
void succeeded()
Dump commands should not be issued whilst the HW is disabled.
The pipe to VPP into which we write the commands.
const_iterator end()
Constant iterator to the end of the records retunred during the dump.
unsigned int(* get_msg_size_t)(void *)
A function type def for calculating a message's size.
typename std::vector< Msg< M >, typename Msg< M >::Msg_allocator >::const_iterator const_iterator
static const rc_t OK
The HW write was successfull.
rc_t wait()
Wait for the issue of the command to complete.
std::promise< rc_t > m_promise
The underlying promise that implements the synchornous nature of the command issue.
The VPP Object Model (VOM) library.
A representation of a method call to VPP.
std::unique_ptr< MSG > m_dump
The VAPI event registration.
vapi::Result_set< typename MSG::resp_type >::const_iterator const_iterator
A base class for VPP dump commands.
static const rc_t TIMEOUT
HW write timedout - VPP did not respond within a timely manner.