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

Functions

static bool_t Run_m1553_bc_send_msgSchedule (int32_t cardIndex, int32_t module, uint32_t modid)
 Run_m1553_bc_send_msgSchedule initializes the 1553 device as a bus controller (BC) and sends out a message. This routine demonstrates the following API functions in the 1553 naibrd library: naibrd_1553_Open naibrd_1553_Initialize naibrd_1553_BcDataBlockCreate naibrd_1553_BcMessageCreateBcToRt naibrd_1553_BcCommandCreate naibrd_1553_BcFrameCreate naibrd_1553_BcDataBlockWrite naibrd_1553_BcStart naibrd_1553_BcStop naibrd_1553_Free.
 
static bool_t RunSendMessageSchedule (int32_t cardIndex, int32_t module, int32_t channel, uint32_t modid)
 
int32_t m1553_bc_run_sched (void)
 The purpose of the M1553_BC_RunSchedule is to illustrate the methods to call in the naibrd library to configure the 1553 channel as a Bus Controller and to send various messages at different periodic rates. Specifically, Message 1 is sent at a rate of 400 Hz (every 2.5 ms), Message 2 is sent at a rate of 200 Hz (every 5 ms) and Message 3 is sent at a rate of 100 Hz (every 10 ms). Three 2.5 ms minor frames are used to manage the periodicity of these messages. Minor Frame 1 contains Messages 1, 2 and 3. Minor Frame 2 contains Messages 1 and 2 only. Minor Frame 3 only contains Message 1. By chaining these frames together in the following order:
 

Variables

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

Function Documentation

◆ m1553_bc_run_sched()

int32_t m1553_bc_run_sched ( void )

The purpose of the M1553_BC_RunSchedule is to illustrate the methods to call in the naibrd library to configure the 1553 channel as a Bus Controller and to send various messages at different periodic rates. Specifically, Message 1 is sent at a rate of 400 Hz (every 2.5 ms), Message 2 is sent at a rate of 200 Hz (every 5 ms) and Message 3 is sent at a rate of 100 Hz (every 10 ms). Three 2.5 ms minor frames are used to manage the periodicity of these messages. Minor Frame 1 contains Messages 1, 2 and 3. Minor Frame 2 contains Messages 1 and 2 only. Minor Frame 3 only contains Message 1. By chaining these frames together in the following order:

Minor Frame 1 | Minor Frame 3 | Minor Frame 2 | Minor Frame 3

Message 1 is sent every 2.5 ms, Message 2 is sent every 5 ms and Message 3 is sent every 10 ms.

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

◆ Run_m1553_bc_send_msgSchedule()

static bool_t Run_m1553_bc_send_msgSchedule ( int32_t cardIndex,
int32_t module,
uint32_t modid )
static

Run_m1553_bc_send_msgSchedule initializes the 1553 device as a bus controller (BC) and sends out a message. This routine demonstrates the following API functions in the 1553 naibrd library: naibrd_1553_Open naibrd_1553_Initialize naibrd_1553_BcDataBlockCreate naibrd_1553_BcMessageCreateBcToRt naibrd_1553_BcCommandCreate naibrd_1553_BcFrameCreate naibrd_1553_BcDataBlockWrite naibrd_1553_BcStart naibrd_1553_BcStop naibrd_1553_Free.

◆ RunSendMessageSchedule()

static bool_t RunSendMessageSchedule ( int32_t cardIndex,
int32_t module,
int32_t channel,
uint32_t modid )
static

Variable Documentation

◆ DEF_CONFIG_FILE

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