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

#include <avbts_message.hpp>

Inheritance diagram for PTPMessageAnnounce:
Inheritance graph
Collaboration diagram for PTPMessageAnnounce:
Collaboration graph

Public Member Functions

 PTPMessageAnnounce (IEEE1588Port *port)
 
 ~PTPMessageAnnounce ()
 
bool isBetterThan (PTPMessageAnnounce *msg)
 Compare gramdmaster's capabilities comming on the announce messages against the current grandmaster capabilities. More...
 
unsigned char getGrandmasterPriority1 (void)
 Gets grandmaster's priority1 value. More...
 
unsigned char getGrandmasterPriority2 (void)
 Gets grandmaster's priority2 value. More...
 
ClockQualitygetGrandmasterClockQuality (void)
 Gets grandmaster clock quality. More...
 
uint16_t getStepsRemoved (void)
 Gets the steps removed value. See IEEE 802.1AS clause 10.3.3. More...
 
void getGrandmasterIdentity (char *identity)
 Gets grandmaster identity value. More...
 
ClockIdentity getGrandmasterClockIdentity ()
 Gets grandmaster's clockIdentity value. More...
 
void processMessage (IEEE1588Port *port)
 Processes PTP message. More...
 
void sendPort (IEEE1588Port *port, PortIdentity *destIdentity)
 Assembles PTPMessageAnnounce message on the IEEE1588Port payload. More...
 
- Public Member Functions inherited from PTPMessageCommon
 PTPMessageCommon (IEEE1588Port *port)
 Creates the PTPMessageCommon interface. More...
 
virtual ~PTPMessageCommon (void)
 
unsigned char * getFlags (void)
 Gets a pointer to the flags field within the PTP message. More...
 
uint16_t getSequenceId (void)
 Gets the sequenceId value within a ptp message. More...
 
void setSequenceId (uint16_t seq)
 Sets the sequence ID value to the PTP message. More...
 
MessageType getMessageType (void)
 Gets the MessageType field within the PTP message. More...
 
long long getCorrectionField (void)
 Gets the correctionField value in a Little-Endian format. More...
 
void setCorrectionField (long long correctionAmount)
 Sets the correction field. It expects the host format. More...
 
void getPortIdentity (PortIdentity *identity)
 Gets PortIdentity field. More...
 
void setPortIdentity (PortIdentity *identity)
 Sets PortIdentity value. More...
 
Timestamp getTimestamp (void)
 Gets the current Timestamp value from the PTP message. More...
 
uint32_t getTimestampCounterValue (void)
 Gets the timestamp counter value set during the RX timestamp method. More...
 
void setTimestamp (Timestamp &timestamp)
 Sets the timestamp value. More...
 
bool garbage ()
 Gets the garbage collection status. More...
 
bool isSenderEqual (PortIdentity portIdentity)
 Determine whether the message was sent by given communication technology, uuid, and port id fields. More...
 
void buildCommonHeader (uint8_t *buf)
 Builds PTP common header. More...
 

Friends

PTPMessageCommonbuildPTPMessage (char *buf, int size, LinkLayerAddress *remote, IEEE1588Port *port)
 Builds a PTP message. More...
 

Additional Inherited Members

- Protected Member Functions inherited from PTPMessageCommon
 PTPMessageCommon (void)
 
- Protected Attributes inherited from PTPMessageCommon
unsigned char versionPTP
 
uint16_t versionNetwork
 
MessageType messageType
 
PortIdentitysourcePortIdentity
 
uint16_t sequenceId
 
LegacyMessageType control
 
unsigned char flags [2]
 
uint16_t messageLength
 
char logMeanMessageInterval
 
long long correctionField
 
unsigned char domainNumber
 
Timestamp _timestamp
 
unsigned _timestamp_counter_value
 
bool _gc
 

Detailed Description

Provides the PTPMessageAnnounce interface The PTPMessageAnnounce class is used to create announce messages on the 802.1AS format when building the ptp messages.

Constructor & Destructor Documentation

PTPMessageAnnounce::PTPMessageAnnounce ( IEEE1588Port port)

Creates the PTPMessageAnnounce interface

PTPMessageAnnounce::~PTPMessageAnnounce ( )

Destroys the PTPMessageAnnounce interface

Member Function Documentation

ClockIdentity PTPMessageAnnounce::getGrandmasterClockIdentity ( void  )
inline

Gets grandmaster's clockIdentity value.

Returns
Grandmaster ClockIdentity
ClockQuality* PTPMessageAnnounce::getGrandmasterClockQuality ( void  )
inline

Gets grandmaster clock quality.

Returns
Pointer to a ClockQuality object.
void PTPMessageAnnounce::getGrandmasterIdentity ( char *  identity)
inline

Gets grandmaster identity value.

Parameters
identity[out] Grandmaster identity
Returns
void
unsigned char PTPMessageAnnounce::getGrandmasterPriority1 ( void  )
inline

Gets grandmaster's priority1 value.

Returns
Grandmaster priority1
unsigned char PTPMessageAnnounce::getGrandmasterPriority2 ( void  )
inline

Gets grandmaster's priority2 value.

Returns
Grandmaster priority2
uint16_t PTPMessageAnnounce::getStepsRemoved ( void  )
inline

Gets the steps removed value. See IEEE 802.1AS clause 10.3.3.

Returns
steps removed value
bool PTPMessageAnnounce::isBetterThan ( PTPMessageAnnounce msg)

Compare gramdmaster's capabilities comming on the announce messages against the current grandmaster capabilities.

Parameters
msg[in] PTPMessageAnnounce to be compared
Returns
TRUE if it is better. FALSE otherwise.
void PTPMessageAnnounce::processMessage ( IEEE1588Port port)
virtual

Processes PTP message.

Parameters
portIEEE1588Port
Returns
void

Reimplemented from PTPMessageCommon.

void PTPMessageAnnounce::sendPort ( IEEE1588Port port,
PortIdentity destIdentity 
)

Assembles PTPMessageAnnounce message on the IEEE1588Port payload.

Parameters
portIEEE1588Port where the message will be assembled
destIdentity[in] Destination PortIdentity
Returns
void

Friends And Related Function Documentation

PTPMessageCommon* buildPTPMessage ( char *  buf,
int  size,
LinkLayerAddress remote,
IEEE1588Port port 
)
friend

Builds a PTP message.

Parameters
buf[in] message buffer to send
sizemessage length
remoteDestination link layer address
port[in] IEEE1588 port
Returns
PTP message instance of PTPMessageCommon

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