Software Library API naibrd 1.62
See all documentation at naii.docs.com
Transmit and Receive Operation Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_SetTxEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable)
 Enables or disables the Transmitter of the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_GetTxEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outenable)
 Reads the state of the Transmitter of the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_SetRxEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable)
 Enables or disables the receiver of the channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_GetRxEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outenable)
 Reads the receiver enabled / disabled status of the channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_WriteWord (int32_t cardIndex, int32_t module, int32_t channel, uint32_t wordvalue)
 This function will add a 32-bit word to the transmit FIFO of the specified channel. The single word is passed as a parameter. (For A4 modules, the Tx FIFO is incremented after internally writing the lower 16-bit word).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_ReadWord (int32_t cardIndex, int32_t module, int32_t channel, bool_t timeStampEnabled, uint16_t *outstatus, uint32_t *outdata, uint32_t *outtimestamp)
 This function reads the status, 32-bit data, and the timestamp (if enabled) from the receive FIFO of the specified channel. If the channel is an ARINC-568 channel, only data is read (no status or timestamp).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_TransmitBuffer (int32_t cardIndex, int32_t module, int32_t channel, int32_t msglen, uint32_t *msgbuf, int32_t *outmsglen)
 This function will write multiple 32-bit words of data to the transmit FIFO of the specified channel. Pointers to a buffer and a length are passed as parameters. The actual number of words placed in the buffer is returned. If the available space in the FIFO is less than the number of messages being placed in the FIFO, the messages are not placed in the FIFO and instead, the available space in the FIFO is returned in a variable.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_ReadFifo (int32_t cardIndex, int32_t module, int32_t channel, bool_t timeStampEnabled, uint32_t msglen, uint32_t *outstatus, uint32_t *outdata, uint32_t *outtimestamp, int32_t *outnummsgs)
 This function reads the status, the 32-bit ARINC data, and the time stamp (if time stamping is enabled) from the receive FIFO of the specified channel for the number of words (of data) specified (up to 255).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_ReadFifoMBox (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outdata)
 This function will read one word (A4: 16-bit, AR1: 32-bit) from the FIFO of the specified channel. In MailBox Mode, this word contains the SDI/Label of the MailBox with a new message.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_ReadMBox (int32_t cardIndex, int32_t module, int32_t channel, bool_t timeStampEnabled, int32_t label, uint16_t *outstatus, uint32_t *outdata, uint32_t *outtimestamp)
 This will read the ARINC data and associated status (and timestamp, if enabled) from the Mailbox specified by the label for the specified channel.
 

Detailed Description


Function Documentation

◆ naibrd_AR_GetRxEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_GetRxEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * outenable )

Reads the receiver enabled / disabled status of the channel specified.

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]).
outenable: (Output) Receiver enabled (1) or disabled (0).
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_AR_GetTxEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_GetTxEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * outenable )

Reads the state of the Transmitter 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]).
outenable: (Output) Transmit enabled (1) or disabled (0).
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_AR_ReadFifo()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_ReadFifo ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t timeStampEnabled,
uint32_t msglen,
uint32_t * outstatus,
uint32_t * outdata,
uint32_t * outtimestamp,
int32_t * outnummsgs )

This function reads the status, the 32-bit ARINC data, and the time stamp (if time stamping is enabled) from the receive FIFO of the specified channel for the number of words (of data) specified (up to 255).

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]).
timeStampEnabled: (Input) Indication if timestamp is enabled.
msglen: (Input) Number of ARINC messages to read back. Note outstatus, outdata and outdata parameters must have memory allocated for this number of ARINC messages.
outstatus: (Output) FIFO status word.
outdata: (Output) 32-bit data word.
outtimestamp: (Output) Time stamp.
outnummsgs: (Output) Number of ARINC msgs read from 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_AR_ReadFifoMBox()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_ReadFifoMBox ( int32_t cardIndex,
int32_t module,
int32_t channel,
uint32_t * outdata )

This function will read one word (A4: 16-bit, AR1: 32-bit) from the FIFO of the specified channel. In MailBox Mode, this word contains the SDI/Label of the MailBox with a new message.

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]).
outdata: (Output) Single word read from FIFO which represents SDI/Label of received ARINC message.
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_AR_ReadMBox()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_ReadMBox ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t timeStampEnabled,
int32_t label,
uint16_t * outstatus,
uint32_t * outdata,
uint32_t * outtimestamp )

This will read the ARINC data and associated status (and timestamp, if enabled) from the Mailbox specified by the label for 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]).
timeStampEnabled: (Input) Indication if timestamp is enabled.
label: (Input) Least 10 bits of ARINC Word comprising SDI/Label (0 - 1023).
outstatus: (Output) 16-bit status word.
outdata: (Output) 32-bit data word value (16-bit Hi Word + 16-bit Lo word).
outtimestamp: (Output) 32-bit Time Stamp (if time stamping is enabled).
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_AR_ReadWord()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_ReadWord ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t timeStampEnabled,
uint16_t * outstatus,
uint32_t * outdata,
uint32_t * outtimestamp )

This function reads the status, 32-bit data, and the timestamp (if enabled) from the receive FIFO of the specified channel. If the channel is an ARINC-568 channel, only data is read (no status or timestamp).

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]).
timeStampEnabled: (Input) Indication if timestamp is enabled.
outstatus: (Output) 16-bit status word.
outdata: (Output) 32-bit data word.
outtimestamp: (Output) 32-bit Time Stamp (If time stamping is enabled).
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_EMPTY when there is no ARINC messages in the receive FIFO.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_AR_SetRxEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_SetRxEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t enable )

Enables or disables the receiver of the channel specified.

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]).
enable: (Input) Enable (1) or disable (0) the receiver.
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_AR_SetTxEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_SetTxEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t enable )

Enables or disables the Transmitter 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]).
enable: (Input) Transmit enable (1) or disable (0).
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_AR_TransmitBuffer()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_TransmitBuffer ( int32_t cardIndex,
int32_t module,
int32_t channel,
int32_t msglen,
uint32_t * msgbuf,
int32_t * outmsglen )

This function will write multiple 32-bit words of data to the transmit FIFO of the specified channel. Pointers to a buffer and a length are passed as parameters. The actual number of words placed in the buffer is returned. If the available space in the FIFO is less than the number of messages being placed in the FIFO, the messages are not placed in the FIFO and instead, the available space in the FIFO is returned in a variable.

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]).
msglen: (Input) Number of 32-bit words of data in msgbuffer.
msgbuf: (Input) Arinc messages.
outmsglen: (Output) Number of 32-bit words placed on Tx FIFO or if there isn't enough room in the TX Fifo, the number of messages that can be placed on the Tx 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_INVALID_VALUE when buffer is not a valid pointer and/or outlength is less than zero.
  • NAI_ERROR_FULL when there is not enough room in the FIFO, outmsglen will indicate how much room there is.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_AR_WriteWord()

NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_WriteWord ( int32_t cardIndex,
int32_t module,
int32_t channel,
uint32_t wordvalue )

This function will add a 32-bit word to the transmit FIFO of the specified channel. The single word is passed as a parameter. (For A4 modules, the Tx FIFO is incremented after internally writing the lower 16-bit word).

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]).
wordvalue: (Input) 32-bit word value to write.
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_FULL when there is not enough room in the FIFO.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.