MX Foundation 4
Asynchronous Events

A ARINC 629 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 transmission channel are as follows:

Condition Description
MXF_ASYNCEVENT_COND_TXPERIODIC_UPDATEMSG_BUFFER_THRESHOLD Periodic update message buffer threshold reached.
MXF_ASYNCEVENT_COND_TX_ERROR Transmit errors on the TX port.


MXF_ASYNCEVENT_COND_TXPERIODIC_UPDATEMSG_BUFFER_THRESHOLD

Causes an asynchronous event to occur when the specified TX periodic update message buffer threshold is reached. The messages must be selected using mxfAsyncEventTxPeriodicUpdateMsgSelectSet().

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

MXF_ASYNCEVENT_COND_TX_ERROR

Causes an asynchronous event to occur when a TX error is detected. MXF_ASYNCEVENT_PENDING_INFO.condition.txErr.status will have one or more of the major frame status error bit set.

Status Major frame status
MXF_TXPERIODIC_MJRFRAME_STATUS_SIM_ERROR The major frame is stopped after a SIM error.
MXF_TXPERIODIC_MJRFRAME_STATUS_TX_OVERFLOW The major frame is stopped after a TX overflow.
MXF_TXPERIODIC_MJRFRAME_STATUS_BUS_QUIET A Bus Quiet error condition has been detected.
Updated 10/23/2023