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) |
uint32 mxfBridgeConfigGet | ( | HMXF_BRIDGE | bridge, |
HMXF_CHANNEL * | source, | ||
HMXF_BUFFER * | destination, | ||
uint64 * | delay | ||
) |
Returns the bridge setup parameters such as the channel source handle, transmission buffer handle and receive-to-transmit delay.
[in] | bridge | bridge handle. |
[out] | source | returned source channel handle. |
[out] | destination | returned transmission buffer handle. |
[out] | delay | returned delay value. |
uint32 mxfBridgeConfigSet | ( | HMXF_BRIDGE | bridge, |
uint64 | delay | ||
) |
Sets the receive-to-transmit delay for a bridge.
The default receive-to-transmit delay is 2 ms.
[in] | bridge | bridge handle. |
[in] | delay | receive-to-transmit delay value (1 ms to 10 ms based on the timebase resolution). The delay is deterministic with value greater than 2 ms. |
uint32 mxfBridgeCreate | ( | HMXF_CHANNEL | source, |
HMXF_BUFFER | destination, | ||
HMXF_BRIDGE * | 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.
[in] | source | source channel handle. |
[in] | destination | transmission buffer handle. |
[out] | bridge | returned bridge handle. |
uint32 mxfBridgeSelectGet | ( | HMXF_BRIDGE | bridge, |
uint64 | address, | ||
uint64 * | modulo, | ||
char * | action | ||
) |
Return the bridge data modification command string and the selection status for a specified message identified by the selected address.
[in] | bridge | bridge handle. |
[in] | address | selected message address (label). |
[out] | modulo | returned modulo-N counter value. |
[out] | action | command string returned. |
uint32 mxfBridgeSelectSet | ( | HMXF_BRIDGE | bridge, |
uint64 | address, | ||
uint64 | modulo, | ||
const char * | 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.
[in] | bridge | bridge handle. |
[in] | address | address (label). |
[in] | modulo | modulo-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] | action | command 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:
|
uint32 mxfBridgeStart | ( | HMXF_BRIDGE | bridge | ) |
Starts the routing of data between the source and the destination.
[in] | bridge | bridge handle. |
uint32 mxfBridgeStop | ( | HMXF_BRIDGE | bridge | ) |
Stops the routing of data between the source and the destination.
[in] | bridge | bridge handle. |
uint32 mxfBridgeTerminate | ( | HMXF_BRIDGE | bridge | ) |
Unlinks the source / destination channels and releases the resources allocated.
[in] | bridge | bridge handle. |