Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
gptp.h File Reference

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

#include <net/net_core.h>
#include <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
 
struct  gptp_hdr
 
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. More...
 
typedef void(* gptp_port_cb_t) (int port, struct net_if *iface, void *user_data)
 Callback used while iterating over gPTP ports. More...
 

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. More...
 
void gptp_unregister_phase_dis_cb (struct gptp_phase_dis_cb *phase_dis)
 Unregister a phase discontinuity callback. More...
 
void gptp_call_phase_dis_cb (void)
 Call a phase discontinuity callback function. More...
 
int gptp_event_capture (struct net_ptp_time *slave_time, bool *gm_present)
 Get gPTP time. More...
 
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. More...
 
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. More...
 
struct gptp_domain * gptp_get_domain (void)
 Get gPTP domain. More...
 
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. More...
 
struct gptp_hdrgptp_get_hdr (struct net_pkt *pkt)
 Return pointer to gPTP packet header in network packet. More...
 

Detailed Description

Public functions for the Precision Time Protocol Stack.