MX Foundation 4

Functions

uint32 mxfBridgeConfigGet (HMXF_BRIDGE bridge, HMXF_CHANNEL *source, HMXF_BUFFER *destination, uint64 *delay)
 
uint32 mxfBridgeConfigSet (HMXF_BRIDGE bridge, uint64 delay)
 
uint32 mxfBridgeCreate (HMXF_CHANNEL source, HMXF_BUFFER destination, HMXF_BRIDGE *bridge)
 
uint32 mxfBridgeSelectGet (HMXF_BRIDGE bridge, uint64 address, uint64 *modulo, char *action)
 
uint32 mxfBridgeSelectSet (HMXF_BRIDGE bridge, uint64 address, uint64 modulo, const char *action)
 
uint32 mxfBridgeStart (HMXF_BRIDGE bridge)
 
uint32 mxfBridgeStop (HMXF_BRIDGE bridge)
 
uint32 mxfBridgeTerminate (HMXF_BRIDGE bridge)
 

Detailed Description

Function Documentation

uint32 mxfBridgeConfigGet ( HMXF_BRIDGE  bridge,
HMXF_CHANNEL *  source,
HMXF_BUFFER *  destination,
uint64 *  delay 
)
C#
public static extern UInt32 mxfBridgeConfigGet(UInt64 bridge, out UInt64 source, out UInt64 destination, out UInt64 delay);

Returns the bridge setup parameters such as the channel source handle, transmission buffer handle and receive-to-transmit delay.

Parameters
[in]bridgebridge handle.
[out]sourcereturned source channel handle.
[out]destinationreturned transmission buffer handle.
[out]delayreturned delay value.
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
mxfBridgeCreate()
mxfBridgeConfigSet()
uint32 mxfBridgeConfigSet ( HMXF_BRIDGE  bridge,
uint64  delay 
)
C#
public static extern UInt32 mxfBridgeConfigSet(UInt64 bridge, UInt64 delay);

Sets the receive-to-transmit delay for a bridge.

The default receive-to-transmit delay is 2 ms.

Parameters
[in]bridgebridge handle.
[in]delayreceive-to-transmit delay value (1 ms to 10 ms based on the timebase resolution). The delay is deterministic with value greater than 2 ms.
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
mxfBridgeCreate()
mxfBridgeConfigGet()
Examples:
ar429_embedded_bridge.c, and ar429_embedded_bridge.cs.
uint32 mxfBridgeCreate ( HMXF_CHANNEL  source,
HMXF_BUFFER  destination,
HMXF_BRIDGE *  bridge 
)
C#
public static extern UInt32 mxfBridgeCreate(UInt64 source, UInt64 destination, out UInt64 bridge);

Creates a bridge object handle using specified source channel handle and transmission buffer handle, and allocates the necessary resources.

After this function is called, the source and destination are logically connected.

By default, no message is retransmitted when the bridge is activated. mxfBridgeSelectSet() must be called to define which messages are to be forwarded from the source to the destination.

The source and destination channel must reside on the same device.

Parameters
[in]sourcesource channel handle.
[in]destinationtransmission buffer handle.
[out]bridgereturned bridge 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
mxfBridgeSelectSet()
mxfBridgeConfigSet()
mxfBridgeStart()
mxfBridgeTerminate()
Examples:
ar429_embedded_bridge.c, and ar429_embedded_bridge.cs.
uint32 mxfBridgeSelectGet ( HMXF_BRIDGE  bridge,
uint64  address,
uint64 *  modulo,
char *  action 
)
C#
public static extern UInt32 mxfBridgeSelectGet(UInt64 bridge, UInt64 address, out UInt64 modulo, StringBuilder action);

Return the bridge data modification command string and the selection status for a specified message identified by the selected address.

Parameters
[in]bridgebridge handle.
[in]addressselected message address (label).
[out]moduloreturned modulo-N counter value.
[out]actioncommand string returned.
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
mxfBridgeCreate()
mxfBridgeSelectSet()
uint32 mxfBridgeSelectSet ( HMXF_BRIDGE  bridge,
uint64  address,
uint64  modulo,
const char *  action 
)
C#
public static extern UInt32 mxfBridgeSelectSet(UInt64 bridge, UInt64 address, UInt64 modulo, string action);

Selects the receiver messages that will be routed through the bridge and optionally define specific data modification action based on a mask to the routed message.

By default no message is routed from the source to the destination.

This function allows filtering and/or for on-the-fly data modification such as forcing a bit-field to zero, one or inversion.

Note
A maximum of 8192 addresses per device can be selected.
Parameters
[in]bridgebridge handle.
[in]addressaddress (label).
[in]modulomodulo-N counter value attached to the specified message (identified by the selected address);
when the specified message is received, the corresponding counter is incremented. The message will be routed through the bridge only when the counter reach the modulo-N value. This allows to transmit a message on each N occurrence. Setting the modulo value to « 1 » will allow the specified message to be routed trough the bridge on all its occurrences. Setting the modulo value to « 0 » will unselect the specified message and it will be simply dropped.
[in]actioncommand string which defines the action to do when the specified message (identified by the selected address) is received.
String mask format: DM:################################

The rightmost character corresponds to the message bit # 0, the next character correspond to the message bit #1 etc..
If the number of # characters is shorter then the message length the remaining message bits will be unaffected, like masked with the X character

Each specific character # may be set to X, 0, 1 or N as follow:
  • X : instructs the corresponding bit to stay unchanged
  • 0 : forces the corresponding bit to zero
  • 1 : forces the corresponding bit to one
  • N : instructs to invert (NOT) the corresponding bit

    Example: DM:XXXXXXXX00XXXXXXNNNN00001111000X
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
mxfBridgeCreate()
mxfBridgeSelectGet()
Examples:
ar429_embedded_bridge.c, and ar429_embedded_bridge.cs.
uint32 mxfBridgeStart ( HMXF_BRIDGE  bridge)
C#
public static extern UInt32 mxfBridgeStart(UInt64 bridge);

Starts the routing of data between the source and the destination.

Parameters
[in]bridgebridge 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
mxfBridgeCreate()
mxfBridgeConfigSet()
mxfBridgeStop()
Examples:
ar429_embedded_bridge.c, and ar429_embedded_bridge.cs.
uint32 mxfBridgeStop ( HMXF_BRIDGE  bridge)
C#
public static extern UInt32 mxfBridgeStop(UInt64 bridge);

Stops the routing of data between the source and the destination.

Parameters
[in]bridgebridge 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
mxfBridgeCreate()
mxfBridgeStart()
Examples:
ar429_embedded_bridge.c, and ar429_embedded_bridge.cs.
uint32 mxfBridgeTerminate ( HMXF_BRIDGE  bridge)
C#
public static extern UInt32 mxfBridgeTerminate(UInt64 bridge);

Unlinks the source / destination channels and releases the resources allocated.

Parameters
[in]bridgebridge 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
mxfBridgeCreate()
mxfBridgeStart()
mxfBridgeStop()
Examples:
ar429_embedded_bridge.c, and ar429_embedded_bridge.cs.
Updated 03/30/2022