MX Foundation 4
|
Functions | |
uint32 | mxfEmbeddedTxAperiodicWrite (MXF_EMBEDDED_TXAPERIODIC_MSG *txWriteInfo) |
uint32 | mxfEmbeddedTxPeriodicUpdateMsgWrite (MXF_EMBEDDED_TXPERIODIC_UPDATEMSG *txWriteInfo) |
uint32 | mxfEmbeddedDeviceTimerGet (uint64 *timer) |
uint32 | mxfEmbeddedSharedBufferRead (uint32 offset, uint32 size, uint32 *data) |
uint32 | mxfEmbeddedSharedBufferWrite (uint32 offset, uint32 size, uint32 *data) |
uint32 | mxfEmbeddedTimerHandlerEnableSet (uint32 period, uint32 enable) |
uint32 | mxfEmbeddedRxBufferWrite (uint32 index, uint32 count, MXF_EMBEDDED_DATAREC *rec) |
uint32 | mxfEmbeddedRxBufferCountGet (uint32 index, uint32 *count) |
uint32 | mxfEmbeddedTxBufferRead (uint32 index, uint32 maxMsgCount, uint32 maxBytesCount, uint32 *msgCount, uint32 *byteCount, MXF_EMBEDDED_DATAREC *rec) |
uint32 | mxfEmbeddedTxBufferCountGet (uint32 index, uint32 *count) |
uint32 | mxfEmbeddedPortDiscreteWrite (uint32 moduleIndex, uint32 portIndex, uint32 mask, uint32 data) |
uint32 | mxfEmbeddedPortDiscreteRead (uint32 moduleIndex, uint32 portIndex, uint32 mask, uint32 *data) |
uint32 | mxfEmbeddedNVStorageFileMsgWrite (uint32 index, uint32 maxCount, void *msg, uint32 *count) |
uint32 | mxfEmbeddedNVStorageFileStatusGet (uint32 index, uint64 *freeByte, uint64 *unreadByte, uint64 *bufferedWriteByte, uint32 *overflow) |
uint32 | mxfEmbeddedNextRecordPtrGet (uint64 channelClass, uint64 recType, void *currentRec, void **nextRec) |
uint32 mxfEmbeddedTxAperiodicWrite | ( | MXF_EMBEDDED_TXAPERIODIC_MSG * | txWriteInfo | ) |
Writes data records to the specified transmitter channel queue. Data items to be transmitted are specified within records, along with a time tag and a control word. This function is similar and use the same channel queues of the mxfTxAperiodicWrite() MX Foundation's function.
[in] | txWriteInfo | transmit information structure |
uint32 mxfEmbeddedTxPeriodicUpdateMsgWrite | ( | MXF_EMBEDDED_TXPERIODIC_UPDATEMSG * | txWriteInfo | ) |
Writes data records to the specified transmitter channel periodic update message buffer specified by the message ID structure. Data items to be transmitted are specified within a record, along with a control word, data size and repeat count. This function is similar and use the same channel periodic update message buffers as the mxfTxPeriodicUpdateMsgWrite() MX Foundation's function.
The last message of each TX periodic update message buffer is sent endlessly until a new message is written into the buffer. The user may delete old messages before writing new ones or add new messages at the end of the TX periodic update messages buffer using relevant MXF_EMBEDDED_TXPERIODIC_UPDATEMSG.options parameter options.
This service is supported by theses channel class: ARINC 429 and MIL-1553.
[in] | txWriteInfo | periodic update information structure |
uint32 mxfEmbeddedDeviceTimerGet | ( | uint64 * | timer | ) |
Reads the device real time clock in nanoseconds.
[out] | timer | device timer |
uint32 mxfEmbeddedSharedBufferRead | ( | uint32 | offset, |
uint32 | size, | ||
uint32 * | data | ||
) |
Reads data from shared buffer memory on the device.
A specific region of memory must be reserved on the device before the initialization by using the mxfSystemInitAttributeUint64CallbackHandler() and the KMXF_DEVICE_EMBEDDED_SHARED_SIZE attribute.
[in] | offset | offset from the beginning of the shared memory in 32-bit basis |
[in] | size | number of 32-bit word to read |
[out] | data | pointer to read buffer |
uint32 mxfEmbeddedSharedBufferWrite | ( | uint32 | offset, |
uint32 | size, | ||
uint32 * | data | ||
) |
This function writes data to the shared space memory on the device.
A specific region of memory must be reserved on the device before the initialization by using the mxfSystemInitAttributeUint64CallbackHandler() and the KMXF_DEVICE_EMBEDDED_SHARED_SIZE attribute.
[in] | offset | offset from the beginning of the shared memory in 32-bit basis |
[in] | size | number of 32-bit word to write |
[in] | data | pointer to write buffer |
uint32 mxfEmbeddedTimerHandlerEnableSet | ( | uint32 | period, |
uint32 | enable | ||
) |
Enables or disables the timer handler. When enabled, at each elapsed timer period the mxfEmbeddedTimerHandler() function handler is called.
[in] | period | Period of the timer (5000 – 30000000 microseconds) |
[in] | enable | Enables state (0:disabled, 1:enabled) |
uint32 mxfEmbeddedRxBufferWrite | ( | uint32 | index, |
uint32 | count, | ||
MXF_EMBEDDED_DATAREC * | rec | ||
) |
Writes records in the RX queue buffer. RX queue are used to transfer data from MX-Embedded to the host. This function will write data in the RX queue buffer so the host application can read it with mxfEmbeddedRxBufferRead(). This function uses the MXF_EMBEDDED_DATAREC structure.
[in] | index | RX queue index |
[in] | count | number of records to write |
[in] | rec | pointer to record array (MXF_EMBEDDED_DATAREC). The records are packed in the buffer. The mxfEmbeddedNextRecordPtrGet() function must be used to navigate from one record to the other in the buffer. |
uint32 mxfEmbeddedRxBufferCountGet | ( | uint32 | index, |
uint32 * | count | ||
) |
Returns the count of records in the RX queue buffer (i.e. count of pending records not read yet).
[in] | index | RX queue index |
[out] | count | number of records |
uint32 mxfEmbeddedTxBufferRead | ( | uint32 | index, |
uint32 | maxMsgCount, | ||
uint32 | maxBytesCount, | ||
uint32 * | msgCount, | ||
uint32 * | byteCount, | ||
MXF_EMBEDDED_DATAREC * | rec | ||
) |
Reads records present in the TX bufferqueue. TX queues are used to transfer data from the host to MX-Embedded. This function will read data written in the TX queue buffer by the host application with mxfEmbeddedTxBufferWrite(). This function uses MXF_EMBEDDED_DATAREC structure.
[in] | index | TX queue index |
[in] | maxMsgCount | maximum number of records to read (0 means all messages). |
[in] | maxBytesCount | maximum number of bytes to read (minimum 1). |
[out] | msgCount | returned message count |
[out] | byteCount | returned byte count |
[out] | rec | pointer to data records (MXF_EMBEDDED_DATAREC). The records are packed in the buffer. The mxfEmbeddedNextRecordPtrGet() function must be used to navigate from one record to the other in the buffer. |
uint32 mxfEmbeddedTxBufferCountGet | ( | uint32 | index, |
uint32 * | count | ||
) |
Returns the count of records in the TX buffer queue (i.e. count of pending records not read yet).
[in] | index | TX queue index |
[out] | count | number of records |
uint32 mxfEmbeddedPortDiscreteWrite | ( | uint32 | moduleIndex, |
uint32 | portIndex, | ||
uint32 | mask, | ||
uint32 | data | ||
) |
Sets the discrete output lines state of the specified discrete port.
[in] | moduleIndex | module index |
[in] | portIndex | port index |
[in] | mask | port bit mask |
[in] | data | data to set |
Port Mask Example
The mask bit 0 selects the channel first port, bit 1 the second port, etc.
Therefore, to set the state of the port #1, set the mask to 0x00000002.
uint32 mxfEmbeddedPortDiscreteRead | ( | uint32 | moduleIndex, |
uint32 | portIndex, | ||
uint32 | mask, | ||
uint32 * | data | ||
) |
Reads the current discrete input lines state for the specified discrete port.
[in] | moduleIndex | module index |
[in] | portIndex | port index |
[in] | mask | port mask. |
[out] | data | data returned. |
Port Mask Example
The mask bit 0 selects the channel first port, bit 1 the second port, etc.
Therefore, to get the state of the port #1, set the mask to 0x00000002.
uint32 mxfEmbeddedNVStorageFileMsgWrite | ( | uint32 | index, |
uint32 | maxCount, | ||
void * | msg, | ||
uint32 * | count | ||
) |
This function writes messages to the specified file. The messages format must follow the message type of the file.
[in] | index | file index |
[in] | maxCount | maximum number of messages to write |
[in] | msg | pointer to messages to write |
[out] | count | number of messages actually written |
uint32 mxfEmbeddedNVStorageFileStatusGet | ( | uint32 | index, |
uint64 * | freeByte, | ||
uint64 * | unreadByte, | ||
uint64 * | bufferedWriteByte, | ||
uint32 * | overflow | ||
) |
This function gets the status of the specified file index.
[in] | index | file index |
[out] | freeByte | file free byte count |
[out] | unreadByte | file unread byte count |
[out] | bufferedWriteByte | file buffered write count |
[out] | overflow | file overflow |
uint32 mxfEmbeddedNextRecordPtrGet | ( | uint64 | channelClass, |
uint64 | recType, | ||
void * | currentRec, | ||
void ** | nextRec | ||
) |
Returns the next buffer address in a buffer array.
[in] | channelClass | channel class |
[in] | recType | record type. Should be MXF_EMBEDDED_RECTYPE_DATAREC for data record. |
[in] | currentRec | pointer to the beginning or the current record in the buffer |
[out] | nextRec | pointer to next record in the buffer |