MX Foundation 4
MX Embedded Trap Handler

Functions

uint32 mxfEmbeddedHandlerEnableSet (HMXF_CHANNEL channel, uint64 id, uint64 enable, uint64 param)
 
void mxfEmbeddedCommandHandler (uint32 command, uint32 size, uint32 *buffer, uint32 reserved)
 
void mxfEmbeddedDataDownloadHandler (uint32 size, uint32 *buffer, uint32 reserved)
 
void mxfEmbeddedRxIntHandler (MXF_EMBEDDED_RX_INFO *rxInfo, uint32 reserved)
 
void mxfEmbeddedTxPeriodicUpdateMsgIntHandler (MXF_EMBEDDED_TXPERIODIC_UPDATEMSG_INFO *txInfo, uint32 reserved)
 
void mxfEmbeddedTimerHandler (void *reserved, uint32 reserved1)
 

Detailed Description

Function Documentation

uint32 mxfEmbeddedHandlerEnableSet ( HMXF_CHANNEL  channel,
uint64  id,
uint64  enable,
uint64  param 
)
C#
public static extern UInt32 mxfEmbeddedHandlerEnableSet(UInt64 channel, UInt64 id, UInt64 enable, UInt64 param);

Enables or disables the specified embedded application handler.

Parameters
[in]channelchannel handle
[in]idhandler id
Constant Description
MXF_EMBEDDED_HANDLER_ID_RX Receive handler
MXF_EMBEDDED_HANDLER_ID_TX_PERIODIC_UPDATE_MSG Periodic update message handler
[in]enableenable state
Constant Description
VMXF_ENABLE Enables handler
VMXF_DISABLE Disables handler
[in]paramReserved for future use. Must be set to 0.
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
mxfEmbeddedCodeDownload()
Examples:
ar429_embedded_discrete.c, and ar429_embedded_discrete.cs.
void mxfEmbeddedCommandHandler ( uint32  command,
uint32  size,
uint32 *  buffer,
uint32  reserved 
)

This handler is called when mxfEmbeddedCommandSend() host function is called. The command ID and the command parameter buffer, size and pointer, are received by function parameters.

Note
This handler has a lower priority than the other handlers and can be interrupted.
Parameters
[in]commandcommand identifier
[in]sizenumber of 32-bit word received in buffer
[in]bufferparameter buffer
[in]reservedreserved for future use
Returns
None
Availability:
Available in MX Foundation 4.0 and later.
See also
mxfEmbeddedCommandSend()
Examples:
ar429_embedded_side_discrete.c, and ar429_embedded_side_timer.c.
void mxfEmbeddedDataDownloadHandler ( uint32  size,
uint32 *  buffer,
uint32  reserved 
)

This handler is called when mxfEmbeddedDataDownload() host function is called. The data section size and pointer are received by function parameters. The data section is copied in SRAM memory following the embedded code. The pointer may be saved in a global variable in order to be able to access it in another function handler.

Parameters
[in]sizenumber of 32-bit word received in buffer
[in]bufferparameter buffer
[in]reservedreserved for future use
Returns
None
Availability:
Available in MX Foundation 4.0 and later.
See also
mxfEmbeddedDataDownload()
Examples:
ar429_embedded_side_discrete.c, and ar429_embedded_side_timer.c.
void mxfEmbeddedRxIntHandler ( MXF_EMBEDDED_RX_INFO rxInfo,
uint32  reserved 
)

Receives interrupt handler. This handler is called when a data is received from any enabled channel. Each received data will be passed to this function. It is called before the acquisition receive and sampling receive handling. This handler has three action possibilities: acquisition receive filtering, triggering, and sampling filtering.

Note
This handler must be enabled on a channel basis using the mxfEmbeddedHandlerEnableSet() host function.
Parameters
[in]rxInforeceives information pointer
[in]reservedreserved for future use
Returns
None
Availability:
Available in MX Foundation 4.0 and later.
See also
mxfEmbeddedHandlerEnableSet()
Examples:
ar429_embedded_side_discrete.c, and ar429_embedded_side_timer.c.
void mxfEmbeddedTxPeriodicUpdateMsgIntHandler ( MXF_EMBEDDED_TXPERIODIC_UPDATEMSG_INFO txInfo,
uint32  reserved 
)

Periodic transmit update message interrupt handler. This handler is called after data has been transmitted on any enabled channel. It is called before the TX periodic update message buffer handling. This handler lets the user update the message before the next transmission.

Note
This handler must be enabled by channel basis with the mxfEmbeddedHandlerEnableSet() host function.
Parameters
[in]txInfoperiodic transmit update information pointer
[in]reservedreserved for future use
Returns
None
Availability:
Available in MX Foundation 4.0 and later.
See also
mxfEmbeddedHandlerEnableSet()
Examples:
ar429_embedded_side_discrete.c, and ar429_embedded_side_timer.c.
void mxfEmbeddedTimerHandler ( void *  reserved,
uint32  reserved1 
)

Timer interrupt handler. This handler is called periodically at each timer period.

Note
This handler can be enabled or disabled using the mxfEmbeddedTimerHandlerEnableSet() embedded function.
Parameters
[in]reservedreserved for future use
[in]reserved1reserved for future use
Returns
None
Availability:
Available in MX Foundation 4.0 and later.
See also
mxfEmbeddedTimerHandlerEnableSet()
Examples:
ar429_embedded_side_discrete.c, and ar429_embedded_side_timer.c.
Updated 10/23/2023