MX Foundation 4
Error Injection

The normal usage of the aperiodic / periodic services is to send accurate data on the data bus. However, for testing purposes, a facility is needed to send erroneous data on the bus. This functionality allows an application to test if the receiving LRU can recover properly from transmission errors.

The control field of the MXF_A429_DATAREC can be used for injection errors on the data-bus.

Example

The following code shows how to inject errors using the ARINC 429 record control property.

ar429_buffer_threshold.c

#define TX_MSG_LABEL 5
#define TX_MSG_SDI 0
#define TXALMOSTFULL 7
uint32 rc=0;
uint32 i;
MXF_A429_DATAREC *recPtr=hostBuffer;
uint64 label, sdi, ssm, parity;
static uint64 data=0;
...
// Refills the FIFO in order to produce a ramp
for(i=0; !rc && i<TXALMOSTFULL; i++)
{
// Sends a parity error on first record
recPtr->timeTag=0;
recPtr->control=(i!=0)?0:MXF_A429_TX_REC_CTRL_PARITY_ERROR;
recPtr->repeatCount=1;
recPtr->reserved=0;
label = TX_MSG_LABEL;
sdi = TX_MSG_SDI;
data++;
ssm = 0;
parity = VMXF_A429_PARITY_ODD;
rc = mxfA429ArwCompose(label, sdi, data, ssm, parity, &recPtr->data);
if(!rc)
rc = mxfA429NextDataRecordPtrGet(recPtr, &recPtr);
}
// Adds more data to the buffer
if(!rc)
rc = mxfA429TxPeriodicUpdateMsgWrite(buffer, i, hostBuffer);
...
Updated 10/23/2023