Software Library API naibrd 1.62
See all documentation at naii.docs.com
1553 Bus Controller (BC) Functions

Functions

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcConfig (int16_t swDevice, uint32_t dwOptions)
 Initialize the device as a bus controller (BC) with the given initialization options.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcSetMessageRetryPolicy (int16_t swDevice, uint16_t wNumberOfRetries, uint16_t wFirstRetryBus, uint16_t wSecondRetryBus, uint16_t wReserved)
 Configure the message retry policy of given BC device to given number of retries and given first and second chance bus to retry the message with.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcStart (int16_t swDevice, int16_t swFrameId, int32_t sdwFrameCount)
 Start the Bus Controller (BC).
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcStop (int16_t swDevice)
 Stop the Bus Controller (BC).
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcCommandGetWord (uint16_t wHardwareOpcode, uint16_t wCondition, uint16_t *wpCommandOpcode)
 Generate a command word using given opcode and condition code. Odd parity is used for the generation of the parity bit (MSB) of the command opcode word.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcGetActivationState (int16_t swDevice, uint16_t *wpCurrentState)
 Get the activation state, idle or busy, of given BC device.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcDataBlockCreate (int16_t swDevice, int16_t swDataBlockId, uint16_t wDataBlockSize, uint16_t *wapBuffer, uint16_t wBufferSize)
 Create a BC data block with a unique identifier given by the swDataBlockId input parameter. This data block can be used by a BC message and can be 1-32 words long, single or double buffered.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcDataBlockDelete (int16_t swDevice, int16_t swDataBlockId)
 Delete the data block associated with the swDataBlockId identifier.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcDataBlockWrite (int16_t swDevice, int16_t swDataBlockId, uint16_t *wapBuffer, uint16_t wBufferSize, uint16_t wOffset)
 Write to a BC data block.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcDataBlockRead (int16_t swDevice, int16_t swDataBlockId, uint16_t *wapBuffer, uint16_t wBufferSize, uint16_t wOffset)
 Read a BC data block.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcFrameCreate (int16_t swDevice, int16_t swFrameId, uint16_t wFrameType, int16_t *swapCommandIds, uint16_t wCommandCount, uint16_t wFrameTime, uint16_t wFlags)
 Create a BC frame from an array of opcode IDs input by the user.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcFrameDelete (int16_t swDevice, int16_t swFrameId)
 Delete a BC frame.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcCommandCreate (int16_t swDevice, int16_t swCommandId, uint16_t wOpcode, uint16_t wCondition, uint32_t dwParameter1, uint32_t dwParameter2, uint32_t dwReserved)
 Create an opcode command for use in the creation of a frame.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcCommandDelete (int16_t swDevice, int16_t swCommandId)
 Delete an opcode command.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageCreateBcToRt (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wReceiverRt, uint16_t wReceiverRtSubaddress, uint16_t wWordCount, uint16_t wGapTime, uint32_t dwOptions)
 Create a BC to RT message.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageCreateRtToBc (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wTransmitterRt, uint16_t wTransmitterRtSubaddress, uint16_t wWordCount, uint16_t wGapTime, uint32_t dwOptions)
 Create a RT to BC message.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageCreateRtToRt (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wReceiverRt, uint16_t wReceiverRtSubaddress, uint16_t wWordCount, uint16_t wTransmitterRt, uint16_t wTransmitterRtSubaddress, uint16_t wGapTime, uint32_t dwOptions)
 Create a RT to RT message.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageCreateMode (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wRt, uint16_t wMessageDirection, uint16_t wModeCommand, uint16_t wGapTime, uint32_t dwOptions)
 Create a Mode message.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageCreateBcToBroadcast (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wReceiverRtSubaddress, uint16_t wWordCount, uint16_t wGapTime, uint32_t dwOptions)
 Create a BC to Broadcast message.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageCreateRtToBroadcast (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wReceiverRtSubaddress, uint16_t wWordCount, uint16_t wTransmitterRt, uint16_t wTransmitterRtSubaddress, uint16_t wGapTime, uint32_t dwOptions)
 Create a RT to Broadcast message.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageCreateBroadcastMode (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wMessageDirection, uint16_t wModeCommand, uint16_t wGapTime, uint32_t dwOptions)
 Create a Broadcast Mode message.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageCreate (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockIdForMessage1, uint16_t wBcControlWordForMessage1, uint16_t wCommandWord1ForMessage1, uint16_t wCommandWord2ForMessage1, uint16_t wGapTimeForMessage1, int16_t swDataBlockIdForMessage2, uint16_t wBcControlWordForMessage2, uint16_t wCommandWord1ForMessage2, uint16_t wCommandWord2ForMessage2, uint16_t wGapTimeForMessage2, uint32_t dwOptions)
 Create a single or dual BC message.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageModifyBcToRt (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wReceiverRt, uint16_t wReceiverRtSubaddress, uint16_t wWordCount, uint16_t wGapTime, uint32_t dwOptions, uint16_t wModificationFlags)
 Modify a BC to RT message that was previously created.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageModifyRtToBc (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wTransmitterRt, uint16_t wTransmitterRtSubaddress, uint16_t wWordCount, uint16_t wGapTime, uint32_t dwOptions, uint16_t wModificationFlags)
 Modify a RT to BC message that was previously created.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageModifyRtToRt (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wReceiverRt, uint16_t wReceiverRtSubaddress, uint16_t wWordCount, uint16_t wTransmitterRt, uint16_t wTransmitterRtSubaddress, uint16_t wGapTime, uint32_t dwOptions, uint16_t wModificationFlags)
 Modify a RT to RT message that was previously created.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageModifyMode (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wRt, uint16_t wMessageDirection, uint16_t wModeCommand, uint16_t wGapTime, uint32_t dwOptions, uint16_t wModificationFlags)
 Modify a Mode message that was previously created.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageModifyBcToBroadcast (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wReceiverRtSubaddress, uint16_t wWordCount, uint16_t wGapTime, uint32_t dwOptions, uint16_t wModificationFlags)
 Modify a BC to Broadcast message that was previously created.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageModifyRtToBroadcast (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wReceiverRtSubaddress, uint16_t wWordCount, uint16_t wTransmitterRt, uint16_t wTransmitterRtSubaddress, uint16_t wGapTime, uint32_t dwOptions, uint16_t wModificationFlags)
 Modify a RT to Broadcast message that was previously created.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageModifyBroadcastMode (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wMessageDirection, uint16_t wModeCommand, uint16_t wGapTime, uint32_t dwOptions, uint16_t wModificationFlags)
 Modify a Broadcast Mode message that was previously created.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageModify (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockIdForMessage1, uint16_t wBcControlWordForMessage1, uint16_t wCommandWord1ForMessage1, uint16_t wCommandWord2ForMessage1, uint16_t wGapTimeForMessage1, int16_t swDataBlockIdForMessage2, uint16_t wBcControlWordForMessage2, uint16_t wCommandWord1ForMessage2, uint16_t wCommandWord2ForMessage2, uint16_t wGapTimeForMessage2, uint16_t wModificationFlags)
 Modify a single or dual BC message that was previously created.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageDelete (int16_t swDevice, int16_t swMessageId)
 Delete a BC message.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcGetMessageByIdRaw (int16_t swDevice, int16_t swMessageId, uint16_t *wapBuffer, uint16_t wIsPurgeRequired)
 Reads a BC message (specified by the message ID) into a user supplied buffer in raw format.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageDecodeRaw (int16_t swDevice, uint16_t *wapBuffer, naiDecodedMessageStructure *dmspDecodedMessage)
 Decode a BC message in raw format into a decoded message structure.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageGetByIdDecoded (int16_t swDevice, int16_t swMessageId, naiDecodedMessageStructure *dmspDecodedMessage, uint16_t wIsPurgeRequired)
 Read either the next unread message or the latest message received on the stack based on the message ID.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcConfigureMessageGapTimerEnable (int16_t swDevice, uint16_t bIsMessageGapTimeFieldEnabled)
 Enable or disable the message gap time field for all messages.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcSetGpfState (int16_t swDevice, uint16_t wGpfNumber, uint16_t wEffect)
 Modify a General Purpose Flag (GPF). These flags allow the host to intervene and manipulate certain BC instructions (by way of conditional opcodes) while the BC is running. Using this function, the host can write to the GPF register to set, clear or toggle the flags.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcGetConditionState (int16_t swDevice, uint16_t wConditionCode, uint16_t *wpCurrentState)
 Read the BC Condition Code register to get the current condition.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcGpqRead (int16_t swDevice, naiGpqEntryStructure *gespGpqEntry)
 Read the next unread entry off of the General Purpose Queue (GPQ). The GPQ is used by the BC to convey data (time tag, block status, parameter value or data at memory address) to the host. To push data to the GPQ, use opcodes PTT, PBS, PSI or PSM. Data should be pushed to the GPQ in pairs, where the first value, the header, is pushed with PSI then the second value is pushed with any of the four aforementioned opcodes.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcGpqGetEntriesCount (int16_t swDevice)
 Return the number of entries in the General Purpose Queue.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcGpqGetOperationalStatistics (int16_t swDevice, naiGpqOperationalStatisticsStructure *gosspGpqOperationalStatistics, uint16_t bIsResetOfHighestRecordedPercentageRequired)
 Get operational statistics for the General Purpose Queue.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageCreateBcToRt (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wReceiverRt, uint16_t wReceiverRtSubaddress, uint16_t wWordCount, uint16_t wGapTime, uint32_t dwOptions, uint16_t *wapBuffer)
 Create an asynchronous BC to RT message. Note: This function creates a new data block of given ID and fills it with the contents of the given buffer.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageCreateRtToBc (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wTransmitterRt, uint16_t wTransmitterRtSubaddress, uint16_t wWordCount, uint16_t wGapTime, uint32_t dwOptions, uint16_t *wapBuffer)
 Create an asynchronous RT to BC message. Note: This function creates a new data block of given ID and fills it with the contents of the given buffer.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageCreateRtToRt (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wReceiverRt, uint16_t wReceiverRtSubaddress, uint16_t wWordCount, uint16_t wTransmitterRt, uint16_t wTransmitterRtSubaddress, uint16_t wGapTime, uint32_t dwOptions, uint16_t *wapBuffer)
 Create an asynchronous RT to RT message. Note: This function creates a new data block of given ID and fills it with the contents of the given buffer.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageCreateMode (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wRt, uint16_t wMessageDirection, uint16_t wModeCommand, uint16_t wGapTime, uint32_t dwOptions, uint16_t *wapBuffer)
 Create an asynchronous Mode message. Note: This function creates a new data block of given ID and fills it with the contents of the given buffer.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageCreateBcToBroadcast (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wReceiverRtSubaddress, uint16_t wWordCount, uint16_t wGapTime, uint32_t dwOptions, uint16_t *wapBuffer)
 Create an asynchronous BC to Broadcast message. Note: This function creates a new data block of given ID and fills it with the contents of the given buffer.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageCreateRtToBroadcast (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wReceiverRtSubaddress, uint16_t wWordCount, uint16_t wTransmitterRt, uint16_t wTransmitterRtSubaddress, uint16_t wGapTime, uint32_t dwOptions, uint16_t *wapBuffer)
 Create an asynchronous RT to Broadcast message. Note: This function creates a new data block of given ID and fills it with the contents of the given buffer.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageCreateBroadcastMode (int16_t swDevice, int16_t swMessageId, int16_t swDataBlockId, uint16_t wMessageDirection, uint16_t wModeCommand, uint16_t wGapTime, uint32_t dwOptions, uint16_t *wapBuffer)
 Create an asynchronous Broadcast Mode message. Note: This function creates a new data block of given ID and fills it with the contents of the given buffer.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageRemainingCount (int16_t swDevice)
 Returns the current number of asynchronous messages remaining in the low priority queue.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageSendOneAtLowPriority (int16_t swDevice, uint16_t wMessageId)
 This function is used to send a single low priority Asynchronous message. This is in contrast to naibrd_1553_BcAsynchronousMessageSendAtLowPriority* functions, which places all asynchronous messages on a low priority queue. Additionally, this function call does not block (no delays). If this function gets called again before the previous async message was sent, it will return an error. The user should specify the message ID of the asynchronous message to send. This function utilizes GPF-5 so the user should not use GPF-5 for any other purpose if this function is being called in the user application. This function is currently not supported in FTJ/FTK modules. This function is not a DDC compatible function.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageSendAtLowPriority_ExecuteOnce (int16_t swDevice, uint16_t *wpRemainingMessageCount, uint16_t wTimeFactor)
 NOTE: This function is an alternative to naibrd_1553_BcAsynchronousMessageSendAtLowPriority. Send asynchronous messages in the low priority queue. The order of message transmission is determined by the message ID (lowest ID first). The difference between this and naibrd_1553_BcAsynchronousMessageSendAtLowPriority is in the handling of async messages that return errors. If either function is called once while the BC is running and a transmitted async message returns an error (e.g. no response error), the message will continue to send on every iteration of the minor frame. However, this function can be called over and over and each time, it will regenerate the async frame only from messages that were not yet sent. In this way, async messages that were already transmitted, regardless of whether or not it returned an error, will stop sending and will need to be deleted and recreated in order to be sent again. The naibrd_1553_BcAsynchronousMessageSendAtLowPriority function does not possess this capability and will keep async messages with errors in the async queue to be sent over and over again no matter how many times the function is called. This function provides a level of software control to handle low priority async messages that are not communicated successfully. To use this function, the BC must be configured for low priority async mode using the naibrd_1553_BcConfig function. Please refer to the M1553_BC_SendMessage_Async sample C code for an example that utilizes this function effectively.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageSendAtLowPriority (int16_t swDevice, uint16_t *wpRemainingMessageCount, uint16_t wTimeFactor)
 NOTE: It is recommended to use naibrd_1553_BcAsynchronousMessageSendAtLowPriority_ExecuteOnce to send low priority messages (read its function description for more information). Send asynchronous messages on the low priority queue. The order of message transmission is determined by the message ID (lowest ID first). Once an asynchronous message is defined, it may be transmitted at high priority again and again as many times as the user requires, but it won't be transmitted more than once at low priority. Moreover, if an asynchronous message has already been transmitted at high priority, it won't be retransmitted at low priority even once. In order to force its retransmission in such a case, the message must be deleted and recreated. To use this function, the BC must be configured for low priority async mode using the naibrd_1553_BcConfig function.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageSendAtHighPriority_ExecuteOnce (int16_t swDevice, uint16_t wMessageId, uint16_t wTimeFactor)
 NOTE: This function is an alternative to naibrd_1553_BcAsynchronousMessageSendAtHighPriority. Send an asynchronous message with high priority. Once an asynchronous message is defined, it may be transmitted at high priority again and again as many times as the user requires, but it won't be transmitted more than once at low priority. Moreover, if an asynchronous message has already been transmitted at high priority, it won't be retransmitted at low priority even once. In order to force its retransmission in such a case, the message must be deleted and recreated. The async message will be transmitted only once per call to this function, even if it returns an error (e.g. no response error). This contrasts with naibrd_1553_BcAsynchronousMessageSendAtHighPriority, which forcibly re-sends the message if it returns an error. For this reason, this function is recommended over naibrd_1553_BcAsynchronousMessageSendAtHighPriority. To use this function, the BC must be configured for high priority async mode using the naibrd_1553_BcConfig function by OR'ing together NAI_1553_BC_ASYNCHRONOUS_HIGH_PRIORITY_MODE with NAI_1553_BC_ASYNCHRONOUS_HIGH_PRIORITY_ONCE_ANYWAY and passing it in as the dwOptions parameter. Please refer to the M1553_BC_SendMessage_Async sample C code for an example that utilizes this function effectively.
 
NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageSendAtHighPriority (int16_t swDevice, uint16_t wMessageId, uint16_t wTimeFactor)
 NOTE: It is recommended to use naibrd_1553_BcAsynchronousMessageSendAtHighPriority_ExecuteOnce to send high priority messages (read its function description for more information). Send an asynchronous message with high priority. Once an asynchronous message is defined, it may be transmitted at high priority again and again as many times as the user requires, but it won't be transmitted more than once at low priority. Moreover, if an asynchronous message has already been transmitted at high priority, it won't be retransmitted at low priority even once. In order to force its retransmission in such a case, the message must be deleted and recreated. To use this function, the BC must be configured for high priority async mode using the naibrd_1553_BcConfig function.
 

Detailed Description


Function Documentation

◆ naibrd_1553_BcAsynchronousMessageCreateBcToBroadcast()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageCreateBcToBroadcast ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wReceiverRtSubaddress,
uint16_t wWordCount,
uint16_t wGapTime,
uint32_t dwOptions,
uint16_t * wapBuffer )

Create an asynchronous BC to Broadcast message. Note: This function creates a new data block of given ID and fills it with the contents of the given buffer.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of data block to be created.
wReceiverRtSubaddress: (Input) Receiving RT Subaddress.
wWordCount: (Input) Message Word Count.
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
wapBuffer: (Input) Buffer containing data.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_SUITABLE_ASYNCHRONOUS_MODE_UNDEFINED when the suitable asynchronous mode is undefined
  • NAI_1553_RC_ASYNCHRONOUS_MESSAGE_ERROR when the count of asynchronous messages is greater than the maximum

◆ naibrd_1553_BcAsynchronousMessageCreateBcToRt()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageCreateBcToRt ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wReceiverRt,
uint16_t wReceiverRtSubaddress,
uint16_t wWordCount,
uint16_t wGapTime,
uint32_t dwOptions,
uint16_t * wapBuffer )

Create an asynchronous BC to RT message. Note: This function creates a new data block of given ID and fills it with the contents of the given buffer.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of data block to be created.
wReceiverRt: (Input) Receiving RT Address.
wReceiverRtSubaddress: (Input) Receiving RT Subaddress.
wWordCount: (Input) Message Word Count.
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
wapBuffer: (Input) Buffer containing data.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_SUITABLE_ASYNCHRONOUS_MODE_UNDEFINED when the suitable asynchronous mode is undefined
  • NAI_1553_RC_ASYNCHRONOUS_MESSAGE_ERROR when the count of asynchronous messages is greater than the maximum

◆ naibrd_1553_BcAsynchronousMessageCreateBroadcastMode()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageCreateBroadcastMode ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wMessageDirection,
uint16_t wModeCommand,
uint16_t wGapTime,
uint32_t dwOptions,
uint16_t * wapBuffer )

Create an asynchronous Broadcast Mode message. Note: This function creates a new data block of given ID and fills it with the contents of the given buffer.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of data block to be created.
wMessageDirection: (Input) Transmit or Receive (NAI_1553_CMD_TX or NAI_1553_CMD_RX).
wModeCommand: (Input) Mode Code Command (0-31).
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
wapBuffer: (Input) Buffer containing data.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_SUITABLE_ASYNCHRONOUS_MODE_UNDEFINED when the suitable asynchronous mode is undefined
  • NAI_1553_RC_ASYNCHRONOUS_MESSAGE_ERROR when the count of asynchronous messages is greater than the maximum

◆ naibrd_1553_BcAsynchronousMessageCreateMode()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageCreateMode ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wRt,
uint16_t wMessageDirection,
uint16_t wModeCommand,
uint16_t wGapTime,
uint32_t dwOptions,
uint16_t * wapBuffer )

Create an asynchronous Mode message. Note: This function creates a new data block of given ID and fills it with the contents of the given buffer.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of data block to be created.
wRt: (Input) RT Address.
wMessageDirection: (Input) Transmit or Receive (NAI_1553_CMD_TX or NAI_1553_CMD_RX).
wModeCommand: (Input) Mode Code Command (0-31).
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
wapBuffer: (Input) Buffer containing data.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_SUITABLE_ASYNCHRONOUS_MODE_UNDEFINED when the suitable asynchronous mode is undefined
  • NAI_1553_RC_ASYNCHRONOUS_MESSAGE_ERROR when the count of asynchronous messages is greater than the maximum

◆ naibrd_1553_BcAsynchronousMessageCreateRtToBc()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageCreateRtToBc ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wTransmitterRt,
uint16_t wTransmitterRtSubaddress,
uint16_t wWordCount,
uint16_t wGapTime,
uint32_t dwOptions,
uint16_t * wapBuffer )

Create an asynchronous RT to BC message. Note: This function creates a new data block of given ID and fills it with the contents of the given buffer.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of data block to be created.
wTransmitterRt: (Input) Transmitter RT Address.
wTransmitterRtSubaddress: (Input) Transmitter RT Subaddress.
wWordCount: (Input) Message Word Count.
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
wapBuffer: (Input) Buffer containing data.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_SUITABLE_ASYNCHRONOUS_MODE_UNDEFINED when the suitable asynchronous mode is undefined
  • NAI_1553_RC_ASYNCHRONOUS_MESSAGE_ERROR when the count of asynchronous messages is greater than the maximum

◆ naibrd_1553_BcAsynchronousMessageCreateRtToBroadcast()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageCreateRtToBroadcast ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wReceiverRtSubaddress,
uint16_t wWordCount,
uint16_t wTransmitterRt,
uint16_t wTransmitterRtSubaddress,
uint16_t wGapTime,
uint32_t dwOptions,
uint16_t * wapBuffer )

Create an asynchronous RT to Broadcast message. Note: This function creates a new data block of given ID and fills it with the contents of the given buffer.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of data block to be created.
wReceiverRtSubaddress: (Input) Receiving RT Subaddress.
wWordCount: (Input) Message Word Count.
wTransmitterRt: (Input) Transmitter RT Address.
wTransmitterRtSubaddress: (Input) Transmitter RT Subaddress.
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
wapBuffer: (Input) Buffer containing data.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_SUITABLE_ASYNCHRONOUS_MODE_UNDEFINED when the suitable asynchronous mode is undefined
  • NAI_1553_RC_ASYNCHRONOUS_MESSAGE_ERROR when the count of asynchronous messages is greater than the maximum

◆ naibrd_1553_BcAsynchronousMessageCreateRtToRt()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageCreateRtToRt ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wReceiverRt,
uint16_t wReceiverRtSubaddress,
uint16_t wWordCount,
uint16_t wTransmitterRt,
uint16_t wTransmitterRtSubaddress,
uint16_t wGapTime,
uint32_t dwOptions,
uint16_t * wapBuffer )

Create an asynchronous RT to RT message. Note: This function creates a new data block of given ID and fills it with the contents of the given buffer.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of data block to be created.
wReceiverRt: (Input) Receiving RT Address.
wReceiverRtSubaddress: (Input) Receiving RT Subaddress.
wWordCount: (Input) Message Word Count.
wTransmitterRt: (Input) Transmitter RT Address.
wTransmitterRtSubaddress: (Input) Transmitter RT Subaddress.
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
wapBuffer: (Input) Buffer containing data.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_SUITABLE_ASYNCHRONOUS_MODE_UNDEFINED when the suitable asynchronous mode is undefined
  • NAI_1553_RC_ASYNCHRONOUS_MESSAGE_ERROR when the count of asynchronous messages is greater than the maximum

◆ naibrd_1553_BcAsynchronousMessageRemainingCount()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageRemainingCount ( int16_t swDevice)

Returns the current number of asynchronous messages remaining in the low priority queue.

Parameters
swDevice: (Input) Logical Device Number (0-31).
Returns
  • Value (>=0) indicating number of messages in queue when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_SUITABLE_ASYNCHRONOUS_MODE_UNDEFINED when the suitable asynchronous mode is undefined
  • NAI_1553_RC_NO_FRAME_TIME_SET_FOR_MAJOR_FRAME when the frame time is not set for the major frame

◆ naibrd_1553_BcAsynchronousMessageSendAtHighPriority()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageSendAtHighPriority ( int16_t swDevice,
uint16_t wMessageId,
uint16_t wTimeFactor )

NOTE: It is recommended to use naibrd_1553_BcAsynchronousMessageSendAtHighPriority_ExecuteOnce to send high priority messages (read its function description for more information). Send an asynchronous message with high priority. Once an asynchronous message is defined, it may be transmitted at high priority again and again as many times as the user requires, but it won't be transmitted more than once at low priority. Moreover, if an asynchronous message has already been transmitted at high priority, it won't be retransmitted at low priority even once. In order to force its retransmission in such a case, the message must be deleted and recreated. To use this function, the BC must be configured for high priority async mode using the naibrd_1553_BcConfig function.

Parameters
swDevice: (Input) Logical Device Number (0-31).
wMessageId: (Input) Unique ID Number for an existing asynchronous message.
wTimeFactor: (Input) Unused.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_SUITABLE_ASYNCHRONOUS_MODE_UNDEFINED when the suitable asynchronous mode is undefined
  • NAI_1553_RC_INVALID_PARAMETER when the message given by the message ID is not valid
  • NAI_1553_RC_ASYNCHRONOUS_MESSAGE_ERROR when the message given by the message ID is not the proper message type or when there was a transmission error
  • NAI_1553_RC_ASYNCHRONOUS_SUBROUTINE_BUSY when the asynchronous subroutine is busy

◆ naibrd_1553_BcAsynchronousMessageSendAtHighPriority_ExecuteOnce()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageSendAtHighPriority_ExecuteOnce ( int16_t swDevice,
uint16_t wMessageId,
uint16_t wTimeFactor )

NOTE: This function is an alternative to naibrd_1553_BcAsynchronousMessageSendAtHighPriority. Send an asynchronous message with high priority. Once an asynchronous message is defined, it may be transmitted at high priority again and again as many times as the user requires, but it won't be transmitted more than once at low priority. Moreover, if an asynchronous message has already been transmitted at high priority, it won't be retransmitted at low priority even once. In order to force its retransmission in such a case, the message must be deleted and recreated. The async message will be transmitted only once per call to this function, even if it returns an error (e.g. no response error). This contrasts with naibrd_1553_BcAsynchronousMessageSendAtHighPriority, which forcibly re-sends the message if it returns an error. For this reason, this function is recommended over naibrd_1553_BcAsynchronousMessageSendAtHighPriority. To use this function, the BC must be configured for high priority async mode using the naibrd_1553_BcConfig function by OR'ing together NAI_1553_BC_ASYNCHRONOUS_HIGH_PRIORITY_MODE with NAI_1553_BC_ASYNCHRONOUS_HIGH_PRIORITY_ONCE_ANYWAY and passing it in as the dwOptions parameter. Please refer to the M1553_BC_SendMessage_Async sample C code for an example that utilizes this function effectively.

Parameters
swDevice: (Input) Logical Device Number (0-31).
wMessageId: (Input) Unique ID Number for an existing asynchronous message.
wTimeFactor: (Input) Unused.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_SUITABLE_ASYNCHRONOUS_MODE_UNDEFINED when the suitable asynchronous mode is undefined
  • NAI_1553_RC_INVALID_PARAMETER when the message given by the message ID is not valid
  • NAI_1553_RC_ASYNCHRONOUS_MESSAGE_ERROR when the message given by the message ID is not the proper message type or when there was a transmission error
  • NAI_1553_RC_ASYNCHRONOUS_SUBROUTINE_BUSY when the asynchronous subroutine is busy

◆ naibrd_1553_BcAsynchronousMessageSendAtLowPriority()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageSendAtLowPriority ( int16_t swDevice,
uint16_t * wpRemainingMessageCount,
uint16_t wTimeFactor )

NOTE: It is recommended to use naibrd_1553_BcAsynchronousMessageSendAtLowPriority_ExecuteOnce to send low priority messages (read its function description for more information). Send asynchronous messages on the low priority queue. The order of message transmission is determined by the message ID (lowest ID first). Once an asynchronous message is defined, it may be transmitted at high priority again and again as many times as the user requires, but it won't be transmitted more than once at low priority. Moreover, if an asynchronous message has already been transmitted at high priority, it won't be retransmitted at low priority even once. In order to force its retransmission in such a case, the message must be deleted and recreated. To use this function, the BC must be configured for low priority async mode using the naibrd_1553_BcConfig function.

Parameters
swDevice: (Input) Logical Device Number (0-31).
wpRemainingMessageCount: (Output) This is always zero.
wTimeFactor: (Input) Unused.
Returns
  • When function is completed successfully, this function returns the count of asynchronous messages assigned for Tx that are not yet asynchronously transmitted
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_SUITABLE_ASYNCHRONOUS_MODE_UNDEFINED when the suitable asynchronous mode is undefined
  • NAI_1553_RC_NO_FRAME_TIME_SET_FOR_MAJOR_FRAME when no major frame time is set
  • NAI_1553_RC_ASYNCHRONOUS_SUBROUTINE_BUSY when the asynchronous subroutine is busy
  • NAI_1553_RC_INVALID_PARAMETER when the wpRemainingMessageCount pointer is null
  • NAI_1553_RC_ASYNCHRONOUS_LIST_IS_EMPTY when the asynchronous low priority queue is empty
  • NAI_1553_RC_ALLOCATION_FAIL when memory allocation failed for the Tx subroutine

◆ naibrd_1553_BcAsynchronousMessageSendAtLowPriority_ExecuteOnce()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageSendAtLowPriority_ExecuteOnce ( int16_t swDevice,
uint16_t * wpRemainingMessageCount,
uint16_t wTimeFactor )

NOTE: This function is an alternative to naibrd_1553_BcAsynchronousMessageSendAtLowPriority. Send asynchronous messages in the low priority queue. The order of message transmission is determined by the message ID (lowest ID first). The difference between this and naibrd_1553_BcAsynchronousMessageSendAtLowPriority is in the handling of async messages that return errors. If either function is called once while the BC is running and a transmitted async message returns an error (e.g. no response error), the message will continue to send on every iteration of the minor frame. However, this function can be called over and over and each time, it will regenerate the async frame only from messages that were not yet sent. In this way, async messages that were already transmitted, regardless of whether or not it returned an error, will stop sending and will need to be deleted and recreated in order to be sent again. The naibrd_1553_BcAsynchronousMessageSendAtLowPriority function does not possess this capability and will keep async messages with errors in the async queue to be sent over and over again no matter how many times the function is called. This function provides a level of software control to handle low priority async messages that are not communicated successfully. To use this function, the BC must be configured for low priority async mode using the naibrd_1553_BcConfig function. Please refer to the M1553_BC_SendMessage_Async sample C code for an example that utilizes this function effectively.

Parameters
swDevice: (Input) Logical Device Number (0-31).
wpRemainingMessageCount: (Output) This is always zero.
wTimeFactor: (Input) Unused.
Returns
  • When function is completed successfully, this function returns the count of asynchronous messages assigned for Tx that are not yet asynchronously transmitted
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_SUITABLE_ASYNCHRONOUS_MODE_UNDEFINED when the suitable asynchronous mode is undefined
  • NAI_1553_RC_NO_FRAME_TIME_SET_FOR_MAJOR_FRAME when no major frame time is set
  • NAI_1553_RC_ASYNCHRONOUS_SUBROUTINE_BUSY when the asynchronous subroutine is busy
  • NAI_1553_RC_INVALID_PARAMETER when the wpRemainingMessageCount pointer is null
  • NAI_1553_RC_ASYNCHRONOUS_LIST_IS_EMPTY when the asynchronous low priority queue is empty
  • NAI_1553_RC_ALLOCATION_FAIL when memory allocation failed for the Tx subroutine

◆ naibrd_1553_BcAsynchronousMessageSendOneAtLowPriority()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcAsynchronousMessageSendOneAtLowPriority ( int16_t swDevice,
uint16_t wMessageId )

This function is used to send a single low priority Asynchronous message. This is in contrast to naibrd_1553_BcAsynchronousMessageSendAtLowPriority* functions, which places all asynchronous messages on a low priority queue. Additionally, this function call does not block (no delays). If this function gets called again before the previous async message was sent, it will return an error. The user should specify the message ID of the asynchronous message to send. This function utilizes GPF-5 so the user should not use GPF-5 for any other purpose if this function is being called in the user application. This function is currently not supported in FTJ/FTK modules. This function is not a DDC compatible function.

Parameters
swDevice: (Input) Logical Device Number (0-31).
wMessageId: (Input) Unique ID Number for an existing asynchronous message.
Returns
  • NAI_SUCCESS when function is completed successfully.
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_SUITABLE_ASYNCHRONOUS_MODE_UNDEFINED when the suitable asynchronous mode is undefined
  • NAI_1553_RC_NO_FRAME_TIME_SET_FOR_MAJOR_FRAME when no major frame time is set
  • NAI_1553_RC_ASYNCHRONOUS_SUBROUTINE_BUSY when the asynchronous subroutine is busy
  • NAI_1553_RC_ASYNCHRONOUS_MESSAGE_ERROR when the message given by the specified wMessageId is not an asynchronous message

◆ naibrd_1553_BcCommandCreate()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcCommandCreate ( int16_t swDevice,
int16_t swCommandId,
uint16_t wOpcode,
uint16_t wCondition,
uint32_t dwParameter1,
uint32_t dwParameter2,
uint32_t dwReserved )

Create an opcode command for use in the creation of a frame.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swCommandId: (Input) Unique command ID.
wOpcode: (Input) Type of opcode operated by the new command.
NAI_1553_OPCODE_TRAP
NAI_1553_OPCODE_EXECUTE_MESSAGE
NAI_1553_OPCODE_JUMP
NAI_1553_OPCODE_CALL_SUBROUTINE
NAI_1553_OPCODE_RETURN_FROM_SUBROUTINE
NAI_1553_OPCODE_INTERRUPT_REQUEST
NAI_1553_OPCODE_HALT
NAI_1553_OPCODE_DELAY
NAI_1553_OPCODE_WAIT_END_OF_FRAME
NAI_1553_OPCODE_COMPARE_TO_FRAME_TIMER
NAI_1553_OPCODE_COMPARE_TO_MESSAGE_TIMER
NAI_1553_OPCODE_UPDATE_GENERAL_PURPOSE_FLAG
NAI_1553_OPCODE_LOAD_TIME_TAG_COUNTER
NAI_1553_OPCODE_LOAD_FRAME_TIMER
NAI_1553_OPCODE_START_FRAME_TIMER
NAI_1553_OPCODE_PUSH_TIME_TAG_COUNTER
NAI_1553_OPCODE_PUSH_BLOCK_STATUS_WORD
NAI_1553_OPCODE_PUSH_VALUE
NAI_1553_OPCODE_PUSH_INDERCT_VALUE
NAI_1553_OPCODE_WAIT_FOR_TRIGGER
NAI_1553_OPCODE_EXECUTE_AND_FLIP
NAI_1553_OPCODE_FOCUS_ON_VARIABLE
NAI_1553_OPCODE_ADD_TO_VARIABLE
NAI_1553_OPCODE_LOAD_TO_VARIABLE
NAI_1553_OPCODE_COMPARE_VARIABLE
NAI_1553_OPCODE_PUSH_VARIABLE
NAI_1553_OPCODE_TIME_CONDITIONED_MESSAGE_TX
wCondition: (Input) Condition that must be true for the opcode to run.
NAI_1553_OPCODE_COND_LESS_THAN
NAI_1553_OPCODE_COND_GREATER_THAN
NAI_1553_OPCODE_COND_EQUAL
NAI_1553_OPCODE_COND_NOT_EQUAL
NAI_1553_OPCODE_COND_GP1_1
NAI_1553_OPCODE_COND_GP1_0
NAI_1553_OPCODE_COND_GP2_1
NAI_1553_OPCODE_COND_GP2_0
NAI_1553_OPCODE_COND_GP3_1
NAI_1553_OPCODE_COND_GP3_0
NAI_1553_OPCODE_COND_GP4_1
NAI_1553_OPCODE_COND_GP4_0
NAI_1553_OPCODE_COND_GP5_1
NAI_1553_OPCODE_COND_GP5_0
NAI_1553_OPCODE_COND_GP6_1
NAI_1553_OPCODE_COND_GP6_0
NAI_1553_OPCODE_COND_GP7_1
NAI_1553_OPCODE_COND_GP7_0
NAI_1553_OPCODE_COND_NO_RESPONSE
NAI_1553_OPCODE_COND_RESPONSE
NAI_1553_OPCODE_COND_FORMAT_ERROR
NAI_1553_OPCODE_COND_NO_FORMAT_ERROR
NAI_1553_OPCODE_COND_GOOD_TRANSFER
NAI_1553_OPCODE_COND_BAD_TRANFER
NAI_1553_OPCODE_COND_MASKED_STATUS_SET
NAI_1553_OPCODE_COND_MASKED_STATUS_CLEAR
NAI_1553_OPCODE_COND_BAD_MESSAGE
NAI_1553_OPCODE_COND_GOOD_MESSAGE
NAI_1553_OPCODE_COND_NO_RETRY
NAI_1553_OPCODE_COND_1_RETRY
NAI_1553_OPCODE_COND_2_RETRIES
NAI_1553_OPCODE_COND_ALWAYS
NAI_1553_OPCODE_COND_NEVER
dwParameter1: (Input) Parameter that may or may not be required, depending on the opcode.
dwParameter2: (Input) Another parameter that may or may not be required, depending on the opcode.
dwReserved: (Input) Reserved for future use.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when an invalid swCommandId, wOpcode, wCondition, dwParameter1 or dwParameter2 is specified
  • NAI_1553_RC_BC_OBJECT_ALREADY_EXISTS when the command identified by swCommandId already exists
  • NAI_1553_RC_ASYNCHRONOUS_MESSAGE_ERROR when the message specified in a XEQ, XQF or time conditioned message opcode command is asynchronous

◆ naibrd_1553_BcCommandDelete()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcCommandDelete ( int16_t swDevice,
int16_t swCommandId )

Delete an opcode command.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swCommandId: (Input) Unique command ID.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when an invalid swCommandId is specified
  • NAI_1553_RC_UNDEFINED_NODE when the command identified by swCommandId is not defined
  • NAI_1553_RC_NOT_SUPPORTED when the command identified by swCommandId is still in use

◆ naibrd_1553_BcCommandGetWord()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcCommandGetWord ( uint16_t wHardwareOpcode,
uint16_t wCondition,
uint16_t * wpCommandOpcode )

Generate a command word using given opcode and condition code. Odd parity is used for the generation of the parity bit (MSB) of the command opcode word.

Parameters
wHardwareOpcode: (Input) A hardware opcode.
wCondition: (Input) A condition code.
wpCommandOpcode: (Output) A pointer to a variable within which the generated command opcode is returned.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_PARAMETER when wCondition and/or wHardwareOpcode is invalid, or if the wpCommandOpcode pointer is null.

◆ naibrd_1553_BcConfig()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcConfig ( int16_t swDevice,
uint32_t dwOptions )

Initialize the device as a bus controller (BC) with the given initialization options.

Parameters
swDevice: (Input) Logical Device Number (0-31).
dwOptions: (Input) BC Operation options. Valid values are the following:
0
NAI_1553_BC_ASYNCHRONOUS_LOW_PRIORITY_MODE
NAI_1553_BC_ASYNCHRONOUS_HIGH_PRIORITY_MODE
NAI_1553_BC_ASYNCHRONOUS_BOTH_PRIORITY_MODES
NAI_1553_BC_ASYNCHRONOUS_HIGH_PRIORITY_ONCE_ANYWAY    This must be set in order to utilize the asynchronous
                                                      *_ExecuteOnce() functions.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state

◆ naibrd_1553_BcConfigureMessageGapTimerEnable()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcConfigureMessageGapTimerEnable ( int16_t swDevice,
uint16_t bIsMessageGapTimeFieldEnabled )

Enable or disable the message gap time field for all messages.

Parameters
swDevice: (Input) Logical Device Number (0-31).
bIsMessageGapTimeFieldEnabled: (Input) Gap Time field enable (TRUE or FALSE).
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state

◆ naibrd_1553_BcDataBlockCreate()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcDataBlockCreate ( int16_t swDevice,
int16_t swDataBlockId,
uint16_t wDataBlockSize,
uint16_t * wapBuffer,
uint16_t wBufferSize )

Create a BC data block with a unique identifier given by the swDataBlockId input parameter. This data block can be used by a BC message and can be 1-32 words long, single or double buffered.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swDataBlockId: (Input) Unique block ID.
wDataBlockSize: (Input) Value representing the size of the data block (1-32, NAI_1553_BC_DATABLOCK_DOUBLE, NAI_1553_BC_DATABLOCK_SINGLE).
wapBuffer: (Input) Pointer to data to be loaded upon block creation.
wBufferSize: (Input) Number of words to be copied from wapBuffer to the data block.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when swDataBlockId, wDataBlockSize or wBufferSize are invalid or the wapBuffer is null.
  • NAI_1553_RC_BC_OBJECT_ALREADY_EXISTS when a data block with swDataBlockId already exists.
  • NAI_1553_RC_ALLOCATION_FAIL when memory allocation for the data block failed.

◆ naibrd_1553_BcDataBlockDelete()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcDataBlockDelete ( int16_t swDevice,
int16_t swDataBlockId )

Delete the data block associated with the swDataBlockId identifier.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swDataBlockId: (Input) Unique block ID.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when an invalid swDataBlockId is specified
  • NAI_1553_RC_UNDEFINED_NODE when the data block identified by swDataBlockId is not defined
  • NAI_1553_RC_NOT_SUPPORTED when the data block identified by swDataBlockId is still in use by a message

◆ naibrd_1553_BcDataBlockRead()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcDataBlockRead ( int16_t swDevice,
int16_t swDataBlockId,
uint16_t * wapBuffer,
uint16_t wBufferSize,
uint16_t wOffset )

Read a BC data block.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swDataBlockId: (Input) Unique block ID.
wapBuffer: (Output) Pointer to a buffer that will contain the data read from the data block.
wBufferSize: (Input) Number of words to be read from the data block.
wOffset: (Input) Starting word index of the data block to read from.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when an invalid swDataBlockId, wBufferSize or wOffset is specified or the wapBuffer is null
  • NAI_1553_RC_UNDEFINED_NODE when the data block identified by swDataBlockId is not defined

◆ naibrd_1553_BcDataBlockWrite()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcDataBlockWrite ( int16_t swDevice,
int16_t swDataBlockId,
uint16_t * wapBuffer,
uint16_t wBufferSize,
uint16_t wOffset )

Write to a BC data block.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swDataBlockId: (Input) Unique block ID.
wapBuffer: (Input) Pointer to data to be loaded into the data block.
wBufferSize: (Input) Number of words to be copied from wapBuffer to the data block.
wOffset: (Input) Starting word index of the data block to write to.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when an invalid swDataBlockId, wBufferSize or wOffset is specified or the wapBuffer is null
  • NAI_1553_RC_UNDEFINED_NODE when the data block identified by swDataBlockId is not defined

◆ naibrd_1553_BcFrameCreate()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcFrameCreate ( int16_t swDevice,
int16_t swFrameId,
uint16_t wFrameType,
int16_t * swapCommandIds,
uint16_t wCommandCount,
uint16_t wFrameTime,
uint16_t wFlags )

Create a BC frame from an array of opcode IDs input by the user.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swFrameId: (Input) Unique frame ID.
wFrameType: (Input) Frame type (NAI_1553_BC_FRAME_MAJOR, NAI_1553_BC_FRAME_MINOR).
swapCommandIds: (Input) Array of command IDs, each associated with an opcode message.
wCommandCount: (Input) Number of command IDs in swapCommandIds to be included in the frame.
wFrameTime: (Input) Time for the frame to complete. Unit is 100 microseconds.
wFlags: (Input) Special options.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when an invalid swFrameId, wFrameType, wCommandCount or wFlags is specified
  • NAI_1553_RC_BC_OBJECT_ALREADY_EXISTS when the frame identified by swFrameId already exists
  • NAI_1553_RC_UNDEFINED_COMMAND when the commandID is invalid or not associated with an opcode message
  • NAI_1553_RC_NOT_SUPPORTED when an invalid opcode and parameter combination is specified in a command

◆ naibrd_1553_BcFrameDelete()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcFrameDelete ( int16_t swDevice,
int16_t swFrameId )

Delete a BC frame.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swFrameId: (Input) Unique frame ID.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when an invalid swFrameId is specified
  • NAI_1553_RC_UNDEFINED_NODE when the frame identified by swFrameId is not defined
  • NAI_1553_RC_NOT_SUPPORTED when the frame identified by swFrameId is still in use

◆ naibrd_1553_BcGetActivationState()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcGetActivationState ( int16_t swDevice,
uint16_t * wpCurrentState )

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
swDevice: (Input) Logical Device Number (0-31).
wpCurrentState: (Output) Activation state (NAI_1553_BC_STATE_BUSY or NAI_1553_BC_STATE_IDLE).
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC

◆ naibrd_1553_BcGetConditionState()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcGetConditionState ( int16_t swDevice,
uint16_t wConditionCode,
uint16_t * wpCurrentState )

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

Parameters
swDevice: (Input) Logical Device Number (0-31).
wConditionCode: (Input) Condition Code. Valid values:
NAI_1553_BC_COND_GPF_EQUAL_FLAG
NAI_1553_BC_COND_GPF_LESS_THAN_FLAG
NAI_1553_BC_COND_GPF0
NAI_1553_BC_COND_GPF1
NAI_1553_BC_COND_GPF2
NAI_1553_BC_COND_GPF3
NAI_1553_BC_COND_GPF4
NAI_1553_BC_COND_GPF5
NAI_1553_BC_COND_GPF6
NAI_1553_BC_COND_GPF7
NAI_1553_BC_COND_NO_RESPONSE
NAI_1553_BC_COND_FORMAT_ERROR
NAI_1553_BC_COND_GOOD_DATA_BLOCK_TRANSFER
NAI_1553_BC_COND_MASKED_STATUS
NAI_1553_BC_COND_BAD_MESSAGE
NAI_1553_BC_COND_RETRY_COUNT
NAI_1553_BC_COND_ALWAYS
wpCurrentState: (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 (FALSE) or 1 (TRUE).
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when invalid wConditionCode is specified or wpCurrentState pointer is null

◆ naibrd_1553_BcGetMessageByIdRaw()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcGetMessageByIdRaw ( int16_t swDevice,
int16_t swMessageId,
uint16_t * wapBuffer,
uint16_t wIsPurgeRequired )

Reads a BC message (specified by the message ID) into a user supplied buffer in raw format.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
wapBuffer: (Output) User supplied buffer that will contain the raw message.
wIsPurgeRequired: (Input) Purge message after reading (TRUE or FALSE).
Returns
  • 1 when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when an invalid swMessageId is specified, or when a message with swMessageId is not defined, or when wapBuffer is null

◆ naibrd_1553_BcGpqGetEntriesCount()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcGpqGetEntriesCount ( int16_t swDevice)

Return the number of entries in the General Purpose Queue.

Parameters
swDevice: (Input) Logical Device Number (0-31).
Returns
  • Number of GPQ entries (>= 0) if function completes successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state

◆ naibrd_1553_BcGpqGetOperationalStatistics()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcGpqGetOperationalStatistics ( int16_t swDevice,
naiGpqOperationalStatisticsStructure * gosspGpqOperationalStatistics,
uint16_t bIsResetOfHighestRecordedPercentageRequired )

Get operational statistics for the General Purpose Queue.

Parameters
swDevice: (Input) Logical Device Number (0-31).
gosspGpqOperationalStatistics: (Output) Pointer to a Gpq Operational Statistics Structure which will contain the operational statistics. This structure contains the following member variables:
dwLostMessageCount            Count of lost messages
wFullnessPercentage           Current percentage of fullness of the related stack/queue (0 to 100%)
wMaximumFullnessPercentage    Maximum encountered percentage of fullness of the related stack/queue (0 to 100%)
bIsResetOfHighestRecordedPercentageRequired: (Input) Reset the maximum fullness percentage recorded.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when gosspGpqOperationalStatistics pointer is null
  • NAI_1553_RC_OPERATIONAL_STATISTICS_NOT_ENABLED if operational statistics are not enabled

◆ naibrd_1553_BcGpqRead()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcGpqRead ( int16_t swDevice,
naiGpqEntryStructure * gespGpqEntry )

Read the next unread entry off of the General Purpose Queue (GPQ). The GPQ is used by the BC to convey data (time tag, block status, parameter value or data at memory address) to the host. To push data to the GPQ, use opcodes PTT, PBS, PSI or PSM. Data should be pushed to the GPQ in pairs, where the first value, the header, is pushed with PSI then the second value is pushed with any of the four aforementioned opcodes.

Parameters
swDevice: (Input) Logical Device Number (0-31).
gespGpqEntry: (Output) Pointer to a Gpq Entry Structure which will contain the entry read off of the general purpose queue. This structure contains the following member variables:
wHeader                       Entry header (16-bit) used to identify the type of data.
wData                         Entry data (16-bit).

Note that the entry header is user defined, however 0xFFFF, 0xFFF8 and 0xFFF1 should not be used as the API uses these values internally.

Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when gespGpqEntry pointer is null

◆ naibrd_1553_BcMessageCreate()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageCreate ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockIdForMessage1,
uint16_t wBcControlWordForMessage1,
uint16_t wCommandWord1ForMessage1,
uint16_t wCommandWord2ForMessage1,
uint16_t wGapTimeForMessage1,
int16_t swDataBlockIdForMessage2,
uint16_t wBcControlWordForMessage2,
uint16_t wCommandWord1ForMessage2,
uint16_t wCommandWord2ForMessage2,
uint16_t wGapTimeForMessage2,
uint32_t dwOptions )

Create a single or dual BC message.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockIdForMessage1: (Input) Unique data block ID of an existing data block for message 1.
wBcControlWordForMessage1: (Input) BC control word of message 1. This is an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
wCommandWord1ForMessage1: (Input) Command Word 1 of message 1.
wCommandWord2ForMessage1: (Input) Command Word 2 of message 1.
wGapTimeForMessage1: (Input) Time to next message 1 (in uS).
swDataBlockIdForMessage2: (Input) Unique data block ID of an existing data block for message 2.
wBcControlWordForMessage2: (Input) BC control word of message 2. This is an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
wCommandWord1ForMessage2: (Input) Command Word 1 of message 2.
wCommandWord2ForMessage2: (Input) Command Word 2 of message 2.
wGapTimeForMessage2: (Input) Time to next message 2 (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when an invalid swMessageId, swDataBlockIdForMessage1 or swDataBlockIdForMessage2 is specified
  • NAI_1553_RC_INVALID_MESSAGE_OPTIONS when invalid dwOptions are specified
  • NAI_1553_RC_BC_OBJECT_ALREADY_EXISTS when a message associated with swMessageId already exists
  • NAI_1553_RC_UNDEFINED_NODE when a data block identified by swDataBlockIdForMessage1 or swDataBlockIdForMessage2 is not defined
  • NAI_1553_RC_BC_INVALID_DATA_BLOCK_SIZE when the data block size is not suitable for the given command

◆ naibrd_1553_BcMessageCreateBcToBroadcast()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageCreateBcToBroadcast ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wReceiverRtSubaddress,
uint16_t wWordCount,
uint16_t wGapTime,
uint32_t dwOptions )

Create a BC to Broadcast message.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of an existing data block.
wReceiverRtSubaddress: (Input) Receiving RT Subaddress.
wWordCount: (Input) Message Word Count.
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_MESSAGE_OPTIONS when invalid dwOptions are specified

◆ naibrd_1553_BcMessageCreateBcToRt()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageCreateBcToRt ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wReceiverRt,
uint16_t wReceiverRtSubaddress,
uint16_t wWordCount,
uint16_t wGapTime,
uint32_t dwOptions )

Create a BC to RT message.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of an existing data block.
wReceiverRt: (Input) Receiving RT Address.
wReceiverRtSubaddress: (Input) Receiving RT Subaddress.
wWordCount: (Input) Message Word Count.
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_MESSAGE_OPTIONS when invalid dwOptions are specified

◆ naibrd_1553_BcMessageCreateBroadcastMode()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageCreateBroadcastMode ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wMessageDirection,
uint16_t wModeCommand,
uint16_t wGapTime,
uint32_t dwOptions )

Create a Broadcast Mode message.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of an existing data block.
wMessageDirection: (Input) Transmit or Receive (NAI_1553_CMD_TX or NAI_1553_CMD_RX).
wModeCommand: (Input) Mode Code Command (0-31).
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_MESSAGE_OPTIONS when invalid dwOptions are specified

◆ naibrd_1553_BcMessageCreateMode()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageCreateMode ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wRt,
uint16_t wMessageDirection,
uint16_t wModeCommand,
uint16_t wGapTime,
uint32_t dwOptions )

Create a Mode message.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of an existing data block.
wRt: (Input) RT Address.
wMessageDirection: (Input) Transmit or Receive (NAI_1553_CMD_TX or NAI_1553_CMD_RX).
wModeCommand: (Input) Mode Code Command (0-31).
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_MESSAGE_OPTIONS when invalid dwOptions are specified

◆ naibrd_1553_BcMessageCreateRtToBc()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageCreateRtToBc ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wTransmitterRt,
uint16_t wTransmitterRtSubaddress,
uint16_t wWordCount,
uint16_t wGapTime,
uint32_t dwOptions )

Create a RT to BC message.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of an existing data block.
wTransmitterRt: (Input) Transmitting RT Address.
wTransmitterRtSubaddress: (Input) Transmitter RT Subaddress.
wWordCount: (Input) Message Word Count.
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_MESSAGE_OPTIONS when invalid dwOptions are specified

◆ naibrd_1553_BcMessageCreateRtToBroadcast()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageCreateRtToBroadcast ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wReceiverRtSubaddress,
uint16_t wWordCount,
uint16_t wTransmitterRt,
uint16_t wTransmitterRtSubaddress,
uint16_t wGapTime,
uint32_t dwOptions )

Create a RT to Broadcast message.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of an existing data block.
wReceiverRtSubaddress: (Input) Receiving RT Subaddress.
wWordCount: (Input) Message Word Count.
wTransmitterRt: (Input) Transmitter RT Address.
wTransmitterRtSubaddress: (Input) Transmitter RT Subaddress.
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_MESSAGE_OPTIONS when invalid dwOptions are specified

◆ naibrd_1553_BcMessageCreateRtToRt()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageCreateRtToRt ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wReceiverRt,
uint16_t wReceiverRtSubaddress,
uint16_t wWordCount,
uint16_t wTransmitterRt,
uint16_t wTransmitterRtSubaddress,
uint16_t wGapTime,
uint32_t dwOptions )

Create a RT to RT message.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of an existing data block.
wReceiverRt: (Input) Receiving RT Address.
wReceiverRtSubaddress: (Input) Receiving RT Subaddress.
wWordCount: (Input) Message Word Count.
wTransmitterRt: (Input) Transmitter RT Address.
wTransmitterRtSubaddress: (Input) Transmitter RT Subaddress.
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_MESSAGE_OPTIONS when invalid dwOptions are specified

◆ naibrd_1553_BcMessageDecodeRaw()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageDecodeRaw ( int16_t swDevice,
uint16_t * wapBuffer,
naiDecodedMessageStructure * dmspDecodedMessage )

Decode a BC message in raw format into a decoded message structure.

Parameters
swDevice: (Input) Logical Device Number (0-31).
wapBuffer: (Input) Buffer containing the raw 16-bit messages.
dmspDecodedMessage: (Output) Decoded Message Structure containing the following members:
wType                         Message type
wBlockStatus                  Block status word
wTimeTag3                     Time tag - 3rd word (UNUSED)
wTimeTag2                     Time tag - 2nd word (UNUSED)
wTimeTag                      Time tag - 1st word
wCommandWord1                 First command word
wCommandWord2                 Second command word
bIsCommandWord1Relevant       A flag that says if first command word is relevant (always TRUE)
bIsCommandWord2Relevant       A flag that says if second command word is relevant
wStatus1                      The [first] status word that's actually identified on the bus
wStatus2                      The second status word that's actually identified on the bus
bIsStatus1Relevant            A flag that says if first status word is relevant
bIsStatus2Relevant            A flag that says if second status word is relevant
wDataWordCount                The number of valid data words that have been received for this message
waData[32]                    An Array containing the data words
wBcControlWord                Control word (BC only)
wBcGapTime                    Message gap time (BC only)
wBcLoopbackWord1              The echo of the last word transmitted by the BC (BC only)
wUnused01                     An unused field, kept only in order to be compatible with DDC
bIsBcLoopbackWord1Relevant    A flag that says if first loopback word is relevant (BC only)
wUnused02                     An unused field, kept only in order to be compatible with DDC
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_PARAMETER when dmspDecodedMessage or wapBuffer is null

◆ naibrd_1553_BcMessageDelete()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageDelete ( int16_t swDevice,
int16_t swMessageId )

Delete a BC message.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when an invalid swMessageId is specified
  • NAI_1553_RC_UNDEFINED_MESSAGE_BLOCK when a message associated with swMessageId is undefined
  • NAI_1553_RC_NOT_SUPPORTED when the opcode command in the message is still in use

◆ naibrd_1553_BcMessageGetByIdDecoded()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageGetByIdDecoded ( int16_t swDevice,
int16_t swMessageId,
naiDecodedMessageStructure * dmspDecodedMessage,
uint16_t wIsPurgeRequired )

Read either the next unread message or the latest message received on the stack based on the message ID.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
dmspDecodedMessage: (Output) Decoded Message Structure containing the following members:
wType                         Message type
wBlockStatus                  Block status word
wTimeTag3                     Time tag - 3rd word (UNUSED)
wTimeTag2                     Time tag - 2nd word (UNUSED)
wTimeTag                      Time tag - 1st word
wCommandWord1                 First command word
wCommandWord2                 Second command word
bIsCommandWord1Relevant       A flag that says if first command word is relevant (always TRUE)
bIsCommandWord2Relevant       A flag that says if second command word is relevant
wStatus1                      The [first] status word that's actually identified on the bus
wStatus2                      The second status word that's actually identified on the bus
bIsStatus1Relevant            A flag that says if first status word is relevant
bIsStatus2Relevant            A flag that says if second status word is relevant
wDataWordCount                The number of valid data words that have been received for this message
waData[32]                    An Array containing the data words
wBcControlWord                Control word (BC only)
wBcGapTime                    Message gap time (BC only)
wBcLoopbackWord1              The echo of the last word transmitted by the BC (BC only)
wUnused01                     An unused field, kept only in order to be compatible with DDC
bIsBcLoopbackWord1Relevant    A flag that says if first loopback word is relevant (BC only)
wUnused02                     An unused field, kept only in order to be compatible with DDC
wIsPurgeRequired: (Input) Purge message after reading (TRUE or FALSE).
Returns
  • 1 when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when an invalid swMessageId is specified, the message associated with swMessageId is undefined or dmspDecodedMessage is null

◆ naibrd_1553_BcMessageModify()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageModify ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockIdForMessage1,
uint16_t wBcControlWordForMessage1,
uint16_t wCommandWord1ForMessage1,
uint16_t wCommandWord2ForMessage1,
uint16_t wGapTimeForMessage1,
int16_t swDataBlockIdForMessage2,
uint16_t wBcControlWordForMessage2,
uint16_t wCommandWord1ForMessage2,
uint16_t wCommandWord2ForMessage2,
uint16_t wGapTimeForMessage2,
uint16_t wModificationFlags )

Modify a single or dual BC message that was previously created.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockIdForMessage1: (Input) Unique data block ID of an existing data block for message 1.
wBcControlWordForMessage1: (Input) BC control word of message 1. This is an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
wCommandWord1ForMessage1: (Input) Command Word 1 of message 1.
wCommandWord2ForMessage1: (Input) Command Word 2 of message 1.
wGapTimeForMessage1: (Input) Time to next message 1 (in uS).
swDataBlockIdForMessage2: (Input) Unique data block ID of an existing data block for message 2.
wBcControlWordForMessage2: (Input) BC control word of message 2. This is an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
wCommandWord1ForMessage2: (Input) Command Word 1 of message 2.
wCommandWord2ForMessage2: (Input) Command Word 2 of message 2.
wGapTimeForMessage2: (Input) Time to next message 2 (in uS).
wModificationFlags: (Input) Message modification options that may contain an OR'ed combination of the following:
NAI_1553_BC_MSG_MOD_MESSAGE1_DATA_BLOCK
NAI_1553_BC_MSG_MOD_MESSAGE1_BC_CONTROL
NAI_1553_BC_MSG_MOD_MESSAGE1_COMMAND1
NAI_1553_BC_MSG_MOD_MESSAGE1_COMMAND2
NAI_1553_BC_MSG_MOD_MESSAGE1_GAPTIME
NAI_1553_BC_MSG_MOD_MESSAGE2_DATA_BLOCK
NAI_1553_BC_MSG_MOD_MESSAGE2_BC_CONTROL
NAI_1553_BC_MSG_MOD_MESSAGE2_COMMAND1
NAI_1553_BC_MSG_MOD_MESSAGE2_COMMAND2
NAI_1553_BC_MSG_MOD_MESSAGE2_GAPTIME
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when an invalid swMessageId, swDataBlockIdForMessage1, swDataBlockIdForMessage2 or wModificationFlags is specified
  • NAI_1553_RC_INVALID_MESSAGE_OPTIONS when invalid dwOptions are specified
  • NAI_1553_RC_UNDEFINED_MESSAGE_BLOCK when a message associated with swMessageId is undefined
  • NAI_1553_RC_UNDEFINED_DATA_BLOCK when a data block identified by swDataBlockIdForMessage1 or swDataBlockIdForMessage2 is not defined
  • NAI_1553_RC_BC_INVALID_DATA_BLOCK_SIZE when the data block size is not suitable for the given command

◆ naibrd_1553_BcMessageModifyBcToBroadcast()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageModifyBcToBroadcast ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wReceiverRtSubaddress,
uint16_t wWordCount,
uint16_t wGapTime,
uint32_t dwOptions,
uint16_t wModificationFlags )

Modify a BC to Broadcast message that was previously created.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of an existing data block.
wReceiverRtSubaddress: (Input) Receiving RT Subaddress.
wWordCount: (Input) Message Word Count.
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
wModificationFlags: (Input) Message modification options that may contain an OR'ed combination of the following:
NAI_1553_BC_MSG_MOD_MESSAGE1_DATA_BLOCK
NAI_1553_BC_MSG_MOD_MESSAGE1_BC_CONTROL
NAI_1553_BC_MSG_MOD_MESSAGE1_COMMAND1
NAI_1553_BC_MSG_MOD_MESSAGE1_COMMAND2
NAI_1553_BC_MSG_MOD_MESSAGE1_GAPTIME
NAI_1553_BC_MSG_MOD_MESSAGE2_DATA_BLOCK
NAI_1553_BC_MSG_MOD_MESSAGE2_BC_CONTROL
NAI_1553_BC_MSG_MOD_MESSAGE2_COMMAND1
NAI_1553_BC_MSG_MOD_MESSAGE2_COMMAND2
NAI_1553_BC_MSG_MOD_MESSAGE2_GAPTIME
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_MESSAGE_OPTIONS when invalid dwOptions are specified

◆ naibrd_1553_BcMessageModifyBcToRt()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageModifyBcToRt ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wReceiverRt,
uint16_t wReceiverRtSubaddress,
uint16_t wWordCount,
uint16_t wGapTime,
uint32_t dwOptions,
uint16_t wModificationFlags )

Modify a BC to RT message that was previously created.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of an existing data block.
wReceiverRt: (Input) Receiving RT Address.
wReceiverRtSubaddress: (Input) Receiving RT Subaddress.
wWordCount: (Input) Message Word Count.
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
wModificationFlags: (Input) Message modification options that may contain an OR'ed combination of the following:
NAI_1553_BC_MSG_MOD_MESSAGE1_DATA_BLOCK
NAI_1553_BC_MSG_MOD_MESSAGE1_BC_CONTROL
NAI_1553_BC_MSG_MOD_MESSAGE1_COMMAND1
NAI_1553_BC_MSG_MOD_MESSAGE1_COMMAND2
NAI_1553_BC_MSG_MOD_MESSAGE1_GAPTIME
NAI_1553_BC_MSG_MOD_MESSAGE2_DATA_BLOCK
NAI_1553_BC_MSG_MOD_MESSAGE2_BC_CONTROL
NAI_1553_BC_MSG_MOD_MESSAGE2_COMMAND1
NAI_1553_BC_MSG_MOD_MESSAGE2_COMMAND2
NAI_1553_BC_MSG_MOD_MESSAGE2_GAPTIME
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_MESSAGE_OPTIONS when invalid dwOptions are specified

◆ naibrd_1553_BcMessageModifyBroadcastMode()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageModifyBroadcastMode ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wMessageDirection,
uint16_t wModeCommand,
uint16_t wGapTime,
uint32_t dwOptions,
uint16_t wModificationFlags )

Modify a Broadcast Mode message that was previously created.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of an existing data block.
wMessageDirection: (Input) Transmit or Receive (NAI_1553_CMD_TX or NAI_1553_CMD_RX).
wModeCommand: (Input) Mode Code Command (0-31).
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
wModificationFlags: (Input) Message modification options that may contain an OR'ed combination of the following:
NAI_1553_BC_MSG_MOD_MESSAGE1_DATA_BLOCK
NAI_1553_BC_MSG_MOD_MESSAGE1_BC_CONTROL
NAI_1553_BC_MSG_MOD_MESSAGE1_COMMAND1
NAI_1553_BC_MSG_MOD_MESSAGE1_COMMAND2
NAI_1553_BC_MSG_MOD_MESSAGE1_GAPTIME
NAI_1553_BC_MSG_MOD_MESSAGE2_DATA_BLOCK
NAI_1553_BC_MSG_MOD_MESSAGE2_BC_CONTROL
NAI_1553_BC_MSG_MOD_MESSAGE2_COMMAND1
NAI_1553_BC_MSG_MOD_MESSAGE2_COMMAND2
NAI_1553_BC_MSG_MOD_MESSAGE2_GAPTIME
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_MESSAGE_OPTIONS when invalid dwOptions are specified

◆ naibrd_1553_BcMessageModifyMode()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageModifyMode ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wRt,
uint16_t wMessageDirection,
uint16_t wModeCommand,
uint16_t wGapTime,
uint32_t dwOptions,
uint16_t wModificationFlags )

Modify a Mode message that was previously created.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of an existing data block.
wRt: (Input) RT Address.
wMessageDirection: (Input) Transmit or Receive (NAI_1553_CMD_TX or NAI_1553_CMD_RX).
wModeCommand: (Input) Mode Code Command (0-31).
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
wModificationFlags: (Input) Message modification options that may contain an OR'ed combination of the following:
NAI_1553_BC_MSG_MOD_MESSAGE1_DATA_BLOCK
NAI_1553_BC_MSG_MOD_MESSAGE1_BC_CONTROL
NAI_1553_BC_MSG_MOD_MESSAGE1_COMMAND1
NAI_1553_BC_MSG_MOD_MESSAGE1_COMMAND2
NAI_1553_BC_MSG_MOD_MESSAGE1_GAPTIME
NAI_1553_BC_MSG_MOD_MESSAGE2_DATA_BLOCK
NAI_1553_BC_MSG_MOD_MESSAGE2_BC_CONTROL
NAI_1553_BC_MSG_MOD_MESSAGE2_COMMAND1
NAI_1553_BC_MSG_MOD_MESSAGE2_COMMAND2
NAI_1553_BC_MSG_MOD_MESSAGE2_GAPTIME
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_MESSAGE_OPTIONS when invalid dwOptions are specified

◆ naibrd_1553_BcMessageModifyRtToBc()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageModifyRtToBc ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wTransmitterRt,
uint16_t wTransmitterRtSubaddress,
uint16_t wWordCount,
uint16_t wGapTime,
uint32_t dwOptions,
uint16_t wModificationFlags )

Modify a RT to BC message that was previously created.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of an existing data block.
wTransmitterRt: (Input) Transmitting RT Address.
wTransmitterRtSubaddress: (Input) Transmitting RT Subaddress.
wWordCount: (Input) Message Word Count.
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
wModificationFlags: (Input) Message modification options that may contain an OR'ed combination of the following:
NAI_1553_BC_MSG_MOD_MESSAGE1_DATA_BLOCK
NAI_1553_BC_MSG_MOD_MESSAGE1_BC_CONTROL
NAI_1553_BC_MSG_MOD_MESSAGE1_COMMAND1
NAI_1553_BC_MSG_MOD_MESSAGE1_COMMAND2
NAI_1553_BC_MSG_MOD_MESSAGE1_GAPTIME
NAI_1553_BC_MSG_MOD_MESSAGE2_DATA_BLOCK
NAI_1553_BC_MSG_MOD_MESSAGE2_BC_CONTROL
NAI_1553_BC_MSG_MOD_MESSAGE2_COMMAND1
NAI_1553_BC_MSG_MOD_MESSAGE2_COMMAND2
NAI_1553_BC_MSG_MOD_MESSAGE2_GAPTIME
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_MESSAGE_OPTIONS when invalid dwOptions are specified

◆ naibrd_1553_BcMessageModifyRtToBroadcast()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageModifyRtToBroadcast ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wReceiverRtSubaddress,
uint16_t wWordCount,
uint16_t wTransmitterRt,
uint16_t wTransmitterRtSubaddress,
uint16_t wGapTime,
uint32_t dwOptions,
uint16_t wModificationFlags )

Modify a RT to Broadcast message that was previously created.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of an existing data block.
wReceiverRtSubaddress: (Input) Receiving RT Subaddress.
wWordCount: (Input) Time to next message (in uS).
wTransmitterRt: (Input) Transmitting RT Address.
wTransmitterRtSubaddress: (Input) Transmitting RT Subaddress.
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
wModificationFlags: (Input) Message modification options that may contain an OR'ed combination of the following:
NAI_1553_BC_MSG_MOD_MESSAGE1_DATA_BLOCK
NAI_1553_BC_MSG_MOD_MESSAGE1_BC_CONTROL
NAI_1553_BC_MSG_MOD_MESSAGE1_COMMAND1
NAI_1553_BC_MSG_MOD_MESSAGE1_COMMAND2
NAI_1553_BC_MSG_MOD_MESSAGE1_GAPTIME
NAI_1553_BC_MSG_MOD_MESSAGE2_DATA_BLOCK
NAI_1553_BC_MSG_MOD_MESSAGE2_BC_CONTROL
NAI_1553_BC_MSG_MOD_MESSAGE2_COMMAND1
NAI_1553_BC_MSG_MOD_MESSAGE2_COMMAND2
NAI_1553_BC_MSG_MOD_MESSAGE2_GAPTIME
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_MESSAGE_OPTIONS when invalid dwOptions are specified

◆ naibrd_1553_BcMessageModifyRtToRt()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcMessageModifyRtToRt ( int16_t swDevice,
int16_t swMessageId,
int16_t swDataBlockId,
uint16_t wReceiverRt,
uint16_t wReceiverRtSubaddress,
uint16_t wWordCount,
uint16_t wTransmitterRt,
uint16_t wTransmitterRtSubaddress,
uint16_t wGapTime,
uint32_t dwOptions,
uint16_t wModificationFlags )

Modify a RT to RT message that was previously created.

Parameters
swDevice: (Input) Logical Device Number (0-31).
swMessageId: (Input) Unique message ID.
swDataBlockId: (Input) Unique data block ID of an existing data block.
wReceiverRt: (Input) Receiving RT Address.
wReceiverRtSubaddress: (Input) Receiving RT Subaddress.
wWordCount: (Input) Time to next message (in uS).
wTransmitterRt: (Input) Transmitting RT Address.
wTransmitterRtSubaddress: (Input) Transmitting RT Subaddress.
wGapTime: (Input) Time to next message (in uS).
dwOptions: (Input) Message options that may contain an OR'ed combination of the following:
NAI_1553_BC_CTRL_1553A
NAI_1553_BC_CTRL_1553B
NAI_1553_BC_CTRL_END_OF_MESSAGE_INTERRUPT_ENABLED
NAI_1553_BC_CTRL_BROADCAST_CHECK_MASKED
NAI_1553_BC_CTRL_LOOPBACK_TEST_PERFORMED
NAI_1553_BC_CTRL_BUS_A
NAI_1553_BC_CTRL_BUS_B
NAI_1553_BC_CTRL_RETRY_ENABLED
NAI_1553_BC_CTRL_RESERVE_STATUS_BITS_MASKED
NAI_1553_BC_CTRL_TERMINAL_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_SUBSYSTEM_STATUS_FLAG_MASKED
NAI_1553_BC_CTRL_BUSY_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_SERVICE_REQUEST_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_MESSAGE_ERROR_STATUS_BIT_MASKED
NAI_1553_BC_CTRL_TX_TIME_TAG_IN_SYNCHRONIZE_WITH_DATA_MODE_COMMAND
NAI_1553_BC_MESSAGE_OPT_DUAL_MESSAGE
NAI_1553_BC_MESSAGE_OPT_STAY_ON_ALTERNATE_BUS
wModificationFlags: (Input) Message modification options that may contain an OR'ed combination of the following:
NAI_1553_BC_MSG_MOD_MESSAGE1_DATA_BLOCK
NAI_1553_BC_MSG_MOD_MESSAGE1_BC_CONTROL
NAI_1553_BC_MSG_MOD_MESSAGE1_COMMAND1
NAI_1553_BC_MSG_MOD_MESSAGE1_COMMAND2
NAI_1553_BC_MSG_MOD_MESSAGE1_GAPTIME
NAI_1553_BC_MSG_MOD_MESSAGE2_DATA_BLOCK
NAI_1553_BC_MSG_MOD_MESSAGE2_BC_CONTROL
NAI_1553_BC_MSG_MOD_MESSAGE2_COMMAND1
NAI_1553_BC_MSG_MOD_MESSAGE2_COMMAND2
NAI_1553_BC_MSG_MOD_MESSAGE2_GAPTIME
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_MESSAGE_OPTIONS when invalid dwOptions are specified

◆ naibrd_1553_BcSetGpfState()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcSetGpfState ( int16_t swDevice,
uint16_t wGpfNumber,
uint16_t wEffect )

Modify a General Purpose Flag (GPF). These flags allow the host to intervene and manipulate certain BC instructions (by way of conditional opcodes) while the BC is running. Using this function, the host can write to the GPF register to set, clear or toggle the flags.

Parameters
swDevice: (Input) Logical Device Number (0-31).
wGpfNumber: (Input) GPF bit to modify. Valid values:
NAI_1553_BC_GPF0
NAI_1553_BC_GPF1
NAI_1553_BC_GPF2
NAI_1553_BC_GPF3
NAI_1553_BC_GPF4
NAI_1553_BC_GPF5
NAI_1553_BC_GPF6
NAI_1553_BC_GPF7
wEffect: (Input) Request effect on GPF. Valid values:
NAI_1553_BC_GPF_LEAVE
NAI_1553_BC_GPF_SET
NAI_1553_BC_GPF_CLEAR
NAI_1553_BC_GPF_TOGGLE
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when invalid wGpfNumber or wEffect is specified

◆ naibrd_1553_BcSetMessageRetryPolicy()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcSetMessageRetryPolicy ( int16_t swDevice,
uint16_t wNumberOfRetries,
uint16_t wFirstRetryBus,
uint16_t wSecondRetryBus,
uint16_t wReserved )

Configure the message retry policy of given BC device to given number of retries and given first and second chance bus to retry the message with.

Note:

  • In order to make a BC device retry a message in case of error, all the following terms must be matched:
  • Function naibrd_1553_SetMessageRetryPolicy has been called to configure the BC device with a suitable number of retries and actually available retry buses.
  • Each of the messages that should be retried on error has been defined with option NAI_1553_BC_CTRL_RETRY_ENABLED upon its creation using function naibrd_1553_BcMessageCreate* (or modified after creation using function naibrd_1553_BcMessageModify*).

Equivalent DDC definition: aceBCSetMsgRetry

Parameters
swDevice: (Input) Logical Device Number (0-31).
wNumberOfRetries: (Input) Desired number of retries on message failure.
wFirstRetryBus: (Input) The bus to retry the message with in the first time in case of message failure (NAI_1553_MESSAGE_RETRY_SAME or NAI_1553_MESSAGE_RETRY_ALT).
wSecondRetryBus: (Input) The bus to retry the message with in the second time in case of message failure (NAI_1553_MESSAGE_RETRY_SAME or NAI_1553_MESSAGE_RETRY_ALT).
wReserved: (Input) Reserved for future use.
Returns
  • NAI_SUCCESS
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device is not set in RT or RT/MT mode
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when wNumberOfRetries, wFirstRetryBus or wSecondRetryBus is an invalid value

◆ naibrd_1553_BcStart()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcStart ( int16_t swDevice,
int16_t swFrameId,
int32_t sdwFrameCount )

Start the Bus Controller (BC).

Parameters
swDevice: (Input) Logical Device Number (0-31).
swFrameId: (Input) Unique Frame ID.
sdwFrameCount: (Input) Number of times frame is to be executed (zero also means single Tx) or NAI_1553_BC_FRAME_RUN_FOREVER to run forever.
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state
  • NAI_1553_RC_INVALID_PARAMETER when swFrameId and/or sdwFrameCount is invalid
  • NAI_1553_RC_UNDEFINED_NODE when the frame of swFrameId is not defined
  • NAI_1553_RC_NOT_MAJOR_FRAME when the frame of swFrameId is not a major frame

◆ naibrd_1553_BcStop()

NAIBRDFUNC nai_1553_t NAIAPI naibrd_1553_BcStop ( int16_t swDevice)

Stop the Bus Controller (BC).

Parameters
swDevice: (Input) Logical Device Number (0-31).
Returns
  • NAI_SUCCESS when function is completed successfully
  • NAI_1553_RC_INVALID_DEVICE_NUMBER when incorrect device number was input
  • NAI_1553_RC_INVALID_MODE when device mode is not set to BC
  • NAI_1553_RC_INVALID_STATE when device is in an invalid state