MX Foundation 4
|
Functions | |
uint32 | mxfTxPeriodicUpdateMsgBufferAlloc (HMXF_CHANNEL channel, uint64 bufferIndex, uint64 size, HMXF_BUFFER *buffer, uint64 *allocated) |
uint32 | mxfTxPeriodicUpdateMsgBufferGet (HMXF_CHANNEL channel, uint64 bufferIndex, HMXF_BUFFER *buffer) |
uint32 | mxfTxPeriodicUpdateMsgBufferFree (HMXF_BUFFER buffer) |
uint32 | mxfTxPeriodicUpdateMsgBufferStatusGet (HMXF_BUFFER buffer, uint64 *msgCount, uint64 *pendingBytes, uint64 *freeBytes) |
uint32 | mxfTxPeriodicUpdateMsgBufferInfoGet (HMXF_BUFFER buffer, HMXF_CHANNEL *channel, uint64 *bufferIndex) |
uint32 | mxfTxPeriodicUpdateMsgWrite (HMXF_BUFFER buffer, uint64 count, void *rec) |
uint32 | mxfTxPeriodicUpdateMsgWriteAsync (HMXF_BUFFER buffer, uint64 count, void *hostBuffer, MXF_ASYNCHRONOUS_CALLBACK writeCompletion, void *context) |
uint32 | mxfTxPeriodicUpdateMsgUpdate (uint64 options, uint64 count, MXF_MSG_UPDATE_DATAREC rec[]) |
uint32 | mxfTxPeriodicUpdateMsgClear (HMXF_BUFFER buffer, uint64 options) |
uint32 | mxfTxPeriodicUpdateMsgChannelAsyncEventInit (HMXF_CHANNEL channel, uint64 almostEmpty, void *context, MXF_ASYNCEVENT_BUFFER_HANDLER callback) |
uint32 | mxfTxPeriodicUpdateMsgChannelAsyncEventTerminate (HMXF_CHANNEL channel) |
uint32 | mxfTxPeriodicUpdateMsgChannelAsyncEventSelectSet (HMXF_CHANNEL channel, uint64 select, uint64 count, HMXF_BUFFER *bufferArray) |
uint32 | mxfTxPeriodicUpdateMsgChannelAsyncEventSelectGet (HMXF_CHANNEL channel, uint64 maxCount, uint64 *count, HMXF_BUFFER *bufferArray) |
uint32 | mxfTxErrChannelAsyncEventInit (HMXF_CHANNEL channel, void *context, MXF_ASYNCEVENT_TXERR_HANDLER callback) |
uint32 | mxfTxErrChannelAsyncEventTerminate (HMXF_CHANNEL channel) |
uint32 mxfTxPeriodicUpdateMsgBufferAlloc | ( | HMXF_CHANNEL | channel, |
uint64 | bufferIndex, | ||
uint64 | size, | ||
HMXF_BUFFER * | buffer, | ||
uint64 * | allocated | ||
) |
Allocates a periodic update transmission message buffer area to an application. The allocated size can be greater than the asked size (rounding is done for internal buffer alignment). allocated
parameter can return the actual allocated size.
[in] | channel | channel handle. |
[in] | bufferIndex | index of the buffer to allocate |
[in] | size | size of the transmit buffer in bytes to allocate. |
[out] | buffer | handle of periodic update buffer. |
[out] | allocated | returned allocated size. Optional, pass NULL to if not needed. |
uint32 mxfTxPeriodicUpdateMsgBufferGet | ( | HMXF_CHANNEL | channel, |
uint64 | bufferIndex, | ||
HMXF_BUFFER * | buffer | ||
) |
Returns, based on the channel / buffer index, the allocated buffer handle for a periodic update message buffer.
[in] | channel | channel handle. |
[in] | bufferIndex | index of the buffer to get. |
[out] | buffer | handle of periodic update buffer. |
uint32 mxfTxPeriodicUpdateMsgBufferFree | ( | HMXF_BUFFER | buffer | ) |
Deallocates the memory previously allocated by mxfTxPeriodicUpdateMsgBufferAlloc().
[in] | buffer | buffer handle. |
uint32 mxfTxPeriodicUpdateMsgBufferStatusGet | ( | HMXF_BUFFER | buffer, |
uint64 * | msgCount, | ||
uint64 * | pendingBytes, | ||
uint64 * | freeBytes | ||
) |
Returns the current buffer usage (message count, used bytes, free bytes) for an allocated periodic update message buffer area.
[in] | buffer | buffer handle. |
[out] | msgCount | number of messages pending in the buffer. |
[out] | pendingBytes | number of pending bytes. |
[out] | freeBytes | number of free bytes. |
uint32 mxfTxPeriodicUpdateMsgBufferInfoGet | ( | HMXF_BUFFER | buffer, |
HMXF_CHANNEL * | channel, | ||
uint64 * | bufferIndex | ||
) |
Returns the channel and buffer index associated to a buffer for a periodic update message transmission.
[in] | buffer | buffer handle. |
[out] | channel | channel handle. Pass NULL to ignore this parameter. |
[out] | bufferIndex | buffer index. Pass NULL to ignore this parameter. |
uint32 mxfTxPeriodicUpdateMsgWrite | ( | HMXF_BUFFER | buffer, |
uint64 | count, | ||
void * | rec | ||
) |
Writes messages of the record array into the specified buffer. The last message of each buffer is sent continuously until a new message is written into the buffer.
[in] | buffer | buffer handle. | ||||||||||||||||
[in] | count | count of records to write. | ||||||||||||||||
[in] | rec | array of record(s) to write. The records in the buffer need to be indexed using mxfNextRecordPtrGet() function. The supported records are:
|
uint32 mxfTxPeriodicUpdateMsgWriteAsync | ( | HMXF_BUFFER | buffer, |
uint64 | count, | ||
void * | hostBuffer, | ||
MXF_ASYNCHRONOUS_CALLBACK | writeCompletion, | ||
void * | context | ||
) |
Writes asynchronously messages of the record array into the specified buffer. The function will return immediately after it has been registered to be executed by another thread. A callback function will be called when the asynchronous function has finished. A maximum of 1000 asynchronous function calls can be queued.
The last message of each buffer is sent continuously until a new message is written into the buffer.
[in] | buffer | buffer handle. | ||||||||||||||||
[in] | count | count of records to write. | ||||||||||||||||
[in] | hostBuffer | array of record(s) to write. The records in the buffer need to be indexed using mxfNextRecordPtrGet() function. The supported records are:
| ||||||||||||||||
[in] | writeCompletion | callback function to be called when write process has been completed. Callback function is defined as follow: [in] result: return code of the function. [in] context: pointer to a value that has been passed for the callback. [in] output: array of additional information. output[0] contains the number of records to write. | ||||||||||||||||
[in] | context | pointer to a value that will be passed to the callback handler (optional). |
uint32 mxfTxPeriodicUpdateMsgUpdate | ( | uint64 | options, |
uint64 | count, | ||
MXF_MSG_UPDATE_DATAREC | rec[] | ||
) |
Allows to update many buffers in one function call.
There is a limit of a little less than 1MB for the total size of rec.
[in] | options | Reserved for future use, must be 0. |
[in] | count | count of MXF_MSG_UPDATE_DATAREC in rec. |
[in] | rec | array of MXF_MSG_UPDATE_DATAREC that contain the data to update. |
uint32 mxfTxPeriodicUpdateMsgClear | ( | HMXF_BUFFER | buffer, |
uint64 | options | ||
) |
Clears the specified periodic update message buffer.
[in] | buffer | buffer handle. | ||||||
[in] | options | option.
|
uint32 mxfTxPeriodicUpdateMsgChannelAsyncEventInit | ( | HMXF_CHANNEL | channel, |
uint64 | almostEmpty, | ||
void * | context, | ||
MXF_ASYNCEVENT_BUFFER_HANDLER | callback | ||
) |
Sets an async event handler for a Tx Periodic Update Msg channel. When the almost empty threshold will be reached, the callback will be called once and will be called again only when the almost empty threshold will be reached again. The messages are selected by using mxfTxPeriodicUpdateMsgChannelAsyncEventSelectSet().
[in] | channel | Tx Periodic Update Msg channel handle |
[in] | almostEmpty | almost empty threshold value |
[in] | context | handler callback context |
[in] | callback | Tx Periodic Update Msg buffer callback handler |
The callback handler function is defined as follow:
[in] buffer: buffer handle [in] context: context pointer
uint32 mxfTxPeriodicUpdateMsgChannelAsyncEventTerminate | ( | HMXF_CHANNEL | channel | ) |
Clears the async event handler for a Tx Periodic Update Msg channel.
[in] | channel | Tx Periodic Update Msg buffer channel |
uint32 mxfTxPeriodicUpdateMsgChannelAsyncEventSelectSet | ( | HMXF_CHANNEL | channel, |
uint64 | select, | ||
uint64 | count, | ||
HMXF_BUFFER * | bufferArray | ||
) |
Selects or deselects the TX periodic update message buffers for Tx Periodic Update Msg condition on a specified TX channel.
This function must be called in addition to mxfTxPeriodicUpdateMsgChannelAsyncEventInit() to cause an asynchronous event to occur when a specific TX periodic update message buffer threshold is reached.
[in] | channel | channel handle | ||||||||
[in] | select | action to perform for the message IDs
| ||||||||
[in] | count | number of buffers | ||||||||
[in] | bufferArray | handle to buffer(s) arrays |
uint32 mxfTxPeriodicUpdateMsgChannelAsyncEventSelectGet | ( | HMXF_CHANNEL | channel, |
uint64 | maxCount, | ||
uint64 * | count, | ||
HMXF_BUFFER * | bufferArray | ||
) |
Returns the list of buffers registered for a specified TX channel for x Periodic Update Msg asynchronous event condition.
[in] | channel | channel handle |
[in] | maxCount | maximum of buffers expected |
[out] | count | number of buffers returned |
[out] | bufferArray | handle to buffer(s) arrays |
uint32 mxfTxErrChannelAsyncEventInit | ( | HMXF_CHANNEL | channel, |
void * | context, | ||
MXF_ASYNCEVENT_TXERR_HANDLER | callback | ||
) |
Sets an async event handler for a Tx Error. When an error will be detected, the callback will be called once and will be called again only when another error will be detected.
[in] | channel | Tx channel handle |
[in] | context | handler callback context |
[in] | callback | Tx Err buffer callback handler |
The callback handler function is defined as follow:
[in] channel: channel handle [in] status: detected error [in] context: context pointer
uint32 mxfTxErrChannelAsyncEventTerminate | ( | HMXF_CHANNEL | channel | ) |
Clears the async event handler for a Tx Error.
[in] | channel | Tx channel handle |