gPTP Documentation
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LinkLayerAddress Class Reference

#include <avbts_osnet.hpp>

Inheritance diagram for LinkLayerAddress:
Inheritance graph
Collaboration diagram for LinkLayerAddress:
Collaboration graph

Public Member Functions

 LinkLayerAddress ()
 
 LinkLayerAddress (uint64_t address_scalar)
 
 LinkLayerAddress (uint8_t *address_octet_array)
 
bool operator== (const LinkLayerAddress &cmp) const
 Operator '==' overloading method. It provides a comparison between cmp and the class ethernet address defined at its constructor. More...
 
bool operator< (const LinkLayerAddress &cmp) const
 Operator '<' overloading method. It provides a comparison between cmp and the class ethernet address defined at its constructor. More...
 
bool operator> (const LinkLayerAddress &cmp) const
 Operator '>' overloading method. It provides a comparison between cmp and the class ethernet address defined at its constructor. More...
 
void toOctetArray (uint8_t *address_octet_array)
 Gets first 6 bytes from ethernet address of object LinkLayerAddress. More...
 

Detailed Description

LinkLayerAddress Class Provides methods for initializing and comparing ethernet addresses.

Constructor & Destructor Documentation

LinkLayerAddress::LinkLayerAddress ( )
inline

Default constructor

LinkLayerAddress::LinkLayerAddress ( uint64_t  address_scalar)
inline

Receives a 64bit scalar address and initializes its internal octet array with the first 48 bits.

Parameters
address_scalar64 bit address
LinkLayerAddress::LinkLayerAddress ( uint8_t *  address_octet_array)
inline

Receives an address as an array of octets and copies the first 6 over the internal ethernet address.

Parameters
address_octet_arrayArray of octets containing the address
Todo:
Verify if address_octet_array is not null

Member Function Documentation

bool LinkLayerAddress::operator< ( const LinkLayerAddress cmp) const
inline

Operator '<' overloading method. It provides a comparison between cmp and the class ethernet address defined at its constructor.

Parameters
cmpValue to be compared against.
Returns
TRUE if cmp is lower than addr, FALSE otherwise.
bool LinkLayerAddress::operator== ( const LinkLayerAddress cmp) const
inline

Operator '==' overloading method. It provides a comparison between cmp and the class ethernet address defined at its constructor.

Parameters
cmpValue to be compared against.
Returns
TRUE if they are equal; FALSE otherwise.
bool LinkLayerAddress::operator> ( const LinkLayerAddress cmp) const
inline

Operator '>' overloading method. It provides a comparison between cmp and the class ethernet address defined at its constructor.

Parameters
cmpValue to be compared against.
Returns
TRUE if cmp is bigger than addr, FALSE otherwise.
void LinkLayerAddress::toOctetArray ( uint8_t *  address_octet_array)
inline

Gets first 6 bytes from ethernet address of object LinkLayerAddress.

Parameters
address_octet_array[out] Pointer to store the ethernet address information.
Returns
void
Todo:
Verify if address_octet_array is not null

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