MX Foundation 4
Basic Transmission

In order to send data using a raw port you must:

Transmission with Absolute timing

Using the MXF_TXAPERIODIC_FLAG_ABSOLUTE_START_TIME flag, an absolute start time is specified to send the records. The records are then sent back-to-back. The record's time tag can't be used.

Transmission with Record Absolute timing

Using the MXF_TXAPERIODIC_FLAG_USE_RECORD_ABSOLUTE_TIME flag, each record's time tag is set in the future (in sequence) for the transmission of the records. The start time can't be used with this option.

Transmission with Record Relative timing

Using the MXF_TXAPERIODIC_FLAG_USE_RECORD_RELATIVE_TIME flag, the records' time tag specifies the relative time between each records for transmission. The start time can't be used with this option.

Example

ar664_playback.c
The code snippets below demonstrate the basic steps needed to setup a Raw port transmission.

#define DATARECS_BUFFER_SIZE_MAX 64*1024
HMXF_DEVICE device = 0;
HMXF_CHANNEL phyChn = 0;
HMXF_BUFFER txBuffer = 0;
uint32 rc;
uint64 allocated;
MXF_A664_DATAREC* txRec = NULL;
...
rc = mxfA664TxAperiodicBufferAlloc(phyChn, MXF_TXAPERIODIC_PRIORITY_HIGH, 1000, 1024, &txBuffer, &allocated);
if (!rc)
{
txRec = malloc(DATARECS_BUFFER_SIZE_MAX);
memset(txRec, 0, DATARECS_BUFFER_SIZE_MAX);
if (!txRec)
rc = MAXT_ERROR_MEM;
}
if(!rc)
rc = mxfDeviceTimerGet(device, &currentTime);
if(!rc)
{
currentTime += 500 * 1000 * 1000; // 500ms later
memset(&txRec, 0, sizeof(MXF_A664_DATAREC));
txRec.timeTag = currentTime;
// Do not compute MAC CRC, IP checksum and override NET ID
txRec.control = MXF_A664_CTRL_TX_RAW_IP_CHECKSUM_INCLUDED | MXF_A664_CTRL_TX_RAW_MAC_CRC32_INCLUDED | MXF_A664_CTRL_TX_RAW_MAC_NETID_INCLUDED;
rc = mxfA664TxAperiodicWrite(txBuffer, MXF_TXAPERIODIC_FLAG_USE_RECORD_ABSOLUTE_TIME, 0, 1, &txRec, &writtenCount);
}
...
if (!rc)
rc = mxfTxAperiodicBufferFree(txBuffer);
...
Updated 10/23/2023