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

#include <avbts_port.hpp>

Collaboration diagram for PortIdentity:
Collaboration graph

Public Member Functions

 PortIdentity ()
 
 PortIdentity (uint8_t *clock_id, uint16_t *portNumber)
 Constructs PortIdentity interface. More...
 
bool operator!= (const PortIdentity &cmp) const
 Implements the operator '!=' overloading method. Compares clock_id and portNumber. More...
 
bool operator== (const PortIdentity &cmp) const
 Implements the operator '==' overloading method. Compares clock_id and portNumber. More...
 
bool operator< (const PortIdentity &cmp) const
 Implements the operator '<' overloading method. Compares clock_id and portNumber. More...
 
bool operator> (const PortIdentity &cmp) const
 Implements the operator '>' overloading method. Compares clock_id and portNumber. More...
 
void getClockIdentityString (uint8_t *id)
 Gets the ClockIdentity string. More...
 
void setClockIdentity (ClockIdentity clock_id)
 Sets the ClockIdentity. More...
 
ClockIdentity getClockIdentity (void)
 Gets the clockIdentity value. More...
 
void getPortNumberNO (uint16_t *id)
 Gets the port number following the network byte order, i.e. Big-Endian. More...
 
void getPortNumber (uint16_t *id)
 Gets the port number in the host byte order, which can be either Big-Endian or Little-Endian, depending on the processor where it is running. More...
 
void setPortNumber (uint16_t *id)
 Sets the Port number. More...
 

Detailed Description

PortIdentity interface Defined at IEEE 802.1AS Clause 8.5.2

Constructor & Destructor Documentation

PortIdentity::PortIdentity ( )
inline

Default Constructor

PortIdentity::PortIdentity ( uint8_t *  clock_id,
uint16_t *  portNumber 
)
inline

Constructs PortIdentity interface.

Parameters
clock_idClock ID value as defined at IEEE 802.1AS Clause 8.5.2.2
portNumberPort Number

Member Function Documentation

ClockIdentity PortIdentity::getClockIdentity ( void  )
inline

Gets the clockIdentity value.

Returns
A copy of Clock identity value.
void PortIdentity::getClockIdentityString ( uint8_t *  id)
inline

Gets the ClockIdentity string.

Parameters
id[out] Pointer to an array of octets.
Returns
void
void PortIdentity::getPortNumber ( uint16_t *  id)
inline

Gets the port number in the host byte order, which can be either Big-Endian or Little-Endian, depending on the processor where it is running.

Parameters
idPort number
Returns
void
void PortIdentity::getPortNumberNO ( uint16_t *  id)
inline

Gets the port number following the network byte order, i.e. Big-Endian.

Parameters
id[out] Port number
Returns
void
bool PortIdentity::operator!= ( const PortIdentity cmp) const
inline

Implements the operator '!=' overloading method. Compares clock_id and portNumber.

Parameters
cmpConstant PortIdentity value to be compared against.
Returns
TRUE if the comparison value differs from the object's PortIdentity value. FALSE otherwise.
bool PortIdentity::operator< ( const PortIdentity cmp) const
inline

Implements the operator '<' overloading method. Compares clock_id and portNumber.

Parameters
cmpConstant PortIdentity value to be compared against.
Returns
TRUE if the comparison value is lower than the object's PortIdentity value. FALSE otherwise.
bool PortIdentity::operator== ( const PortIdentity cmp) const
inline

Implements the operator '==' overloading method. Compares clock_id and portNumber.

Parameters
cmpConstant PortIdentity value to be compared against.
Returns
TRUE if the comparison value equals to the object's PortIdentity value. FALSE otherwise.
bool PortIdentity::operator> ( const PortIdentity cmp) const
inline

Implements the operator '>' overloading method. Compares clock_id and portNumber.

Parameters
cmpConstant PortIdentity value to be compared against.
Returns
TRUE if the comparison value is greater than the object's PortIdentity value. FALSE otherwise.
void PortIdentity::setClockIdentity ( ClockIdentity  clock_id)
inline

Sets the ClockIdentity.

Parameters
clock_idClock Identity to be set.
Returns
void
void PortIdentity::setPortNumber ( uint16_t *  id)
inline

Sets the Port number.

Parameters
id[in] Port number
Returns
void

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