Event Stream

Reference Documentation

product_line_custom
Intel® PAC
Napatech SmartNIC
category
Reference Information
Napatech Software Suite: Event Stream

Detailed Description

Event streams are used to get various events from the system. The event stream is a read only stream.

To open an event stream call NT_EventOpen. Once the event stream is open it will receive all system events. An application that requires certain events will open an event stream and read the events one by one. The application can then react on the events that it wants to react on and ignore the rest. Once done, call NT_EventClose to close the stream.

The events types currently supported are:

  • Port events These events are link up and link down events.
  • Sensor events These events are sensor alarm state changes.
  • Config events These events are sent when a configuration change has been made.
  • Time sync events These events are time synchronization state changes.

For an example on how to use the event stream see event/event_example.c.

Note
The event stream is not thread-safe. If the same stream handle is to be used by multiple threads, it must be mutex protected in the application.

Functions

int NT_EventOpen (NtEventStream_t *hStream, const char *name, uint32_t eventMask)
 Opens an event stream and initializes event queues, etc. More...
 
int NT_EventRead (NtEventStream_t hStream, NtEvent_t *event, uint32_t timeout)
 Reads an event from an event queue. More...
 
int NT_EventWrite (NtEventStream_t hStream, enum NtEventRaise_e eventId)
 
int NT_EventClose (NtEventStream_t hStream)
 Releases the stream and clears event queues, etc. More...
 

Data Structures

struct  NtEventPort_s
 
struct  NtEventPtpPort_s
 
struct  NtSDRAMFillLevel_s
 
struct  NtSDRAMFillLevel_s::NtStream_s
 
struct  NtSDRAMFillLevel_s::NtHostBuffer_s
 
struct  NtEventSensor_s
 
struct  NtEventTimeSync_s
 
struct  NtEventTimeSyncStateMachine_s
 
struct  NtEvent_s
 
union  NtEvent_s::NtEvent_u
 

Macros

#define MAX_SDRAM_FILL_LEVEL_STREAMS   256
 

Typedefs

typedef struct NtEvent_s NtEvent_t
 
typedef struct NtEventStream_s * NtEventStream_t
 

Enumerations

enum  NtEventSource_e {
  NT_EVENT_SOURCE_NONE = 0, NT_EVENT_SOURCE_PORT = (1 << 0), NT_EVENT_SOURCE_SENSOR = (1 << 1), NT_EVENT_SOURCE_CONFIG = (1 << 2),
  NT_EVENT_SOURCE_TIMESYNC = (1 << 3), NT_EVENT_SOURCE_SDRAM_FILL_LEVEL = (1 << 4), NT_EVENT_SOURCE_PTP_PORT = (1 << 5), NT_EVENT_SOURCE_TIMESYNC_STATE_MACHINE = (1 << 6),
  NT_EVENT_SOURCE_ALL, NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ADAPTER0 = (1 << 23), NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ADAPTER1 = (1 << 24), NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ADAPTER2 = (1 << 25),
  NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ADAPTER3 = (1 << 26), NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ADAPTER4 = (1 << 27), NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ADAPTER5 = (1 << 28), NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ADAPTER6 = (1 << 29),
  NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ADAPTER7 = (1 << 30), NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ALL
}
 
enum  NtEventRaise_e { NT_EVENT_SAMPLE_TIMESTAMP = 1 }
 
enum  NtEventPort_e {
  NT_EVENT_PORT_LINK_UP, NT_EVENT_PORT_LINK_DOWN, NT_EVENT_RXAUI_LINK_ERROR, NT_EVENT_PORT_BYPASS_ACTIVATED,
  NT_EVENT_PORT_BYPASS_DEACTIVATED, NT_EVENT_PORT_NIM_INSERTED, NT_EVENT_PORT_NIM_REMOVED
}
 
enum  NtEventSensor_e { NT_EVENT_SENSOR_ALARM_STATE_ENTRY, NT_EVENT_SENSOR_ALARM_STATE_EXIT }
 
enum  NtEventTimeSync_e { NT_EVENT_TIMESYNC_PPS_REQUEST_TIME }
 
enum  NtEventTimeSyncStateMachine_e {
  NT_EVENT_TIMESYNC_TIME_REFERENCE_LOST, NT_EVENT_TIMESYNC_TIME_REFERENCE_SELECT, NT_EVENT_TIMESYNC_TIME_REFERENCE_SELECT_FAIL, NT_EVENT_TIMESYNC_TIME_IN_SYNC,
  NT_EVENT_TIMESYNC_TIME_OUT_OF_SYNC, NT_EVENT_TIMESYNC_PTP_STATE_CHANGE, NT_EVENT_TIMESYNC_TIME_STAMP_CLOCK_SET, NT_EVENT_TIMESYNC_EXTERNAL_DEVICE_LOST_SYNC_SIGNAL,
  NT_EVENT_TIMESYNC_EXTERNAL_DEVICE_OUT_OF_SYNC, NT_EVENT_TIMESYNC_EXTERNAL_DEVICE_LOST_TIME_OF_DAY
}
 

Data Structure Documentation

struct NtEventPort_s

Event link up/down information

Definition at line 192 of file stream_event.h.

Data Fields

enum NtEventPort_e action
 Port action. More...
 
uint8_t portNo
 Port generating the event. More...
 
uint8_t Reserved1 [3]
 

Field Documentation

enum NtEventPort_e NtEventPort_s::action

Port action.

Examples:
eventMonitor_example.c.

Definition at line 193 of file stream_event.h.

Referenced by DumpEvent().

uint8_t NtEventPort_s::portNo

Port generating the event.

Examples:
eventMonitor_example.c.

Definition at line 194 of file stream_event.h.

Referenced by DumpEvent().

uint8_t NtEventPort_s::Reserved1[3]

Definition at line 195 of file stream_event.h.

struct NtEventPtpPort_s

PTP port link up/down event information

Definition at line 201 of file stream_event.h.

Data Fields

enum NtEventPort_e action
 Port action. More...
 
uint8_t adapterNo
 Adapter that generates the event. More...
 
uint8_t portNo
 Port that generates the event. More...
 
uint8_t Reserved1 [2]
 

Field Documentation

enum NtEventPort_e NtEventPtpPort_s::action

Port action.

Examples:
eventMonitor_example.c.

Definition at line 202 of file stream_event.h.

Referenced by DumpEvent().

uint8_t NtEventPtpPort_s::adapterNo

Adapter that generates the event.

Examples:
eventMonitor_example.c.

Definition at line 203 of file stream_event.h.

Referenced by DumpEvent().

uint8_t NtEventPtpPort_s::portNo

Port that generates the event.

Definition at line 204 of file stream_event.h.

uint8_t NtEventPtpPort_s::Reserved1[2]

Definition at line 205 of file stream_event.h.

struct NtSDRAMFillLevel_s

Definition at line 212 of file stream_event.h.

Data Fields

uint8_t adapterNo
 The adapter owning the host buffer. More...
 
uint8_t Reserved1 [3]
 
uint32_t streamsId
 Stream ID using the host buffer. More...
 
uint32_t numStreams
 Number of streams using the host buffers. Also indicating the use depth of aStreams. More...
 
uint64_t used
 
uint64_t size
 The amount of SDRAM reserved for this host buffer. More...
 
struct NtSDRAMFillLevel_s::NtHostBuffer_s hb
 
struct NtSDRAMFillLevel_s::NtStream_s aStreams [MAX_SDRAM_FILL_LEVEL_STREAMS]
 

Field Documentation

uint8_t NtSDRAMFillLevel_s::adapterNo

The adapter owning the host buffer.

Definition at line 213 of file stream_event.h.

uint8_t NtSDRAMFillLevel_s::Reserved1[3]

Definition at line 214 of file stream_event.h.

uint32_t NtSDRAMFillLevel_s::streamsId

Stream ID using the host buffer.

Examples:
eventMonitor_example.c.

Definition at line 215 of file stream_event.h.

Referenced by DumpEvent().

uint32_t NtSDRAMFillLevel_s::numStreams

Number of streams using the host buffers. Also indicating the use depth of aStreams.

Examples:
eventMonitor_example.c.

Definition at line 216 of file stream_event.h.

Referenced by DumpEvent().

uint64_t NtSDRAMFillLevel_s::used

SDRAM used. This shows the amount of adapter memory used. One must pay attention to this value. When the value is close to used, it means that the adapter has used all the buffer memory. This happens if the adapter is not able to transfer the received data to the host buffers on the PC and is mainly caused by a slow application not being able to release the data fast enough. Packet loss will probably occur.

Examples:
eventMonitor_example.c.

Definition at line 217 of file stream_event.h.

Referenced by DumpEvent().

uint64_t NtSDRAMFillLevel_s::size

The amount of SDRAM reserved for this host buffer.

Examples:
eventMonitor_example.c.

Definition at line 222 of file stream_event.h.

Referenced by DumpEvent().

struct NtSDRAMFillLevel_s::NtHostBuffer_s NtSDRAMFillLevel_s::hb
Examples:
eventMonitor_example.c.

Referenced by DumpEvent().

struct NtSDRAMFillLevel_s::NtStream_s NtSDRAMFillLevel_s::aStreams[MAX_SDRAM_FILL_LEVEL_STREAMS]
Examples:
eventMonitor_example.c.

Referenced by DumpEvent().

struct NtSDRAMFillLevel_s::NtStream_s

the array of streams using the host buffer

Definition at line 242 of file stream_event.h.

Data Fields

int streamIndex
 The index for the stream attached to the host buffer. More...
 
uint64_t enQueued
 The data currently enqueued to the stream. The stream with the largest enqueued amount is the slowest stream and probably the one that causes the packet loss. More...
 
uint64_t processID
 The process owning the stream. More...
 

Field Documentation

int NtSDRAMFillLevel_s::NtStream_s::streamIndex

The index for the stream attached to the host buffer.

Examples:
eventMonitor_example.c.

Definition at line 243 of file stream_event.h.

Referenced by DumpEvent().

uint64_t NtSDRAMFillLevel_s::NtStream_s::enQueued

The data currently enqueued to the stream. The stream with the largest enqueued amount is the slowest stream and probably the one that causes the packet loss.

Examples:
eventMonitor_example.c.

Definition at line 244 of file stream_event.h.

Referenced by DumpEvent().

uint64_t NtSDRAMFillLevel_s::NtStream_s::processID

The process owning the stream.

Examples:
eventMonitor_example.c.

Definition at line 245 of file stream_event.h.

Referenced by DumpEvent().

struct NtSDRAMFillLevel_s::NtHostBuffer_s

This structure tells where the host buffer is currently used.

Definition at line 226 of file stream_event.h.

Data Fields

uint64_t deQueued
 
uint64_t enQueued
 
uint64_t enQueuedAdapter
 
uint64_t size
 Host buffer size. More...
 

Field Documentation

uint64_t NtSDRAMFillLevel_s::NtHostBuffer_s::deQueued

Bytes available or in use by the streams. If all data is placed here it means that the application is too slow to handle the data. The application is not able to release the packets (host buffer) fast enough so the data is ready for the driver and adapter to fill with new data. The result is that the adapter runs out of data space and a packet loss occurs.

Examples:
eventMonitor_example.c.

Definition at line 227 of file stream_event.h.

Referenced by DumpEvent().

uint64_t NtSDRAMFillLevel_s::NtHostBuffer_s::enQueued

Bytes available to the host buffer handler. If all data is placed here it means that the driver is too slow to handle the data. This is a driver error and should never happen.

Examples:
eventMonitor_example.c.

Definition at line 232 of file stream_event.h.

Referenced by DumpEvent().

uint64_t NtSDRAMFillLevel_s::NtHostBuffer_s::enQueuedAdapter

Bytes currently in the adapter. Most of the time the data should be placed here.

Examples:
eventMonitor_example.c.

Definition at line 235 of file stream_event.h.

Referenced by DumpEvent().

uint64_t NtSDRAMFillLevel_s::NtHostBuffer_s::size

Host buffer size.

Examples:
eventMonitor_example.c.

Definition at line 237 of file stream_event.h.

Referenced by DumpEvent().

struct NtEventSensor_s

Event sensor change information

Examples:
eventMonitor_example.c.

Definition at line 252 of file stream_event.h.

Data Fields

enum NtSensorSource_e source
 The source of the sensor (the port or adapter on which the sensor resides) More...
 
int sourceIndex
 The source index - the adapter number or port number where the sensor resides. More...
 
int sensorIndex
 
enum NtEventSensor_e action
 Whether the alarm is entered or exited. More...
 
int value
 The value that triggered the event. More...
 
enum NtAdapterType_e adapterType
 The adapter type triggering the event. More...
 

Field Documentation

enum NtSensorSource_e NtEventSensor_s::source

The source of the sensor (the port or adapter on which the sensor resides)

Examples:
eventMonitor_example.c.

Definition at line 253 of file stream_event.h.

Referenced by DumpSensor(), and GetSensorData().

int NtEventSensor_s::sourceIndex

The source index - the adapter number or port number where the sensor resides.

Examples:
eventMonitor_example.c.

Definition at line 254 of file stream_event.h.

Referenced by GetSensorData().

int NtEventSensor_s::sensorIndex

The sensor index - the index of the sensor within the group of sensors. Each adapter or port has a different number and sensor type.

Examples:
eventMonitor_example.c.

Definition at line 255 of file stream_event.h.

Referenced by GetSensorData().

enum NtEventSensor_e NtEventSensor_s::action

Whether the alarm is entered or exited.

Examples:
eventMonitor_example.c.

Definition at line 262 of file stream_event.h.

Referenced by DumpSensor().

int NtEventSensor_s::value

The value that triggered the event.

Examples:
eventMonitor_example.c.

Definition at line 263 of file stream_event.h.

Referenced by DumpSensor().

enum NtAdapterType_e NtEventSensor_s::adapterType

The adapter type triggering the event.

Definition at line 264 of file stream_event.h.

struct NtEventTimeSync_s

Time sync information

Definition at line 270 of file stream_event.h.

Data Fields

enum NtEventTimeSync_e action
 What happened. More...
 
uint8_t adapter
 Which adapter generated the event. More...
 
uint8_t Reserved1 [3]
 

Field Documentation

enum NtEventTimeSync_e NtEventTimeSync_s::action

What happened.

Examples:
eventMonitor_example.c, and pps/pps_example.c.

Definition at line 271 of file stream_event.h.

Referenced by DumpEvent(), and main().

uint8_t NtEventTimeSync_s::adapter

Which adapter generated the event.

Examples:
eventMonitor_example.c, and pps/pps_example.c.

Definition at line 272 of file stream_event.h.

Referenced by DumpEvent(), and main().

uint8_t NtEventTimeSync_s::Reserved1[3]

Definition at line 273 of file stream_event.h.

struct NtEventTimeSyncStateMachine_s

Time sync state machine event information

Definition at line 279 of file stream_event.h.

Data Fields

enum NtEventTimeSyncStateMachine_e action
 What happened. More...
 
uint8_t adapter
 Which adapter generated the event. More...
 
enum NtTimeSyncReference_e timeReference
 Time reference affected by the event. More...
 
union {
   enum NtPTPPortState_e   ptpState [2]
 ptpState[0] = old state; ptpState[1] = new state More...
 
   uint64_t   timeStampClock
 Time in nanoseconds set on adapter. More...
 
}; 
 
uint8_t reserved [3]
 Reserved for future use. More...
 

Field Documentation

enum NtEventTimeSyncStateMachine_e NtEventTimeSyncStateMachine_s::action

What happened.

Examples:
event/event_example.c, and eventMonitor_example.c.

Definition at line 280 of file stream_event.h.

Referenced by DumpEvent(), and main().

uint8_t NtEventTimeSyncStateMachine_s::adapter

Which adapter generated the event.

Examples:
eventMonitor_example.c.

Definition at line 281 of file stream_event.h.

Referenced by DumpEvent().

enum NtTimeSyncReference_e NtEventTimeSyncStateMachine_s::timeReference

Time reference affected by the event.

Examples:
eventMonitor_example.c.

Definition at line 282 of file stream_event.h.

Referenced by DumpEvent().

enum NtPTPPortState_e NtEventTimeSyncStateMachine_s::ptpState[2]

ptpState[0] = old state; ptpState[1] = new state

Examples:
eventMonitor_example.c.

Definition at line 284 of file stream_event.h.

Referenced by DumpEvent().

uint64_t NtEventTimeSyncStateMachine_s::timeStampClock

Time in nanoseconds set on adapter.

Examples:
event/event_example.c, and eventMonitor_example.c.

Definition at line 285 of file stream_event.h.

Referenced by DumpEvent(), and main().

union { ... }
uint8_t NtEventTimeSyncStateMachine_s::reserved[3]

Reserved for future use.

Definition at line 287 of file stream_event.h.

struct NtEvent_s

Event information

Examples:
event/event_example.c, eventMonitor_example.c, and pps/pps_example.c.

Definition at line 293 of file stream_event.h.

Data Fields

enum NtEventSource_e type
 Event type. More...
 
union NtEvent_s::NtEvent_u u
 

Field Documentation

enum NtEventSource_e NtEvent_s::type

Event type.

Examples:
event/event_example.c, eventMonitor_example.c, and pps/pps_example.c.

Definition at line 294 of file stream_event.h.

Referenced by DumpEvent(), and main().

union NtEvent_s::NtEvent_u NtEvent_s::u
Examples:
event/event_example.c, eventMonitor_example.c, and pps/pps_example.c.

Referenced by DumpEvent(), and main().

union NtEvent_s::NtEvent_u

Union holding event information

Definition at line 298 of file stream_event.h.

Data Fields

struct NtEventPort_s portEvent
 Port events - NT_EVENT_SOURCE_PORT. More...
 
struct NtEventSensor_s sensorEvent
 Sensor events - NT_EVENT_SOURCE_SENSOR. More...
 
struct NtConfig_s configEvent
 Config events - NT_EVENT_SOURCE_CONFIG. More...
 
struct NtEventTimeSync_s timeSyncEvent
 Time sync events - NT_EVENT_SOURCE_TIMESYNC. More...
 
struct NtSDRAMFillLevel_s sdramFillLevelEvent
 Host buffer usage event - NT_EVENT_SOURCE_SDRAM_FILL_LEVEL. More...
 
struct NtEventPtpPort_s ptpPortEvent
 PTP port event - NT_EVENT_SOURCE_PTP_PORT. More...
 
struct NtEventTimeSyncStateMachine_s timeSyncStateMachineEvent
 Time sync change state event - NT_EVENT_SOURCE_TIMESYNC_STATE_MACHINE. More...
 

Field Documentation

struct NtEventPort_s NtEvent_s::NtEvent_u::portEvent

Port events - NT_EVENT_SOURCE_PORT.

Examples:
eventMonitor_example.c.

Definition at line 299 of file stream_event.h.

Referenced by DumpEvent().

struct NtEventSensor_s NtEvent_s::NtEvent_u::sensorEvent

Sensor events - NT_EVENT_SOURCE_SENSOR.

Examples:
eventMonitor_example.c.

Definition at line 300 of file stream_event.h.

Referenced by DumpEvent().

struct NtConfig_s NtEvent_s::NtEvent_u::configEvent

Config events - NT_EVENT_SOURCE_CONFIG.

Examples:
event/event_example.c, and eventMonitor_example.c.

Definition at line 301 of file stream_event.h.

Referenced by DumpEvent(), and main().

struct NtEventTimeSync_s NtEvent_s::NtEvent_u::timeSyncEvent

Time sync events - NT_EVENT_SOURCE_TIMESYNC.

Examples:
eventMonitor_example.c, and pps/pps_example.c.

Definition at line 302 of file stream_event.h.

Referenced by DumpEvent(), and main().

struct NtSDRAMFillLevel_s NtEvent_s::NtEvent_u::sdramFillLevelEvent

Host buffer usage event - NT_EVENT_SOURCE_SDRAM_FILL_LEVEL.

Examples:
eventMonitor_example.c.

Definition at line 303 of file stream_event.h.

Referenced by DumpEvent().

struct NtEventPtpPort_s NtEvent_s::NtEvent_u::ptpPortEvent

PTP port event - NT_EVENT_SOURCE_PTP_PORT.

Examples:
eventMonitor_example.c.

Definition at line 304 of file stream_event.h.

Referenced by DumpEvent().

struct NtEventTimeSyncStateMachine_s NtEvent_s::NtEvent_u::timeSyncStateMachineEvent

Time sync change state event - NT_EVENT_SOURCE_TIMESYNC_STATE_MACHINE.

Examples:
event/event_example.c, and eventMonitor_example.c.

Definition at line 305 of file stream_event.h.

Referenced by DumpEvent(), and main().

Function Documentation

int NT_EventOpen ( NtEventStream_t hStream,
const char *  name,
uint32_t  eventMask 
)

Opens an event stream and initializes event queues, etc.

This function must be called before using the events. The necessary stream, lists, mutexes and semaphores are initialized and created.

The source of event is selected by the eventMask. This could be either a single event source or all event sources. See NtEventSource_e for the different event sources.

Parameters
[in,out]hStreamPointer to the stream handle
[in]nameA friendly name of the stream
[in]eventMaskNtEventSource_e - A bitmask defining the sources of events to receive
Return values
==NT_SUCCESS: Success
!=NT_SUCCESS: Error
Examples:
event/event_example.c, eventMonitor_example.c, and pps/pps_example.c.

Referenced by main().

int NT_EventRead ( NtEventStream_t  hStream,
NtEvent_t event,
uint32_t  timeout 
)

Reads an event from an event queue.

This function is called by the user to read an event. The event is copied from the event queue to the stream handle for the user to read using the HAL functions. The event is marked as read for deletion and cannot be read by the user again.

Parameters
[in]hStreamStream to store the current event
[out]eventEvent structure - the event information is returned in this structure
[in]timeoutTime in milliseconds to wait for an event
Return values
==NT_SUCCESS: Success
!=NT_SUCCESS: Error
Examples:
event/event_example.c, eventMonitor_example.c, and pps/pps_example.c.

Referenced by main().

int NT_EventWrite ( NtEventStream_t  hStream,
enum NtEventRaise_e  eventId 
)
int NT_EventClose ( NtEventStream_t  hStream)

Releases the stream and clears event queues, etc.

This function must be called after using the events in order to release the stream and clear the allocated lists, mutexes and semaphores.

Parameters
[in]hStreamPointer to the stream handle
Return values
==NT_SUCCESS: Success
!=NT_SUCCESS: Error
Examples:
event/event_example.c, eventMonitor_example.c, and pps/pps_example.c.

Referenced by main().

Macro Definition Documentation

#define MAX_SDRAM_FILL_LEVEL_STREAMS   256

Event SDRAM fill level information

Definition at line 211 of file stream_event.h.

Typedef Documentation

typedef struct NtEvent_s NtEvent_t

Event information

typedef struct NtEventStream_s* NtEventStream_t

Event stream handle

Definition at line 312 of file stream_event.h.

Enumeration Type Documentation

The event types supported Note: MUST be bitmasks

Enumerator
NT_EVENT_SOURCE_NONE 
NT_EVENT_SOURCE_PORT 

Bit for port event - Data placed in NtEventPort_s.

NT_EVENT_SOURCE_SENSOR 

Bit for sensor change event - Data placed in NtEventSensor_s.

NT_EVENT_SOURCE_CONFIG 

Bit for config change made events - Data placed in NtConfig_s.

NT_EVENT_SOURCE_TIMESYNC 

Bit for time sync events - Data placed in NtEventTimeSync_s.

NT_EVENT_SOURCE_SDRAM_FILL_LEVEL 

Bit for host buffer fill level warning - Data placed in NtSDRAMFillLevel_s.

NT_EVENT_SOURCE_PTP_PORT 

Bit for PTP port events - Data placed in NtEventPtpPort_s.

NT_EVENT_SOURCE_TIMESYNC_STATE_MACHINE 

Bit for time sync state machine - Data placed in NtEventTimeSyncStateMachine_s.

NT_EVENT_SOURCE_ALL 

Bits for all events.

NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ADAPTER0 

Listen for command event(s). Event raised on write.

NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ADAPTER1 
NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ADAPTER2 
NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ADAPTER3 
NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ADAPTER4 
NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ADAPTER5 
NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ADAPTER6 
NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ADAPTER7 
NT_EVENT_LISTEN_TIMESTAMP_SAMPLE_ALL 

Definition at line 76 of file stream_event.h.

Enumerator
NT_EVENT_SAMPLE_TIMESTAMP 

Definition at line 115 of file stream_event.h.

Port events
NT_EVENT_PORT_NIM_INSERTED and NT_EVENT_PORT_NIM_REMOVED will also be issued during the load of ntservice if a NIM is present/not present at this time. These events are not issued for fixed ports like RJ45.

If the link goes up or down, then NT_EVENT_PORT_LINK_UP and NT_EVENT_PORT_LINK_DOWN are issued. A special case is relevant if the link goes down and then shortly afterwards comes up again, and at the same time sampling is used to detect link changes (in contrast to interrupt). In this case this link-down glitch might go undetected by the sampling itself. For most adapters, however, a sticky bit is set when the link goes down and remains in this state until cleared. If, therefore, the link is up at the current sampling, and it was also up at the last sampling, but the sticky bit indicates that the link has been down, then an NT_EVENT_PORT_LINK_DOWN event followed immediately by an NT_EVENT_PORT_LINK_UP event are issued. In this case the log will also indicate that a link down glitch has occurred. It should be noted that the link might go up and down several times during a sampling period but this only counts as ONE link down glitch. Whether sampling or interrupt is used to detect link changes is adapter dependent.

The following figure illustrates a link-down glitch:

LinkDownGlitch1.png
Link-down Glitch


Enumerator
NT_EVENT_PORT_LINK_UP 

Port link up event.

NT_EVENT_PORT_LINK_DOWN 

Port link down event.

NT_EVENT_RXAUI_LINK_ERROR 

Port RXAUI link error.

NT_EVENT_PORT_BYPASS_ACTIVATED 

Port bypass activated event.

NT_EVENT_PORT_BYPASS_DEACTIVATED 

Port bypass deactivated event.

NT_EVENT_PORT_NIM_INSERTED 

Port NIM inserted/found event.

NT_EVENT_PORT_NIM_REMOVED 

Port NIM removed/not-found event.

Definition at line 148 of file stream_event.h.

Sensor events

Enumerator
NT_EVENT_SENSOR_ALARM_STATE_ENTRY 

Sensor enters alarm state.

NT_EVENT_SENSOR_ALARM_STATE_EXIT 

Sensor exits alarm state.

Definition at line 161 of file stream_event.h.

Event time sync information

Enumerator
NT_EVENT_TIMESYNC_PPS_REQUEST_TIME 

Request for PPS reference time.

Definition at line 169 of file stream_event.h.

Event time sync state machine information

Enumerator
NT_EVENT_TIMESYNC_TIME_REFERENCE_LOST 

Time reference is lost.

NT_EVENT_TIMESYNC_TIME_REFERENCE_SELECT 

Select time reference.

NT_EVENT_TIMESYNC_TIME_REFERENCE_SELECT_FAIL 

Fail to select time reference.

NT_EVENT_TIMESYNC_TIME_IN_SYNC 

TS clock changed from out-of-sync to in-sync with master clock based on configured threshold value. Note: no timestamp value supplied.

NT_EVENT_TIMESYNC_TIME_OUT_OF_SYNC 

TS clock changed from in-sync to out-of-sync with master clock based on configured threshold value. note: no timestamp value supplied.

NT_EVENT_TIMESYNC_PTP_STATE_CHANGE 

Change of PTP state.

NT_EVENT_TIMESYNC_TIME_STAMP_CLOCK_SET 

Absolute value assigned to time stamp clock.

NT_EVENT_TIMESYNC_EXTERNAL_DEVICE_LOST_SYNC_SIGNAL 

External device lost synchronization signal.

NT_EVENT_TIMESYNC_EXTERNAL_DEVICE_OUT_OF_SYNC 

External device is out of synchronization.

NT_EVENT_TIMESYNC_EXTERNAL_DEVICE_LOST_TIME_OF_DAY 

External device lost time of day information.

Definition at line 176 of file stream_event.h.