MX Foundation 4
|
An 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:
After this registration, the application can read acquisition data as usual and/or received asynchronous events through the callback handler.
The receive queue can also be read from the callback handler if necessary.
The event conditions that can be monitored are as follows:
Condition | Description |
---|---|
MXF_ASYNCEVENT_COND_RX_MSG | Specific message available in the buffer. |
MXF_ASYNCEVENT_COND_RX_ERROR | Receive errors on the RX port. |
MXF_ASYNCEVENT_COND_RXACQ_BUFFER_THRESHOLD | Acquisition buffer threshold exceeded. |
ar429_rx_event_handler.c
ar429_buffer_threshold.c
The function below illustrates how to define an asynchronous callback handler for trapping ARINC 429 RX conditions.
ar429_rx_event_handler.c
ar429_buffer_threshold.c
In the example below a condition handler is defined to monitor conditions, and an ARINC 429 RX acquisition channel is started to receive data.