Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
|
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. The enabling of the transmitter should occur after configuration of the channel is completed by the user. In particular, make sure to set the Tx Mode with naibrd_AR_SetTransmitSendMode() prior to enabling the transmitter. Otherwise, the module may exhibit undefined behavior. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_AR_GetTxEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_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. The enabling of the receiver should occur after configuration of the channel is completed by the user. In particular, make sure to set the Rx Mode with naibrd_AR_SetReceiveMode() prior to enabling the receiver. Otherwise, the module may exhibit undefined behavior. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_AR_GetRxEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *p_outenable) |
Reads the receiver enabled / disabled status of the channel specified. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_AR_LoadTxFifo (int32_t cardIndex, int32_t module, int32_t channel, int32_t txCount, const uint32_t *p_buffer, int32_t *p_outtxCount) |
This function will write multiple 32-bit words of data to the transmit FIFO of the specified channel. A pointer to a buffer and 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 the output variable. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_AR_ReadRxFifo (int32_t cardIndex, int32_t module, int32_t channel, bool_t timeStampEnabled, int32_t rxCount, uint32_t *p_outstatus, uint32_t *p_outdata, uint32_t *p_outtimeStamp, int32_t *p_outrxCount) |
This function reads new ARINC messages from the receive FIFO buffer. If timestamping is ENABLED and a new ARINC message is received, the receive FIFO will contain a new entry comprising three 32-bit words: status word, ARINC word and timestamp word. Under this scenario, if the user calls this function by passing in a 1 for rxCount, three words will be read from the receive FIFO to retrieve the status word, ARINC word and timestamp word. If timestamping is DISABLED and a new ARINC message is received, the receive FIFO will contain a new entry comprising two 32-bit words: status word and ARINC word. In this case, if the user calls this function by passing in a 1 for rxCount, two words will be read from the receive FIFO to retrieve the status word and ARINC word. NOTE: The user must indicate whether or not timestamping is enabled on this channel using the timeStampEnabled input parameter. Timestamping on a channel by channel basis is enabled or disabled with naibrd_AR_SetRxTimeStampEn(). | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_AR_ReadMBoxRxFifo (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *p_outSDILabel) |
This function, which is only used in Mailbox Receive mode, is used to retrieve SDI/Labels of new ARINC messages that have arrived in their respective mailboxes. In Mailbox Receive mode, which is configured with the function naibrd_AR_SetReceiveMode(), the hardware reserves 1024 32-bit words in module memory for 1024 mailboxes. Each mailbox is associated with a unique address given by the SDI/Label, of which there are 1024 (0 to 0x3FF) values. This function will read one 32-bit word from the Rx FIFO of the specified channel. This word will contain only the SDI/Label of the new ARINC message. Call naibrd_AR_ReadMBox with this SDI/Label to retrieve the new ARINC message from the mailbox. NOTE: The specified channel must be in Mailbox Receive mode for this function to work properly. This function will NOT check to make sure the channel is in the correct Receive mode. | |
NAIBRDFUNC nai_status_t NAIAPI | naibrd_AR_ReadMBox (int32_t cardIndex, int32_t module, int32_t channel, bool_t timeStampEnabled, uint32_t SDILabel, uint16_t *p_outstatus, uint32_t *p_outdata, uint32_t *p_outtimeStamp) |
This function, which is only used in Mailbox Receive mode, is used to read ARINC messages from mailboxes. This function will read the ARINC word and associated status (and timestamp, if enabled) from the Mailbox specified by the SDI/Label. Use the naibrd_AR_ReadMBoxRxFifo function to read off any new SDI/Labels for which a new ARINC message has arrived. Then use this function to fetch the new ARINC message for that SDI/Label. NOTE: The specified channel must be in Mailbox Receive mode for this function to work properly. This function will NOT check to make sure the channel is in the correct Receive mode. Additionally, the user must indicate whether or not timestamping is enabled on this channel using the timeStampEnabled input parameter. Timestamping on a channel by channel basis is enabled or disabled with naibrd_AR_SetRxTimeStampEn(). | |
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_GetRxEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t * | p_outenable ) |
Reads the receiver enabled / disabled status of the channel specified.
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_outenable | : (Output) Receiver enabled (1) or disabled (0). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_GetTxEnable | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t * | p_outenable ) |
Reads the state of the Transmitter of the specified channel.
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_outenable | : (Output) Transmit enabled (1) or disabled (0). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_LoadTxFifo | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
int32_t | txCount, | ||
const uint32_t * | p_buffer, | ||
int32_t * | p_outtxCount ) |
This function will write multiple 32-bit words of data to the transmit FIFO of the specified channel. A pointer to a buffer and 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 the output variable.
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]). |
txCount | : (Input) Number of 32-bit words of data in p_buffer. |
p_buffer | : (Input) Arinc messages. |
p_outtxCount | : (Output) Number of 32-bit words placed on Tx FIFO. Or if there is not enough room in the FIFO, this value will indicate how much room there is available and status will return NAI_ERROR_FULL. |
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_ReadMBox | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | timeStampEnabled, | ||
uint32_t | SDILabel, | ||
uint16_t * | p_outstatus, | ||
uint32_t * | p_outdata, | ||
uint32_t * | p_outtimeStamp ) |
This function, which is only used in Mailbox Receive mode, is used to read ARINC messages from mailboxes. This function will read the ARINC word and associated status (and timestamp, if enabled) from the Mailbox specified by the SDI/Label. Use the naibrd_AR_ReadMBoxRxFifo function to read off any new SDI/Labels for which a new ARINC message has arrived. Then use this function to fetch the new ARINC message for that SDI/Label. NOTE: The specified channel must be in Mailbox Receive mode for this function to work properly. This function will NOT check to make sure the channel is in the correct Receive mode. Additionally, the user must indicate whether or not timestamping is enabled on this channel using the timeStampEnabled input parameter. Timestamping on a channel by channel basis is enabled or disabled with naibrd_AR_SetRxTimeStampEn().
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) Indicate if timestamp is enabled (NAI_TRUE = enabled, NAI_FALSE = disabled). |
SDILabel | : (Input) Least 10 bits of ARINC Word comprising SDI/Label (0x0 - 0x3FF). The format of this word is the following: Bits 8 and 9 SDI Bits 0 to 7 Label |
p_outstatus | : (Output) 16-bit status word. |
p_outdata | : (Output) 32-bit ARINC word. |
p_outtimeStamp | : (Output) 32-bit Time Stamp (if time stamping is enabled). |
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_ReadMBoxRxFifo | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
uint32_t * | p_outSDILabel ) |
This function, which is only used in Mailbox Receive mode, is used to retrieve SDI/Labels of new ARINC messages that have arrived in their respective mailboxes. In Mailbox Receive mode, which is configured with the function naibrd_AR_SetReceiveMode(), the hardware reserves 1024 32-bit words in module memory for 1024 mailboxes. Each mailbox is associated with a unique address given by the SDI/Label, of which there are 1024 (0 to 0x3FF) values. This function will read one 32-bit word from the Rx FIFO of the specified channel. This word will contain only the SDI/Label of the new ARINC message. Call naibrd_AR_ReadMBox with this SDI/Label to retrieve the new ARINC message from the mailbox. NOTE: The specified channel must be in Mailbox Receive mode for this function to work properly. This function will NOT check to make sure the channel is in the correct Receive mode.
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_outSDILabel | : (Output) Single word read from FIFO which contains the SDI/Label of a received ARINC message. The format of this word is the following: Bits 31 to 10 Unused Bits 9 to 8 SDI Bits 7 to 0 Label |
NAIBRDFUNC nai_status_t NAIAPI naibrd_AR_ReadRxFifo | ( | int32_t | cardIndex, |
int32_t | module, | ||
int32_t | channel, | ||
bool_t | timeStampEnabled, | ||
int32_t | rxCount, | ||
uint32_t * | p_outstatus, | ||
uint32_t * | p_outdata, | ||
uint32_t * | p_outtimeStamp, | ||
int32_t * | p_outrxCount ) |
This function reads new ARINC messages from the receive FIFO buffer. If timestamping is ENABLED and a new ARINC message is received, the receive FIFO will contain a new entry comprising three 32-bit words: status word, ARINC word and timestamp word. Under this scenario, if the user calls this function by passing in a 1 for rxCount, three words will be read from the receive FIFO to retrieve the status word, ARINC word and timestamp word. If timestamping is DISABLED and a new ARINC message is received, the receive FIFO will contain a new entry comprising two 32-bit words: status word and ARINC word. In this case, if the user calls this function by passing in a 1 for rxCount, two words will be read from the receive FIFO to retrieve the status word and ARINC word. NOTE: The user must indicate whether or not timestamping is enabled on this channel using the timeStampEnabled input parameter. Timestamping on a channel by channel basis is enabled or disabled with naibrd_AR_SetRxTimeStampEn().
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) Indicate if timestamp is enabled (NAI_TRUE = enabled, NAI_FALSE = disabled). |
rxCount | : (Input) Number of ARINC messages to attempt to read from the receive FIFO. Note that the user should provide arrays for p_outstatus, p_outdata and p_outtimestamp that are large enough to hold the requested number of ARINC messages. |
p_outstatus | : (Output) Pointer to a user-supplied array that will contain message status words. |
p_outdata | : (Output) Pointer to a user-supplied array that will contain 32-bit ARINC words. |
p_outtimeStamp | : (Output) Pointer to a user-supplied array that will contain timestamps. |
p_outrxCount | : (Output) Number of ARINC messages actually read from FIFO. |
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. The enabling of the receiver should occur after configuration of the channel is completed by the user. In particular, make sure to set the Rx Mode with naibrd_AR_SetReceiveMode() prior to enabling the receiver. Otherwise, the module may exhibit undefined behavior.
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. |
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. The enabling of the transmitter should occur after configuration of the channel is completed by the user. In particular, make sure to set the Tx Mode with naibrd_AR_SetTransmitSendMode() prior to enabling the transmitter. Otherwise, the module may exhibit undefined behavior.
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 (NAI_TRUE) or disable (NAI_FALSE). |