MX Foundation 4
Basic Acquisition

The way to set a basic acquisition receive application is as follows:

  • A receive channel must be obtained using the mxfModuleChannelGet() function or with the mxfModuleChannelAllGet() function by specifying the MXF_SCLASS_RXACQ_SRV subclass.
  • The acquisition buffer must be allocated using the mxfRxAcqBufferAlloc() function.
  • The acquisition mode can be set using the mxfRxAcqModeSet() function.

    Two modes of acquisition are defined;

    Condition Description
    MXF_RXACQ_MODE_LINEAR In this mode the acquisition stops when the buffer is full.
    MXF_RXACQ_MODE_CIRCULAR In this mode the acquisition buffer is circular and never stops receiving.
    Whenever the acquisition queue becomes full, the acquisition process will discard the newest received record.
  • The acquisition must be started using the mxfRxAcqStart() function.
  • A read loop can be implemented using the mxfA429RxAcqRead() function and the data received decoded using the mxfA429ArwDecompose() function.

The MXF_A429_DATAREC structure must be used for reading an ARINC 429 message with acquisition service.

Example

ar429_periodic.c
The example below shows how to implement an ARINC 429 basic receive acquisition application.

#define BUFFER_SIZE 4096
HMXF_CHANNEL rxChannel;
HMXF_BUFFER rxBuffer;
MXF_A429_DATAREC *rec429=NULL;
MXF_A429_DATAREC *recPtr=rec429;
uint64 status, msgsCount, bytesCount;
uint64 j;
uint32 label, sdi, data, ssm, parity;
uint32 rc;
...
// Allocates RX acquisition buffer
if (!rc)
rc = mxfRxAcqBufferAlloc(rxChannel, BUFFER_SIZE, &rxBuffer, NULL);
// Allocates host buffer
if (!rc)
{
rec429 = (MXF_A429_DATAREC*)malloc(BUFFER_SIZE);
if (!rec429)
rc = MAXT_ERROR_MEM;
}
// Starts the acquisition process
if (!rc)
rc = mxfRxAcqModeSet(rxBuffer, MXF_RXACQ_MODE_LINEAR);
if (!rc)
{
rc = mxfRxAcqStart(rxBuffer, MXF_RXACQ_FLAG_DEFAULT, 0, 0);
if (!rc)
printf("\nAcquisition started\n\r");
}
...
// Reads and displays records
rc = mxfA429RxAcqRead(rxBuffer, 0, BUFFER_SIZE, &status, &msgsCount, &bytesCount, rec429);
for (j=0; j<msgsCount && !rc; j++)
{
rc = mxfA429ArwDecompose(recPtr->data, &label, &sdi, &data, &ssm, &parity);
if(!rc)
{
printf("%02llu: Timetag %llu - ARINC word=[%03llo,%lld,%05llX,%lld,%s]\n",
j, recPtr->timeTag, label, sdi, data, ssm, (parity==VMXF_A429_PARITY_ODD)?"ODD":"EVEN");
if(!rc)
rc = mxfA429NextDataRecordPtrGet(recPtr, &recPtr);
}
}
...
Updated 10/23/2023