Software Library API naibrd 2.24.0
See all documentation at naii.docs.com

Functions

NAIBRDFUNC naibrd_1553_t NAIAPI naibrd_1553_CmdWordCreate (uint16_t *p_outcommandWord, naibrd_1553_rt_address_t rtAddress, naibrd_1553_messageDirection_t messageDirection, naibrd_1553_rt_subaddress_t subaddressOrMode, uint16_t wordCountOrModeCode)
 Create a 1553 command word using the given parameters.
 
NAIBRDFUNC char_t *NAIAPI naibrd_1553_GetBlkStatusWordErrorString (naibrd_1553_gen_device_mode_t mode, uint16_t blockStatus)
 Build and return a string in which the designated errors are textually reported. If no error is designated, a null string is returned.
 

Detailed Description

Function Documentation

◆ naibrd_1553_CmdWordCreate()

NAIBRDFUNC naibrd_1553_t NAIAPI naibrd_1553_CmdWordCreate ( uint16_t * p_outcommandWord,
naibrd_1553_rt_address_t rtAddress,
naibrd_1553_messageDirection_t messageDirection,
naibrd_1553_rt_subaddress_t subaddressOrMode,
uint16_t wordCountOrModeCode )

Create a 1553 command word using the given parameters.

Parameters
p_outcommandWord: (Output) The constructed Command Word.
rtAddress: (Input) Remote Terminal Address (0-31).
messageDirection: (Input) Message Direction (0: Receive, 1: Transmit).
subaddressOrMode: (Input) Subaddress (0-31).
wordCountOrModeCode: (Input) Data Word Count or Mode Code (0-31).
Returns
  • NAI_SUCCESS
  • NAIBRD_1553_RC_INVALID_PARAMETER when commandWord pointer is null
  • NAIBRD_1553_RC_INVALID_RT_ADDRESS when value of rtAddress is invalid
  • NAIBRD_1553_RC_INVALID_DIRECTION_BIT when value of messageDirection is invalid
  • NAIBRD_1553_RC_INVALID_SUBADDRESS_OR_MODE_SELECTOR when value of subaddressOrMode is invalid
  • NAIBRD_1553_RC_INVALID_WORD_COUNT_OR_MODE_CODE when value of wordCountOrModeCode is invalid

◆ naibrd_1553_GetBlkStatusWordErrorString()

NAIBRDFUNC char_t *NAIAPI naibrd_1553_GetBlkStatusWordErrorString ( naibrd_1553_gen_device_mode_t mode,
uint16_t blockStatus )

Build and return a string in which the designated errors are textually reported. If no error is designated, a null string is returned.

Note:

  • Block status word errors are relevant only with modes BC, RT, and MT, and the interpretation of errors is mode-dependent.
  • This function returns the same error string as the DDC library, though without the redundant trailing space, in order to stay compatible with DDC.
  • This function returns a pointer to a static string and not to a dynamically allocated string or a user supplied string only in order to stay compatible with DDC. This behavior isn't thread safe, and in case thread-1 calls this function right after thread-0, the string that has been originally returned to thread-0 is principally changed.

Equivalent DDC definition: aceGetBSWErrString

Parameters
mode: (Input) Operation mode.
blockStatus(Input) A block status word that typically designates one or more errors.
Returns
  • Pointer to an error string, or null string if no error.