11#define S (gPtpCoreState)
44 delReqMsg.
tx_dm = S.profile.delayMechanism;
void ptp_send_pdelay_resp_follow_up(const RawPtpMessage *pMsg)
void ptp_compute_mean_path_delay_p2p(const TimestampI *pTs, const uint64_t *pCf, TimestampI *pMPD)
void ptp_compute_mean_path_delay_e2e(const TimestampI *pTs, const uint64_t *pCf, TimestampI *pMPD)
static RawPtpMessage pdelRespMsg
whole, compiled PDelay_Resp message
void ptp_send_delay_req_message()
static PtpHeader delReqHeader
header for sending Delay_Reg messages
static RawPtpMessage pdelRespFUpMsg
whole, compiled PDelay_Resp_Follow_Up message
void ptp_init_delay_req_header()
void ptp_send_pdelay_resp(const RawPtpMessage *pMsg)
This module defines messaging functions for both the slave and master modules.
void ptp_write_delay_resp_id_data(void *pPayload, const PtpDelay_RespIdentification *pDRData)
void ptp_extract_header(PtpHeader *pHeader, const void *pPayload)
void ptp_construct_binary_header(void *pData, const PtpHeader *pHeader)
void ptp_write_binary_timestamps(void *pPayload, const TimestampI *ts, uint8_t n)
void ptp_clear_flags(PtpFlags *pFlags)
This module defines functions that deal with actual PTP messages; they can extract or insert headers,...
Core of the PTP implementation. Defines functions for message processing, clock tuning,...
In here reside a multitude of fundamental PTP-related constants and definitions.
#define PTP_PCKT_SIZE_PDELAY_RESP_FOLLOW_UP
Size of a PDelay_Resp_Follow_Up message.
#define PTP_HEADER_LENGTH
Length of the PTP header.
#define PTP_TIMESTAMP_LENGTH
Length of a single timestamp.
#define PTP_PORT_ID_LENGTH
Length of the port identification field.
#define PTP_PORT_ID
PTP port ID on the device.
#define PTP_PCKT_SIZE_PDELAY_RESP
Size of a PDelay_Resp message.
This module defines the fundamental PTP message and state machine type, flags, bitfields and the PTP ...
@ PTP_CON_Delay_Req
Delay Request.
@ PTP_MC_EVENT
Event Message Class.
@ PTP_MC_GENERAL
General Message Class.
@ PTP_MT_PDelay_Resp
Peer Delay Response.
@ PTP_MT_PDelay_Req
Peer Delay Request.
@ PTP_MT_Delay_Req
Delay Request.
@ PTP_MT_PDelay_Resp_Follow_Up
Peer Delay Response Follow Up.
@ PTP_DM_E2E
End-to-End Delay Mechanism.
@ PTP_DM_P2P
Peer-to-Peer Delay Mechanism.
Identification carrying Delay_Resp message.
bool PTP_TWO_STEP
Two Step.
Raw PTP message structure.
PtpDelayMechanism tx_dm
transmit transport type
PtpMessageClass tx_mc
transmit message class
void(* pTxCb)(const struct RawPtpMessage_ *pMsg)
transmit callback function
uint32_t size
Packet size.
TimestampI * pTs
pointer to timestamp
uint8_t data[(128)]
raw packet data
bool ptp_transmit_enqueue(const RawPtpMessage *pMsg)
The entry point of the whole PTP-implementation. Calling reg_task_ptp() initializes the PTP-engine,...
TimestampI * addTime(TimestampI *r, const TimestampI *a, const TimestampI *b)
TimestampI * divTime(TimestampI *r, const TimestampI *a, int divisor)
TimestampI * nsToTsI(TimestampI *r, int64_t ns)
TimestampI * subTime(TimestampI *r, const TimestampI *a, const TimestampI *b)