stream_info.h
Go to the documentation of this file.
65 * @li <tt>Time sync external info</tt> - this includes the time sync information from a connected device
67 * @li <tt>Product info</tt> - this includes the Product type, Product ID, Serial Number, PBA ID, AVR version, CPLD version and FPGA versions
72 * @note The info stream is not thread-safe. If the same stream handle is to be used by multiple threads,
83 NT_INFO_CMD_READ_COMPAT_0, //!< Command for backward compatibility - defined in stream_info_compat.h
84 NT_INFO_CMD_READ_COMPAT_1, //!< Command for backward compatibility - defined in stream_info_compat.h
86 NT_INFO_CMD_READ_COMPAT_3, //!< Command for backward compatibility - defined in stream_info_compat.h
88 NT_INFO_CMD_READ_COMPAT_2, //!< Command for backward compatibility - defined in stream_info_compat.h
89 NT_INFO_CMD_READ_COMPAT_5, //!< Command for backward compatibility - defined in stream_info_compat.h
90 NT_INFO_CMD_READ_COMPAT_4, //!< Command for backward compatibility - defined in stream_info_compat.h
91 NT_INFO_CMD_READ_COMPAT_6, //!< Command for backward compatibility - defined in stream_info_compat.h
93 NT_INFO_CMD_READ_COMPAT_9, //!< Command for backward compatibility - defined in stream_info_compat.h
95 NT_INFO_CMD_READ_COMPAT_10, //!< Command for backward compatibility - defined in stream_info_compat.h
96 NT_INFO_CMD_READ_TIMESYNC_STATUS_EXT, //!< Time sync external status info - the time sync external status data
97 NT_INFO_CMD_READ_COMPAT_7, //!< Adapter info version 2 - the number of sensors, ports, PCI ID and bus ID
100 NT_INFO_CMD_READ_COMPAT_11, //!< Adapter info version 3 - the number of sensors, ports, PCI ID and bus ID
102 NT_INFO_CMD_READ_COMPAT_15, //!< PTP info v1 PTP port status, PTP clock datasets and PTP configuration
104 NT_INFO_CMD_READ_COMPAT_21, //!< Time sync info version 3 - the time sync connector and time sync data
106 NT_INFO_CMD_READ_COMPAT_13, //!< Adapter info version 4 - the number of sensors, ports, PCI ID and bus ID
108 NT_INFO_CMD_READ_COMPAT_17, //!< Adapter info version 5 - the number of sensors, ports, PCI ID and bus ID
111 NT_INFO_CMD_READ_PTP_V2, //!< PTP info v2 PTP port status, PTP clock data sets and PTP configuration
114 NT_INFO_CMD_READ_ADAPTER_V6, //!< Adapter info version 6 - the number of sensors, ports, PCI ID and bus ID
118 NT_INFO_CMD_READ_TIMESYNC_V4, //!< Time sync info version 4 - the time sync connector and time sync data
148 NT_AVR_VALID_2 = 1, //!< Valid AVR data for mainboard and front board has been filled in the structure (Both index 0 and 1 has been filled with valid data)
149 NT_AVR_VALID_1 = 2, //!< Valid AVR data has been filled in the structure (Only index 0 has been filled with valid data)
153 uint8_t valid; //!< Does this structure contain valid data (not all adapters use this structure)
183 uint32_t reserved:10;
203 uint64_t timeSynchronizedTxOffset; //!< Time offset between time stamp in first frame and adapter time
253 uint8_t Reserved4[3];
254 uint8_t numPhysicalAdapters; //!< The number of physical adapters grouped in this logical adapter
255 uint8_t Reserved5[3];
262 uint32_t supportedProfilesBitmask; //!< The profiles supported by the adapter - the value is represented as a bitmask of @ref NtProfileType_e values
263 uint32_t adapterFeatures; //!< The features supported by the adapter - the value is represented as a bitmask of @ref NtFeatureType_e values
302 uint32_t extendedDescriptor; //!< The extended descriptor in use by RX - if 0 then no extended is used
303 uint32_t supportedExtendedDescriptorsBitmask; //!< Bitmask of supported extended descriptors, for example, if bit 7 is set then extended descriptor 7 is supported, and if bit 8 it set then extended descriptor 8 is supported
306 enum NtTimestampMethod_e timestampMethod; //!< The time stamp method (SOF/EOF) used by the adapter
317 NT_PORT_FEATURE_DMA_TRANSMIT=1LL<<0, //!< The port is able to perform DMA transmit. Ports that do not have this bit set will only be able to transmit at a limited rate
318 NT_PORT_FEATURE_HARDSLICE_AT_MAXFRAMESIZE=1LL<<1, //!< The port will hard slice packets when they exceed the maximum frame size
319 NT_PORT_FEATURE_IPV4_TX_CHECKSUM_CALC=1LL<<2, //!< The port can calculate the IPv4 checksum on transmit
320 NT_PORT_FEATURE_UDP_TX_CHECKSUM_CALC=1LL<<3, //!< The port can calculate the UDP checksum on transmit
321 NT_PORT_FEATURE_TCP_TX_CHECKSUM_CALC=1LL<<4, //!< The port can calculate the TCP checksum on transmit
322 NT_PORT_FEATURE_INJECT_TX_TS=1LL<<5, //!< The port can inject a time stamp when transmitting packets
323 NT_PORT_FEATURE_TIMED_TX=1LL<<6, //!< The port can transmit timed using the time stamps in each packet
327 NT_PORT_FEATURE_RX_ONLY=1LL<<10, //!< The port can only be used to receive data. No transmit capabilities.
328 NT_PORT_FEATURE_TX_REPLICATE=1LL<<11, //!< The port can replicate the TX traffic of another port
329 NT_PORT_FEATURE_FCS_TX_CHECKSUM_CALC=1LL<<12 //!< The port can calculate the FCS checksum on transmit
362 uint16_t minTxPktSize; //!< The minimum transmit packet size, see also @ref NtRMON1Counters_s::undersizePkts
368 uint16_t sm; //!< NIM link length (in meters) supported SM (9um). A value of 0xFFFF indicates that the length is >= 65535 m
381 enum NtBypassTrigger_e bypassTriggerModes; //!< Bypass triggers that affect this port state using @ref NtBypassTrigger_e
382 enum NtBypassPortState_e currentBypassPortState; //!< Current (live) bypass port state using @ref NtBypassPortState_e
383 enum NtBypassPortState_e onInitBypassPortState; //!< onInit bypass port state using @ref NtBypassPortState_e
384 enum NtBypassPortState_e onPowerFailBypassPortState; //!< onPowerFail bypass port state using @ref NtBypassPortState_e
385 enum NtBypassPortState_e onWatchdogFailBypassPortState; //!< onWatchdogFail bypass port state using @ref NtBypassPortState_e
407 * Capabilities reflect what the port is capable of, that is, what speed/duplex is possible. For example,
422 uint8_t Reserved4[3];
444 uint32_t statusMask; //!< Adapter status mask holds information on how the port is configured at startup
481 enum NtSensorSource_e source; //!< The source of the sensor (port or adapter on which the sensor resides)
482 uint32_t sourceIndex; //!< The source index - the adapter number for adapter sensors and port number for port sensors
483 uint32_t sensorIndex; //!< The sensor index within the source index (sensor number on the adapter or sensor number on the port)
534 enum NtTimeSyncSamplingSrcStatus_e sampledStatus; //!< Status of sampled timestamp (valid/invalid)
535 uint64_t sampledTime; //!< The sampled adapter time in ns since 1/1 1970 (unix epoch). if NATIVE timestamp format is configured, the epoch is user defined)
536 enum NtTimeSyncSamplingSrcStatus_e externalStatus; //!< Status of external reference timestamp (available/unavailable)
537 uint64_t externalTime; //!< The sampled external time in ns since 1/1 1970 (unix epoch). if NATIVE timestamp format is configured, the epoch is user defined)
544 #define NT_TIME_SYNC_CLOCK_RATE_ADJ_UNKNOWN 1000000000 //!< Used for timeSyncClockRateAdjustment and timeSyncOSClockRateAdjustment parameters to indicate that no clock rate adjustment is retrievable
555 enum NtTimeSyncFreqReference_e tsFreqRefPrio[4]; //!< Timesync frequency reference priority list
561 enum NtTimeSyncInSyncStatus_e timeSyncInSyncStatus; //!< The timestamp clock time in-sync/out-of-sync status
562 enum NtTimeSyncConStatus_e timeSyncCurrentConStatus; //!< The current time sync connector status
563 enum NtTimeSyncPpsStatus_e timeSyncPpsEnable; //!< The time sync PPS enable. Activated by an application
564 enum NtTimeSyncPpsSyncMode_e timeSyncPpsSyncMode; //!< When current timeref is PpsIn, this is the sync mode status
571 uint32_t timeSyncTimeOffset; //!< The time sync offset in nanoseconds. Used for NT-TS and PPS caple delay compensation
572 uint64_t timeSyncPpsSampled; //!< The sampled PPS time. In ns since 1/1 1970 (unix epoch). if NATIVE timestamp format is configured, the epoch is user defined). Note that timeSyncPpsEnable must be true for this parameter to become valid
575 struct NtInfoTimeSyncSample_s sample[NT_TIMESYNC_SAMPLING_CNT]; //!< Timestamp sample sets. @ref NtTimeSyncSamplingSrc_e
576 uint64_t timeSyncCpuTsc[2]; //!< When TS sampling is app initiated through an event write, these values are cpu tsc values before and after the ts sampling
578 int64_t timeSyncClockRateAdjustment; //!< The current clock rate adjustment imposed on the TS clock to synchronize to the referenced clock in nanoseconds per second. This is only supported on newer Gen2 adapters (FPGA version must be 46 or above)
581 uint32_t timeSyncAdapterToOSSyncEnabled; //!< Non-zero if this adapter is configured to synchronize the server OS clock
583 int64_t timeSyncOSClockRateAdjustment; //!< The current clock rate adjustment imposed on the server OS clock to synchronize to the adapter TS clock.
591 uint32_t extDevSyncSignalOk; //!< The status of the external synchronization signal (1 if ok, otherwise 0) (Only used if the external device is a NT-TSU)
592 uint32_t extDevInSync; //!< The external device is in sync (1 if in sync, otherwise 0) (Only used if the external device is a NT-TSU or a NT-TSE)
593 uint32_t extDevTimeOfDayOk; //!< The external device delivers valid Time Of Day information (1 if valid, otherwise 0) (Only used if the external device is a NT-TSU or a NT-TSE) For the NT-TSU this indicates if the serial time stream is available. For the NT-TSE this field indicates if the Ethernet connection is up.
594 uint32_t extDevOsModeSyncEnabled; //!< The external device is synching to the OS time (1 if synching, otherwise 0) Only used if the external device is an adapter.
595 uint32_t extDevOsModeInSync; //!< The external device is in synchronization to the OS time (1 if in sync, otherwise 0) Only used if the external device is an adapter.
596 uint32_t extDevIsMaster; //!< The External device is master (1 if the external device is a NTTSU or NTTSE, otherwise 0)
597 uint32_t extAdapterIsMaster; //!< An external Adapter is master (1 if the external device is an adapter, otherwise 0)
609 NT_TIMESYNC_STATISTICS_PTP_ONLY = 1, //!< When using older FPGAs on PTP adapters, then PTP will be supported only
610 NT_TIMESYNC_STATISTICS_FULL_SUPPORT = 2 //!< Full supported. All protocols and failover/fallback are supported
618 enum NtTsStatSupport_e supported; //!< Specifies the level of which this feature is supported by the adapter.
619 uint64_t ts; //!< The adapter time when retrieved in ns since 1/1 1970 (unix epoch). if NATIVE timestamp format is configured, the epoch is user defined)
630 uint64_t syncLostCnt; //!< The number of out-of-sync events (or synchronization lost events) that has occured since last reset
631 uint64_t hardResetCnt; //!< The number of clock hard reset events that has occured since last reset (including the application triggered)
675 uint32_t sourceIndex; //!< The source index - either adapter number or port number on which the sensor resides
676 uint32_t sensorIndex; //!< The sensor index within the source index, for example, 2 for sensor 2 on port 4
682 * The adapterNo, hostBufferNo and hostBufferType must be initialized for the relevant adapter, host buffer number and host buffer type.
904 uint16_t observedOffsScaledLogVariance; //!< Observed offset variance of the parent clock, measured by this clock
905 int32_t observedPhaseChangeRate; //!< Observed phase change rate of the parent clock, measured by this clock
935 int16_t currentUtcOffset; //!< Current UTC offset used. This may be from GM or configured if currUtcOffsValid is false
939 bool timeTraceable; //!< True if timescale and current UTC offset is traceable to a primary source
940 bool frequencyTraceable; //!< True if the frequency determining the timescale is traceable to a primary source
952 int64_t peerMeanPathDelay; //!< If using Peer-to-Peer delay mechanism this is the measured P2P propagation delay for this port
1018 char SerialNo[2][32]; //!< Serial number (only index 0 used on Gen 1 otherwise 0 = main, 1 = front)
1047 int32_t group4PlusCount; //!< Number of group filters used combining 4 patterns with 4 different dynamic offsets
1048 int32_t group8Count; //!< Number of group filters used combining 8 patterns with 2 different dynamic offsets
1160 struct NtInfoCmdHostBuffer_v1_s hostBuffer_v1; //!< NT_INFO_CMD_READ_HOSTBUFFER specific data version 1
1162 struct NtInfoCmdTimeSync_v4_s timeSync_v4; //!< NT_INFO_CMD_READ_TIMESYNC specific data version 4
1163 struct NtInfoCmdTimeSyncStatusExt_s timeSyncExt; //!< NT_INFO_CMD_READ_TIMESYNC_EXT_STATUS specific data
1166 struct NtInfoReadProductInfo_v2_s productInfo_v2;//!< NT_INFO_CMD_READ_PRODUCTINFO specific data version 2
1168 struct NtInfoCmdFilterUsage_v1_s filterUsage_v1;//!< NT_INFO_CMD_READ_FILTERUSAGE_V1 specific data
1174 struct NtInfoCmdTimeSync_v1_s timeSync_v1; //!< NT_INFO_CMD_READ_TIMESYNC specific data version 1
1175 struct NtInfoCmdTimeSync_v2_s timeSync_v2; //!< NT_INFO_CMD_READ_TIMESYNC specific data version 2
1176 struct NtInfoCmdTimeSync_v3_s timeSync_v3; //!< NT_INFO_CMD_READ_TIMESYNC specific data version 3
1188 struct NtInfoCmdAdapter_v4_s adapter_v4; //!< NT_INFO_CMD_READ_ADAPTER_V4 specific data version 4
1196 struct NtInfoReadProductInfo_v1_s productInfo_v1;//!< NT_INFO_CMD_READ_PRODUCTINFO specific data version 1