SZSPTP ez430-RF2480 1.0

ZigBee Sensor Network with synchronized time and time-stamped measurements.
PTP Event Messages
+ Collaboration diagram for PTP Event Messages:

Functions

void ptp_MsgSyncSnd ()
 
void ptp_MsgSyncRcv (ptp_octet *pBuf)
 Receive Sync message. More...
 
void ptp_MsgDelayReqSnd ()
 Send Delay_Req message. More...
 
void ptp_MsgDelayReqRcv (ptp_octet *pBuf)
 Receive Delay_Req message. More...
 
ptp_uinteger8 ptp_MsgPdelayReqSnd (ptp_uinteger8 portNumber)
 Send PDelay_Req message. More...
 
void ptp_MsgPdelayReqCheck ()
 Check for PDelay_Req message. More...
 
void ptp_MsgPdelayReqRcv (ptp_octet *pBuf, PTP_TimeStamp *t2, ptp_uinteger8 portNumber)
 Receive PDelay_Req message. More...
 
ptp_uinteger8 ptp_MsgPdelayRespSnd ()
 Send Pdelay_Resp message. More...
 
void ptp_MsgPdelayRespRcv (ptp_octet *pBuf, PTP_TimeStamp *t4, ptp_uinteger8 portNumber)
 Receive Pdelay_Resp message. More...
 

Detailed Description

Function Documentation

void ptp_MsgDelayReqRcv ( ptp_octet pBuf)

Receive Delay_Req message.

This function acts when receive a Delay_Req message from the network. Not implemented.

Parameters
[in]pBufPointer to the data to parse

Definition at line 271 of file ptp_messages.c.

void ptp_MsgDelayReqSnd ( )

Send Delay_Req message.

This function sends a Delay_Req message of E2E mechanism. Not implemented.

Definition at line 260 of file ptp_messages.c.

void ptp_MsgPdelayReqCheck ( )

Check for PDelay_Req message.

This function checks if there is a PDelayReq on the queue to be answered.

Definition at line 365 of file ptp_messages.c.

References ptp_MsgPdelayRespSnd(), ptp_P2PDelayReqQueueRead, and ptp_P2PDelayReqQueueWrite.

Referenced by ptp_processPDelayReq().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ptp_MsgPdelayReqRcv ( ptp_octet pBuf,
PTP_TimeStamp t2,
ptp_uinteger8  portNumber 
)

Receive PDelay_Req message.

This function acts when receive a PDelay_Req message from the network. IEC 61588-2009 / IEEE 1588-2008 sections 11.4.3 a) and 13.9

Parameters
[in]pBufPointer to the data to parse
[in]t2T2 for measure of mean path delay on P2P mechanism
[in]portNumberPort number of receiver

Definition at line 313 of file ptp_messages.c.

References ptp_adjTime(), ptp_MustAdjustAtPDelayReq, ptp_P2PDelayReqQueueRead, ptp_P2PDelayReqQueueWrite, PTP_P2PPDELAYREQQUEUESIZE, ptp_rcvInt64(), ptp_rcvOctets(), ptp_rcvUInt16(), ptp_rcvUInt32(), and ptp_rcvUInt48sc().

Referenced by ptp_rcvmessage().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ptp_uinteger8 ptp_MsgPdelayReqSnd ( ptp_uinteger8  portNumber)

Send PDelay_Req message.

This function sends a PDelay_Req message of P2P mechanism. IEC 61588-2009 / IEEE 1588-2008 sections 13.9 and 11.4.3

Parameters
[in]portNumberPort number of the sender
Returns
1 on success, 0 on fail.

Definition at line 284 of file ptp_messages.c.

References nwk_getNeighborAddress(), ptp_endFrame(), ptp_getCurrentTime(), ptp_MsgHeaderSnd(), PTP_MSGTYPE_PDELAY_REQ, ptp_sequencePDelayReqId, ptp_snd(), ptp_sndUInt32(), ptp_sndUInt48sc(), ptp_startFrame(), and PTP_ZEROSEQ64.

Referenced by ptp_process().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ptp_MsgPdelayRespRcv ( ptp_octet pBuf,
PTP_TimeStamp t4,
ptp_uinteger8  portNumber 
)

Receive Pdelay_Resp message.

This function acts when receive a Pdelay_Resp message from the network. IEC 61588-2009 / IEEE 1588-2008 sections 11.4.3 d) and 13.10

Parameters
[in]pBufPointer to the data to parse
[in]t4T4 for measure of mean path delay on P2P mechanism
[in]portNumberPort number of receiver

Definition at line 425 of file ptp_messages.c.

References ptp_adjTime(), ptp_MustAdjustAtPDelayReq, ptp_rcvInt64(), ptp_rcvUInt16(), ptp_rcvUInt32(), ptp_rcvUInt48sc(), ptp_sequencePDelayReqId, and ptp_timeDiff().

Referenced by ptp_rcvmessage().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ptp_uinteger8 ptp_MsgPdelayRespSnd ( )

Send Pdelay_Resp message.

This function sends a Pdelay_Resp message of P2P mechanism. IEC 61588-2009 / IEEE 1588-2008 sections 11.4.3 b) and 13.10

Returns
1 on success, 0 on fail.

Definition at line 379 of file ptp_messages.c.

References nwk_getNeighborAddress(), nwk_getNeighborForeignPort(), ptp_endFrame(), ptp_getCurrentTime(), ptp_MsgHeaderSnd(), PTP_MSGTYPE_PDELAY_RESP, ptp_P2PDelayReqQueueRead, PTP_P2PPDELAYREQQUEUESIZE, ptp_snd(), ptp_sndUInt16(), ptp_sndUInt32(), ptp_sndUInt48sc(), ptp_startFrame(), and ptp_timeDiff().

Referenced by ptp_MsgPdelayReqCheck().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ptp_MsgSyncRcv ( ptp_octet pBuf)

Receive Sync message.

This function acts when receive a Sync message from the network. Not implemented.

Parameters
[in]pBufPointer to the data to parse

Definition at line 251 of file ptp_messages.c.

void ptp_MsgSyncSnd ( )

Parameters
[in]pBufPointer to the data to parse Zero suffix

This function adds a sequence of zeros at the end of the message.

Parameters
[in]sizeSize of suffix to add
[in]pBufPointer to the data to parse Send Sync message

This function sends a Sync message of E2E mechanism. Not implemented.

Definition at line 240 of file ptp_messages.c.