16 #ifndef __VOM_SRPC_CMD_H__ 17 #define __VOM_SRPC_CMD_H__ 23 template <
typename MSG>
47 int stats_index = reply.get_response().get_payload().stats_index;
48 int retval = reply.get_response().get_payload().retval;
virtual std::string to_string() const =0
convert to string format for debug purposes
static const rc_t & from_vpp_retval(int32_t rv)
Get the rc_t from the VPP API value.
MSG msg_t
convenient typedef
virtual ~srpc_cmd()
Desructor.
Error codes that VPP will return during a HW write.
static const log_level_t DEBUG
srpc_cmd(HW::item< handle_t > &item)
Constructor taking the HW item that will be updated by the command.
static const handle_t INVALID
A value of an interface handle_t that means the itf does not exist.
virtual vapi_error_e operator()(MSG &reply)
call operator used as a callback by VAPI when the reply is available
A base class for all RPC commands to VPP.
void fulfill(const HW::item< handle_t > &d)
Fulfill the commands promise.
A type declaration of an interface handle in VPP.
static const rc_t OK
The HW write was successfull.
The VPP Object Model (VOM) library.
HW::item< handle_t > & item()
return the HW item the command updates