MX Foundation 4
|
HDLC Transmit / Receive Record Structure. More...
#include <mxf_class_hdlc.h>
Data Fields | |
uint64 | timeTag |
uint32 | control |
uint32 | dataSize |
uint32 | repeatCount |
uint32 | reserved |
uint16 | data [2048] |
This record structure is needed when sending (transmission) and receiving (acquisition) HDLC string.
MXF_HDLC_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. The time tag may also be disabled by the KMXF_HDLC_MODULE_RX_TIMETAG_ENABLE attribute.
Transmission Mode: For aperiodic transmit operation, the time tag allows the application to specify the time at which the data is to be transmitted. Depending on the usage the time tag can be optional.
MXF_HDLC_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_HDLC_RX_REC_CTRL_OPENING_FLAG | Opening flag detected in this data record. If frame size is greater than 4096 bytes, this bit will indicate the first data record of this frame. |
MXF_HDLC_RX_REC_CTRL_CLOSING_FLAG | Closing flag detected in this data record. If frame size is greater than 4096 bytes, this bit will indicate the last data record of this frame. |
MXF_HDLC_RX_REC_CTRL_CLOSING_ERROR | Indicates closing flag error (closing flag is missing) |
MXF_HDLC_RX_REC_CTRL_ABORT | Frame has been aborted (0x7F character received) |
MXF_HDLC_RX_REC_CTRL_DECODING_ERROR | Indicates decoding error |
MXF_HDLC_RX_REC_CTRL_FCS_ERROR | Indicates frame check sequence error (see KMXF_HDLC_FCS_TYPE) |
MXF_HDLC_RX_REC_CTRL_FRAMESIZE_ERROR | Indicates frame size error (see KMXF_HDLC_FRAME_SIZE_ENABLE) |
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 (Opening/closing flag, frame size if enabled, FCS if enabled, no abort, no discrete output trigger).
The control bits are defined as follows:
Bit constant | Description |
---|---|
MXF_HDLC_TX_REC_CTRL_OPENING_FLAG_NOT_SEND | Don’t send opening flag. This is useful to allow transmission of frames greater than 4096 bytes. |
MXF_HDLC_TX_REC_CTRL_CLOSING_FLAG_NOT_SEND | Don’t send closing flag. This is useful to allow transmission of frames greater than 4096 bytes. |
MXF_HDLC_TX_REC_CTRL_ABORT_SEND | Send an abort character (0x7F) at the end of the string. |
MXF_HDLC_TX_REC_CTRL_FCS_NOT_SEND | Don’t send Frame check sequence word (see KMXF_HDLC_FCS_TYPE). FCS word will be replaced by the data at the FCS position in the buffer. As no effect is FCS is not enabled. |
MXF_HDLC_TX_REC_CTRL_FRAMESIZE_NOT_SEND | Don’t send the frame size word (see KMXF_HDLC_FRAME_SIZE_ENABLE). Frame size word will be replaced by the data at the frame size position in the buffer. As no effect if Frame Size is not enabled. |
MXF_HDLC_TX_REC_CTRL_DISCRETE_OUTPUT_TRIG | Generate a discrete trigger pulse for the duration of the HDLC transmit output. The pulse will occur on the channel associated discrete line, see mxfChannelDiscreteOutputTriggerEnableSet(). |
MXF_HDLC_DATAREC::dataSize |
Acquisition mode: Number of bytes received in data array.
Transmission Mode: Number of bytes to transmit from data array.
MXF_HDLC_DATAREC::repeatCount |
Acquisition mode: Not used.
Transmission Mode: Number of times to repeat the transmission of the record. Must be set to one.
MXF_HDLC_DATAREC::reserved |
Reserved for future use. Must be set to 0 for transmit operation.
MXF_HDLC_DATAREC::data |
Acquisition mode: Data received.
Transmission Mode: Data to transmit.