FD.io VPP  v18.10-34-gcce845e
Vector Packet Processing
VOM::dump_cmd< MSG > Class Template Reference

A base class for VPP dump commands. More...

+ Inheritance diagram for VOM::dump_cmd< MSG >:
+ Collaboration diagram for VOM::dump_cmd< MSG >:

Public Types

typedef MSG msg_t
 
typedef MSG::resp_type record_t
 
typedef vapi::Result_set< typename MSG::resp_type >::const_iterator const_iterator
 

Public Member Functions

 dump_cmd ()
 Default Constructor. More...
 
virtual ~dump_cmd ()
 Destructor. More...
 
 dump_cmd (const dump_cmd &d)=default
 
const_iterator begin ()
 Constant iterator to the start of the records retunred during the dump. More...
 
const_iterator end ()
 Constant iterator to the end of the records retunred during the dump. More...
 
rc_t wait ()
 Wait for the issue of the command to complete. More...
 
vapi_error_e operator() (MSG &d)
 Call operator called when the dump is complete. More...
 
virtual void retire (connection &con)
 Retire/cancel a long running command. More...
 
- Public Member Functions inherited from VOM::cmd
 cmd ()
 Default constructor. More...
 
virtual ~cmd ()
 Virtual destructor. More...
 
virtual rc_t issue (connection &con)=0
 Issue the command to VPP/HW. More...
 
virtual std::string to_string () const =0
 convert to string format for debug purposes More...
 

Protected Member Functions

void succeeded ()
 Dump commands should not be issued whilst the HW is disabled. More...
 

Protected Attributes

std::promise< rc_tm_promise
 The underlying promise that implements the synchornous nature of the command issue. More...
 
std::unique_ptr< MSG > m_dump
 The VAPI event registration. More...
 

Friends

class HW::cmd_q
 The HW::cmd_q is a friend so it can call suceedded. More...
 

Detailed Description

template<typename MSG>
class VOM::dump_cmd< MSG >

A base class for VPP dump commands.

Dump commands are one of the sub-set of command types to VPP. Here the client makes a read request on the resource and VPP responds with all the records. This command is executed synchronously. Once complete the client can 'pop' the records from the command object

Definition at line 43 of file dump_cmd.hpp.

Member Typedef Documentation

template<typename MSG>
typedef vapi::Result_set<typename MSG::resp_type>::const_iterator VOM::dump_cmd< MSG >::const_iterator

Definition at line 50 of file dump_cmd.hpp.

template<typename MSG>
typedef MSG VOM::dump_cmd< MSG >::msg_t

Definition at line 46 of file dump_cmd.hpp.

template<typename MSG>
typedef MSG::resp_type VOM::dump_cmd< MSG >::record_t

Definition at line 47 of file dump_cmd.hpp.

Constructor & Destructor Documentation

template<typename MSG>
VOM::dump_cmd< MSG >::dump_cmd ( )
inline

Default Constructor.

Definition at line 55 of file dump_cmd.hpp.

+ Here is the caller graph for this function:

template<typename MSG>
virtual VOM::dump_cmd< MSG >::~dump_cmd ( )
inlinevirtual

Destructor.

Definition at line 63 of file dump_cmd.hpp.

template<typename MSG>
VOM::dump_cmd< MSG >::dump_cmd ( const dump_cmd< MSG > &  d)
default

Member Function Documentation

template<typename MSG>
const_iterator VOM::dump_cmd< MSG >::begin ( )
inline

Constant iterator to the start of the records retunred during the dump.

Definition at line 70 of file dump_cmd.hpp.

template<typename MSG>
const_iterator VOM::dump_cmd< MSG >::end ( )
inline

Constant iterator to the end of the records retunred during the dump.

Definition at line 83 of file dump_cmd.hpp.

template<typename MSG>
vapi_error_e VOM::dump_cmd< MSG >::operator() ( MSG &  d)
inline

Call operator called when the dump is complete.

Definition at line 111 of file dump_cmd.hpp.

template<typename MSG>
virtual void VOM::dump_cmd< MSG >::retire ( connection con)
inlinevirtual

Retire/cancel a long running command.

Implements VOM::cmd.

Definition at line 121 of file dump_cmd.hpp.

template<typename MSG>
void VOM::dump_cmd< MSG >::succeeded ( )
inlineprotectedvirtual

Dump commands should not be issued whilst the HW is disabled.

Implements VOM::cmd.

Definition at line 133 of file dump_cmd.hpp.

template<typename MSG>
rc_t VOM::dump_cmd< MSG >::wait ( )
inline

Wait for the issue of the command to complete.

Definition at line 93 of file dump_cmd.hpp.

Friends And Related Function Documentation

template<typename MSG>
friend class HW::cmd_q
friend

The HW::cmd_q is a friend so it can call suceedded.

Definition at line 138 of file dump_cmd.hpp.

Field Documentation

template<typename MSG>
std::unique_ptr<MSG> VOM::dump_cmd< MSG >::m_dump
protected

The VAPI event registration.

Definition at line 143 of file dump_cmd.hpp.

template<typename MSG>
std::promise<rc_t> VOM::dump_cmd< MSG >::m_promise
protected

The underlying promise that implements the synchornous nature of the command issue.

Definition at line 128 of file dump_cmd.hpp.


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