gPTP Documentation
|
#include <avbts_message.hpp>
Public Member Functions | |
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 ×tamp) |
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... | |
virtual void | processMessage (IEEE1588Port *port) |
Generic interface for processing PTP message. More... | |
void | buildCommonHeader (uint8_t *buf) |
Builds PTP common header. More... | |
Protected Member Functions | |
PTPMessageCommon (void) | |
Protected Attributes | |
unsigned char | versionPTP |
uint16_t | versionNetwork |
MessageType | messageType |
PortIdentity * | sourcePortIdentity |
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 |
Friends | |
PTPMessageCommon * | buildPTPMessage (char *buf, int size, LinkLayerAddress *remote, IEEE1588Port *port) |
Builds a PTP message. More... | |
Provides the PTPMessage common interface used during building of PTP messages.
|
inlineprotected |
Default constructor
PTPMessageCommon::PTPMessageCommon | ( | IEEE1588Port * | port | ) |
Creates the PTPMessageCommon interface.
port | IEEE1588Port where the message interface is connected to. |
|
virtual |
Destroys PTPMessageCommon interface
void PTPMessageCommon::buildCommonHeader | ( | uint8_t * | buf | ) |
Builds PTP common header.
buf | [out] PTP message |
|
inline |
Gets the garbage collection status.
|
inline |
Gets the correctionField value in a Little-Endian format.
|
inline |
Gets a pointer to the flags field within the PTP message.
|
inline |
Gets the MessageType field within the PTP message.
void PTPMessageCommon::getPortIdentity | ( | PortIdentity * | identity | ) |
|
inline |
Gets the sequenceId value within a ptp message.
|
inline |
|
inline |
Gets the timestamp counter value set during the RX timestamp method.
bool PTPMessageCommon::isSenderEqual | ( | PortIdentity | portIdentity | ) |
Determine whether the message was sent by given communication technology, uuid, and port id fields.
portIdentity | PortIdentity value |
|
virtual |
Generic interface for processing PTP message.
port | IEEE1588 port |
Reimplemented in PTPMessagePathDelayRespFollowUp, PTPMessagePathDelayResp, PTPMessagePathDelayReq, PTPMessageFollowUp, PTPMessageSync, and PTPMessageAnnounce.
|
inline |
Sets the correction field. It expects the host format.
correctionAmount |
void PTPMessageCommon::setPortIdentity | ( | PortIdentity * | identity | ) |
|
inline |
Sets the sequence ID value to the PTP message.
seq | Sequence id value to be set. |
|
inline |
|
friend |
Builds a PTP message.
buf | [in] message buffer to send |
size | message length |
remote | Destination link layer address |
port | [in] IEEE1588 port |
|
protected |
Garbage collection flag
|
protected |
PTP message timestamp
|
protected |
PTP timestamp counter value
|
protected |
Control message type of LegacyMessageType
|
protected |
Correction Field (IEEE 1588-2008 table 21)
|
protected |
PTP domain number
|
protected |
PTP flags field
|
protected |
LogMessageInterval (IEEE 1588-2008 table 24)
|
protected |
PTP message length
|
protected |
MessageType to be built
|
protected |
PTP message sequence ID
|
protected |
PortIdentity from source
|
protected |
Network version
|
protected |
PTP version