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_COMPAT_27, //!< 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
125 NT_INFO_CMD_READ_ADAPTER_V7, //!< Adapter info version 7 - the number of sensors, ports, PCI ID and bus ID
174 char serialNo[50]; //!< The CPU board serial number. FPGA board serial number is the main serial number
179 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)
180 NT_AVR_VALID_1 = 2, //!< Valid AVR data has been filled in the structure (Only index 0 has been filled with valid data)
184 uint8_t valid; //!< Does this structure contain valid data (not all adapters use this structure)
214 uint32_t reserved:10;
234 uint64_t timeSynchronizedTxOffset; //!< Time offset between time stamp in first frame and adapter time
284 uint8_t Reserved4[3];
285 uint8_t numPhysicalAdapters; //!< The number of physical adapters grouped in this logical adapter
286 uint8_t Reserved5[3];
293 uint32_t supportedProfilesBitmask; //!< The profiles supported by the adapter - the value is represented as a bitmask of @ref NtProfileType_e values
294 uint32_t adapterFeatures; //!< The features supported by the adapter - the value is represented as a bitmask of @ref NtFeatureType_e values
333 uint32_t extendedDescriptor; //!< The extended descriptor in use by RX - if 0 then no extended is used
334 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
337 enum NtTimestampMethod_e timestampMethod; //!< The time stamp method (SOF/EOF) used by the adapter
353 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
354 NT_PORT_FEATURE_HARDSLICE_AT_MAXFRAMESIZE=1LL<<1, //!< The port will hard slice packets when they exceed the maximum frame size
355 NT_PORT_FEATURE_IPV4_TX_CHECKSUM_CALC=1LL<<2, //!< The port can calculate the IPv4 checksum on transmit
356 NT_PORT_FEATURE_UDP_TX_CHECKSUM_CALC=1LL<<3, //!< The port can calculate the UDP checksum on transmit
357 NT_PORT_FEATURE_TCP_TX_CHECKSUM_CALC=1LL<<4, //!< The port can calculate the TCP checksum on transmit
358 NT_PORT_FEATURE_INJECT_TX_TS=1LL<<5, //!< The port can inject a time stamp when transmitting packets
359 NT_PORT_FEATURE_TIMED_TX=1LL<<6, //!< The port can transmit timed using the time stamps in each packet
363 NT_PORT_FEATURE_RX_ONLY=1LL<<10, //!< The port can only be used to receive data. No transmit capabilities.
364 NT_PORT_FEATURE_TX_REPLICATE=1LL<<11, //!< The port can replicate the TX traffic of another port
365 NT_PORT_FEATURE_FCS_TX_CHECKSUM_CALC=1LL<<12, //!< The port can calculate the FCS checksum on transmit
400 uint16_t minTxPktSize; //!< The minimum transmit packet size, see also @ref NtRMON1Counters_s::undersizePkts
406 uint16_t sm; //!< NIM link length (in meters) supported SM (9um). A value of 0xFFFF indicates that the length is >= 65535 m
419 enum NtBypassTrigger_e bypassTriggerModes; //!< Bypass triggers that affect this port state using @ref NtBypassTrigger_e
420 enum NtBypassPortState_e currentBypassPortState; //!< Current (live) bypass port state using @ref NtBypassPortState_e
421 enum NtBypassPortState_e onInitBypassPortState; //!< onInit bypass port state using @ref NtBypassPortState_e
422 enum NtBypassPortState_e onPowerFailBypassPortState; //!< onPowerFail bypass port state using @ref NtBypassPortState_e
423 enum NtBypassPortState_e onWatchdogFailBypassPortState; //!< onWatchdogFail bypass port state using @ref NtBypassPortState_e
445 * Capabilities reflect what the port is capable of, that is, what speed/duplex is possible. For example,
460 uint8_t Reserved4[3];
522 enum NtSensorSource_e source; //!< The source of the sensor (port or adapter on which the sensor resides)
523 uint32_t sourceIndex; //!< The source index - the adapter number for adapter sensors and port number for port sensors
524 uint32_t sensorIndex; //!< The sensor index within the source index (sensor number on the adapter or sensor number on the port)
568 int streamIDList[256]; //!< Holds all the stream IDs currently created in the system // HB256: TODO
577 enum NtTimeSyncSamplingSrcStatus_e sampledStatus; //!< Status of sampled timestamp (valid/invalid)
578 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)
579 enum NtTimeSyncSamplingSrcStatus_e externalStatus; //!< Status of external reference timestamp (available/unavailable)
580 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)
587 #define NT_TIME_SYNC_CLOCK_RATE_ADJ_UNKNOWN 1000000000 //!< Used for timeSyncClockRateAdjustment and timeSyncOSClockRateAdjustment parameters to indicate that no clock rate adjustment is retrievable
598 enum NtTimeSyncFreqReference_e tsFreqRefPrio[4]; //!< Timesync frequency reference priority list
604 enum NtTimeSyncInSyncStatus_e timeSyncInSyncStatus; //!< The timestamp clock time in-sync/out-of-sync status
605 enum NtTimeSyncConStatus_e timeSyncCurrentConStatus; //!< The current time sync connector status
606 enum NtTimeSyncPpsStatus_e timeSyncPpsEnable; //!< The time sync PPS enable. Activated by an application
607 enum NtTimeSyncPpsSyncMode_e timeSyncPpsSyncMode; //!< When current timeref is PpsIn, this is the sync mode status
614 uint32_t timeSyncTimeOffset; //!< The time sync offset in nanoseconds. Used for NT-TS and PPS caple delay compensation
615 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
618 struct NtInfoTimeSyncSample_s sample[NT_TIMESYNC_SAMPLING_CNT]; //!< Timestamp sample sets. @ref NtTimeSyncSamplingSrc_e
619 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
621 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)
624 uint32_t timeSyncAdapterToOSSyncEnabled; //!< Non-zero if this adapter is configured to synchronize the server OS clock
626 int64_t timeSyncOSClockRateAdjustment; //!< The current clock rate adjustment imposed on the server OS clock to synchronize to the adapter TS clock.
634 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)
635 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)
636 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.
637 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.
638 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.
639 uint32_t extDevIsMaster; //!< The External device is master (1 if the external device is a NTTSU or NTTSE, otherwise 0)
640 uint32_t extAdapterIsMaster; //!< An external Adapter is master (1 if the external device is an adapter, otherwise 0)
652 NT_TIMESYNC_STATISTICS_PTP_ONLY = 1, //!< When using older FPGAs on PTP adapters, then PTP will be supported only
653 NT_TIMESYNC_STATISTICS_FULL_SUPPORT = 2 //!< Full supported. All protocols and failover/fallback are supported
661 enum NtTsStatSupport_e supported; //!< Specifies the level of which this feature is supported by the adapter.
662 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)
673 uint64_t syncLostCnt; //!< The number of out-of-sync events (or synchronization lost events) that has occured since last reset
674 uint64_t hardResetCnt; //!< The number of clock hard reset events that has occured since last reset (including the application triggered)
718 uint32_t sourceIndex; //!< The source index - either adapter number or port number on which the sensor resides
719 uint32_t sensorIndex; //!< The sensor index within the source index, for example, 2 for sensor 2 on port 4
725 * The adapterNo, hostBufferNo and hostBufferType must be initialized for the relevant adapter, host buffer number and host buffer type.
947 uint16_t observedOffsScaledLogVariance; //!< Observed offset variance of the parent clock, measured by this clock
948 int32_t observedPhaseChangeRate; //!< Observed phase change rate of the parent clock, measured by this clock
978 int16_t currentUtcOffset; //!< Current UTC offset used. This may be from GM or configured if currUtcOffsValid is false
982 bool timeTraceable; //!< True if timescale and current UTC offset is traceable to a primary source
983 bool frequencyTraceable; //!< True if the frequency determining the timescale is traceable to a primary source
995 int64_t peerMeanPathDelay; //!< If using Peer-to-Peer delay mechanism this is the measured P2P propagation delay for this port
1062 char SerialNo[2][32]; //!< Serial number (only index 0 used on Gen 1 otherwise 0 = main, 1 = front)
1095 int32_t group4PlusCount; //!< Number of group filters used combining 4 patterns with 4 different dynamic offsets
1096 int32_t group8Count; //!< Number of group filters used combining 8 patterns with 2 different dynamic offsets
1206 struct NtInfoCmdAdapter_v7_s adapter_v7; //!< NT_INFO_CMD_READ_ADAPTER_V7 specific data version 7
1208 struct NtInfoCmdHostBuffer_v1_s hostBuffer_v1; //!< NT_INFO_CMD_READ_HOSTBUFFER specific data version 1
1210 struct NtInfoCmdTimeSync_v4_s timeSync_v4; //!< NT_INFO_CMD_READ_TIMESYNC specific data version 4
1211 struct NtInfoCmdTimeSyncStatusExt_s timeSyncExt; //!< NT_INFO_CMD_READ_TIMESYNC_EXT_STATUS specific data
1214 struct NtInfoReadProductInfo_v4_s productInfo_v4;//!< NT_INFO_CMD_READ_PRODUCTINFO specific data version 4
1216 struct NtInfoCmdFilterUsage_v1_s filterUsage_v1;//!< NT_INFO_CMD_READ_FILTERUSAGE_V1 specific data
1222 struct NtInfoCmdTimeSync_v1_s timeSync_v1; //!< NT_INFO_CMD_READ_TIMESYNC specific data version 1
1223 struct NtInfoCmdTimeSync_v2_s timeSync_v2; //!< NT_INFO_CMD_READ_TIMESYNC specific data version 2
1224 struct NtInfoCmdTimeSync_v3_s timeSync_v3; //!< NT_INFO_CMD_READ_TIMESYNC specific data version 3
1236 struct NtInfoCmdAdapter_v4_s adapter_v4; //!< NT_INFO_CMD_READ_ADAPTER_V4 specific data version 4
1244 struct NtInfoReadProductInfo_v1_s productInfo_v1;//!< NT_INFO_CMD_READ_PRODUCTINFO specific data version 1
1245 struct NtInfoReadProductInfo_v2_s productInfo_v2;//!< NT_INFO_CMD_READ_PRODUCTINFO specific data version 2
1248 struct NtInfoReadProductInfo_v3_s productInfo_v3;//!< NT_INFO_CMD_READ_PRODUCTINFO specific data version 3
1249 struct NtInfoCmdAdapter_v6_s adapter_v6; //!< NT_INFO_CMD_READ_ADAPTER_V6 specific data version 6