MX Foundation 4
Asynchronous Events

A MIL-1553 application can register condition(s) to be monitored by the firmware.

When a callback handler is defined, the condition(s) are reported to the application asynchronously from the firmware to the handler.

The way to define a handler is as follows:

List of conditions

The event conditions that can be monitored for a BC channel are as follows:

Condition Description
MXF_ASYNCEVENT_COND_RXACQ_BUFFER_THRESHOLD Acquisition buffer threshold exceeded.
MXF_ASYNCEVENT_COND_RX_MSG Specific message available in the queue.
MXF_ASYNCEVENT_COND_RX_ERROR Receive errors on the RX port.
MXF_ASYNCEVENT_COND_TXPERIODIC_UPDATEMSG_BUFFER_THRESHOLD Periodic update message buffer threshold reached.
MXF_ASYNCEVENT_COND_TXAPERIODIC_BUFFER_THRESHOLD Aperiodic transmit buffer threshold reached.
MXF_ASYNCEVENT_COND_TX_ERROR Transmit errors on the TX port.


#define ALMOST_FULL 20
#define ALMOST_EMPTY 10
uint32 rc;
HMXF_SERVER server;
HMXF_BUFFER bcBufferTx;
HMXF_ASYNCEVENT asyncEvent=0;
...
// Configures aperiodic asynchronous event condition
if(!rc)
rc = mxfAsyncEventHandlerInit(server, &txHandler, txBuffer, &asyncEvent);
if(!rc)
{
condition.reserved = 0;
condition.condID = MXF_ASYNCEVENT_COND_TXAPERIODIC_BUFFER_THRESHOLD;
rc = mxfAsyncEventConditionsSet(asyncEvent, TRUE, 1, &condition);
}
...
// Disables asynchronous event condition
if(!rc)
rc = mxfAsyncEventConditionsSet(asyncEvent, FALSE, 1, &condition);
if(!rc)
...

mil1553_aperiodic.c
mil1553_bc_rt_data_assignment.c

Updated 10/23/2023