Software Library API naibrd 2.24.0
See all documentation at naii.docs.com

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_GetEventMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ser_event_mapped_status_type_t statusType, nai_status_bit_t *p_outstatusBit)
 Retrieves the value (status set or status not set) for a specific event mapped status. Use this function if you want to get only one status at a time. Use to naibrd_SER_GetEventMappedStatusRaw if you want to get more than one status at a time.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_ClearEventMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ser_event_mapped_status_type_t statusType)
 Clears the specified event mapped status bit. When an event occurs, the corresponding status bit gets set in both the realtime and latched status registers. This function is used to clear a user-specified bit in the latched status register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_GetEventMappedStatusRaw (int32_t cardIndex, int32_t module, int32_t channel, nai_status_access_type_t accessType, naibrd_ser_event_mapped_category_type_t categoryType, uint32_t *p_outstatusRaw)
 Retrieves the raw event mapped status for the specified channel. Use this function if you want to get more than one status at a time.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_ClearEventMappedStatusRaw (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ser_event_mapped_category_type_t categoryType, uint32_t statusRaw)
 Clears the latched status for the specified channel. Use this function if you want to clear more than one status at a time.
 

Detailed Description

Function Documentation

◆ naibrd_SER_ClearEventMappedStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_ClearEventMappedStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_ser_event_mapped_status_type_t statusType )

Clears the specified event mapped status bit. When an event occurs, the corresponding status bit gets set in both the realtime and latched status registers. This function is used to clear a user-specified bit in the latched status register.

Note
If any realtime status type is provided, the function will return NAI_ERROR_INVALID_VALUE since realtime status bits are not cleared by the user.
Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
statusType: (Input) Status Type to clear. Refer to the naibrd_ser_event_mapped_status_type_t.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when an incorrect parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SER_ClearEventMappedStatusRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_ClearEventMappedStatusRaw ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_ser_event_mapped_category_type_t categoryType,
uint32_t statusRaw )

Clears the latched status for the specified channel. Use this function if you want to clear more than one status at a time.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
categoryType: (Input) The category of the event mapped status. Use NAIBRD_SER_EVENT_MAP_COMM (clearing of statuses in the FIFO category is not supported, only realtime access is available for FIFO statuses.
statusRaw: (Output) Raw event mapped status word of events to clear. This word is an OR'ed combination of the following possible bits: refer to naibrd_ser_event_mapped_status_mask_t.
  Parity Error                0x00000001
  Rx Buffer Almost Full       0x00000002
  CRC Error                   0x00000004
  Rx Complete (ETX recd)      0x00000008
  Rx Data Available           0x00000010
  Rx Overrun                  0x00000020
  High Watermark Reached      0x00000040
  Low Watermark Reached       0x00000080
  Tx Buffer Almost Empty      0x00000100
  Tx Complete                 0x00000200
  TimeOut Occurred            0x00000400
  Break Abort                 0x00000800
  Sync Char Detected          0x00001000
  CTS High Detect (rise)      0x00002000
  CTS Low Detect (fall)       0x00004000
  CTS/GPI 1                   0x00008000
  GPI 2 (SC3 Only)            0x00010000
  Gap Timeout Occurred        0x00020000
  Built in Self Test Passed   0x40000000
  Channel Configured          0x80000000
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when an incorrect parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SER_GetEventMappedStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_GetEventMappedStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_ser_event_mapped_status_type_t statusType,
nai_status_bit_t * p_outstatusBit )

Retrieves the value (status set or status not set) for a specific event mapped status. Use this function if you want to get only one status at a time. Use to naibrd_SER_GetEventMappedStatusRaw if you want to get more than one status at a time.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
statusType: (Input) The status to check the value of.
p_outstatusBit: (Output) NAI_STATUS_BIT_LO for status not set and NAI_STATUS_BIT_HI for status set.<

>

Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when an incorrect parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_SER_GetEventMappedStatusRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_SER_GetEventMappedStatusRaw ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_status_access_type_t accessType,
naibrd_ser_event_mapped_category_type_t categoryType,
uint32_t * p_outstatusRaw )

Retrieves the raw event mapped status for the specified channel. Use this function if you want to get more than one status at a time.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
accessType: (Input) Status Type (NAI_STATUS_LATCHED or NAI_STATUS_REALTIME).
categoryType: (Input) The category of the raw event mapped status to get. Use NAIBRD_SER_EVENT_MAP_COMM to get all COMM statuses or use NAIBRD_SER_EVENT_MAP_FIFO to get all FIFO statuses.
p_outstatusRaw: (Output) Raw event mapped status word. This word is an OR'ed combination of the following possible bits: refer to naibrd_ser_event_mapped_status_mask_t.
  Parity Error               0x00000001
  Rx Buffer Almost Full      0x00000002
  CRC Error                  0x00000004
  Rx Complete (ETX recd)     0x00000008
  Rx Data Available          0x00000010
  Rx Overrun                 0x00000020
  High Watermark Reached     0x00000040
  Low Watermark Reached      0x00000080
  Tx Buffer Almost Empty     0x00000100
  Tx Complete                0x00000200
  TimeOut Occurred           0x00000400
  Break Abort                0x00000800
  Sync Char Detected         0x00001000
  CTS High Detect (rise)     0x00002000
  CTS Low Detect (fall)      0x00004000
  CTS/GPI 1                  0x00008000
  GPI 2 (SC3 Only)           0x00010000
  Gap Timeout Occurred       0x00020000
  Built in Self Test Passed  0x40000000
  Channel Configured         0x80000000
<

>

Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when an incorrect parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.