MX Foundation 4
MXF_HFCE_DATAREC Struct Reference

HFCE Transmit / Receive Record Structure. More...

#include <mxf_class_hfce.h>

Data Fields

uint64 timeTag
 
uint32 control
 
uint32 dataSize
 
uint32 repeatCount
 
uint32 reserved
 
uint16 data [256]
 

Detailed Description

This record structure is needed when sending (transmission) and receiving (acquisition) HFCE packet.

Examples:
hfce.c, hfce_aperiodic.c, hfce_buffer_threshold.c, hfce_trigger.c, and hfce_tx_error_injection.c.

Field Documentation

MXF_HFCE_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_HFCE_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:
hfce.c, hfce_aperiodic.c, hfce_buffer_threshold.c, hfce_trigger.c, and hfce_tx_error_injection.c.
MXF_HFCE_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_HFCE_RX_REC_CTRL_PREAMBLE Opening preamble detected in this data record
MXF_HFCE_RX_REC_CTRL_POSTAMBLE Closing postamble detected in this data record
MXF_HFCE_RX_REC_CTRL_DECODING_ERROR Indicates decoding error
MXF_HFCE_RX_REC_CTRL_FCS_ERROR Indicates frame check sequence error
MXF_HFCE_RX_REC_CTRL_LENGTH_ERROR Indicates frame received with and invalid length (not multiple of 16 bits)
MXF_HFCE_RX_REC_CTRL_FRAMESIZE_ERROR Indicates frame received with less than 3 words or length not matching the frame length field
MXF_HFCE_RX_REC_CTRL_FRAMESIZE_ODD Indicates frame length field value is odd



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 (Preamble/postamble and FCS).

The control bits are defined as follows:

Bit constant Description
MXF_HFCE_TX_REC_CTRL_PREAMBLE_NOT_SENT Don’t send preamble
MXF_HFCE_TX_REC_CTRL_POSTAMBLE_NOT_SENT Don’t send postamble
MXF_HFCE_TX_REC_CTRL_FCS_NOT_SENT Don’t send Frame check sequence word
MXF_HFCE_TX_REC_CTRL_FCS_ERROR Send Frame check sequence word with error
MXF_HFCE_TX_REC_CTRL_LENGTH_ERROR Send the last word with one bit less
MXF_HFCE_TX_REC_CTRL_FRAMESIZE_ODD Force the length field to an odd value. If length field value is already odd, no change is made. If length field value is even, it's value is decremented by one except if it is zero where it is set to one.
Examples:
hfce.c, hfce_aperiodic.c, hfce_buffer_threshold.c, hfce_trigger.c, and hfce_tx_error_injection.c.
MXF_HFCE_DATAREC::dataSize

Acquisition mode: Number of bytes received in data array, including FCS field.

Transmission Mode: Number of bytes to transmit from data array. Normally correspond to the payload size (in bytes) + 4 bytes (label and length fields).

Examples:
hfce.c, hfce_aperiodic.c, hfce_buffer_threshold.c, hfce_trigger.c, and hfce_tx_error_injection.c.
MXF_HFCE_DATAREC::repeatCount

Acquisition mode: Not used.

Transmission Mode: Number of times to repeat the transmission of the record. Must be set to one.

Examples:
hfce.c, hfce_aperiodic.c, hfce_buffer_threshold.c, hfce_trigger.c, and hfce_tx_error_injection.c.
MXF_HFCE_DATAREC::reserved

Reserved for future use. Must be set to 0 for transmit operation.

Examples:
hfce.c, hfce_aperiodic.c, hfce_buffer_threshold.c, hfce_trigger.c, and hfce_tx_error_injection.c.
MXF_HFCE_DATAREC::data

Acquisition mode: Data received.

Transmission Mode: Data to transmit. If control bit MXF_HFCE_TX_REC_CTRL_FCS_NOT_SENT is not set, the FCS will automatically be added after the data.

Examples:
hfce.c, hfce_aperiodic.c, hfce_buffer_threshold.c, hfce_trigger.c, and hfce_tx_error_injection.c.
Updated 10/23/2023