Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
AR-568 Buffer and Channel Status Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_GetTxFifoCnt (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outcount)
 Returns the number of 32-bit ARINC-568 words in the transmit FIFO of the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_GetRxFifoCnt (int32_t cardIndex, int32_t module, int32_t channel, int32_t *p_outcount)
 Returns the number of ARINC-568 messages in the receive FIFO of the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_GetChanMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ar568_chan_mapped_status_type_t statusType, nai_status_bit_t *p_outstatusBit)
 Read a channel mapped status bit for the specified channel and status type. Valid status types are defined by the naibrd_ar568_chan_mapped_status_type_t enumeration. Only BIT statuses are able to be read using this function. Refer to naibrd_AR568_GetEventMappedStatus() for reading event mapped statuses.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_GetChanMappedStatusRaw (int32_t cardIndex, int32_t module, naibrd_ar568_chan_mapped_status_type_t statusType, uint32_t *p_outstatusRaw)
 Read a channel mapped status register for the specified status type. Valid status types are defined by the naibrd_ar568_chan_mapped_status_type_t enumeration. Only BIT statuses are able to be read using this function. Refer to naibrd_AR568_GetEventMappedStatusRaw() for reading event mapped statuses.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_ClearChanMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ar568_chan_mapped_status_type_t statusType)
 Clears the user specified latched status bit on the user specified channel. Only BIT statuses are able to be cleared using this function. Refer to naibrd_AR568_ClearEventMappedStatus() for clearing event mapped statuses. NOTE: this function does not apply to *_REALTIME status types, which do not clear. If a *_REALTIME status type is specified, this function returns NAI_ERROR_INVALID_VALUE.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_ClearChanMappedStatusRaw (int32_t cardIndex, int32_t module, naibrd_ar568_chan_mapped_status_type_t statusType, uint32_t statusRaw)
 Clears one or more latched channel mapped status bits for the user specified status type. Only BIT statuses are able to be cleared using this function. Refer to naibrd_AR568_ClearEventMappedStatusRaw() for clearing event mapped statuses. NOTE: this function does not apply to *_REALTIME status types, which do not clear. If a *_REALTIME status type is specified, this function returns NAI_ERROR_INVALID_VALUE.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_GetEventMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ar568_event_mapped_status_type_t statusType, nai_status_bit_t *p_outstatusBit)
 Read an event mapped status bit for the specified channel and status type. Valid status types are defined by the naibrd_ar568_event_mapped_status_type_t enumeration.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_GetEventMappedStatusRaw (int32_t cardIndex, int32_t module, int32_t channel, nai_status_access_type_t accessType, naibrd_ar568_event_mapped_category_type_t categoryType, uint32_t *p_outstatusRaw)
 This function reads an event mapped status register for the specified channel. Logic 1 is active.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_ClearEventMappedStatus (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ar568_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 (dynamic) and latched status registers. The latched status bit will only clear if the user writes a '1' to the bit. This function is used to clear a user-specified bit in the latched status register. NOTE: If a _REALTIME status type is provided, the function will return NAI_ERROR_INVALID_VALUE since realtime status bits are not cleared by the user.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_ClearEventMappedStatusRaw (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ar568_event_mapped_category_type_t categoryType, uint32_t statusRaw)
 This function clears one or more latched event mapped status bits. When an event occurs, the corresponding status bit gets set in both the realtime (dynamic) and latched status registers. The latched status bit will only clear if the user writes a '1' to the bit. This function is used to clear one or more user-specified bits in the latched status register.
 

Detailed Description

Function Documentation

◆ naibrd_AR568_ClearChanMappedStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_ClearChanMappedStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_ar568_chan_mapped_status_type_t statusType )

Clears the user specified latched status bit on the user specified channel. Only BIT statuses are able to be cleared using this function. Refer to naibrd_AR568_ClearEventMappedStatus() for clearing event mapped statuses. NOTE: this function does not apply to *_REALTIME status types, which do not clear. If a *_REALTIME status type is specified, this function returns NAI_ERROR_INVALID_VALUE.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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) AR Status Type - refer to naibrd_ar568_chan_mapped_status_type_t definition.
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid statusType is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_AR568_ClearChanMappedStatusRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_ClearChanMappedStatusRaw ( int32_t cardIndex,
int32_t module,
naibrd_ar568_chan_mapped_status_type_t statusType,
uint32_t statusRaw )

Clears one or more latched channel mapped status bits for the user specified status type. Only BIT statuses are able to be cleared using this function. Refer to naibrd_AR568_ClearEventMappedStatusRaw() for clearing event mapped statuses. NOTE: this function does not apply to *_REALTIME status types, which do not clear. If a *_REALTIME status type is specified, this function returns NAI_ERROR_INVALID_VALUE.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
statusType: (Input) AR Status Type - refer to naibrd_ar568_chan_mapped_status_type_t definition.
statusRaw: (Input) 32-bit unsigned int representing OR'ed combination of channel-mapped status bits to clear. Refer to naibrd_ar568_chan_status_bit_mask_t for status bit masks.
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid statusType is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_AR568_ClearEventMappedStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_ClearEventMappedStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_ar568_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 (dynamic) and latched status registers. The latched status bit will only clear if the user writes a '1' to the bit. This function is used to clear a user-specified bit in the latched status register. NOTE: If a _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 connect 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_ar568_event_mapped_status_type_t definition.
Returns
  • NAI_SUCCESS when the device has been initialized successfully
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid statusType is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_AR568_ClearEventMappedStatusRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_ClearEventMappedStatusRaw ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_ar568_event_mapped_category_type_t categoryType,
uint32_t statusRaw )

This function clears one or more latched event mapped status bits. When an event occurs, the corresponding status bit gets set in both the realtime (dynamic) and latched status registers. The latched status bit will only clear if the user writes a '1' to the bit. This function is used to clear one or more user-specified bits in the latched status register.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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) Event Status Category (NAIBRD_AR568_EVENT_MAP_GENERAL).
statusRaw: (Input) Set event status bit. See naibrd_ar568_event_mapped_status_mask_t for definition.
   NAIBRD_AR568_EVENT_STATUS_GENERAL_RX_DATA_AVAIL           Rx Data Available
   NAIBRD_AR568_EVENT_STATUS_GENERAL_RX_FIFO_EMPTY           Rx FIFO Empty
   NAIBRD_AR568_EVENT_STATUS_GENERAL_RX_FIFO_ALM_EMPTY       Rx FIFO Almost Empty
   NAIBRD_AR568_EVENT_STATUS_GENERAL_RX_FIFO_ALM_FULL        Rx FIFO Almost Full
   NAIBRD_AR568_EVENT_STATUS_GENERAL_RX_FIFO_FULL            Rx FIFO Full
   NAIBRD_AR568_EVENT_STATUS_GENERAL_RX_FIFO_READ_ERROR      Rx FIFO Read Error
   NAIBRD_AR568_EVENT_STATUS_GENERAL_RX_FIFO_OVERFLOW        Rx FIFO Overflow
   NAIBRD_AR568_EVENT_STATUS_GENERAL_RX_FRAME_ERROR          Rx Frame Error
   NAIBRD_AR568_EVENT_STATUS_GENERAL_TX_BUSY                 Tx Busy
   NAIBRD_AR568_EVENT_STATUS_GENERAL_TX_FIFO_EMPTY           Tx FIFO Empty
   NAIBRD_AR568_EVENT_STATUS_GENERAL_TX_FIFO_ALM_EMPTY       Tx FIFO Almost Empty
   NAIBRD_AR568_EVENT_STATUS_GENERAL_TX_FIFO_ALM_FULL        Tx FIFO Almost Full
   NAIBRD_AR568_EVENT_STATUS_GENERAL_TX_FIFO_FULL            Tx FIFO Full
   NAIBRD_AR568_EVENT_STATUS_GENERAL_TX_FIFO_OVERFLOW        Tx FIFO Overflow
Returns
  • NAI_SUCCESS when the device has been initialized successfully
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified. NAI_ERROR_INVALID_VALUE when invalid categoryType is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_AR568_GetChanMappedStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_GetChanMappedStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_ar568_chan_mapped_status_type_t statusType,
nai_status_bit_t * p_outstatusBit )

Read a channel mapped status bit for the specified channel and status type. Valid status types are defined by the naibrd_ar568_chan_mapped_status_type_t enumeration. Only BIT statuses are able to be read using this function. Refer to naibrd_AR568_GetEventMappedStatus() for reading event mapped statuses.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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) AR Channel Mapped Status Type - refer to naibrd_ar568_chan_mapped_status_type_t definition.
p_outstatusBit: (Output) Status (NAI_STATUS_BIT_LO or NAI_STATUS_BIT_HI).
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid statusType is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_AR568_GetChanMappedStatusRaw()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_GetChanMappedStatusRaw ( int32_t cardIndex,
int32_t module,
naibrd_ar568_chan_mapped_status_type_t statusType,
uint32_t * p_outstatusRaw )

Read a channel mapped status register for the specified status type. Valid status types are defined by the naibrd_ar568_chan_mapped_status_type_t enumeration. Only BIT statuses are able to be read using this function. Refer to naibrd_AR568_GetEventMappedStatusRaw() for reading event mapped statuses.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
statusType: (Input) AR Channel Mapped Status Type - refer to naibrd_ar568_chan_mapped_status_type_t definition.
p_outstatusRaw: (Output) 32-bit unsigned int representing OR'ed combination of channel-mapped status bits. Refer to naibrd_ar568_chan_status_bit_mask_t for status bit masks.
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid statusType is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_AR568_GetEventMappedStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_GetEventMappedStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_ar568_event_mapped_status_type_t statusType,
nai_status_bit_t * p_outstatusBit )

Read an event mapped status bit for the specified channel and status type. Valid status types are defined by the naibrd_ar568_event_mapped_status_type_t enumeration.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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) AR Event Mapped Status Type - refer to naibrd_ar568_event_mapped_status_type_t definition.
p_outstatusBit: (Output) Status (NAI_STATUS_BIT_LO or NAI_STATUS_BIT_HI).
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid statusType is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_AR568_GetEventMappedStatusRaw()

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

This function reads an event mapped status register for the specified channel. Logic 1 is active.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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 Access Type (NAI_STATUS_LATCHED or NAI_STATUS_REALTIME).
categoryType: (Input) Event Status Category (NAIBRD_AR568_EVENT_MAP_GENERAL).
p_outstatusRaw: (Output) Channel status word indicating which statuses are set. This word is an OR'ed combination of the following bit masks (taken from naibrd_ar568_event_mapped_status_mask_t definition):
   NAIBRD_AR568_EVENT_STATUS_GENERAL_RX_DATA_AVAIL           Rx Data Available
   NAIBRD_AR568_EVENT_STATUS_GENERAL_RX_FIFO_EMPTY           Rx FIFO Empty
   NAIBRD_AR568_EVENT_STATUS_GENERAL_RX_FIFO_ALM_EMPTY       Rx FIFO Almost Empty
   NAIBRD_AR568_EVENT_STATUS_GENERAL_RX_FIFO_ALM_FULL        Rx FIFO Almost Full
   NAIBRD_AR568_EVENT_STATUS_GENERAL_RX_FIFO_FULL            Rx FIFO Full
   NAIBRD_AR568_EVENT_STATUS_GENERAL_RX_FIFO_READ_ERROR      Rx FIFO Read Error
   NAIBRD_AR568_EVENT_STATUS_GENERAL_RX_FIFO_OVERFLOW        Rx FIFO Overflow
   NAIBRD_AR568_EVENT_STATUS_GENERAL_RX_FRAME_ERROR          Rx Frame Error
   NAIBRD_AR568_EVENT_STATUS_GENERAL_TX_BUSY                 Tx Busy
   NAIBRD_AR568_EVENT_STATUS_GENERAL_TX_FIFO_EMPTY           Tx FIFO Empty
   NAIBRD_AR568_EVENT_STATUS_GENERAL_TX_FIFO_ALM_EMPTY       Tx FIFO Almost Empty
   NAIBRD_AR568_EVENT_STATUS_GENERAL_TX_FIFO_ALM_FULL        Tx FIFO Almost Full
   NAIBRD_AR568_EVENT_STATUS_GENERAL_TX_FIFO_FULL            Tx FIFO Full
   NAIBRD_AR568_EVENT_STATUS_GENERAL_TX_FIFO_OVERFLOW        Tx FIFO Overflow
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid accessType or categoryType is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_AR568_GetRxFifoCnt()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_GetRxFifoCnt ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t * p_outcount )

Returns the number of ARINC-568 messages in the receive FIFO of the specified channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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]).
p_outcount: (Output) Number of ARINC messages in the receive FIFO.
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_AR568_GetTxFifoCnt()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR568_GetTxFifoCnt ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t * p_outcount )

Returns the number of 32-bit ARINC-568 words in the transmit FIFO of the specified channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to connect 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]).
p_outcount: (Output) Number of 32-bit ARINC words in the transmit FIFO.
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_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.