#include <ieee1588.hpp>
Provides a ClockIdentity abstraction See IEEE 802.1AS-2011 Clause 8.5.2.2
ClockIdentity::ClockIdentity |
( |
| ) |
|
|
inline |
Default constructor. Sets ID to zero
ClockIdentity::ClockIdentity |
( |
uint8_t * |
id | ) |
|
|
inline |
Constructs the object and sets its ID.
- Parameters
-
id | [in] clock id as an octet array |
std::string ClockIdentity::getIdentityString |
( |
| ) |
|
Gets the identity string from the ClockIdentity object.
- Returns
- String containing the clock identity
void ClockIdentity::getIdentityString |
( |
uint8_t * |
id | ) |
|
|
inline |
Gets the identity string from the ClockIdentity object.
- Parameters
-
- Returns
- void
bool ClockIdentity::operator!= |
( |
const ClockIdentity & |
cmp | ) |
const |
|
inline |
Implements the operator '!=' overloading method.
- Parameters
-
- Returns
- TRUE if cmp differs from the object's clock identity. FALSE otherwise.
Implements the operator '<' overloading method.
- Parameters
-
- Returns
- TRUE if cmp value is lower than the object's clock identity value. FALSE otherwise.
bool ClockIdentity::operator== |
( |
const ClockIdentity & |
cmp | ) |
const |
|
inline |
Implements the operator '==' overloading method.
- Parameters
-
- Returns
- TRUE if cmp equals to the object's clock identity. FALSE otherwise
Implements the operator '>' overloading method.
- Parameters
-
- Returns
- TRUE if cmp value is greater than the object's clock identity value. FALSE otherwise
void ClockIdentity::print |
( |
const char * |
str | ) |
|
|
inline |
This method is only enabled at compiling time. When enabled, it prints on the stderr output the clock identity information.
- Parameters
-
str | [in] String to be print out before the clock identity value |
- Returns
- void
void ClockIdentity::set |
( |
uint8_t * |
id | ) |
|
|
inline |
Set the clock id to the object.
- Parameters
-
- Returns
- void
Set clock id based on the link layer address. Clock id is 8 octets long whereas link layer address is 6 octets long and it is turned into a clock identity as per the 802.1AS standard described in clause 8.5.2.2.
- Parameters
-
address | Link layer address |
- Returns
- void
The documentation for this class was generated from the following file: