MX Foundation 4
Acquisition with Trigger

A basic acquisition program allows capturing of all data received on a bus. In some cases, it is necessary to start capturing the traffic only when a specific event is detected. In this case, the acquisition triggering service can be used for this. Two types of events are supported: trigger on a specific ARINC 717 data word content and trigger on the running state of another channel.

When an acquisition with trigger is started, the data received is not available to the application until the trigger condition(s) are met. In this state, the data received is kept in a circular queue. The maximum number of data records to be kept in the queue is configurable. If the queue is full, the older data is flushed to make place for newly incoming data. When the trigger conditions are realized, the acquisition goes into a running state. In this state, the pre-trig data and all newly incoming data are queued until the application reads them (through the mxfA717RxAcqRead() function).
The trigger conditions can be "ANDed" and/or "ORed".

Example

ar717_rx_acquisition_trigger.c
The example below shows how triggering on a specific data word content can be set.

uint32 rc;
HMXF_SERVER server;
HMXF_COND_LIST condList;
...
// Configures trigger
// Creates the condition list
if (!rc)
rc = mxfRxAcqTrigConditionListAlloc(server, &condList);
// The condition will be triggered when data is 0x315 at word 21 of any subframe
if(!rc)
{
condParam.mask = 0x0FFF0000;
condParam.data = 0x03150000;
condParam.offset = 10;
condParam.options = MXF_RXACQ_TRIG_COND_RDATA_OPTIONS_EQUAL;
rc = mxfRxAcqTrigConditionAdd(condList, MXF_RXACQ_TRIG_COND_ID_RDATA_DW , &condParam);
}
// Sets the trigger with a pretrig count of 3 which allows some records to be read before the condition was triggered.
if(!rc)
rc = mxfRxAcqTrigSet(rxBuffer, condList, 3);
...
Updated 10/23/2023