Software Library API naibrd 1.62
See all documentation at naii.docs.com
1553 Service Functions

Functions

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_CommandWordCreate (uint16_t *wpCommandWord, uint16_t wRtAddress, uint16_t wMessageDirection, uint16_t wSubaddressOrMode, uint16_t wWordCountOrModeCode)
 Create a 1553 command word using the given parameters.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_CommandWordParse (uint16_t wCommandWord, uint16_t *wpRtAddress, uint16_t *wpMessageDirection, uint16_t *wpSubaddressOrMode, uint16_t *wpWordCountOrModeCode)
 Parses the given 1553 command word and returns its individual parts.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_GetStatusString (nai_1553_t status, char_t *spErrorString, uint16_t wMaxStringLength)
 This function returns a string that describes the specified error code.
 
NAIBRDFUNC uint16_t NAIAPI naibrd_1553_GetLibVersion (void)
 Retrieves the naibrd library version information.
 

Detailed Description


Function Documentation

◆ naibrd_1553_CommandWordCreate()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_CommandWordCreate ( uint16_t * wpCommandWord,
uint16_t wRtAddress,
uint16_t wMessageDirection,
uint16_t wSubaddressOrMode,
uint16_t wWordCountOrModeCode )

Create a 1553 command word using the given parameters.

Parameters
wpCommandWord: (Output) The constructed Command Word.
wRtAddress: (Input) Remote Terminal Address (0-31).
wMessageDirection: (Input) Message Direction (0: Receive, 1: Transmit).
wSubaddressOrMode: (Input) Subaddress (0-31).
wWordCountOrModeCode: (Input) Data Word Count or Mode Code (0-31).
Returns
  • NAI_SUCCESS
  • NAI_1553_RC_INVALID_PARAMETER when wpCommandWord pointer is null
  • NAI_1553_RC_INVALID_RT_ADDRESS when value of wRtAddress is invalid
  • NAI_1553_RC_INVALID_DIRECTION_BIT when value of wMessageDirection is invalid
  • NAI_1553_RC_INVALID_SUBADDRESS_OR_MODE_SELECTOR when value of wSubaddressOrMode is invalid
  • NAI_1553_RC_INVALID_WORD_COUNT_OR_MODE_CODE when value of wWordCountOrModeCode is invalid

◆ naibrd_1553_CommandWordParse()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_CommandWordParse ( uint16_t wCommandWord,
uint16_t * wpRtAddress,
uint16_t * wpMessageDirection,
uint16_t * wpSubaddressOrMode,
uint16_t * wpWordCountOrModeCode )

Parses the given 1553 command word and returns its individual parts.

Parameters
wCommandWord: (Input) The Command Word.
wpRtAddress: (Output) Remote Terminal Address.
wpMessageDirection: (Output) Message Direction (0: Receive, 1: Transmit).
wpSubaddressOrMode: (Output) Subaddress.
wpWordCountOrModeCode: (Output) Data Word Count or Mode Code.
Returns
  • NAI_SUCCESS
  • NAI_1553_RC_INVALID_PARAMETER when any of wpRtAddress, wpMessageDirection, wpSubaddressOrMode or wpWordCountOrModeCode pointers are null

◆ naibrd_1553_GetLibVersion()

NAIBRDFUNC uint16_t NAIAPI naibrd_1553_GetLibVersion ( void )

Retrieves the naibrd library version information.

Returns
  • naibrd library version number x.x.x

◆ naibrd_1553_GetStatusString()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_GetStatusString ( nai_1553_t status,
char_t * spErrorString,
uint16_t wMaxStringLength )

This function returns a string that describes the specified error code.

Parameters
status: (Input) The Error Code.
spErrorString: (Output) Pointer to the buffer where the Error String is returned.
wMaxStringLength: (Input) The size of the buffer in which the Error String is returned.
Returns
  • NAI_SUCCESS
  • NAI_1553_RC_INVALID_PARAMETER when spErrorString is null
  • NAI_1553_RC_INVALID_BUFFER when wMaxStringLength is less than 80 bytes