MX Foundation 4

Functions

uint32 mxfASYNCEHTxAperiodicWrite (HMXF_BUFFER buffer, uint64 options, uint64 startTime, uint64 count, MXF_ASYNCEH_DATAREC *rec)
 
uint32 mxfASYNCEHRxAcqRead (HMXF_BUFFER buffer, uint64 maxMsgCount, uint64 maxBytesCount, uint64 *status, uint64 *msgCount, uint64 *byteCount, MXF_ASYNCEH_DATAREC *rec)
 
uint32 mxfASYNCEHNextDataRecordPtrGet (MXF_ASYNCEH_DATAREC *currentRec, MXF_ASYNCEH_DATAREC **nextRec)
 
uint32 mxfASYNCEHEmbeddedNVStorageFileMsgRead (HMXF_NVSTORAGE nvStorage, uint64 fileIndex, uint64 maxMsgCount, uint64 maxBytesCount, uint64 *msgCount, uint64 *byteCount, MXF_ASYNCEH_DATAREC *msg)
 
uint32 mxfASYNCEHEmbeddedNVStorageFileMsgWrite (HMXF_NVSTORAGE nvStorage, uint64 fileIndex, uint64 maxMsgCount, MXF_ASYNCEH_DATAREC *msg, uint64 *count)
 
uint32 mxfASYNCEH9BitTxAperiodicWrite (HMXF_BUFFER buffer, uint64 options, uint64 startTime, uint64 count, MXF_ASYNCEH_9BIT_DATAREC *rec)
 
uint32 mxfASYNCEH9BitRxAcqRead (HMXF_BUFFER buffer, uint64 maxMsgCount, uint64 maxBytesCount, uint64 *status, uint64 *msgCount, uint64 *byteCount, MXF_ASYNCEH_9BIT_DATAREC *rec)
 
uint32 mxfASYNCEH9BitNextDataRecordPtrGet (MXF_ASYNCEH_9BIT_DATAREC *currentRec, MXF_ASYNCEH_9BIT_DATAREC **nextRec)
 

Detailed Description

Function Documentation

uint32 mxfASYNCEHTxAperiodicWrite ( HMXF_BUFFER  buffer,
uint64  options,
uint64  startTime,
uint64  count,
MXF_ASYNCEH_DATAREC rec 
)
C#
public static extern UInt32 mxfASYNCEHTxAperiodicWrite(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 an optional time tag. 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.

Note
This function is the specific version for ASYNC Enhanced of the multi-protocol mxfTxAperiodicWrite() function.
Parameters
[in]bufferbuffer handle.
[in]optionsoptions for controlling the transmitter before for sending the data records. The details of the options are explained below.
  • MXF_TXAPERIODIC_FLAG_DEFAULT
  • MXF_TXAPERIODIC_FLAG_USE_RECORD_ABSOLUTE_TIME
  • MXF_TXAPERIODIC_FLAG_ABSOLUTE_START_TIME
  • MXF_TXAPERIODIC_FLAG_USE_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 can't be used with a start time.
[in]countnumber of records to write.
[in]recpointer to MXF_ASYNCEH_DATAREC records to write. The records in the buffer need to be indexed using mxfASYNCEHNextDataRecordPtrGet() function.


The options modify 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 can’t 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 can’t 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.

    The time tag field is not used and must be set to 0. The first record is sent at the specified start time and then the other records are transmitted with minimum delay between them.

    This flag cannot be used with 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()
mxfTxAperiodicBufferAlloc()
mxfTxAperiodicBufferStatusGet()
mxfTxAperiodicClear()
mxfSystemTimeBaseSet()
mxfASYNCEHNextDataRecordPtrGet()
Examples:
async.c, async.cs, async_flexsmp.c, async_flexsmp.cs, async_flexsmp_rs232.c, async_flexsmp_rs232.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, mil1553_embedded_async_to_1553.c, and mil1553_embedded_async_to_1553.cs.
uint32 mxfASYNCEHRxAcqRead ( HMXF_BUFFER  buffer,
uint64  maxMsgCount,
uint64  maxBytesCount,
uint64 *  status,
uint64 *  msgCount,
uint64 *  byteCount,
MXF_ASYNCEH_DATAREC rec 
)
C#
public static extern UInt32 mxfASYNCEHRxAcqRead(UInt64 buffer, UInt64 maxMsgCount, UInt64 maxBytesCount, out UInt64 status, out UInt64 msgCount, out UInt64 byteCount, IntPtr rec);

Transfers the records from the channel acquisition buffer to the calling application.

Note
This function is the specific version for ASYNC Enhanced of the multi-protocol mxfRxAcqRead() function.
Parameters
[in]bufferbuffer handle.
[in]maxMsgCountmaximum messages to read (0 means all messages).
[in]maxBytesCountmaximum number of bytes to be read.
[out]statuslast status set.
[out]msgCountnumber of records returned.
[out]byteCountnumber of bytes returned.
[out]recaddress of data records. The records in the buffer need to be indexed using mxfASYNCEHNextDataRecordPtrGet() function.
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
mxfRxAcqRead()
mxfRxAcqStart()
mxfRxAcqBufferAlloc()
mxfRxAcqStop()
mxfASYNCEHNextDataRecordPtrGet()
Examples:
async.c, async.cs, async_flexsmp.c, async_flexsmp.cs, async_flexsmp_rs232.c, async_flexsmp_rs232.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, mil1553_embedded_async_to_1553.c, and multi.cs.
uint32 mxfASYNCEHNextDataRecordPtrGet ( MXF_ASYNCEH_DATAREC currentRec,
MXF_ASYNCEH_DATAREC **  nextRec 
)
C#
public static extern UInt32 mxfASYNCEHNextDataRecordPtrGet(IntPtr currentRec, out IntPtr nextRec);

Returns the next buffer address in a MXF_ASYNCEH_DATAREC buffer array.

Note
This function is the specific version for ASYNC Enhanced of the multi-protocol mxfNextRecordPtrGet() function.
Parameters
[in]currentRecpointer to the beginning or the current record in the buffer.
[out]nextRecpointer to next record in the buffer.
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
mxfNextRecordPtrGet()
mxfASYNCEHRxAcqRead()
mxfASYNCEHTxAperiodicWrite()
Examples:
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, mil1553_embedded_async_to_1553.c, mil1553_embedded_async_to_1553.cs, multi.c, and multi.cs.
uint32 mxfASYNCEHEmbeddedNVStorageFileMsgRead ( HMXF_NVSTORAGE  nvStorage,
uint64  fileIndex,
uint64  maxMsgCount,
uint64  maxBytesCount,
uint64 *  msgCount,
uint64 *  byteCount,
MXF_ASYNCEH_DATAREC msg 
)
C#
public static extern UInt32 mxfASYNCEHEmbeddedNVStorageFileMsgRead(UInt64 storage, UInt64 fileIndex, UInt64 maxRecCount, UInt64 maxBytesCount, out UInt64 recCount, out UInt64 bytesCount, IntPtr rec);

Reads the records from a specific file. The messages format must be of type MXF_EMBEDDED_NVSTORAGE_MSGTYPE_ASYNC_ENHANCED.

Note
This function is the specific version for ASYNC Enhanced of the multi-protocol mxfEmbeddedNVStorageFileMsgRead() function.
Parameters
[in]nvStoragenon-volatile storage handle
[in]fileIndexfile index
[in]maxMsgCountmaximum number of messages that can be returned
[in]maxBytesCountmaximum byte count that can be returned
[out]msgCountcount of messages returned
[out]byteCountnumber of bytes returned in the msg buffer
[out]msgpointer to read buffer containing messages. The records in the buffer need to be indexed using the mxfASYNCEHNextDataRecordPtrGet() function.
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
mxfEmbeddedNVStorageHandleGet()
mxfEmbeddedNVStorageFileStatusGet()
uint32 mxfASYNCEHEmbeddedNVStorageFileMsgWrite ( HMXF_NVSTORAGE  nvStorage,
uint64  fileIndex,
uint64  maxMsgCount,
MXF_ASYNCEH_DATAREC msg,
uint64 *  count 
)
C#
public static extern UInt32 mxfASYNCEHEmbeddedNVStorageFileMsgWrite(UInt64 storage, UInt64 fileIndex, UInt64 maxRecCount, IntPtr rec, out UInt64 recCount);

Writes messages to the specified file. The messages format must be of type MXF_EMBEDDED_NVSTORAGE_MSGTYPE_ASYNC_ENHANCED.

Note
This function is the specific version for ASYNC Enhanced of the multi-protocol mxfEmbeddedNVStorageFileMsgWrite() function.
Parameters
[in]nvStoragenon-volatile storage handle
[in]fileIndexfile index
[in]maxMsgCountmaximum number of messages to write
[in]msgpointer to messages to write. The records in the buffer need to be indexed using mxfASYNCEHNextDataRecordPtrGet() function.
[out]countnumber of messages actually written
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
mxfEmbeddedNVStorageHandleGet()
mxfEmbeddedNVStorageFileStatusGet()
uint32 mxfASYNCEH9BitTxAperiodicWrite ( HMXF_BUFFER  buffer,
uint64  options,
uint64  startTime,
uint64  count,
MXF_ASYNCEH_9BIT_DATAREC rec 
)
C#
public static extern UInt32 mxfASYNCEH9BitTxAperiodicWrite(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 an optional time tag. 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.

Note
This function is can only be used when the word size is set to 9 on a IPM-ASYNC, IO-FLEXSMP or FlexMulti 629.
Parameters
[in]bufferbuffer handle.
[in]optionsoptions for controlling the transmitter before for sending the data records. The details of the options are explained below.
  • MXF_TXAPERIODIC_FLAG_DEFAULT
  • MXF_TXAPERIODIC_FLAG_USE_RECORD_ABSOLUTE_TIME
  • MXF_TXAPERIODIC_FLAG_ABSOLUTE_START_TIME
  • MXF_TXAPERIODIC_FLAG_USE_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 can't be used with a start time.
[in]countnumber of records to write.
[in]recpointer to MXF_ASYNCEH_DATAREC records to write. The records in the buffer need to be indexed using mxfASYNCEHNextDataRecordPtrGet() function.


The options modify 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 can’t 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 can’t 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.

    The time tag field is not used and must be set to 0. The first record is sent at the specified start time and then the other records are transmitted with minimum delay between them.

    This flag cannot be used with 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.6.2 and later.
See also
mxfTxAperiodicBufferAlloc()
mxfTxAperiodicBufferStatusGet()
mxfTxAperiodicClear()
mxfSystemTimeBaseSet()
mxfASYNCEH9BitNextDataRecordPtrGet()
Examples:
ipm_async_rs485_9bit.c.
uint32 mxfASYNCEH9BitRxAcqRead ( HMXF_BUFFER  buffer,
uint64  maxMsgCount,
uint64  maxBytesCount,
uint64 *  status,
uint64 *  msgCount,
uint64 *  byteCount,
MXF_ASYNCEH_9BIT_DATAREC rec 
)
C#
public static extern UInt32 mxfASYNCEH9BitRxAcqRead(UInt64 buffer, UInt64 maxMsgCount, UInt64 maxBytesCount, out UInt64 status, out UInt64 msgCount, out UInt64 byteCount, IntPtr rec);

Transfers the records from the channel acquisition buffer to the calling application.

Note
This function is can only be used when the word size is set to 9 on a IPM-ASYNC, IO-FLEXSMP or FlexMulti 629.
Parameters
[in]bufferbuffer handle.
[in]maxMsgCountmaximum messages to read (0 means all messages).
[in]maxBytesCountmaximum number of bytes to be read.
[out]statuslast status set.
[out]msgCountnumber of records returned.
[out]byteCountnumber of bytes returned.
[out]recaddress of data records. The records in the buffer need to be indexed using mxfASYNCEH9BitNextDataRecordPtrGet() function.
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.6.2 and later.
See also
mxfRxAcqStart()
mxfRxAcqBufferAlloc()
mxfRxAcqStop()
mxfASYNCEH9BitNextDataRecordPtrGet()
Examples:
ipm_async_rs485_9bit.c.
uint32 mxfASYNCEH9BitNextDataRecordPtrGet ( MXF_ASYNCEH_9BIT_DATAREC currentRec,
MXF_ASYNCEH_9BIT_DATAREC **  nextRec 
)
C#
public static extern UInt32 mxfASYNCEH9BitNextDataRecordPtrGet(IntPtr currentRec, out IntPtr nextRec);

Returns the next buffer address in a MXF_ASYNCEH_9BIT_DATAREC buffer array.

Note
This function is can only be used when the word size is set to 9 on a IPM-ASYNC, IO-FLEXSMP or FlexMulti 629.
Parameters
[in]currentRecpointer to the beginning or the current record in the buffer.
[out]nextRecpointer to next record in the buffer.
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.6.2 and later.
See also
mxfASYNCEH9BitRxAcqRead()
mxfASYNCEHTxAperiodicWrite()
Examples:
ipm_async_rs485_9bit.c.
Updated 10/23/2023