MX Foundation 4
|
ASCB Transmit / Receive Record Structure. More...
#include <mxf_class_ascb.h>
Data Fields | |
uint64 | timeTag |
uint32 | control |
uint32 | dataSize |
uint32 | repeatCount |
uint32 | msgPhase |
uint16 | data [256] |
This record structure is needed when sending (transmission) and receiving (acquisition) ASCB message.
MXF_ASCB_DATAREC::timeTag |
Acquisition mode: Specifies the time when the data record has been received by the device. It is an absolute time expressed on the timebase set for the device.
Transmission Mode: Not used, must be set to 0.
MXF_ASCB_DATAREC::control |
Acquisition mode: For receive operation, the control field defines the condition under which the related record data was received.
The control bits are defined as follows:
Bit constant | Description |
---|---|
MXF_ASCB_RX_REC_CTRL_HWCRC_ERROR | The message was received with a bad hardware CRC. |
MXF_ASCB_RX_REC_CTRL_DATACHKSM_ERROR | The message was received with a bad data checksum. |
MXF_ASCB_RX_REC_CTRL_DATACRC_ERROR | The message was received with a bad data CRC. |
MXF_ASCB_RX_REC_CTRL_FC_ERROR | The message was received with an invalid FC. |
MXF_ASCB_RX_REC_CTRL_FRAME_ABORT | An abort sequence was detected (no closing flag). |
MXF_ASCB_RX_REC_CTRL_SYNC_LOST | A sync lost was detected before the end of the message. |
MXF_ASCB_RX_REC_CTRL_BYTE_COUNT_ERROR | The message has a an invalid byte count. |
Transmission Mode: For transmission, the control field allows the user to control the transmission and inject transmit error.
A control of zero instructs the transmit process to send the data using the current transmitter settings.
The control bits are defined as follows:
Bit constant | Description |
---|---|
MXF_ASCB_TX_REC_CTRL_HWCRC_NOT_SENT | The data array contains a hardware CRC override. |
MXF_ASCB_TX_REC_CTRL_DATACHKSM_NOT_SENT | The word array contains a data checksum override. |
MXF_ASCB_TX_REC_CTRL_DATACRC_NOT_SENT | The word array contains a data CRC override. |
MXF_ASCB_TX_REC_CTRL_FC_NOT_SENT | The word array contains a freshness count override. |
MXF_ASCB_TX_REC_CTRL_ADRS_NOT_SENT | data[0] contains an address override to use. |
MXF_ASCB_TX_REC_CTRL_CLOSING_FLAG_NOT_SENT | The closing flag will not be sent. |
MXF_ASCB_TX_REC_CTRL_USE_MSG_PHASE | msgPhase must be used. |
MXF_ASCB_DATAREC::dataSize |
Acquisition mode: Number of bytes received in data array.
Transmission Mode: Number of bytes to transmit from data array.
MXF_ASCB_DATAREC::repeatCount |
Acquisition mode: Not used.
Transmission Mode: Number of times to repeat the transmission of the record. Must be set to one.
MXF_ASCB_DATAREC::msgPhase |
Acquisition mode: Not used.
Transmission Mode: When the associated control bit MXF_ASCB_TX_REC_CTRL_USE_MSG_PHASE is set in control, msgPhase overrides the default message phase attribute.
MXF_ASCB_DATAREC::data |
Acquisition mode: Data received.
Transmission Mode: Data to transmit. bit 0 to 7 of data[0] will be overwritten unless MXF_ASCB_TX_REC_CTRL_ADRS_NOT_SENT bit is set in control. Other parts of data can be overwritten based on the control fields and message settings (FC, CRC, checksum, ...).