Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
BC Control and Monitoring Functions

Functions

NAIBRDFUNC naibrd_1553_t NAIAPI naibrd_1553_BcStart (int16_t device, int16_t frameId, int32_t frameCount)
 Start the Bus Controller (BC).
 
NAIBRDFUNC naibrd_1553_t NAIAPI naibrd_1553_BcStop (int16_t device)
 Stop the Bus Controller (BC).
 
NAIBRDFUNC naibrd_1553_t NAIAPI naibrd_1553_BcGetActiveState (int16_t device, naibrd_1553_bc_active_state_t *p_outcurrentState)
 Get the activation state, idle or busy, of given BC device.
 
NAIBRDFUNC naibrd_1553_t NAIAPI naibrd_1553_BcGetConditionCodeState (int16_t device, naibrd_1553_bc_conditionCode_t conditionCode, uint16_t *p_outcurrentState)
 Read the BC Condition Code register to get the current condition state.
 

Detailed Description

Function Documentation

◆ naibrd_1553_BcGetActiveState()

NAIBRDFUNC naibrd_1553_t NAIAPI naibrd_1553_BcGetActiveState ( int16_t device,
naibrd_1553_bc_active_state_t * p_outcurrentState )

Get the activation state, idle or busy, of given BC device.

Note:

  • A BC device becomes busy when it starts running a frame, and automatically returns to idle when all required frame iterations are finished (i.e., halt command reached).

Equivalent DDC definition: aceBCGetStatus

Parameters
device: (Input) Logical Device Number (0-31).
p_outcurrentState: (Output) Activation state (NAIBRD_1553_BC_STATE_BUSY or NAIBRD_1553_BC_STATE_IDLE).
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAIBRD_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAIBRD_1553_RC_INVALID_MODE when device mode is not set to BC

◆ naibrd_1553_BcGetConditionCodeState()

NAIBRDFUNC naibrd_1553_t NAIAPI naibrd_1553_BcGetConditionCodeState ( int16_t device,
naibrd_1553_bc_conditionCode_t conditionCode,
uint16_t * p_outcurrentState )

Read the BC Condition Code register to get the current condition state.

Parameters
device: (Input) Logical Device Number (0-31).
conditionCode: (Input) Condition Code. Valid values:
* NAIBRD_1553_BC_COND_GPF_EQUAL_FLAG
* NAIBRD_1553_BC_COND_GPF_LESS_THAN_FLAG
* NAIBRD_1553_BC_COND_GPF0
* NAIBRD_1553_BC_COND_GPF1
* NAIBRD_1553_BC_COND_GPF2
* NAIBRD_1553_BC_COND_GPF3
* NAIBRD_1553_BC_COND_GPF4
* NAIBRD_1553_BC_COND_GPF5
* NAIBRD_1553_BC_COND_GPF6
* NAIBRD_1553_BC_COND_GPF7
* NAIBRD_1553_BC_COND_NO_RESPONSE
* NAIBRD_1553_BC_COND_FORMAT_ERROR
* NAIBRD_1553_BC_COND_GOOD_DATA_BLOCK_TRANSFER
* NAIBRD_1553_BC_COND_MASKED_STATUS
* NAIBRD_1553_BC_COND_BAD_MESSAGE
* NAIBRD_1553_BC_COND_RETRY_COUNT
* NAIBRD_1553_BC_COND_ALWAYS
* 
p_outcurrentState: (Output) If wConditionCode equals NAI_1553_BC_COND_RETRY_COUNT, then this parameter returns any one of the following values.
* 0 (no retry)
* 1 (one retry)
* 2 (Not used)
* 3 (2 retries)
* 
For all other values of wConditionCode, this parameter returns 0 (NAI_FALSE) or 1 (NAI_TRUE).
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAIBRD_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAIBRD_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAIBRD_1553_RC_INVALID_STATE when device is not in running state
  • NAIBRD_1553_RC_INVALID_PARAMETER when conditionCode parameter is invalid or p_outcurrentState is null

◆ naibrd_1553_BcStart()

NAIBRDFUNC naibrd_1553_t NAIAPI naibrd_1553_BcStart ( int16_t device,
int16_t frameId,
int32_t frameCount )

Start the Bus Controller (BC).

Parameters
device: (Input) Logical Device Number (0-31).
frameId: (Input) Unique Frame ID.
frameCount: (Input) Number of times frame is to be executed (zero also means single Tx) or NAIBRD_1553_BC_FRAME_RUN_FOREVER to run forever.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAIBRD_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAIBRD_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAIBRD_1553_RC_INVALID_STATE when device is in an invalid state
  • NAIBRD_1553_RC_INVALID_PARAMETER when swFrameId and/or sdwFrameCount is invalid
  • NAIBRD_1553_RC_UNDEFINED_NODE when the frame of swFrameId is not defined
  • NAIBRD_1553_RC_NOT_MAJOR_FRAME when the frame of swFrameId is not a major frame

◆ naibrd_1553_BcStop()

NAIBRDFUNC naibrd_1553_t NAIAPI naibrd_1553_BcStop ( int16_t device)

Stop the Bus Controller (BC).

Parameters
device: (Input) Logical Device Number (0-31).
Returns
  • NAIBRD_SUCCESS when function is completed successfully
  • NAIBRD_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAIBRD_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAIBRD_1553_RC_INVALID_STATE when device is in an invalid state