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

Functions

NAIBRDFUNC naibrd_1553_t NAIAPI naibrd_1553_Open (int32_t cardIndex, int32_t module, int32_t channel, int16_t device)
 Opens one 1553 unit (a "device" in DDC API). This function must be called to associate the device with the card, module, and channel mapping before any core functions are called.
 
NAIBRDFUNC naibrd_1553_t NAIAPI naibrd_1553_Init (int16_t device, naibrd_1553_gen_device_access_t access, naibrd_1553_gen_device_mode_t deviceMode, uint32_t sizeOfAllocatedMemory, uint32_t registersAddress, uint32_t memoryAddress)
 Initializes hardware resources such as memory and register space for a particular mode of operation.
 

Detailed Description

Function Documentation

◆ naibrd_1553_Init()

NAIBRDFUNC naibrd_1553_t NAIAPI naibrd_1553_Init ( int16_t device,
naibrd_1553_gen_device_access_t access,
naibrd_1553_gen_device_mode_t deviceMode,
uint32_t sizeOfAllocatedMemory,
uint32_t registersAddress,
uint32_t memoryAddress )

Initializes hardware resources such as memory and register space for a particular mode of operation.

Parameters
device: (Input) Logical Device Number (0-31).
access: (Input) Specifies the type of access to be used by the device (NAIBRD_1553_ACCESS_CARD, NAIBRD_1553_ACCESS_SIM, NAIBRD_1553_ACCESS_USR).
deviceMode: (Input) Specifies the mode of operation that the device is to be initialized to.
* NAIBRD_1553_MODE_BC
* Sets up the device to run as a bus controller
* NAIBRD_1553_MODE_RT
* Sets up the device to run as a remote terminal
* NAIBRD_1553_MODE_MT
* Sets up the device to run as a monitor
* NAIBRD_1553_MODE_RTMT
* Sets up the device to run in combination remote terminal and monitor mode
* 
To enable retrieval of messages via the 1553 Message FIFO, the deviceMode should be OR'ed with NAIBRD_1553_ASSISTED_MODE. When this mode is enabled, the following functions are disabled: naibrd_1553_BcGetMsgByIdRaw naibrd_1553_BcMsgGetByIdDecoded naibrd_1553_RtMsgGetFromStackRaw naibrd_1553_RtMsgGetFromStackDecoded naibrd_1553_MtMsgGetFromStackRaw naibrd_1553_MtMsgGetFromStackDecoded
sizeOfAllocatedMemory: (Input) Unused.
registersAddress: (Input) Unused.
memoryAddress: (Input) Unused.
Returns
  • NAI_SUCCESS when the device has been initialized successfully
  • NAIBRD_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAIBRD_1553_RC_INVALID_ACCESS when the access type specified is invalid
  • NAIBRD_1553_RC_INVALID_MODE when the mode of operation selected is invalid
  • NAIBRD_1553_RC_INVALID_MODE_OPTIONS when the mode options selected are invalid

◆ naibrd_1553_Open()

NAIBRDFUNC naibrd_1553_t NAIAPI naibrd_1553_Open ( int32_t cardIndex,
int32_t module,
int32_t channel,
int16_t device )

Opens one 1553 unit (a "device" in DDC API). This function must be called to associate the device with the card, module, and channel mapping before any core functions are called.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
device: (Input) Unit index (0-31).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid module parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_IN_USE when the device is already opened.