|
uint32 | mxfRxSamplingBufferAlloc (HMXF_HANDLE handle, uint64 size, HMXF_BUFFER *buffer, uint64 *allocated) |
|
uint32 | mxfRxSamplingBufferGet (HMXF_HANDLE handle, HMXF_BUFFER *buffer) |
|
uint32 | mxfRxSamplingBufferFree (HMXF_BUFFER buffer) |
|
uint32 | mxfRxSamplingBufferStatusGet (HMXF_BUFFER buffer, uint64 *status, uint64 *msgCount, uint64 *pendingBytes, uint64 *freeBytes) |
|
uint32 | mxfRxSamplingBufferInfoGet (HMXF_BUFFER buffer, HMXF_HANDLE *handle) |
|
uint32 | mxfRxSamplingExtEnableSet (HMXF_BUFFER buffer, uint64 state, uint64 count, void *msg) |
|
uint32 | mxfRxSamplingExtEnableAllGet (HMXF_BUFFER buffer, uint64 maxCount, uint64 *count, void *msg) |
|
uint32 | mxfRxSamplingKilltimeGet (HMXF_BUFFER buffer, uint64 *time) |
|
uint32 | mxfRxSamplingKilltimeSet (HMXF_BUFFER buffer, uint64 time) |
|
uint32 | mxfRxSamplingMaxRecordsGet (HMXF_BUFFER buffer, uint64 *address, uint64 *ext) |
|
uint32 | mxfRxSamplingMsgSelectSet (HMXF_BUFFER buffer, uint64 options, uint64 select, uint64 count, void *msg) |
|
uint32 | mxfRxSamplingMsgSelectGet (HMXF_BUFFER buffer, uint64 options, uint64 maxCount, uint64 *count, void *msg) |
|
uint32 | mxfRxSamplingRead (HMXF_BUFFER buffer, uint64 flags, uint64 maxMsgCount, uint64 maxBytesCount, uint64 *msgCount, uint64 *byteCount, void *rec) |
|
uint32 | mxfRxSamplingReadAsync (HMXF_BUFFER buffer, uint64 flags, uint64 maxMsgCount, uint64 maxBytesCount, void *hostBuffer, MXF_ASYNCHRONOUS_CALLBACK readCompletion, void *context) |
|
uint32 | mxfRxSamplingSingleRead (HMXF_BUFFER buffer, uint64 flags, void *msg, void *rec) |
|
uint32 | mxfRxSamplingSingleReadAsync (HMXF_BUFFER buffer, uint64 flags, void *msg, void *hostBuffer, MXF_ASYNCHRONOUS_CALLBACK readCompletion, void *context) |
|
uint32 | mxfRxSamplingRecordSizeGet (HMXF_BUFFER buffer, uint64 *size) |
|
uint32 | mxfRxSamplingStart (HMXF_BUFFER buffer) |
|
uint32 | mxfRxSamplingStop (HMXF_BUFFER buffer) |
|
uint32 mxfRxSamplingMsgSelectSet |
( |
HMXF_BUFFER |
buffer, |
|
|
uint64 |
options, |
|
|
uint64 |
select, |
|
|
uint64 |
count, |
|
|
void * |
msg |
|
) |
| |
Selects or deselects the message(s) to be received on the specified sampling buffer.
Upon data arrival, the embedded process checks if the received message is found in the current selection list. The receive data record will be added to the sampling buffer only if the message is found in the selection list, otherwise it is discarded.
By default, after a device reset, no filtering is performed and all messages are received.
- Parameters
-
[in] | buffer | buffer handle. |
[in] | options | filtering option
Option | Description |
MXF_MSG_SELECT_OPTION_DEFAULT | filter based on the address of the message. |
MXF_MSG_SELECT_OPTION_EXTENDED | filter based on the address/extension of the message (MIL1553 only). |
|
[in] | select | action to perform with the message ID array.
Option | Description |
MXF_MSG_DESELECT | Deselects the message ID (not available for CAN channel). |
MXF_MSG_SELECT_ADD | Adds the specified message ID (not available for CAN channel). |
MXF_MSG_SELECT_ONLY | Replaces the current selection with the provided list. |
|
[in] | count | count of msg in the array. |
[in] | msg | array of message(s) id structure.
|
- Note
- When the count is set to 0 and msg is set to NULL this means all possible message addresses for the protocol. In ARINC 429 and CSDB, the 256 labels are selected implicitly. In MIL1553, all possible RT addresses or RT addresses/subaddresses are selected depending on the MXF_MSG_SELECT_OPTION_EXTENDED option.
- 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
- mxfRxSamplingMsgSelectGet()
uint32 mxfRxSamplingRead |
( |
HMXF_BUFFER |
buffer, |
|
|
uint64 |
flags, |
|
|
uint64 |
maxMsgCount, |
|
|
uint64 |
maxBytesCount, |
|
|
uint64 * |
msgCount, |
|
|
uint64 * |
byteCount, |
|
|
void * |
rec |
|
) |
| |
Generic function to read all sampling records from the sampling buffer to the application buffer.
Each channel class has its specific function (example: mxfMIL1553RxSamplingRead). For C#, only the specific functions are available.
The sampling process maintains records for all of the received addresses (i.e. label). An address is considered received if corresponding data words were received within the kill-time period. A record refresh from the receive port resets the kill-time timer and an updated copy is made available to the application.
The sampling record contains information on the arrival rate and the number of errors, as well as the latest data received for that address.
- Parameters
-
[in] | buffer | buffer handle. |
[in] | flags | option flag.
Flags | Description |
MXF_RXSAMPLING_FLAG_DEFAULT | The record is kept in the buffer and the same record can be read again by the current or another application. |
MXF_RXSAMPLING_FLAG_ERASE_WHEN_READ | After the sampling record is returned, it is removed from the buffer. |
|
[in] | maxMsgCount | maximum number of messages to read (0 means all messages). |
[in] | maxBytesCount | maximum number of bytes to read. |
[out] | msgCount | number of messages returned. |
[out] | byteCount | number of bytes returned. |
[out] | rec | array of message record structure. The record format depends on the channel class. The records in the buffer need to be indexed using mxfNextRecordPtrGet() function.
|
- 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
- mxfRxSamplingBufferAlloc()
-
mxfRxSamplingMsgSelectSet()
-
mxfRxSamplingStart()
-
mxfRxSamplingSingleRead()
-
mxfNextRecordPtrGet()
-
mxfRxSamplingReadAsync()
uint32 mxfRxSamplingReadAsync |
( |
HMXF_BUFFER |
buffer, |
|
|
uint64 |
flags, |
|
|
uint64 |
maxMsgCount, |
|
|
uint64 |
maxBytesCount, |
|
|
void * |
hostBuffer, |
|
|
MXF_ASYNCHRONOUS_CALLBACK |
readCompletion, |
|
|
void * |
context |
|
) |
| |
- C#
- public static extern UInt32 mxfRxSamplingReadAsync(UInt64 buffer, UInt64 flags, UInt64 maxMsgCount, UInt64 maxBytesCount, IntPtr hostBuffer, MXF_ASYNCHRONOUS_CALLBACK readCompletion, IntPtr context);
Reads asynchronously all sampling records from the sampling buffer to the application 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 sampling process maintains records for all of the received addresses (i.e. label). An address is considered received if corresponding data words were received within the kill-time period. A record refresh from the receive port resets the kill-time timer and an updated copy is made available to the application.
The sampling record contains information on the arrival rate and the number of errors, as well as the latest data received for that address.
- Parameters
-
[in] | buffer | buffer handle. |
[in] | flags | option flag.
Flags | Description |
MXF_RXSAMPLING_FLAG_DEFAULT | The record is kept in the buffer and the same record can be read again by the current or another application. |
MXF_RXSAMPLING_FLAG_ERASE_WHEN_READ | After the sampling record is returned, it is removed from the buffer. |
|
[in] | maxMsgCount | maximum number of messages to read (0 means all messages). |
[in] | maxBytesCount | maximum number of bytes to read. |
[out] | hostBuffer | array of message record structure. The record format depends on the channel class. The records in the buffer need to be indexed using mxfNextRecordPtrGet() function.
|
[in] | readCompletion | callback function to be called when read process has been completed. Callback function is defined as follow: 1 typedef void (*MXF_ASYNCHRONOUS_CALLBACK)(HMXF_BUFFER bufferHandle, uint32 result, void* context, uint64* output);
[in] bufferHandle: buffer handle.
[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 messages returned in hostBuffer. output[1] contains the number of bytes returned in hostBuffer. |
[in] | context | pointer to a value that will be passed to the callback handler (optional). |
- 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
- mxfRxSamplingRead()