MX Foundation 4
MXF_HDLC_DATAREC Struct Reference

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]
 

Detailed Description

Field Documentation

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.

Examples:
hdlc.c, hdlc.cs, hdlc_aperiodic.c, hdlc_aperiodic.cs, hdlc_buffer_threshold.c, hdlc_buffer_threshold.cs, hdlc_flexsmp.c, hdlc_flexsmp.cs, hdlc_trigger.c, hdlc_trigger.cs, hdlc_tx_error_injection.c, hdlc_tx_error_injection.cs, multi.c, write_read_async.c, and write_read_async.cs.
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().
Examples:
hdlc.c, hdlc.cs, hdlc_aperiodic.c, hdlc_aperiodic.cs, hdlc_buffer_threshold.c, hdlc_buffer_threshold.cs, hdlc_flexsmp.c, hdlc_trigger.c, hdlc_trigger.cs, hdlc_tx_error_injection.c, hdlc_tx_error_injection.cs, multi.c, write_read_async.c, and write_read_async.cs.
MXF_HDLC_DATAREC::dataSize
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.

Examples:
hdlc.c, hdlc.cs, hdlc_aperiodic.c, hdlc_aperiodic.cs, hdlc_buffer_threshold.c, hdlc_buffer_threshold.cs, hdlc_flexsmp.c, hdlc_trigger.c, hdlc_trigger.cs, hdlc_tx_error_injection.c, hdlc_tx_error_injection.cs, multi.c, multi.cs, write_read_async.c, and write_read_async.cs.
Updated 10/23/2023