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

Functions

static bool_t Run_M1553_RT_Receive (int32_t cardIndex, int32_t module, uint32_t modid, bool_t isAlternateMode)
 
static int32_t UpdateTxDataBlock (uint16_t DevNum, uint8_t Subaddress)
 
static int32_t UpdateTxBuffer (uint16_t DevNum, uint16_t nDataBlkID)
 
static int32_t ProcessMessages (uint16_t DevNum, uint8_t Subaddress, int32_t duration)
 
static int32_t SetStatusBits (uint16_t DevNum, uint32_t modid, bool_t isAlternateMode, uint16_t *statusBitMask)
 
int32_t m1553_rt_receive_status_bits (void)
 The purpose of the m1553_rt_receive_status_bits is to illustrate the methods to call in the naibrd library to configure the 1553 channel as a Remote Terminal, legalize Subaddress 2 for both Tx and Rx, set the RT stautus bits, and set it up to receive data using an Rx double buffer and transmit data from two alternating Tx buffers (active and inactive). If a Rx message is received, the received data will be displayed. If a Tx message is received, the data in the active Tx buffer will be sent to the bus and display the status word. While the RT is running, Tx buffer data will be updated periodically by incrementing all 32 data words of Tx data.
 

Variables

static const int8_t * CONFIG_FILE = (int8_t *)"default_1553_RTReceive_StatusBits.txt"
 
static const uint16_t DATA_BLOCK_ID_TX1 = 1
 
static const uint16_t DATA_BLOCK_ID_TX2 = 2
 
static const uint16_t DATA_BLOCK_ID_RX = 3
 
static const int16_t DEF_RT_CARD_INDEX = 0
 
static const int32_t DEF_RT_MODULE = 1
 
static const int32_t DEF_RT_CHANNEL = 1
 
static const int16_t DEF_RT_DEV_NUM = 1
 
static const uint8_t DEF_RT_ADDRESS = 1
 
static const uint8_t DEF_RT_SUBADDR = 2
 
static const uint16_t DEF_RT_RX_BUF_TYPE = NAIBRD_1553_RT_DATABLOCK_DOUBLE
 
static const uint16_t RTBC_WORDCNT = 32
 
static int32_t currDataBlock
 
static uint16_t statusMask
 

Function Documentation

◆ m1553_rt_receive_status_bits()

int32_t m1553_rt_receive_status_bits ( void )

The purpose of the m1553_rt_receive_status_bits is to illustrate the methods to call in the naibrd library to configure the 1553 channel as a Remote Terminal, legalize Subaddress 2 for both Tx and Rx, set the RT stautus bits, and set it up to receive data using an Rx double buffer and transmit data from two alternating Tx buffers (active and inactive). If a Rx message is received, the received data will be displayed. If a Tx message is received, the data in the active Tx buffer will be sent to the bus and display the status word. While the RT is running, Tx buffer data will be updated periodically by incrementing all 32 data words of Tx data.

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 1553 routines.

  • ConfigDevice
  • DisplayDeviceCfg
  • GetBoardSNModCfg
  • CheckModule

◆ ProcessMessages()

static int ProcessMessages ( uint16_t DevNum,
uint8_t Subaddress,
int32_t duration )
static

◆ Run_M1553_RT_Receive()

static bool_t Run_M1553_RT_Receive ( int32_t cardIndex,
int32_t module,
uint32_t modid,
bool_t isAlternateMode )
static

◆ SetStatusBits()

int32_t SetStatusBits ( uint16_t DevNum,
uint32_t modid,
bool_t isAlternateMode,
uint16_t * statusBitMask )
static

◆ UpdateTxBuffer()

static int32_t UpdateTxBuffer ( uint16_t DevNum,
uint16_t nDataBlkID )
static

◆ UpdateTxDataBlock()

static int32_t UpdateTxDataBlock ( uint16_t DevNum,
uint8_t Subaddress )
static

Variable Documentation

◆ CONFIG_FILE

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

◆ currDataBlock

int32_t currDataBlock
static

◆ DATA_BLOCK_ID_RX

const uint16_t DATA_BLOCK_ID_RX = 3
static

◆ DATA_BLOCK_ID_TX1

const uint16_t DATA_BLOCK_ID_TX1 = 1
static

◆ DATA_BLOCK_ID_TX2

const uint16_t DATA_BLOCK_ID_TX2 = 2
static

◆ DEF_RT_ADDRESS

const uint8_t DEF_RT_ADDRESS = 1
static

◆ DEF_RT_CARD_INDEX

const int16_t DEF_RT_CARD_INDEX = 0
static

◆ DEF_RT_CHANNEL

const int32_t DEF_RT_CHANNEL = 1
static

◆ DEF_RT_DEV_NUM

const int16_t DEF_RT_DEV_NUM = 1
static

◆ DEF_RT_MODULE

const int32_t DEF_RT_MODULE = 1
static

◆ DEF_RT_RX_BUF_TYPE

const uint16_t DEF_RT_RX_BUF_TYPE = NAIBRD_1553_RT_DATABLOCK_DOUBLE
static

◆ DEF_RT_SUBADDR

const uint8_t DEF_RT_SUBADDR = 2
static

◆ RTBC_WORDCNT

const uint16_t RTBC_WORDCNT = 32
static

◆ statusMask

uint16_t statusMask
static