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

Functions

static bool_t Run_M1553_RT_Receive (int32_t cardIndex, int32_t module, uint32_t modid)
 
static int32_t UpdateTxDataBlock (uint16_t DevNum, naibrd_1553_rt_subaddress_t Subaddress)
 
static int32_t UpdateTxBuffer (uint16_t DevNum, uint16_t nDataBlkID)
 
static int32_t ProcessMessages (uint16_t DevNum, naibrd_1553_rt_subaddress_t Subaddress, int32_t duration)
 
int32_t m1553_rt_recv (void)
 The purpose of the M1553_RT_Receive is to illustrate the methods to call in the naibrd library to configure the 1553 channel as a Remote Terminal, legalize Subaddress 2 for Tx, Rx and Broadcast messages, and set it up to receive data using double buffers 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. 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 * DEF_CONFIG_FILE = (int8_t *)"default_1553_RTReceive.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 uint16_t DATA_BLOCK_ID_BCST = 4
 
static const int32_t DEF_RT_CHANNEL = 1
 
static const int16_t DEF_RT_DEV_NUM = 1
 
static const uint16_t DEF_RT_ADDRESS = 1
 
static const uint16_t DEF_RT_SUBADDR = 2
 
static const uint16_t RTBC_WORDCNT = 32
 
static int32_t currDataBlock
 

Function Documentation

◆ m1553_rt_recv()

int32_t m1553_rt_recv ( void )

The purpose of the M1553_RT_Receive is to illustrate the methods to call in the naibrd library to configure the 1553 channel as a Remote Terminal, legalize Subaddress 2 for Tx, Rx and Broadcast messages, and set it up to receive data using double buffers 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. While the RT is running, Tx buffer data will be updated periodically by incrementing all 32 data words of Tx data.

◆ ProcessMessages()

static int32_t ProcessMessages ( uint16_t DevNum,
naibrd_1553_rt_subaddress_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 )
static

◆ UpdateTxBuffer()

static int32_t UpdateTxBuffer ( uint16_t DevNum,
uint16_t nDataBlkID )
static

◆ UpdateTxDataBlock()

static int32_t UpdateTxDataBlock ( uint16_t DevNum,
naibrd_1553_rt_subaddress_t Subaddress )
static

Variable Documentation

◆ currDataBlock

int32_t currDataBlock
static

◆ DATA_BLOCK_ID_BCST

const uint16_t DATA_BLOCK_ID_BCST = 4
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_CONFIG_FILE

const int8_t* DEF_CONFIG_FILE = (int8_t *)"default_1553_RTReceive.txt"
static

◆ DEF_RT_ADDRESS

const uint16_t DEF_RT_ADDRESS = 1
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_SUBADDR

const uint16_t DEF_RT_SUBADDR = 2
static

◆ RTBC_WORDCNT

const uint16_t RTBC_WORDCNT = 32
static