MX Foundation 4

Functions

uint32 mxfTxAperiodicBufferAlloc (HMXF_HANDLE handle, uint64 priority, uint64 size, HMXF_BUFFER *buffer, uint64 *allocated)
 
uint32 mxfTxAperiodicBufferGet (HMXF_HANDLE handle, uint64 priority, HMXF_BUFFER *buffer)
 
uint32 mxfTxAperiodicBufferFree (HMXF_BUFFER buffer)
 
uint32 mxfTxAperiodicBufferStatusGet (HMXF_BUFFER buffer, uint64 *msgCount, uint64 *pendingBytes, uint64 *freeBytes)
 
uint32 mxfTxAperiodicBufferInfoGet (HMXF_BUFFER buffer, HMXF_HANDLE *handle, uint64 *priority)
 
uint32 mxfTxAperiodicClear (HMXF_BUFFER buffer, uint64 options)
 
uint32 mxfTxAperiodicWrite (HMXF_BUFFER buffer, uint64 options, uint64 startTime, uint64 count, void *rec)
 
uint32 mxfTxAperiodicWriteAsync (HMXF_BUFFER buffer, uint64 options, uint64 startTime, uint64 count, void *hostBuffer, MXF_ASYNCHRONOUS_CALLBACK writeCompletion, void *context)
 
uint32 mxfTxAperiodicBufferAsyncEventInit (HMXF_BUFFER buffer, uint64 almostEmpty, void *context, MXF_ASYNCEVENT_BUFFER_HANDLER callback)
 
uint32 mxfTxAperiodicBufferAsyncEventTerminate (HMXF_BUFFER buffer)
 

Detailed Description

The fonctions in this group allow transmit of raw (unstructured) data to a channel.

Function Documentation

uint32 mxfTxAperiodicBufferAlloc ( HMXF_HANDLE  handle,
uint64  priority,
uint64  size,
HMXF_BUFFER *  buffer,
uint64 *  allocated 
)
C#
public static extern UInt32 mxfTxAperiodicBufferAlloc(UInt64 handle, UInt64 priority, UInt64 size, out UInt64 buffer, out UInt64 allocated);

public static extern UInt32 mxfTxAperiodicBufferAlloc(UInt64 handle, UInt64 priority, UInt64 size, out UInt64 buffer, IntPtr allocated);

Allocates an aperiodic transmission buffer area to an application. This function is used when the transmission is performed directly on a physical port channel (for RAW Transmission). The allocated size can be greater than the asked size (rounding is done for internal buffer alignment). The allocated parameter can return the actual allocated size.

Note
This function is implicitly performed when high level virtual links and COM/SAP logical ports created and therefore not used.
Parameters
[in]handlechannel handle (module handle for FlexDAC).
[in]prioritytransmission priority. For CAN bus channel, four priorities are available (0 to 3, 0 is highest priority and 3 is lowest). For MIL1553 BC channel, two priorities are available (low and high). For other channels, three priorities are available (low, normal and high) as defined below.
Constant Description
MXF_TXAPERIODIC_PRIORITY_NORMAL Normal priority
MXF_TXAPERIODIC_PRIORITY_LOW Low priority
MXF_TXAPERIODIC_PRIORITY_HIGH High priority
[in]sizesize in bytes to allocate
[out]bufferhandle of aperiodic buffer area
[out]allocatedreturned allocated size. Optional, pass NULL to if not needed.
Returns
MAXT_SUCCESS is returned when the function has succeeded.
Refer to mxf_error.h for a list of defined errors.
Call mxfSystemErrorStringGet() to transform the return code into a text string.
Availability:
Available in MX Foundation 4.0 and later.
See also
mxfTxAperiodicBufferFree()
mxfTxAperiodicBufferGet()
mxfTxAperiodicBufferStatusGet()
Examples:
ar429_aperiodic.c, ar429_aperiodic.cs, ar429_embedded_bridge.c, ar429_embedded_bridge.cs, ar429_embedded_discrete.c, ar429_embedded_discrete.cs, ar429_embedded_timer.c, ar429_embedded_timer.cs, ar429_UDPCommRxEmbedded.c, ar629_aperiodic_mode.c, ar629_aperiodic_mode.cs, ar708.c, ar708.cs, ar708_aperiodic.c, ar708_aperiodic.cs, ar708_event_handler.c, ar708_event_handler.cs, ar708_trigger.c, ar708_trigger.cs, ar717.c, ar717.cs, ar717_advance.c, ar717_advance.cs, ar717_bridge_from_ar429.c, ar717_bridge_from_ar429.cs, ar717_buffer_threshold.c, ar717_buffer_threshold.cs, ar717_embedded_recorder.c, ar717_embedded_recorder.cs, ar717_rx_acquisition_trigger.c, ar717_rx_acquisition_trigger.cs, async.c, async.cs, async_flow_control_hw.c, async_flow_control_hw.cs, async_flow_control_sw.c, async_flow_control_sw.cs, async_rx_acquisition_trigger.c, async_rx_acquisition_trigger.cs, async_tx_error_injection.c, async_tx_error_injection.cs, can_fd.c, canbus.c, canbus.cs, csdb_aperiodic.c, csdb_aperiodic.cs, dac.c, dac_buffer_threshold.c, dac_relative_timing.c, discrete_event_handler.c, discrete_event_handler.cs, discrete_fifo.c, discrete_fifo.cs, discrete_pulse_clock.c, discrete_pulse_clock.cs, discrete_rx_acquisition_trigger.c, discrete_rx_acquisition_trigger.cs, flexdac.c, flexdac_buffer_threshold.c, flexdac_relative_timing.c, flexdio_event_handler.c, flexdio_fifo.c, hdlc.c, hdlc.cs, hdlc_aperiodic.c, hdlc_aperiodic.cs, hdlc_buffer_threshold.c, hdlc_buffer_threshold.cs, hdlc_trigger.c, hdlc_trigger.cs, hdlc_tx_error_injection.c, hdlc_tx_error_injection.cs, hfce.c, hfce_aperiodic.c, hfce_buffer_threshold.c, hfce_trigger.c, hfce_tx_error_injection.c, irigb_1pps.c, irigb_1pps.cs, mil1553_aperiodic.c, mil1553_aperiodic.cs, mil1553_aperiodic_event.c, mil1553_aperiodic_event.cs, mil1553_aperiodic_frame.c, mil1553_aperiodic_frame.cs, mil1553_bc_extclock.c, mil1553_bc_extclock.cs, mil1553_bm_acquisition_trigger.c, mil1553_bm_acquisition_trigger.cs, mil1553_embedded_async_to_1553.c, mil1553_embedded_async_to_1553.cs, mil1553_rt_rt.c, mil1553_rt_rt.cs, multi.c, multi.cs, pulse.c, write_read_async.c, and write_read_async.cs.
uint32 mxfTxAperiodicBufferGet ( HMXF_HANDLE  handle,
uint64  priority,
HMXF_BUFFER *  buffer 
)
C#
public static extern UInt32 mxfTxAperiodicBufferGet(UInt64 handle, UInt64 priority, out UInt64 buffer);

Returns, based on the channel and priority, the buffer handle allocated to an aperiodic buffer.

Parameters
[in]handlechannel, VL or module handle.
[in]prioritytransmission priority or subvl index.
With A664 VL, subvl index is between 0-3. For others, priority can be:
Constant Description
MXF_TXAPERIODIC_PRIORITY_NORMAL Normal priority (not available in A664)
MXF_TXAPERIODIC_PRIORITY_LOW Low priority
MXF_TXAPERIODIC_PRIORITY_HIGH High priority
[out]bufferhandle of aperiodic buffer area.
Returns
MAXT_SUCCESS is returned when the function has succeeded.
Refer to mxf_error.h for a list of defined errors.
Call mxfSystemErrorStringGet() to transform the return code into a text string.
Availability:
Available in MX Foundation 4.0 and later.
See also
mxfTxAperiodicBufferAlloc()
Examples:
ar664_end_system.c, and ar664_end_system.cs.
uint32 mxfTxAperiodicBufferFree ( HMXF_BUFFER  buffer)
C#
public static extern UInt32 mxfTxAperiodicBufferFree(UInt64 buffer);

Deallocates the memory previously allocated by mxfTxAperiodicBufferAlloc().

Parameters
[in]bufferbuffer handle.
Returns
MAXT_SUCCESS is returned when the function has succeeded.
Refer to mxf_error.h for a list of defined errors.
Call mxfSystemErrorStringGet() to transform the return code into a text string.
Availability:
Available in MX Foundation 4.0 and later.
See also
mxfTxAperiodicBufferAlloc()
Examples:
ar429_aperiodic.c, ar429_aperiodic.cs, ar429_embedded_bridge.c, ar429_embedded_bridge.cs, ar429_embedded_discrete.c, ar429_embedded_discrete.cs, ar429_embedded_timer.c, ar429_embedded_timer.cs, ar429_periodic.cs, ar629_aperiodic_mode.c, ar629_aperiodic_mode.cs, ar664_playback.c, ar664_playback.cs, ar708.c, ar708.cs, ar708_aperiodic.c, ar708_aperiodic.cs, ar708_buffer_threshold.cs, ar708_event_handler.c, ar708_event_handler.cs, ar708_periodic.cs, ar708_sampling.cs, ar708_trigger.c, ar708_trigger.cs, ar708_tx_error_injection.cs, ar717.c, ar717.cs, ar717_advance.c, ar717_advance.cs, ar717_bridge_from_ar429.c, ar717_bridge_from_ar429.cs, ar717_buffer_threshold.c, ar717_buffer_threshold.cs, ar717_embedded_recorder.c, ar717_embedded_recorder.cs, ar717_rx_acquisition_trigger.c, ar717_rx_acquisition_trigger.cs, async.c, async.cs, async_flow_control_hw.c, async_flow_control_hw.cs, async_flow_control_sw.cs, async_rx_acquisition_trigger.c, async_rx_acquisition_trigger.cs, async_tx_error_injection.c, async_tx_error_injection.cs, can_fd.c, canbus.c, canbus.cs, csdb_aperiodic.c, csdb_aperiodic.cs, dac_buffer_threshold.c, discrete_event_handler.c, discrete_event_handler.cs, discrete_fifo.c, discrete_fifo.cs, discrete_pulse_clock.c, discrete_pulse_clock.cs, flexdac_buffer_threshold.c, flexdio_event_handler.c, flexdio_fifo.c, hdlc.c, hdlc.cs, hdlc_aperiodic.c, hdlc_aperiodic.cs, hdlc_buffer_threshold.c, hdlc_buffer_threshold.cs, hdlc_trigger.c, hdlc_trigger.cs, hdlc_tx_error_injection.c, hdlc_tx_error_injection.cs, hfce.c, hfce_aperiodic.c, hfce_buffer_threshold.c, hfce_trigger.c, hfce_tx_error_injection.c, irigb_1pps.c, irigb_1pps.cs, mil1553_aperiodic_event.c, mil1553_aperiodic_event.cs, mil1553_aperiodic_frame.c, mil1553_aperiodic_frame.cs, mil1553_bc_extclock.c, mil1553_bc_extclock.cs, mil1553_bm_acquisition_trigger.c, mil1553_bm_acquisition_trigger.cs, mil1553_rt_rt.c, mil1553_rt_rt.cs, pulse.c, write_read_async.c, and write_read_async.cs.
uint32 mxfTxAperiodicBufferStatusGet ( HMXF_BUFFER  buffer,
uint64 *  msgCount,
uint64 *  pendingBytes,
uint64 *  freeBytes 
)
C#
public static extern UInt32 mxfTxAperiodicBufferStatusGet(UInt64 buffer, out UInt64 msgCount, out UInt64 pendingBytes, out UInt64 freeBytes);

Returns the number of messages/bytes pending and free space in the aperiodic buffer.

Parameters
[in]bufferbuffer handle.
[out]msgCountnumber of pending messages.
[out]pendingBytesnumber of pending bytes.
[out]freeBytesnumber of free bytes.
Returns
MAXT_SUCCESS is returned when the function has succeeded.
Refer to mxf_error.h for a list of defined errors.
Call mxfSystemErrorStringGet() to transform the return code into a text string.
Availability:
Available in MX Foundation 4.0 and later.
See also
mxfTxAperiodicBufferAlloc()
mxfTxAperiodicWrite()
mxfTxAperiodicClear()
Examples:
ar429_aperiodic.c, ar429_aperiodic.cs, ar429_UDPCommRxEmbedded.c, ar708_aperiodic.c, ar708_aperiodic.cs, ar717_bridge_from_ar429.c, ar717_bridge_from_ar429.cs, csdb_aperiodic.c, csdb_aperiodic.cs, discrete_event_handler.c, discrete_event_handler.cs, and flexdio_event_handler.c.
uint32 mxfTxAperiodicBufferInfoGet ( HMXF_BUFFER  buffer,
HMXF_HANDLE *  handle,
uint64 *  priority 
)
C#
public static extern UInt32 mxfTxAperiodicBufferInfoGet(UInt64 buffer, out UInt64 handle, out UInt64 priority);

public static extern UInt32 mxfTxAperiodicBufferInfoGet(UInt64 buffer, out UInt64 handle, IntPtr priority);

Returns the channel handle and priority related to an aperiodic buffer.

Parameters
[in]bufferbuffer handle.
[out]handlechannel or module handle. Pass NULL to ignore this parameter.
[out]prioritytransmission priority. Pass NULL to ignore this parameter.
Returns
MAXT_SUCCESS is returned when the function has succeeded.
Refer to mxf_error.h for a list of defined errors.
Call mxfSystemErrorStringGet() to transform the return code into a text string.
Availability:
Available in MX Foundation 4.0 and later.
See also
mxfTxAperiodicBufferAlloc()
Examples:
dac_buffer_threshold.c, discrete_fifo.c, discrete_fifo.cs, flexdac_buffer_threshold.c, flexdio_fifo.c, hdlc_buffer_threshold.c, hdlc_buffer_threshold.cs, and hfce_buffer_threshold.c.
uint32 mxfTxAperiodicClear ( HMXF_BUFFER  buffer,
uint64  options 
)
C#
public static extern UInt32 mxfTxAperiodicClear(UInt64 buffer, UInt64 options);

Clears the record(s) pending in the aperiodic transmission buffer.

Parameters
[in]bufferbuffer handle.
[in]optionsoptions.

By default, this function call will return when the specified buffer is cleared. It will wait until the current string is completed before clearing the buffer.

To modify the default behavior, you can use the following masks:

MXF_TXAPERIODIC_CLEAR_OPT_NO_BLOCKING
The function call will return without waiting for the specified buffer to be cleared.

MXF_TXAPERIODIC_CLEAR_OPT_HWFIFO
Also clears the hardware FIFO.
  • MIL-STD-1553:
    Not available with MIL-STD-1553, hardware FIFO is always cleared after the current string.
  • Others:
    Using this option will clear the specified buffer AND the channel’s hardware FIFO.

    The firmware will NOT wait until the current string is completed before clearing the specified buffer. The channel’s hardware FIFO will be cleared after the current word; it will NOT wait until the string is completed. Be aware that with this option, any word that is present in the channel’s hardware FIFO will be cleared, no matter where it is coming from. MX Foundation supports multiple buffer priorities along with scheduling transmit service, but all this data is put in a single hardware FIFO, so clearing it, might clear data coming from the scheduling transmit service or from another buffer priority. Not all channel’s hardware FIFO supports this option, in that case, no error is returned, but the channel will continue its transmission until its FIFO is empty.
Returns
MAXT_SUCCESS is returned when the function has succeeded.
Refer to mxf_error.h for a list of defined errors.
Call mxfSystemErrorStringGet() to transform the return code into a text string.
Availability:
Available in MX Foundation 4.0 and later.
See also
mxfTxAperiodicBufferAlloc()
mxfTxAperiodicBufferStatusGet()
mxfTxAperiodicWrite()
Examples:
discrete_event_handler.c, discrete_event_handler.cs, discrete_fifo.c, discrete_fifo.cs, flexdac_buffer_threshold.c, flexdio_event_handler.c, flexdio_fifo.c, mil1553_aperiodic.c, mil1553_aperiodic.cs, mil1553_aperiodic_event.c, mil1553_aperiodic_event.cs, mil1553_rt_rt.c, and mil1553_rt_rt.cs.
uint32 mxfTxAperiodicWrite ( HMXF_BUFFER  buffer,
uint64  options,
uint64  startTime,
uint64  count,
void *  rec 
)
C#
public static extern UInt32 mxfTxAperiodicWrite(UInt64 buffer, UInt64 options, UInt64 startTime, UInt64 count, IntPtr rec);

Sends aperiodic data record for transmission. The data items to be transmitted are specified within the records, along with a time tag and a control word. The first data item is transmitted at the specified starting time.

The records to transmit on time tag must be placed in chronological order in the array. The same time tag must not appear more than once in the array. When the start time is specified, the time tag of the first record or the start time should be at least 50 msec in advance (in client/server at least +100ms) to be relatively precise otherwise it will be sent as soon as possible. Also, the cumulative time of all record’s time tag and the start time must be smaller than 30 seconds.

Parameters
[in]bufferbuffer handle.
[in]optionsoptions for controlling the transmitter before for sending the data records. The details of the options are explained below.
Constant Description
MXF_TXAPERIODIC_FLAG_DEFAULT Default transmission
MXF_TXAPERIODIC_FLAG_USE_RECORD_ABSOLUTE_TIME Transmit using record absolute time
MXF_TXAPERIODIC_FLAG_ABSOLUTE_START_TIME Transmit using absolute start time
MXF_TXAPERIODIC_FLAG_USE_RECORD_RELATIVE_TIME Transmit using record relative time
[in]startTimestart time based on the timebase. This is the time at which the data held in the first record is transmitted by the device. The time is either expressed accordingly to the process time base or relative to the current real-time clock value (i.e. offset in the future). If the bit MXF_TXAPERIODIC_FLAG_ABSOLUTE_START_TIME of the transmit flag is set, then the start time is specified in absolute time (rather than relative). MXF_TXAPERIODIC_FLAG_USE_RECORD_ABSOLUTE_TIME or MXF_TXAPERIODIC_FLAG_USE_RECORD_RELATIVE_TIME options cannot be used with a start time.
[in]countnumber of records to write
[in]recrecords to write. The records in the buffer need to be indexed using mxfNextRecordPtrGet() function. The supported records are:
Channel class TX Aperiodic Record Structure
ARINC 429 MXF_A429_DATAREC
MIL-STD-1553 MXF_MIL1553_DATAREC
CSDB MXF_CSDB_DATAREC
ASYNC ENHANCED MXF_ASYNCEH_DATAREC
ARINC 629 MXF_A629_DATAREC
ARINC 708 MXF_A708_DATAREC
ARINC 717 MXF_A717_DATAREC
HDLC/SDLC MXF_HDLC_DATAREC
Discrete MXF_DISCRETE_DATAREC
ARINC 664 MXF_A664_DATAREC
CAN MXF_CANBUS_DATAREC
Pulse MXF_PULSE_DATAREC
HFCE MXF_HFCE_DATAREC
Flex Analog MXF_FLEXANALOG_DATAREC
Flex DIO MXF_FLEXDIO_DATAREC

The options parameter modifies the transmission scheme as described below;

  • MXF_TXAPERIODIC_FLAG_DEFAULT

    This is the default transmission flag, the scheduling priority defined when the buffer area was defined (see mxfTxAperiodicBufferAlloc()) is used to schedule the transmissions.

    The time tag field is not used and must be set to 0. The records are transmitted with minimum delay between them.

  • MXF_TXAPERIODIC_FLAG_USE_RECORD_ABSOLUTE_TIME

    When set, the absolute transmit time of each data must be set in the record time tag. The time tag must be formatted according to the process time base.

    This flag cannot be used with MXF_TXAPERIODIC_FLAG_USE_RECORD_RELATIVE_TIME, MXF_TXAPERIODIC_FLAG_ABSOLUTE_START_TIME or a start time.

  • MXF_TXAPERIODIC_FLAG_USE_RECORD_RELATIVE_TIME

    When set, the relative transmit time of each data must be set in the record time tag. The process time base resolution is used, but the time base itself is ignored.

    This option causes transmission of the first record at the specified offset and transmission of the remaining records after a delay that is computed by subtracting the record time tag from the time tag of preceding records (i.e. delta time).

    Let’s assume N data records to be transmitted with the MXF_TXAPERIODIC_FLAG_USE_RECORD_RELATIVE_TIME.

    The actual record data transmit time will be computed as follows:

    Time rec1 = Transmission offset (min 50 msec)
    Time rec2 = Time rec1 + (rec2 time tag – rec1 time tag )
    Time rec3 = Time rec2 + (rec3 time tag – rec2 time tag )

    Time recN = Time recN-1 + (recN time tag - recN-1 time tag )

    This flag cannot be used with MXF_TXAPERIODIC_FLAG_USE_RECORD_ABSOLUTE_TIME, MXF_TXAPERIODIC_FLAG_ABSOLUTE_START_TIME or a start time.

  • MXF_TXAPERIODIC_FLAG_ABSOLUTE_START_TIME

    When set, the startTime parameter must be formatted according to the process time base.

    If not set, the startTime parameter is expressed as a relative time from the current real time clock value. The process time base resolution is used, but the time base itself is ignored.

    This flag cannot be used with the MXF_TXAPERIODIC_FLAG_USE_RECORD_ABSOLUTE_TIME or MXF_TXAPERIODIC_FLAG_USE_RECORD_RELATIVE_TIME options.
Returns
MAXT_SUCCESS is returned when the function has succeeded.
Refer to mxf_error.h for a list of defined errors.
Call mxfSystemErrorStringGet() to transform the return code into a text string.
Availability:
Available in MX Foundation 4.0 and later.
See also
mxfTxAperiodicBufferAlloc()
mxfTxAperiodicBufferStatusGet()
mxfTxAperiodicClear()
mxfSystemTimeBaseSet()
mxfTxAperiodicWriteAsync()
Examples:
ar629_aperiodic_mode.c, ar629_aperiodic_mode.cs, discrete_rx_acquisition_trigger.c, discrete_rx_acquisition_trigger.cs, mil1553_bm_acquisition_trigger.c, mil1553_bm_acquisition_trigger.cs, multi.c, and multi.cs.
uint32 mxfTxAperiodicWriteAsync ( HMXF_BUFFER  buffer,
uint64  options,
uint64  startTime,
uint64  count,
void *  hostBuffer,
MXF_ASYNCHRONOUS_CALLBACK  writeCompletion,
void *  context 
)
C#
public static extern UInt32 mxfTxAperiodicWriteAsync(UInt64 buffer, UInt64 options, UInt64 startTime, UInt64 count, IntPtr hostBuffer, MXF_ASYNCHRONOUS_CALLBACK writeCompletion, IntPtr context);

Sends asynchronously aperiodic data record for transmission. The function will return immediately after it has been registered to be executed by another thread. A callback function will be called when the asynchronous function has finished.

A maximum of 1000 asynchronous function calls can be queued.

The data items to be transmitted are specified within the records, along with a time tag and a control word. The first data item is transmitted at the specified starting time.

The records to transmit on time tag must be placed in chronological order in the array. The same time tag must not appear more than once in the array. When the start time is specified, the time tag of the first record or the start time should be at least 50 msec in advance to be relatively precise otherwise it will be sent as soon as possible. Also, the cumulative time of all record’s time tag and the start time must be smaller than 30 seconds.

Parameters
[in]bufferbuffer handle.
[in]optionsoptions for controlling the transmitter before for sending the data records. The details of the options are explained below.
Constant Description
MXF_TXAPERIODIC_FLAG_DEFAULT Default transmission
MXF_TXAPERIODIC_FLAG_USE_RECORD_ABSOLUTE_TIME Transmit using record absolute time
MXF_TXAPERIODIC_FLAG_ABSOLUTE_START_TIME Transmit using absolute start time
MXF_TXAPERIODIC_FLAG_USE_RECORD_RELATIVE_TIME Transmit using record relative time
[in]startTimestart time based on the timebase. This is the time at which the data held in the first record is transmitted by the device. The time is either expressed accordingly to the process time base or relative to the current real-time clock value (i.e. offset in the future). If the bit MXF_TXAPERIODIC_FLAG_ABSOLUTE_START_TIME of the transmit flag is set, then the start time is specified in absolute time (rather than relative). MXF_TXAPERIODIC_FLAG_USE_RECORD_ABSOLUTE_TIME or MXF_TXAPERIODIC_FLAG_USE_RECORD_RELATIVE_TIME options cannot be used with a start time.
[in]countnumber of records to write
[in]hostBufferrecords to write. The records in the buffer need to be indexed using mxfNextRecordPtrGet() function. The supported records are:
Channel class TX Aperiodic record structure
ARINC 429 MXF_A429_DATAREC
MIL-STD-1553 MXF_MIL1553_DATAREC
CSDB MXF_CSDB_DATAREC
ASYNC ENHANCED MXF_ASYNCEH_DATAREC
ARINC 629 MXF_A629_DATAREC
ARINC 708 MXF_A708_DATAREC
ARINC 717 MXF_A717_DATAREC
HDLC MXF_HDLC_DATAREC
Discrete MXF_DISCRETE_DATAREC
ARINC 664 MXF_A664_DATAREC
CAN MXF_CANBUS_DATAREC
Pulse MXF_PULSE_DATAREC
HFCE MXF_HFCE_DATAREC
Flex Analog MXF_FLEXANALOG_DATAREC
Flex DIO MXF_FLEXDIO_DATAREC
[in]writeCompletioncallback function to be called when write process has been completed. Callback function is defined as follow:
1 typedef void (*MXF_ASYNCHRONOUS_CALLBACK)(HMXF_BUFFER bufferHandle, uint32 result, void* context, uint64* output);
[in] bufferHandle: buffer handle.
[in] result: return code of the function.
[in] context: pointer to a value that has been passed for the callback.
[in] output: array of additional information. output[0] contains the number of records to write.
[in]contextpointer to a value that will be passed to the callback handler (optional).


The options parameter modifies the transmission scheme as described below;

  • MXF_TXAPERIODIC_FLAG_DEFAULT

    This is the default transmission flag, the scheduling priority defined when the buffer area was defined (see mxfTxAperiodicBufferAlloc()) is used to schedule the transmissions.

    The time tag field is not used and must be set to 0. The records are transmitted with minimum delay between them.

  • MXF_TXAPERIODIC_FLAG_USE_RECORD_ABSOLUTE_TIME

    When set, the absolute transmit time of each data must be set in the record time tag. The time tag must be formatted according to the process time base.

    This flag cannot be used with MXF_TXAPERIODIC_FLAG_USE_RECORD_RELATIVE_TIME, MXF_TXAPERIODIC_FLAG_ABSOLUTE_START_TIME or a start time.

  • MXF_TXAPERIODIC_FLAG_USE_RECORD_RELATIVE_TIME

    When set, the relative transmit time of each data must be set in the record time tag. The process time base resolution is used, but the time base itself is ignored.

    This option causes transmission of the first record at the specified offset and transmission of the remaining records after a delay that is computed by subtracting the record time tag from the time tag of preceding records (i.e. delta time).

    Let’s assume N data records to be transmitted with the MXF_TXAPERIODIC_FLAG_USE_RECORD_RELATIVE_TIME.

    The actual record data transmit time will be computed as follows:

    Time rec1 = Transmission offset (min 50 msec)
    Time rec2 = Time rec1 + (rec2 time tag – rec1 time tag )
    Time rec3 = Time rec2 + (rec3 time tag – rec2 time tag )

    Time recN = Time recN-1 + (recN time tag - recN-1 time tag )

    This flag cannot be used with MXF_TXAPERIODIC_FLAG_USE_RECORD_ABSOLUTE_TIME, MXF_TXAPERIODIC_FLAG_ABSOLUTE_START_TIME or a start time.

  • MXF_TXAPERIODIC_FLAG_ABSOLUTE_START_TIME

    When set, the startTime parameter must be formatted according to the process time base.

    If not set, the startTime parameter is expressed as a relative time from the current real time clock value. The process time base resolution is used, but the time base itself is ignored.

    This flag cannot be used with the MXF_TXAPERIODIC_FLAG_USE_RECORD_ABSOLUTE_TIME or MXF_TXAPERIODIC_FLAG_USE_RECORD_RELATIVE_TIME options.
Returns
MAXT_SUCCESS is returned when the function has succeeded.
Refer to mxf_error.h for a list of defined errors.
Call mxfSystemErrorStringGet() to transform the return code into a text string.
Availability:
Available in MX Foundation 4.0 and later.
See also
mxfTxAperiodicWrite()
Examples:
write_read_async.c, and write_read_async.cs.
uint32 mxfTxAperiodicBufferAsyncEventInit ( HMXF_BUFFER  buffer,
uint64  almostEmpty,
void *  context,
MXF_ASYNCEVENT_BUFFER_HANDLER  callback 
)

Sets an async event handler for a Tx Aperiodic buffer. When the almost empty threshold will be reached, the callback will be called once and will be called again only when the almost empty threshold will be reached again.

Parameters
[in]bufferTx Aperiodic buffer handle
[in]almostEmptyalmost empty threshold value
[in]contexthandler callback context
[in]callbackTx Aperiodic buffer callback handler

The callback handler function is defined as follow:

1 typedef uint32 (*MXF_ASYNCEVENT_BUFFER_HANDLER)(HMXF_BUFFER buffer, void* context);

[in] buffer: buffer handle [in] context: context pointer

Returns
MAXT_SUCCESS is returned when the function has succeeded.
Refer to mxf_error.h for a list of defined errors.
Call mxfSystemErrorStringGet() to transform the return code into a text string.
Availability:
Available in MX Foundation 4.3.1 and later.
See also
mxfTxAperiodicBufferAsyncEventTerminate()
mxfAsyncEventConditionsSet()
uint32 mxfTxAperiodicBufferAsyncEventTerminate ( HMXF_BUFFER  buffer)

Clears the async event handler for a Tx Aperiodic buffer.

Parameters
[in]bufferTx Aperiodic buffer handle
Returns
MAXT_SUCCESS is returned when the function has succeeded.
Refer to mxf_error.h for a list of defined errors.
Call mxfSystemErrorStringGet() to transform the return code into a text string.
Availability:
Available in MX Foundation 4.3.1 and later.
See also
mxfTxAperiodicBufferAsyncEventInit()
mxfAsyncEventConditionsSet()
Updated 03/30/2022