Transmission with relative record timing means the records are scheduled one after another based on the delta time tag set.
The option MXF_TXAPERIODIC_FLAG_USE_RECORD_RELATIVE_TIME
is used to perform this function.
For instance, for an array of n records to transmit, the records transmit timing is as follows:
Time record 1 = record 1 time tag (offset from current time)
Time record 2 = Time record 1 + (record 2 time tag - record 1 time tag)
Time record 3 = Time record 2 + (record 3 time tag - record 2 time tag)
......
Time record n = Time record n-1 + (record n time tag - record n-1 time tag)
Each time tag becomes relative to the previous record sent.
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;
printf("\nAperiodic transmission (Record Relative)\n");
if(!rc)
{
for(data=0, currentTime=100000000; data<MAX_TX_RECORDS_TO_TRANSMIT; data++)
{
rec->
timeTag = currentTime+(data*5000000);
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_USE_RECORD_RELATIVE_TIME, 0, MAX_TX_RECORDS_TO_TRANSMIT, txHostBuffer);
}
...