AFI
Advanced Forwarding Interface
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
AftDataEtherAddr Class Reference

Data class for Ethernet MAC addresses. More...

#include <AftData.h>

Inheritance diagram for AftDataEtherAddr:
AftData

Public Types

typedef std::shared_ptr
< AftDataEtherAddr
Ptr
 Pointer type for all AftData ethernet addresses.
 

Public Member Functions

 AftDataEtherAddr (AftDataBytes newAddress)
 Constructor for Ethernet address. More...
 
 AftDataEtherAddr (uint8_t *newAddress)
 Constructor for Ethernet address. More...
 
 AftDataEtherAddr (std::string prefixString)
 Constructor for Ethernet address. More...
 
const AftDataBytesdata () const
 
const uint8_t * dataArray () const
 
virtual uint32_t append (AftDataBytes &aData)
 Append contents of data object to AftDataBytes vector. More...
 
virtual const std::string dataClass () const
 
virtual std::ostream & description (std::ostream &os) const
 Append a description of the data to an output stream. More...
 
virtual int compare (const AftData &aData) const
 Compare data. More...
 
- Public Member Functions inherited from AftData
 AftData (uint32_t newBitLength)
 Base constructor for data objects. More...
 
const uint32_t bitLength () const
 
const uint32_t byteLength () const
 
bool operator== (const AftData &aData) const
 Comparator for data. More...
 

Static Public Member Functions

static AftDataEtherAddr::Ptr create (AftDataBytes newAddress)
 Factory generator for Ethernet address. More...
 
static AftDataEtherAddr::Ptr create (uint8_t *newAddress)
 Factory generator for Ethernet address. More...
 
static AftDataEtherAddr::Ptr create (std::string prefixString)
 Factory generator for Ethernet address. More...
 

Protected Attributes

AftDataBytes _data
 Encapsulated Ethernet MAC address.
 
- Protected Attributes inherited from AftData
uint32_t _bitLength
 Size of encapsulated data in bits.
 

Additional Inherited Members

- Protected Member Functions inherited from AftData
void setBitLength (uint32_t newBitLength)
 Set the bitlength of the data. More...
 

Detailed Description

Data class for Ethernet MAC addresses.

Constructor & Destructor Documentation

AftDataEtherAddr::AftDataEtherAddr ( AftDataBytes  newAddress)
inline

Constructor for Ethernet address.

Parameters
[in]newAddressMAC address as a byte vector to represent in data
AftDataEtherAddr::AftDataEtherAddr ( uint8_t *  newAddress)
inline

Constructor for Ethernet address.

Parameters
[in]newAddressMAC address as a C-style byte array to represent in data
AftDataEtherAddr::AftDataEtherAddr ( std::string  prefixString)
inline

Constructor for Ethernet address.

Parameters
[in]prefixStringEthernet address as a dot-notation string to represent in data

Member Function Documentation

virtual uint32_t AftDataEtherAddr::append ( AftDataBytes newData)
inlinevirtual

Append contents of data object to AftDataBytes vector.

Parameters
[in]dataReference to AftDataBytes vector to append to

Reimplemented from AftData.

virtual int AftDataEtherAddr::compare ( const AftData aData) const
inlinevirtual

Compare data.

Parameters
[in]aDataReference to data to compare against
Returns
Zero if data is the same

Reimplemented from AftData.

static AftDataEtherAddr::Ptr AftDataEtherAddr::create ( AftDataBytes  newAddress)
inlinestatic

Factory generator for Ethernet address.

Parameters
[in]newAddressMAC address as a byte vector to represent in data
static AftDataEtherAddr::Ptr AftDataEtherAddr::create ( uint8_t *  newAddress)
inlinestatic

Factory generator for Ethernet address.

Parameters
[in]newAddressEthernet address as a C-style byte array to represent in data
static AftDataEtherAddr::Ptr AftDataEtherAddr::create ( std::string  prefixString)
inlinestatic

Factory generator for Ethernet address.

Parameters
[in]prefixStringEthernet address as a dot-notation string to represent in data
const AftDataBytes& AftDataEtherAddr::data ( ) const
inline
Returns
Returns reference to vector of bytes used for address
const uint8_t* AftDataEtherAddr::dataArray ( ) const
inline
Returns
Reference to base of prefix as uint8_t pointer
virtual const std::string AftDataEtherAddr::dataClass ( ) const
inlinevirtual
Returns
String description of data type

Reimplemented from AftData.

virtual std::ostream& AftDataEtherAddr::description ( std::ostream &  os) const
inlinevirtual

Append a description of the data to an output stream.

Parameters
[in]osReference to output stream to append description to
Returns
Reference to output stream with text description of data appended

Reimplemented from AftData.


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