Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
ar429_loopback.c File Reference

Functions

static bool_t AR_Loopback_run ()
 AR_Loopback_run queries the user for the card, module and channel to configure the ARINC receiver as well as the data rate (high (100kHz) or low (12.5 kHz)). The receiving ARINC channel is configured for FIFO receive mode. This application also queries the user for the card, module and channel to configure an ARINC transmitter. In order for the receiver to receive data from the transmitter the receive and transmit channels must be connected externally. The receive and transmit functions may be set on the same channel, in which case the channel will perform an internal loopback and data sent will be received back.
 
static bool_t AR_TxSchedule (int32_t cardIndex, int32_t module, int32_t channel, naibrd_ar_tx_mode_t txmode)
 
static const char * commandToStr (naibrd_ar_sched_cmd_t cmd)
 
static bool_t AR_TxRxFIFO (int32_t cardIndex, int32_t module, int32_t channelRx, int32_t channelTx, naibrd_ar_tx_mode_t txmode, naibrd_ar_rx_mode_t rxmode)
 
static void waitForStatus (int32_t cardIndex, int32_t module, int32_t channel, uint32_t status, int32_t timeout)
 
static bool_t AR_LoopbackTX (int32_t cardIndex, int32_t module, int32_t channelTx, naibrd_ar_tx_mode_t txmode)
 
static bool_t RxAndDisplayFIFOMsgs (int32_t cardIndex, int32_t module, int32_t channelRx)
 
static bool_t RxandDisplayFIFOandMailBox (int32_t cardIndex, int32_t module, int32_t channel)
 
int32_t ar429_loopback (void)
 The purpose of ar429_loopback is to illustrate the methods to call in the naibrd library to configure two ARINC channels and transmit from one channel while receiving from the other. The two channels must reside on the same module for successful message reception.
 

Variables

static const int8_t * CONFIG_FILE = (const int8_t *)"default_ARLoopback.txt"
 
static bool_t bTimestampEnabled = NAI_FALSE
 

Function Documentation

◆ ar429_loopback()

int32_t ar429_loopback ( void )

The purpose of ar429_loopback is to illustrate the methods to call in the naibrd library to configure two ARINC channels and transmit from one channel while receiving from the other. The two channels must reside on the same module for successful message reception.

The following system configuration routines from the nai_sys_cfg.c file are called to assist with the configuration setup for this program prior to calling the naibrd ARINC routines.

  • ConfigDevice
  • DisplayDeviceCfg
  • GetBoardSNModCfg
  • CheckModule

◆ AR_Loopback_run()

static bool_t AR_Loopback_run ( )
static

AR_Loopback_run queries the user for the card, module and channel to configure the ARINC receiver as well as the data rate (high (100kHz) or low (12.5 kHz)). The receiving ARINC channel is configured for FIFO receive mode. This application also queries the user for the card, module and channel to configure an ARINC transmitter. In order for the receiver to receive data from the transmitter the receive and transmit channels must be connected externally. The receive and transmit functions may be set on the same channel, in which case the channel will perform an internal loopback and data sent will be received back.

◆ AR_LoopbackTX()

static bool_t AR_LoopbackTX ( int32_t cardIndex,
int32_t module,
int32_t channelTx,
naibrd_ar_tx_mode_t txmode )
static

◆ AR_TxRxFIFO()

static bool_t AR_TxRxFIFO ( int32_t cardIndex,
int32_t module,
int32_t channelRx,
int32_t channelTx,
naibrd_ar_tx_mode_t txmode,
naibrd_ar_rx_mode_t rxmode )
static

◆ AR_TxSchedule()

static bool_t AR_TxSchedule ( int32_t cardIndex,
int32_t module,
int32_t channel,
naibrd_ar_tx_mode_t txmode )
static

◆ commandToStr()

static const char * commandToStr ( naibrd_ar_sched_cmd_t cmd)
static

◆ RxandDisplayFIFOandMailBox()

static bool_t RxandDisplayFIFOandMailBox ( int32_t cardIndex,
int32_t module,
int32_t channel )
static

◆ RxAndDisplayFIFOMsgs()

static bool_t RxAndDisplayFIFOMsgs ( int32_t cardIndex,
int32_t module,
int32_t channelRx )
static

◆ waitForStatus()

static void waitForStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
uint32_t status,
int32_t timeout )
static

Variable Documentation

◆ bTimestampEnabled

bool_t bTimestampEnabled = NAI_FALSE
static

◆ CONFIG_FILE

const int8_t* CONFIG_FILE = (const int8_t *)"default_ARLoopback.txt"
static