MX Foundation 4
Asynchronous Events

An ASCB 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_TXPERIODIC_UPDATEMSG_BUFFER_THRESHOLD Periodic update message buffer threshold reached.


#define ALMOST_FULL 20
#define ALMOST_EMPTY 10
uint32 rc;
HMXF_SERVER server;
HMXF_CHANNEL bc;
HMXF_BUFFER bcBufferTx;
HMXF_ASYNCEVENT asyncEvent=0;
MXF_ASCB_DATAREC* txBuffer;
...
// Configures periodic update 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);
}
// Select periodic update buffer
if(!rc)
rc = mxfAsyncEventTxPeriodicUpdateMsgSelectSet(asyncEvent, bc, MXF_MSG_SELECT_ONLY, 1, &bcBufferTx);
...
// Disables asynchronous event condition
if(!rc)
rc = mxfAsyncEventConditionsSet(asyncEvent, FALSE, 1, &condition);
if(!rc)
...
Updated 10/23/2023