FD.io VPP  v19.08.3-2-gbabecb413
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 44 of file hw.hpp.

Constructor & Destructor Documentation

◆ item() [1/4]

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

Constructor.

Definition at line 50 of file hw.hpp.

◆ item() [2/4]

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

Constructor.

Definition at line 58 of file hw.hpp.

◆ item() [3/4]

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

Constructor.

Definition at line 67 of file hw.hpp.

◆ item() [4/4]

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

Constructor.

Definition at line 76 of file hw.hpp.

◆ ~item()

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

Destructor.

+ Here is the caller graph for this function:

Member Function Documentation

◆ data() [1/2]

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

Return the data read/written.

Definition at line 109 of file hw.hpp.

◆ data() [2/2]

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

Const reference to the data.

Definition at line 114 of file hw.hpp.

◆ operator bool()

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

Return true if the HW item is configred in HW.

Definition at line 130 of file hw.hpp.

◆ operator=()

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

Copy assignment.

Definition at line 98 of file hw.hpp.

◆ operator==()

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

Comparison operator.

Definition at line 90 of file hw.hpp.

◆ rc()

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

Get the HW return code.

Definition at line 119 of file hw.hpp.

+ Here is the caller graph for this function:

◆ set()

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 125 of file hw.hpp.

+ Here is the caller graph for this function:

◆ to_string() [1/5]

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

convert to string format for debug purposes

Definition at line 161 of file hw.hpp.

◆ to_string() [2/5]

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

Definition at line 279 of file hw.cpp.

◆ to_string() [3/5]

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

Definition at line 290 of file hw.cpp.

◆ to_string() [4/5]

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

bool Specialisation for HW::item to_string

◆ to_string() [5/5]

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

uint Specialisation for HW::item to_string

◆ update()

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 136 of file hw.hpp.

+ Here is the caller graph for this function:

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