#include "slave.h"
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
#include "common.h"
#include "format_utils.h"
#include "msg_utils.h"
#include "ptp_types.h"
#include "settings_interface.h"
#include "stats.h"
#include "task_ptp.h"
#include "timeutils.h"
#include "ptp_core.h"
#include "ptp_defs.h"
#include "minmax.h"
Go to the source code of this file.
◆ PTP_FC_SKEW_CORRECTION_CYCLES
#define PTP_FC_SKEW_CORRECTION_CYCLES (4) |
Fast compensation: no. of skew correction cycles.
Definition at line 45 of file slave.c.
◆ PTP_FC_TIME_CORRECTION_CYCLES
#define PTP_FC_TIME_CORRECTION_CYCLES (1) |
Fast compensation: no. of time correction cycles.
Definition at line 46 of file slave.c.
◆ PTP_FC_TIME_PROPAGATION_CYCLES
#define PTP_FC_TIME_PROPAGATION_CYCLES (2) |
◆ ptp_commence_e2e_correction()
static void ptp_commence_e2e_correction |
( |
| ) |
|
|
static |
◆ ptp_commence_p2p_correction()
static void ptp_commence_p2p_correction |
( |
uint32_t |
pdelRespSeqId | ) |
|
|
static |
Initiate the P2P correction. This piece of code has been extracted from the ptp_slave_process_message() to prevent code duplication.
- Parameters
-
pdelRespSeqId | sequence ID of the last completed PDel_Req...PDel_Resp(_Follow_Up) cycle |
Definition at line 287 of file slave.c.
◆ ptp_perform_correction()
static void ptp_perform_correction |
( |
| ) |
|
|
static |
Perform clock correction based on gathered timestamps.
Definition at line 52 of file slave.c.
◆ ptp_slave_destroy()
void ptp_slave_destroy |
( |
| ) |
|
Destroy the PTP slave.
Definition at line 484 of file slave.c.
◆ ptp_slave_disable()
void ptp_slave_disable |
( |
| ) |
|
Stop PTP slave (autonomous) operation.
Definition at line 555 of file slave.c.
◆ ptp_slave_enable()
void ptp_slave_enable |
( |
| ) |
|
Start PTP slave (autonomous) operation.
Definition at line 547 of file slave.c.
◆ ptp_slave_init()
Initialize the PTP slave.
Definition at line 476 of file slave.c.
◆ ptp_slave_process_message()
Process PTP packet addressed to a slave clock.
- Parameters
-
pRawMsg | pointer to the raw PTP message |
pHeader | pointer to the extracted PTP header |
Definition at line 300 of file slave.c.
◆ ptp_slave_reset()
Reset the PTP slave.
Definition at line 488 of file slave.c.
◆ ptp_slave_tick()
Tick the slave module.
Definition at line 520 of file slave.c.
◆ ptp_tune_clock()
static void ptp_tune_clock |
( |
float |
tuning_ppb | ) |
|
|
static |
Clock tuning.
- Parameters
-
tuning_ppb | clock tuning in PPB |
Definition at line 34 of file slave.c.