flexPTP 1.0
An IEEE 1588 PTP implementation designed for microcontrollers
Loading...
Searching...
No Matches
common.h File Reference

This module defines messaging functions for both the slave and master modules. More...

#include "ptp_types.h"

Go to the source code of this file.

Functions

void ptp_init_delay_req_header ()
 
void ptp_send_delay_req_message ()
 
void ptp_send_pdelay_resp_follow_up (const RawPtpMessage *pMsg)
 
void ptp_send_pdelay_resp (const RawPtpMessage *pMsg)
 
void ptp_compute_mean_path_delay_e2e (const TimestampI *pTs, const uint64_t *pCf, TimestampI *pMPD)
 
void ptp_compute_mean_path_delay_p2p (const TimestampI *pTs, const uint64_t *pCf, TimestampI *pMPD)
 
void ptp_common_reset ()
 

Detailed Description

This module defines messaging functions for both the slave and master modules.

Definition in file common.h.

Function Documentation

◆ ptp_common_reset()

void ptp_common_reset ( )

Reset functionality shared with both slave and master.

Definition at line 156 of file common.c.

◆ ptp_compute_mean_path_delay_e2e()

void ptp_compute_mean_path_delay_e2e ( const TimestampI pTs,
const uint64_t *  pCf,
TimestampI pMPD 
)

Compute Mean Path Delay when operating in E2E mode.

Parameters
pTspointer to array holding T1-T4 timestamps
pCfpointer to array holding correction fields associated with T1-T4 timestamps
pMPDpointer to area where the MPD gets stored

Definition at line 128 of file common.c.

◆ ptp_compute_mean_path_delay_p2p()

void ptp_compute_mean_path_delay_p2p ( const TimestampI pTs,
const uint64_t *  pCf,
TimestampI pMPD 
)

Compute Mean Path Delay when operating in P2P mode.

Parameters
pTspointer to array holding T1-T4 timestamps
pCfpointer to array holding correction fields associated with T1-T4 timestamps
pMPDpointer to area where the MPD gets stored

Definition at line 141 of file common.c.

◆ ptp_init_delay_req_header()

void ptp_init_delay_req_header ( )

Initialize Delay_Request header.

Definition at line 20 of file common.c.

◆ ptp_send_delay_req_message()

void ptp_send_delay_req_message ( )

Construct and send Delay_Req message.

Definition at line 39 of file common.c.

◆ ptp_send_pdelay_resp()

void ptp_send_pdelay_resp ( const RawPtpMessage pMsg)

Send PDelay_Resp based on PDelay_Req.

Parameters
pMsgpointer to PDelay_Req message object

Definition at line 91 of file common.c.

◆ ptp_send_pdelay_resp_follow_up()

void ptp_send_pdelay_resp_follow_up ( const RawPtpMessage pMsg)

Send PDelay_Resp_Follow_Up based on already transmitted PDelay_Resp message.

Parameters
pMsgpointer to the PDelay_Resp message that forms the base of the Pdelay_Resp_Follow_Up message

Definition at line 61 of file common.c.