MX Foundation 4
Code Migration

MXF 3 vs 4 Differences


This section provide the informations to allow a smooth transition from MX Foundation version 3 to version 4.

Programmers coming from MX Foundation 3 will feel at home using the new MX Foundation 4. Like the previous version, you find available devices and select the Transmit/Receive channels to communicate using the desired channel class protocol. In addition, MX Foundation 4 provides a client/server architecture allowing to communicate with MAX Technologies new FlexMulti devices locally or on a network in a transparent way.

Following resume the main differences between MX Foundation versions 3 and 4:

  • A new function mxfSystemConnect() allows to connect to device locally or remotely on a network.
  • Handle for Flex devices and modules have been added to MXF 4. This means that device and module attribute now needs device and module handle.
  • Buffers for acquisition, sampling, aperiodic transmission, periodic data update and MX-Embedded queues must now be pre-allocated with the corresponding buffer allocation function. It is now with the buffer handle that most of the actions on the buffer (like read from the buffer or write to it) will be executed. Records in the buffer are packed, meaning that they are optimized for space efficiency for DMA transfer. Records in the buffer can not be indexed like an array, but instead must be accessed using mxfNextRecordPtrGet().
  • Default timebase resolution in MXF 4 is nanosecond. Timebase is now used for all services, including transmission.
  • Periodic transmission scheduling now schedules buffers instead of records. Buffers hold the records to transmit.
  • Update to periodic transmission is not tied to an address/extension pair, but to a buffer handle.
  • ARINC 708 label part is automatically inverted by MX Foundation for transmission and reception.
  • Rx acquisition buffer circular mode now keeps oldest records and discards newest records.
  • Multi-Eh Tx slew rate formula and maximum value changed.
  • ASYNC Tx channel now default to RS485 electrical interface.
  • Card configuration files (card#.ini) are not used anymore and replaced by an initialization callback.

Functions Cross-Reference


Here is the list of MX Foundation 3 functions and the corresponding MX Foundation 4.0 functions.

MX Foundation 3 MX Foundation 4.0 NOTE
mxLibraryLoad() mxfSystemInit() or mxfSystemResourcesInit()
mxLibraryUnload() mxfSystemTerminate() or mxfSystemResourcesRelease()
mxLibraryVersionGet() mxfSystemVersionGet()
mxErrorStringGet() mxfSystemErrorStringGet()
mxAttribValueGet() mxfAttributeUint64Get()
mxAttribValueSet() mxfAttributeUint64Set()
mxAttribFloatValueGet() mxfAttributeDoubleGet()
mxAttribFloatValueSet() mxfAttributeDoubleSet()
mxApplicationCount() mxfSystemApplicationCountGet()
mxCardsReset() mxfSystemInit() Will do the same as mxCardsReset() followed by mxLibraryUnload() and mxLibraryLoad()
mxCardCount() mxfSystemDeviceCountGet()
mxChannelLocationGet() mxfChannelLocationGet()
mxChannelDirectionGet() mxfChannelDirectionGet()
mxChannelCount() mxfChannelCountGet()
mxChannelGet() mxfChannelGet()
mxChannelAllGet() mxfChannelAllGet()
mxChannelByLocationGet() mxfModuleChannelGet()
mxChannelRecordSizeGet() mxfChannelRecordSizeGet()
mxChannelStatusGet() N/A mxfChannelTxStatusGet() and mxfChannelRxStatusGet() are sufficient.
mxChannelTxStatusGet() mxfChannelTxStatusGet()
mxChannelRxStatusGet() mxfChannelRxStatusGet()
mxChannelRxErrorCountGet() N/A IPM-HDLC not supported.
mxChannelServicesActiveGet() N/A KMXF_ATTR_SUBCLASS attribute and status functions can perform the same functionality.
mxChannelClassGet() mxfAttributeUint64Get() with KMXF_CHANNEL_CLASS
mxChannelClassSet() mxfSystemInitAttributeUint64CallbackHandler() with KMXF_CHANNEL_CLASS
mxChnClassNameGet() mxfAttributeInfoDetailsGet() with KMXF_CHANNEL_CLASS
mxIoWrite() mxfDiscreteChannelWrite()
mxIoRead() mxfDiscreteChannelRead()
mxTimerGet() mxfDeviceTimerGet()
mxTimerYield() mxfSleep()
mxCardTimer64Get() mxfDeviceTimerGet()
mxConditionListAlloc() mxfRxAcqTrigConditionListAlloc()
mxConditionListFree() mxfRxAcqTrigConditionListFree()
mxConditionListExprSet() mxfRxAcqTrigConditionListExprSet()
mxConditionAdd() mxfRxAcqTrigConditionAdd()
mxMsgLengthSet() N/A Length now field of the minor frame message structure.
mxMsgLengthGet() N/A Length now field of the minor frame message structure.
mxMsgCRCSet() mxfA629RxMsgCrcEnableSet()
mxMsgCRCGet() mxfA629RxMsgCrcEnableGet()
mxMsgChecksumSet() mxfMIL1553MsgChecksumEnableSet()
mxMsgChecksumGet() mxfMIL1553MsgChecksumEnableGet()
mxMsgFCSet() mxfA629MsgFreshnessCounterSet()
mxMsgFCGet() mxfA629MsgFreshnessCounterGet()
mxMsgFCSetEx() mxfA629MsgFreshnessCounterSet()
mxMsgFCGetEx() mxfA629MsgFreshnessCounterGet()
mxMsgBusEnableSet() mxfMIL1553RtSubsystemEnableSet()
mxMsgBusEnableGet() mxfMIL1553RtSubsystemEnableGet()
mxIrqAttach() mxfAsyncEventHandlerInit()
mxIrqDetach() mxfAsyncEventHandlerTerminate()
mxIrqConditionsSet() mxfAsyncEventConditionsSet()
mxIrqConditionsGet() mxfAsyncEventConditionsGet()
mxIrqMsgSelectSet() mxfAsyncEventRxMsgSelectSet()
mxIrqMsgSelectGet() mxfAsyncEventRxMsgSelectGet()
mxIrqPendingGet() mxfAsyncEventPendingGet()
mxIrqPendingClear() mxfAsyncEventPendingClear()
mxIrqTxMsgSelectSet() mxfAsyncEventTxPeriodicUpdateMsgSelectSet()
mxIrqTxMsgSelectGet() mxfAsyncEventTxPeriodicUpdateMsgSelectGet()
mxErrorInjectionSet() mxfMIL1553ErrorInjectionSet()
mxErrorInjectionGet() mxfMIL1553ErrorInjectionGet()
mxErrorInjectionCount() mxfMIL1553ErrorInjectionCountGet()
mxChannelSelfTest() mxfSelfTestMILSTD1553() or mxfSelfTestEBR1553() or mxfSelfTestSERIALASYNC() or mxfSelfTestARINC429() or mxfSelfTestARINC629() or mxfSelfTestARINC708() or mxfSelfTestARINC717() or mxfSelfTestHDLC() or mxfSelfTestCSDB() or mxfSelfTestDISCRETE() or mxfSelfTestARINC664() or mxfSelfTestCANBUS()
mxIRIGBTimerGet() mxfDeviceIrigbTimerGet()
mxIRIGBStatusGet() mxfDeviceIrigbStatusGet()
mxTimeBaseSet() mxfSystemTimeBaseSet()
mxTimeBaseGet() mxfSystemTimeBaseGet()
mxTimerGet64() mxfDeviceTimerGet()
mxChannelRecordSizeGet64() mxfChannelRecordSizeGet()
mxEmbeddedCodeDownload() mxfEmbeddedCodeDownload()
mxEmbeddedDataDownload() mxfEmbeddedDataDownload()
mxEmbeddedCommandSend() mxfEmbeddedCommandSend()
mxEmbeddedSharedSpaceRead() mxfEmbeddedSharedBufferRead()
mxEmbeddedSharedSpaceWrite() mxfEmbeddedSharedBufferWrite()
mxEmbeddedEnableSet() mxfEmbeddedHandlerEnableSet()
mxEmbeddedRxQueueSizeSet() mxfEmbeddedRxBufferAlloc()
mxEmbeddedRxQueueSizeGet() mxfEmbeddedRxBufferStatusGet()
mxEmbeddedRxQueueEnable() N/A MX-Embedded queue always enable now
mxEmbeddedRxQueueDisable() N/A MX-Embedded queue always enable now
mxEmbeddedRxQueueFlush() mxfEmbeddedRxBufferClear()
mxEmbeddedRxQueueRecordRead() mxfEmbeddedRxBufferRead()
mxEmbeddedRxQueueRecordCountGet() mxfEmbeddedRxBufferStatusGet()
mxEmbeddedRxQueueStatusGet() mxfEmbeddedRxBufferStatusGet()
mxEmbeddedTxQueueSizeSet() mxfEmbeddedTxBufferAlloc()
mxEmbeddedTxQueueSizeGet() mxfEmbeddedTxBufferStatusGet()
mxEmbeddedTxQueueEnable() N/A MX-Embedded queue always enable now
mxEmbeddedTxQueueDisable() N/A MX-Embedded queue always enable now
mxEmbeddedTxQueueFlush() mxfEmbeddedTxBufferClear()
mxEmbeddedTxQueueRecordWrite() mxfEmbeddedTxBufferWrite()
mxEmbeddedTxQueueRecordCountGet() mxfEmbeddedTxBufferStatusGet()
mxEmbeddedTxQueueStatusGet() mxfEmbeddedTxBufferStatusGet()
mxAcqReadCountGet() mxfRxAcqBufferStatusGet()
mxAcqRecordRead() mxfRxAcqRead()
mxAcqStart() mxfRxAcqStart()
mxAcqStop() mxfRxAcqStop()
mxAcqStatusGet() mxfRxAcqBufferStatusGet()
mxAcqAdrsSelectSet() mxfRxAcqMsgSelectSet()
mxAcqQueueModeGet() mxfRxAcqBufferStatusGet() and mxfRxAcqModeGet()
mxAcqQueueModeSet() mxfRxAcqBufferAlloc() and mxfRxAcqModeSet()
mxAcqTrigEnableGet() mxfRxAcqTrigEnableGet()
mxAcqTrigEnableSet() mxfRxAcqTrigEnableSet()
mxAcqFlush() mxfRxAcqClear()
mxAcqStopTimeGet() mxfRxAcqStopTimeGet()
mxAcqTrigSet() mxfRxAcqTrigSet()
mxAcqTrigTimeGet() mxfRxAcqTrigTimeGet()
mxAcqRecordRead64() mxfRxAcqRead()
mxSamplingExtEnableAllGet() mxfRxSamplingExtEnableAllGet()
mxSamplingExtEnableSet() mxfRxSamplingExtEnableSet()
mxSamplingKilltimeGet() mxfRxSamplingKilltimeGet()
mxSamplingKilltimeSet() mxfRxSamplingKilltimeSet()
mxSamplingMaxRecordsGet() mxfRxSamplingMaxRecordsGet()
mxSamplingStart() mxfRxSamplingStart()
mxSamplingStop() mxfRxSamplingStop()
mxSamplingRecordRead() mxfRxSamplingRead()
mxSamplingRecordSingleRead() mxfRxSamplingSingleRead()
mxSamplingRecordSizeGet() mxfRxSamplingRecordSizeGet()
mxSamplingAdrsSelectSet() mxfRxSamplingMsgSelectSet()
mxSamplingRecordRead64() mxfRxSamplingRead()
mxSamplingRecordSizeGet64() mxfRxSamplingRecordSizeGet()
mxSamplingRecordSingleRead64() mxfRxSamplingSingleRead()
mxBridgeCreate() mxfBridgeCreate()
mxBridgeTerminate() mxfBridgeTerminate()
mxBridgeStart() mxfBridgeStart()
mxBridgeStop() mxfBridgeStop()
mxBridgeConfigSet() mxfBridgeConfigSet()
mxBridgeConfigGet() mxfBridgeConfigGet()
mxBridgeSelectSet() mxfBridgeSelectSet()
mxBridgeSelectGet() mxfBridgeSelectGet()
mxMsgDecompose() mxfMIL1553DataRecordDecompose() or mxfMIL1553SamplingRecordDecompose()
mxTxRecordWrite() mxfTxAperiodicWrite()
mxTxQueueModeSet() mxfTxAperiodicBufferAlloc()
mxTxQueueModeGet() mxfTxAperiodicBufferStatusGet()
mxTxWriteCountGet() mxfTxAperiodicBufferStatusGet()
mxTxMsgFCSet() mxfA629MsgFreshnessCounterSet()
mxTxMsgFCGet() mxfA629MsgFreshnessCounterGet()
mxTxMsgQueueWrite() mxfTxPeriodicUpdateMsgWrite()
mxTxMsgQueueWriteEx() mxfTxPeriodicUpdateMsgWrite()
mxTxMsgQueueSend() N/A Tx Update Message not by address/extension anymore.
mxTxMsgQueueStart() N/A Tx Update Message always enable now.
mxTxMsgQueueStop() N/A Tx Update Message always enable now.
mxTxMsgQueueExtEnableSet() N/A Tx Update Message not by address/extension anymore.
mxTxMsgQueueStatusGet() mxfTxPeriodicUpdateMsgBufferStatusGet()
mxTxMsgQueueStatusGetEx() mxfTxPeriodicUpdateMsgBufferStatusGet()
mxTxMsgQueueAltDataConfigSet() N/A ASCB not supported.
mxTxMsgQueueAltDataConfigGet() N/A ASCB not supported.
mxTxMsgQueueDataWrite() mxfTxPeriodicUpdateMsgWrite()
mxTxMsgQueueDataSend() mxfTxPeriodicUpdateMsgWrite()
mxTxMsgQueueDataStatusGet() mxfTxPeriodicUpdateMsgBufferStatusGet()
mxTxMsgQueueDataAssignmentSet() mxfMIL1553RtSubsystemEnableSet()
mxTxMsgQueueDataAssignmentGet() mxfMIL1553RtSubsystemEnableGet()
mxTxMsgQueueAperiodicSend() mxfTxAperiodicWrite()
mxMajorFrameSet() mxfTxPeriodicMajorFrameSet()
mxMajorFrameGet() mxfTxPeriodicMajorFrameGet()
mxMajorFrameSyncSet() mxfA629TxPeriodicMajorFrameSyncSet()
mxMajorFrameSyncGet() mxfA629TxPeriodicMajorFrameSyncGet()
mxMajorFrameBranchSet() mxfTxPeriodicMajorFrameSet()
mxMajorFrameBranchGet() mxfTxPeriodicMajorFrameGet()
mxMajorFrameClear() mxfTxPeriodicMajorFrameClear()
mxMajorFrameStart() mxfTxPeriodicMajorFrameStart()
mxMajorFrameStop() mxfTxPeriodicMajorFrameStop()
mxMajorFrameStatusGet() mxfTxPeriodicMajorFrameStatusGet()
mxSchedulerNew() mxfTxPeriodicScheduleNew()
mxSchedulerFree() mxfTxPeriodicScheduleFree()
mxSchedulerMsgAdd() mxfTxPeriodicScheduleMsgAdd()
mxSchedulerRecordListAdd() mxfTxPeriodicScheduleBufferListAdd()
mxSchedulerRun() mxfTxPeriodicScheduleRun()
mxSchedulerRunMulti() mxfTxPeriodicScheduleRunMulti()
mxSchedulerSuspend() mxfTxPeriodicScheduleSuspend()
mxSchedulerResume() mxfTxPeriodicScheduleResume()
mxSchedulerMsgSuspend() mxfTxPeriodicScheduleMsgSuspend()
mxSchedulerMsgResume() mxfTxPeriodicScheduleMsgResume()
mxSchedulerRecordListUpdate() mxfTxPeriodicScheduleBufferListUpdate()
mxSchedulerRecordSet() mxfTxPeriodicScheduleBufferSet()
mxSchedulerRecordPtrGet() mxfTxPeriodicScheduleBufferSet()
mxSchedulerRecordListSet() mxfTxPeriodicScheduleBufferListSet()
mxSchedulerRecordListPtrGet() mxfTxPeriodicScheduleBufferListSet()
mx429ArwBnrToReal() mxfA429ArwBnrToReal()
mx429ArwCompose() mxfA429ArwCompose()
mx429ArwDataGet() mxfA429ArwDecompose()
mx429ArwDecompose() mxfA429ArwDecompose()
mx429ArwLabelGet() mxfA429ArwDecompose()
mx429ArwParityGet() mxfA429ArwDecompose()
mx429ArwParitySet() mxfA429ArwCompose()
mx429ArwRealToBnr() mxfA429ArwRealToBnr()
mxMilStd1553BcDataIdxGet() N/A Buffer index always defined by user now.
mxMilStd1553RtDataIdxGet() N/A Buffer index always defined by user now.
mxEventListAlloc() mxfTxPeriodicScheduleMsgAdd() Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxEventSingleAlloc() mxfTxPeriodicScheduleMsgAdd() Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxEventListFree() mxfTxPeriodicScheduleFree() Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxEventChannelGet() N/A Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxEventRepeatCountGet() N/A Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxEventRepeatCountSet() N/A Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxEventRepeatDelayGet() N/A Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxEventRepeatDelaySet() N/A Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxEventNextDelayGet() N/A Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxEventNextDelaySet() mxfTxPeriodicScheduleBufferListAdd() Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxEventEnable() mxfTxPeriodicScheduleMsgSuspend() and mxfTxPeriodicScheduleMsgResume() Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxEventIsEnabled() N/A Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxEventLaunchTimeGet() N/A Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxEventCountGet() N/A Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxEventTxRecordGet() N/A Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxEventTxRecordSet() mxfTxPeriodicScheduleBufferSet() Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxScheduleMaxCountSet() N/A Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxScheduleMaxCountGet() N/A Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxScheduleCountGet() N/A Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxScheduleClear() mxfTxPeriodicScheduleFree() Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxScheduleGet() N/A Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxScheduleStart() mxfTxPeriodicScheduleRun() Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxScheduleEnable() mxfTxPeriodicScheduleSuspend() and mxfTxPeriodicScheduleResume() Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxScheduleIsEnabled() N/A Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxScheduleCountGet() N/A Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.
mxChannelScheduleEnable() mxfTxPeriodicScheduleSuspend() and mxfTxPeriodicScheduleResume() Tx periodic event scheduling replaced by Tx periodic message buffer scheduling.

Examples


mil1553_bm.c
mil1553_bm_mx3.c

Updated 10/22/2017