The option MXF_TXAPERIODIC_FLAG_ABSOLUTE_START_TIME is used for starting a transmission at a specific start time in the future.
In this example, the transmission start time is based on the device clock + 100ms in the future, then the records are sent back-to-back.
ar708_aperiodic.c
uint32 rc;
size_t txBufferSize;
HMXF_CHANNEL txChannel;
HMXF_BUFFER txBuffer;
uint32 delay100ms = 100000000;
uint64 currentTime;
uint64 data, word;
...
if(!rc)
{
txBufferSize = 4*1024;
if(!rc)
{
if(!txHostBuffer)
rc = MAXT_ERROR_MEM;
}
}
...
rec=txHostBuffer;
if (rc)
return rc;
printf("\nAperiodic transmission (Absolute)\n");
if(!rc)
{
for(data=0; data<MAX_TX_RECORDS_TO_TRANSMIT; data++)
{
for(word=0; word < rec->
dataSize/2; word++)
{
switch(word)
{
case 0:
break;
case 1:
case 2:
case 3:
rec->
data[word] = 0x0000;
break;
default:
rec->
data[word] = (uint16)(0x0101*data);
}
}
}
}
if(!rc)
{
printf("Transmitting ...\n");
rc =
mxfA708TxAperiodicWrite(txBuffer, MXF_TXAPERIODIC_FLAG_ABSOLUTE_START_TIME, currentTime+delay100ms, MAX_TX_RECORDS_TO_TRANSMIT, txHostBuffer);
}
...