Go to the source code of this file.
Data Structures | |
| struct | timeStamp |
| 802.1AS-rev Timestamp structure More... | |
| struct | ExtendedTimestamp |
| 802.1AS-rev ExtendedTimestamp More... | |
| struct | TimeSync_parent_params_t |
| Parent clock params. More... | |
| struct | TimeSync_master_params_t |
| Master and grand master clock params. More... | |
| struct | TimeSync_frame_buffers_t |
| Time synchronization configuration structure. More... | |
| struct | TimeSync_Config_t |
| Time synchronization configuration structure. More... | |
| struct | timeSync_RuntimeVar_t |
| Runtime variables for Time Sync implementation. More... | |
| struct | timeSync_Offset_Stable_Algo_t |
| Variables used for offset stabilization algorithm. More... | |
| struct | syncParam_t |
| Parameters required for calculating Cable Delay. More... | |
| struct | timeSync_SyntInfo_t |
| Parameters required for clock syntonization. More... | |
| struct | timeSync_NrrInfo_t |
| Parameters required for calculating Nighbor Rate Ratio. More... | |
| struct | delayReqRespParams_t |
| Parameters required for calculating Cable Delay. More... | |
| struct | peerDelayParams_t |
| Parameters required for calculating Cable Delay. More... | |
| struct | ipParams_t |
| Used to populate IP/UDP Parameters. These must be populated from Switch params. More... | |
| struct | ptpDparams_t |
| PTPd stack parameters. More... | |
| struct | TimeSync_ParamsHandle |
| Time synchronization parameter handle structure. More... | |
Typedefs | |
| typedef void(* | TimeSync_SyncLossCallBack_t) (void) |
| Sync loss callback function. Call cross module functions in case of loss of synchronization. More... | |
| typedef void(* | TimeSync_stackResetCallback_t) (void *arg) |
| PTP Stack Reset callback function. Timesync handle (of type TimeSync_ParamsHandle_t) will be passed as arg. More... | |
| typedef struct TimeSync_ParamsHandle_s * | TimeSync_ParamsHandle_t |
Enumerations | |
| enum | port_State { INITIALIZING = 1, FAULTY = 2, DISABLED = 3, LISTENING = 4, PRE_MASTER = 5, MASTER = 6, PASSIVE = 7, UNCALIBRATED = 8, SLAVE = 9 } |
| Port States, from IEEE 1588v2. More... | |
| enum | netWorkProtType { UDP_IPV4 = 1, UDP_IPV6 = 2, IEEE_802_3 = 3, DEVICE_NET = 4, CONTROL_NET = 5, PROFINET = 6, UNKNOWN = 0xFFFE } |
| Network Protocol Type. More... | |
| enum | deviceConfig { TC = 1, OC = 2, BOTH = 3 } |
| Current Device configuration. More... | |
| enum | delayType { E2E = 1, P2P = 2 } |
| PTP Delay Mechanism Type. From Table 9 of Standard. More... | |
| enum | ptpFrameTypes_t { NON_SYNC_DELAY_FRAME = 0, SYNC_FRAME = 1, DELAY_REQ_FRAME = 2, DELAY_RESP_FRAME = 3 } |
| PTP Delay Mechanism Type. From Table 9 of Standard. More... | |
| enum | timeSource { ATOMIC_CLOCK = 0x10, GPS = 0x20, TERRESTRIAL_RADIO = 0x30, PTP = 0x40, NTP = 0x50, HAND_SET = 0x60, OTHER = 0x90, INTERNAL_OSCILLATOR = 0xA0 } |
| 802.1AS-rev Enumeration8 More... | |
| enum | icssIepClkFreq { ICSS_IEP_CLK_FREQ_200MHZ = 200000000, ICSS_IEP_CLK_FREQ_250MHZ = 250000000, ICSS_IEP_CLK_FREQ_333MHZ = 333333333 } |
| ICSS IEP Clock Frequencies. More... | |
| enum | compensationType { PTP_NO_COMPENSATION_REQUIRED = 0, PTP_TIME_RECEIVER_FASTER, PTP_TIME_TRANSMITTER_FASTER } |
| Compensation Type Required - depending on PTP timeTransmitter or timeReceiver. More... | |
Functions | |
| int32_t | TimeSync_getRxTimestamp (TimeSync_ParamsHandle_t timeSyncParamsHandle, ptpFrameTypes_t rxFrameType, uint8_t rxPort, uint32_t *nanoseconds, uint64_t *seconds) |
| Reads and provides timestamp of a received event message. More... | |
| int32_t | TimeSync_getRxTimestampFromFrame (TimeSync_ParamsHandle_t timeSyncParamsHandle, uint8_t rxPort, uint32_t *nanoseconds, uint64_t *seconds, uint8_t *TimeStampFromFrame) |
| Reads and provides timestamp of a received event message. More... | |
| int32_t | TimeSync_config (TimeSync_ParamsHandle_t timeSyncHandle) |
| Function to configure domain number and/or log message intervals and/or sync0 signal start time, pulse width. More... | |
| int32_t | TimeSync_getTxTimestamp (TimeSync_ParamsHandle_t timeSyncParamsHandle, ptpFrameTypes_t txFrameType, uint8_t txPort, uint32_t *nanoseconds, uint64_t *seconds) |
| Reads and provides timestamp of a transmitted event message. More... | |
| int8_t | TimeSync_adjTimeSlowComp (TimeSync_ParamsHandle_t timeSyncParamsHandle, int32_t adjOffset) |
| Adjusts the IEP clock by the drift value over one Sync interval. More... | |
| int32_t | TimeSync_setClockTime (TimeSync_ParamsHandle_t timeSyncParamsHandle) |
| Configures the driver memory. More... | |
| void | TimeSync_getCurrentTime (TimeSync_ParamsHandle_t timeSyncParamsHandle, uint32_t *nanoseconds, uint64_t *seconds) |
| Returns the current time on device. More... | |
| void | TimeSync_updateDomainNumberInPTPFrames (TimeSync_ParamsHandle_t timeSyncHandle) |
| Update PTP domain number in TX Buffers. More... | |
| void | TimeSync_updateLogMessageIntervalInPTPFrames (TimeSync_ParamsHandle_t timeSyncHandle) |
| Update log message interval in PTP TX buffers. More... | |
| void | TimeSync_updateDscpValueInDelayRequestFrame (TimeSync_ParamsHandle_t timeSyncHandle, uint8_t dscpValue) |
| Update DSCP value in IP header in PTP Delay Request buffer. More... | |
| #define lswap | ( | x | ) |
| #define htonl_ts | ( | l | ) | (lswap(l)) |
| #define ntohl_ts | ( | l | ) | (lswap(l)) |
| #define htons_ts | ( | s | ) | ((u_short)((u_short)(s) >> 8) | (u_short)((u_short)(s) << 8)) |
| #define ntohs_ts | ( | s | ) | htons_ts(s) |
| #define TASK_STACK_SIZE (2048) |
| #define ICSS_TIMESYNC_EVENT_BIT0 (0x000001) |
| #define ICSS_TIMESYNC_EVENT_BIT1 (0x000002) |
| #define ICSS_TIMESYNC_EVENT_BIT2 (0x000004) |
| #define ICSS_TIMESYNC_EVENT_BIT3 (0x000008) |
| #define ICSS_TIMESYNC_EVENT_BIT4 (0x000010) |
| #define ICSS_TIMESYNC_EVENT_BIT5 (0x000020) |
| #define ICSS_TIMESYNC_EVENT_BIT6 (0x000040) |
| #define ICSS_TIMESYNC_EVENT_BIT7 (0x000080) |
| #define SYNT_DEPTH 3 |
Syntonization depth. No. of timestamps stored to do RCF & NRR calculation
| #define TS_NUM_DOMAINS 1 |
Number of domains supported by implementation
| #define TS_STATE_MACHINE_FIRST_ADJUSTMENT_DONE 1 |
Bit 0. Indicates that driver has copied TS value directly to IEP registers
| #define TS_STATE_MACHINE_LINE_DELAY_COMPUTED 2 |
Bit 1. Indicates that Peer delay or Line delay (in case of E2E) has been computed
| #define TS_STATE_MACHINE_SYNC_INTERVAL_COMPUTED 4 |
Bit 2. Sync interval computed
| #define TS_STATE_MACHINE_READY_FOR_SYNC 7 |
Mask for all three bits. Indicates that driver is now ready to do synchronization
| #define TS_STATE_MACHINE_DEVICE_IN_SYNC 8 |
Bit 3. Device is in sync with master This is continuously monitored
| #define OFFSET_ALGO_BIN_SIZE 5 |
Bin size used for stabilization algo See design doc for details
| #define OFFSET_ALGO_CLUSTER_SIZE 3 |
Number of entries used for clustering See design doc for details
| #define TIMESYNC_OK (0) |
| #define ERROR_TX_FRAMETYPE_NOTVALID (-1) |
| #define ERROR_TX_PORTNUMBER_NOTVALID (-2) |
| #define ERROR_HANDLE_INVALID (-3) |
| #define ERROR_RX_FRAMETYPE_NOTVALID (-4) |
| #define ERROR_RX_PORTNUMBER_NOTVALID (-5) |
| typedef void(* TimeSync_SyncLossCallBack_t) (void) |
Sync loss callback function. Call cross module functions in case of loss of synchronization.
| typedef void(* TimeSync_stackResetCallback_t) (void *arg) |
PTP Stack Reset callback function. Timesync handle (of type TimeSync_ParamsHandle_t) will be passed as arg.
| typedef struct TimeSync_ParamsHandle_s* TimeSync_ParamsHandle_t |
| enum port_State |
| enum netWorkProtType |
| enum deviceConfig |
| enum delayType |
| enum ptpFrameTypes_t |
| enum timeSource |
| enum icssIepClkFreq |
| enum compensationType |