MX Foundation 4
Error Injection

The transmission channel allows the user to send messages with many error types. ARINC 629 modules contains a pool of 100 error injection structures. Each of these errors may be associated with any transmit message by the periodic update message service. Each error structure may be configured with the mxfA629ErrorInjectionSet() function. Any ARINC 629 channel handles of a module may be used with this function and refer to the same error pool. mxfA629ErrorInjectionCompose() function can be used to help build the error injection.

In order to associate the error with a message, the mxfA629TxPeriodicUpdateMsgWrite() function may be used. The MXF_A629_DATAREC structure contains the control field that allows the message to be linked with a specific error index (0-99). To use this index, the MXF_A629_TX_REC_CTRL_ERROR_INJ option bit with the index set in the LSB must be set in the control word.

Error injection for CRC and FC does not use mxfA629ErrorInjectionSet(), but are instead directly set in the control word.

#define BUF_SA3_RX 0
#define RT_ADRS_ERROR 5
uint32 rc;
HMXF_CHANNEL rt;
HMXF_BUFFER bcBufferTx[1];
MXF_A629_DATAREC* txBuffer;
...
// Configures injection #0, manchester zero crossing on sync
if(!rc)
{
memset(&err, 0, sizeof(err));
rc = mxfA629ErrorInjectionCompose(MXF_A629_ERRORID_SYNC_MANCHZEROCROSSING, 8, &err.errors[0]);
if (!rc)
rc = mxfA629ErrorInjectionSet(bc, 0, &err);
}
if(!rc)
{
memset(&txRec629, 0, sizeof(MXF_A629_DATAREC));
txRec629.repeatCount = 1;
txRec629.control = MXF_A629_TX_REC_CTRL_ERROR_INJ;
txRec629.dataSize = 8; //8 bytes
txRec629.data[0] = 0x0000; //Not used
txRec629.data[1] = 0x0000;
txRec629.data[2] = 0x1111;
txRec629.data[3] = 0x2222;
rc = mxfA629TxPeriodicUpdateMsgWrite(txBuffer, 1, &txRec629);
}
...
Updated 10/23/2023