Define all platform-dependent functions that are required to send and receive PTP messages and record their timestamps.
More...
Functions |
void | sendAnnounceMsg (PTPState *ptp) |
| Send an Announce message over the network, with content of message as specified in 13.5.
|
void | sendSyncMsg (PTPState *ptp) |
| Send a Sync message over the network, with content of message as specified in 13.6.
|
void | sendFollowUpMsg (PTPState *ptp) |
| Send a Follow_Up message over the network, with content of message as specified in 13.7.
|
void | sendDelayReqMsg (PTPState *ptp) |
| Send a Delay_Req message over the network, with content of message as specified in 13.6.
|
void | sendDelayRespMsg (PTPState *ptp, DelayReqMsg *msg) |
| Send a Delay_Resp message over the network, with content of message as specified in 13.8.
|
void | sendManagementMsg (PTPState *ptp, ManagementMsg *msg) |
| Send a Management message over the network, with content of message as specified in 15.4.
|
void | getSyncEventEgressTimestamp (PTPState *ptp) |
| Set PTPState.syncEventEgressTimestamp to the timestamp at which the latest Sync message was sent.
|
Boolean | getSyncEventIngressTimestamp (PTPState *ptp, UInteger16 seqId) |
| Set PTPState.syncEventIngressTimestamp to the timestamp at which the latest Sync message was received.
|
void | getDelayEventEgressTimestamp (PTPState *ptp) |
| Set PTPState.delayEventEgressTimestamp to the timestamp at which the latest Delay_Req message was sent.
|
Boolean | getDelayEventIngressTimestamp (PTPState *ptp, UInteger16 seqId) |
| Set PTPState.delayEventIngressTimestamp to the timestamp at which the latest Delay_Req message was received.
|
void | readHeader (Header *header) |
| Parse received message into provided Header data structure, but do not update PTP state (13.1).
|
void | readAnnounceMsg (AnnounceMsg *msg) |
| Parse received Announce message into provided AnnounceMsg data structure, but do not update PTP state (13.5).
|
void | readSyncMsg (SyncMsg *msg) |
| Parse received Sync message into provided SyncMsg data structure, but do not update PTP state (13.6).
|
void | readFollowUpMsg (FollowUpMsg *msg) |
| Parse received Follow_Up message into provided FollowUpMsg data structure, but do not update PTP state (13.7).
|
void | readDelayReqMsg (DelayReqMsg *msg) |
| Parse received Delay_Req message into provided DelayReqMsg data structure, but do not update PTP state (13.6).
|
void | readDelayRespMsg (DelayRespMsg *msg) |
| Parse received Delay_Resp message into provided DelayRespMsg data structure, but do not update PTP state (13.8).
|
void | readManagementMsg (ManagementMsg *msg) |
| Parse received Management message into provided ManagementMsg data structure, but do not update PTP state (15.1).
|
void | clearIngressTimestamp () |
| Clear receive timestamp.
|
Define all platform-dependent functions that are required to send and receive PTP messages and record their timestamps.
The implementation of these functions will depend on how PTP interacts with the communication network and how messages are timestamped.
- Author:
- Michael Zimmer (mzimmer@eecs.berkeley.edu)
- Version:
- Id:
- ptp-msg.h 51 2011-04-12 01:19:19Z mzimmer
Definition in file ptp-msg.h.
Send an Announce message over the network, with content of message as specified in 13.5.
- Parameters:
-
[in,out] | ptp | The current state of PTP. |
Send an Announce message over the network, with content of message as specified in 13.5.
This implementation uses current data from the PTPState ptp and the current time to fill the buffer location uip_appdata with the Announce message. Once the message is correctly in the buffer, the uIP protocol stack is called to send the message.
Definition at line 81 of file ptp-msg.c.
Send a Delay_Req message over the network, with content of message as specified in 13.6.
- Parameters:
-
[in,out] | ptp | The current state of PTP. |
Send a Delay_Req message over the network, with content of message as specified in 13.6.
This implementation uses current data from the PTPState ptp to fill the buffer location uip_appdata with the Delay_Req message. Once the message is correctly in the buffer, the uIP protocol stack is called to send the message.
Definition at line 224 of file ptp-msg.c.
Send a Delay_Resp message over the network, with content of message as specified in 13.8.
- Parameters:
-
[in,out] | ptp | The current state of PTP. |
[in] | msg | The Delay_Req message that is being responded to. |
Send a Delay_Resp message over the network, with content of message as specified in 13.8.
This implementation uses current data from the PTPState ptp and the DelayReqMsg msg for which this message is a response to fill the buffer location uip_appdata with the Delay_Resp message. Once the message is correctly in the buffer, the uIP protocol stack is called to send the message.
Definition at line 264 of file ptp-msg.c.
Send a Follow_Up message over the network, with content of message as specified in 13.7.
- Parameters:
-
[in,out] | ptp | The current state of PTP. |
Send a Follow_Up message over the network, with content of message as specified in 13.7.
This implementation uses current data from the PTPState ptp to fill the buffer location uip_appdata with the Follow_Up message. Once the message is correctly in the buffer, the uIP protocol stack is called to send the message.
Definition at line 188 of file ptp-msg.c.
Send a Management message over the network, with content of message as specified in 15.4.
- Parameters:
-
[in,out] | ptp | The current state of PTP. |
[in] | msg | The Management message being sent. |
Send a Management message over the network, with content of message as specified in 15.4.
This implementation uses current data from the PTPState ptp and the ManagementMsg msg which is being sent to fill the buffer location uip_appdata with the Management message. Once the message is correctly in the buffer, the uIP protocol stack is called to send the message.
Definition at line 304 of file ptp-msg.c.
Send a Sync message over the network, with content of message as specified in 13.6.
- Parameters:
-
[in,out] | ptp | The current state of PTP. |
Send a Sync message over the network, with content of message as specified in 13.6.
This implementation uses current data from the PTPState ptp and the current time to fill the buffer location uip_appdata with the Sync message. Once the message is correctly in the buffer, the uIP protocol stack is called to send the message.
Definition at line 140 of file ptp-msg.c.