FD.io VPP  v18.07-rc0-415-g6c78436
Vector Packet Processing
VOM::HW::item< T > Class Template Reference

A HW::item is data that is either to be written to or read from VPP/HW. More...

Public Member Functions

 item (const T &data)
 Constructor. More...
 
 item ()
 Constructor. More...
 
 item (rc_t rc)
 Constructor. More...
 
 item (const T &data, rc_t rc)
 Constructor. More...
 
 ~item ()=default
 Destructor. More...
 
bool operator== (const item< T > &i) const
 Comparison operator. More...
 
itemoperator= (const item &other)
 Copy assignment. More...
 
T & data ()
 Return the data read/written. More...
 
const T & data () const
 Const reference to the data. More...
 
rc_t rc () const
 Get the HW return code. More...
 
void set (const rc_t &rc)
 Set the HW return code - should only be called from the family of Command objects. More...
 
 operator bool () const
 Return true if the HW item is configred in HW. More...
 
bool update (const item &desired)
 update the item to the desired state. More...
 
std::string to_string () const
 convert to string format for debug purposes More...
 
template<>
std::string to_string () const
 
template<>
std::string to_string () const
 
template<>
std::string to_string () const
 bool Specialisation for HW::item to_string More...
 
template<>
std::string to_string () const
 uint Specialisation for HW::item to_string More...
 

Detailed Description

template<typename T>
class VOM::HW::item< T >

A HW::item is data that is either to be written to or read from VPP/HW.

The item is a pair of the data written/read and the result of that operation.

Definition at line 43 of file hw.hpp.

Constructor & Destructor Documentation

template<typename T>
VOM::HW::item< T >::item ( const T &  data)
inline

Constructor.

Definition at line 49 of file hw.hpp.

template<typename T>
VOM::HW::item< T >::item ( )
inline

Constructor.

Definition at line 57 of file hw.hpp.

template<typename T>
VOM::HW::item< T >::item ( rc_t  rc)
inline

Constructor.

Definition at line 66 of file hw.hpp.

template<typename T>
VOM::HW::item< T >::item ( const T &  data,
rc_t  rc 
)
inline

Constructor.

Definition at line 75 of file hw.hpp.

template<typename T>
VOM::HW::item< T >::~item ( )
default

Destructor.

+ Here is the caller graph for this function:

Member Function Documentation

template<typename T>
T& VOM::HW::item< T >::data ( )
inline

Return the data read/written.

Definition at line 108 of file hw.hpp.

+ Here is the caller graph for this function:

template<typename T>
const T& VOM::HW::item< T >::data ( ) const
inline

Const reference to the data.

Definition at line 113 of file hw.hpp.

template<typename T>
VOM::HW::item< T >::operator bool ( ) const
inline

Return true if the HW item is configred in HW.

Definition at line 129 of file hw.hpp.

template<typename T>
item& VOM::HW::item< T >::operator= ( const item< T > &  other)
inline

Copy assignment.

Definition at line 97 of file hw.hpp.

template<typename T>
bool VOM::HW::item< T >::operator== ( const item< T > &  i) const
inline

Comparison operator.

Definition at line 89 of file hw.hpp.

template<typename T>
rc_t VOM::HW::item< T >::rc ( ) const
inline

Get the HW return code.

Definition at line 118 of file hw.hpp.

+ Here is the caller graph for this function:

template<typename T>
void VOM::HW::item< T >::set ( const rc_t rc)
inline

Set the HW return code - should only be called from the family of Command objects.

Definition at line 124 of file hw.hpp.

template<typename T>
std::string VOM::HW::item< T >::to_string ( void  ) const
inline

convert to string format for debug purposes

Definition at line 160 of file hw.hpp.

template<>
std::string VOM::HW::item< bool >::to_string ( void  ) const

Definition at line 254 of file hw.cpp.

template<>
std::string VOM::HW::item< unsigned int >::to_string ( void  ) const

Definition at line 265 of file hw.cpp.

template<>
std::string VOM::HW::item< bool >::to_string ( ) const

bool Specialisation for HW::item to_string

template<>
std::string VOM::HW::item< unsigned int >::to_string ( ) const

uint Specialisation for HW::item to_string

template<typename T>
bool VOM::HW::item< T >::update ( const item< T > &  desired)
inline

update the item to the desired state.

return true if a HW update is required

Definition at line 135 of file hw.hpp.


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