![]() |
flexPTP 1.0
An IEEE 1588 PTP implementation designed for microcontrollers
|
This module features functions to tweak around the PTP engine's almost every property. More...
Go to the source code of this file.
This module features functions to tweak around the PTP engine's almost every property.
Definition in file settings_interface.h.
uint32_t ptp_get_addend | ( | ) |
Get addend. Only available when using the ADDEND interface.
Definition at line 54 of file settings_interface.c.
int8_t ptp_get_announce_log_period | ( | ) |
Get the logarithmic Announce period code.
Definition at line 134 of file settings_interface.c.
PtpClockAccuracy ptp_get_clock_accuracy | ( | ) |
Get clock accuracy.
Definition at line 181 of file settings_interface.c.
PtpClockClass ptp_get_clock_class | ( | ) |
Get device clock class.
Definition at line 173 of file settings_interface.c.
int32_t ptp_get_clock_offset | ( | ) |
Get clock offset in nanoseconds.
Definition at line 20 of file settings_interface.c.
uint16_t ptp_get_clock_variance | ( | ) |
Get clock variance.
Definition at line 189 of file settings_interface.c.
uint64_t ptp_get_coarse_threshold | ( | ) |
Get PTP coarse correction time error tigger value.
Definition at line 147 of file settings_interface.c.
uint64_t ptp_get_current_master_clock_identity | ( | ) |
Get clock ID of the master that the PTP engine currently follows.
Definition at line 33 of file settings_interface.c.
PtpDelayMechanism ptp_get_delay_mechanism | ( | ) |
Get the PTP delay mechanism.
Definition at line 80 of file settings_interface.c.
int8_t ptp_get_delay_req_log_period | ( | ) |
Get logarithmic PTP message period designator code of Delay_Request queries.
Definition at line 116 of file settings_interface.c.
uint8_t ptp_get_domain | ( | ) |
Get the PTP domain the engine operates in.
Definition at line 45 of file settings_interface.c.
const char * ptp_get_loaded_tlv_chain | ( | ) |
Get the name of the loaded TLV-chain preset.
Definition at line 107 of file settings_interface.c.
uint16_t ptp_get_local_steps_removed | ( | ) |
Get number of local steps removed.
Definition at line 197 of file settings_interface.c.
uint64_t ptp_get_own_clock_identity | ( | ) |
Get our own clock identity.
Definition at line 37 of file settings_interface.c.
uint8_t ptp_get_priority1 | ( | ) |
Get master dataset Priority1 field.
Definition at line 156 of file settings_interface.c.
uint8_t ptp_get_priority2 | ( | ) |
Get master dataset Priority2 field.
Definition at line 165 of file settings_interface.c.
uint8_t ptp_get_profile_flags | ( | ) |
Get profile flags.
Definition at line 98 of file settings_interface.c.
int8_t ptp_get_sync_log_period | ( | ) |
Get the logarithmic Sync period code.
Definition at line 125 of file settings_interface.c.
PtpTransportSpecific ptp_get_transport_specific | ( | ) |
Get the transport specific field.
Definition at line 89 of file settings_interface.c.
PtpTransportType ptp_get_transport_type | ( | ) |
Get PTP transport type.
Definition at line 67 of file settings_interface.c.
float ptp_get_tuning | ( | ) |
Get tuning directly. Only available when using the HLT interface.
void ptp_load_profile | ( | const PtpProfile * | pProfile | ) |
Load profile preset.
pProfile | pointer an existing profile preset. |
Definition at line 112 of file settings_interface.c.
void ptp_prefer_master_clock | ( | uint64_t | clockId | ) |
Make the PTP engine to expect messages from a particular master.
clockId | clock ID of the master we want to follow |
Definition at line 24 of file settings_interface.c.
void ptp_set_addend | ( | uint32_t | addend | ) |
Set addend, the frequency tuning word. Only available when using the ADDEND interface.
addend | addend |
Definition at line 50 of file settings_interface.c.
void ptp_set_announce_log_period | ( | int8_t | alp | ) |
Set the logarithmic Announce period code.
alp | logarithmic period code |
Definition at line 138 of file settings_interface.c.
void ptp_set_clock_accuracy | ( | PtpClockAccuracy | ca | ) |
Set clock accuracy.
Definition at line 177 of file settings_interface.c.
void ptp_set_clock_class | ( | PtpClockClass | cc | ) |
Set device clock class.
Definition at line 169 of file settings_interface.c.
void ptp_set_clock_offset | ( | int32_t | offset | ) |
Set clock offset in nanoseconds.
offset | offset in nanoseconds |
Definition at line 16 of file settings_interface.c.
void ptp_set_clock_variance | ( | uint16_t | var | ) |
Set clock variance.
Definition at line 185 of file settings_interface.c.
void ptp_set_coarse_threshold | ( | uint64_t | ns | ) |
Set PTP coarse correction time error tigger value.
ns | coarse correction kick-in threshold in nanoseconds |
Definition at line 143 of file settings_interface.c.
void ptp_set_delay_mechanism | ( | PtpDelayMechanism | dm | ) |
Set the PTP delay mechanism (E2E/P2P).
dm | delay mechanism |
Definition at line 75 of file settings_interface.c.
void ptp_set_delay_req_log_period | ( | int8_t | drlp | ) |
Set logarithmic PTP message period designator code of Delay_Requests.
drlp | logarithmic period code |
Definition at line 120 of file settings_interface.c.
void ptp_set_domain | ( | uint8_t | domain | ) |
Set PTP domain which the PTP engine listens to.
domain | PTP domain |
Definition at line 41 of file settings_interface.c.
void ptp_set_local_steps_removed | ( | uint16_t | lsr | ) |
Set number of local steps removed.
Definition at line 193 of file settings_interface.c.
void ptp_set_priority1 | ( | uint8_t | p1 | ) |
Set master dataset Priority1 field.
Definition at line 151 of file settings_interface.c.
void ptp_set_priority2 | ( | uint8_t | p2 | ) |
Set master dataset Priority2 field.
Definition at line 160 of file settings_interface.c.
void ptp_set_profile_flags | ( | uint8_t | flags | ) |
Set profile flags.
flags | combination of PtpProfileFlags |
Definition at line 93 of file settings_interface.c.
void ptp_set_sync_log_period | ( | int8_t | slp | ) |
Set the logarithmic Sync period code.
slp | logarithmic period code |
Definition at line 129 of file settings_interface.c.
void ptp_set_time | ( | TimestampU * | pT | ) |
Set PTP time.
pT | pointer to a TimestampU object |
Definition at line 205 of file settings_interface.c.
void ptp_set_tlv_chain_by_name | ( | const char * | tlvSet | ) |
Load TLV-chain preset fetched by name.
tlvSet | name of the TLV-chain preset, pass an empty string ("") to unload everything |
Definition at line 102 of file settings_interface.c.
void ptp_set_transport_specific | ( | PtpTransportSpecific | tspec | ) |
Set transport specific field.
tspec | value of transport specific field |
Definition at line 84 of file settings_interface.c.
void ptp_set_transport_type | ( | PtpTransportType | tp | ) |
Set PTP transport type.
tp | transport type (L2/L4) |
Definition at line 71 of file settings_interface.c.
void ptp_set_tuning | ( | float | tuning_ppb | ) |
Set the tuning directly, the frequency tuning word. Only available when using the HLT interface.
tuning_ppb | tuning in PPB |
void ptp_time | ( | TimestampU * | pT | ) |
Get PTP time right from the hardware clock.
pT | pointer to an existing TimestampU object, that is going to be overwritten with the current time |
Definition at line 201 of file settings_interface.c.
void ptp_unprefer_master_clock | ( | ) |
Allow the PTP engine to follow the best master on the network.
Definition at line 29 of file settings_interface.c.
void ptp_update_time | ( | TimestampI * | dt | ) |
Roughly update time. CAUTION: Update will not be accurate, some software processing is involved!
dt | pointer to a TimestampI object holding the time offset |
Definition at line 209 of file settings_interface.c.