Zephyr API 3.6.99
Loading...
Searching...
No Matches
gptp.h File Reference

Public functions for the Precision Time Protocol Stack. More...

#include <zephyr/net/net_core.h>
#include <zephyr/net/ptp_time.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  gptp_scaled_ns
 Scaled Nanoseconds. More...
 
struct  gptp_uscaled_ns
 UScaled Nanoseconds. More...
 
struct  gptp_port_identity
 Port Identity. More...
 
struct  gptp_flags
 gPTP message flags More...
 
struct  gptp_hdr
 gPTP message header More...
 
struct  gptp_phase_dis_cb
 Phase discontinuity callback structure. More...
 
struct  gptp_clk_src_time_invoke_params
 ClockSourceTime.invoke function parameters. More...
 

Typedefs

typedef void(* gptp_phase_dis_callback_t) (uint8_t *gm_identity, uint16_t *time_base, struct gptp_scaled_ns *last_gm_ph_change, double *last_gm_freq_change)
 Define callback that is called after a phase discontinuity has been sent by the grandmaster.
 
typedef void(* gptp_port_cb_t) (int port, struct net_if *iface, void *user_data)
 Callback used while iterating over gPTP ports.
 

Functions

void gptp_register_phase_dis_cb (struct gptp_phase_dis_cb *phase_dis, gptp_phase_dis_callback_t cb)
 Register a phase discontinuity callback.
 
void gptp_unregister_phase_dis_cb (struct gptp_phase_dis_cb *phase_dis)
 Unregister a phase discontinuity callback.
 
void gptp_call_phase_dis_cb (void)
 Call a phase discontinuity callback function.
 
int gptp_event_capture (struct net_ptp_time *slave_time, bool *gm_present)
 Get gPTP time.
 
char * gptp_sprint_clock_id (const uint8_t *clk_id, char *output, size_t output_len)
 Utility function to print clock id to a user supplied buffer.
 
void gptp_foreach_port (gptp_port_cb_t cb, void *user_data)
 Go through all the gPTP ports and call callback for each of them.
 
struct gptp_domain * gptp_get_domain (void)
 Get gPTP domain.
 
void gptp_clk_src_time_invoke (struct gptp_clk_src_time_invoke_params *arg)
 This interface is used by the ClockSource entity to provide time to the ClockMaster entity of a time-aware system.
 
struct gptp_hdrgptp_get_hdr (struct net_pkt *pkt)
 Return pointer to gPTP packet header in network packet.
 

Detailed Description

Public functions for the Precision Time Protocol Stack.