MX Foundation 4
Attributes

HDLC parameters such as bus speed, word parity and loopback can be read or modified using the mxfAttributeUint64Get(), mxfAttributeDoubleGet(), mxfAttributeUint64Set() and mxfAttributeDoubleSet() functions by passing the handle (device, module or channel) and attribute key-value pair.

See the section Attributes Reference for a description of all supported attributes.

Some other utilities functions are used to get information about attributes:

The example code below shows how to configure an HDLC channel speed by changing the value of the internal HDLC CLOCK.

{
MXF_ATTRIBUTE_INFO_UINT64_DETAILS info; // Attribute detail structure
HMXF_CHANNEL tx; // Channel handle
uint32 rc;
...
//Obtains the max frequency value
if(!rc)
rc = mxfAttributeInfoDetailsGet(tx, KMXF_HDLC_INTERNAL_CLOCK_FREQ, &info);
//Sets the clock frequency with the max frequency value
if(!rc)
rc = mxfAttributeUint64Set(tx, KMXF_HDLC_INTERNAL_CLOCK_FREQ, info.details.range.max);
...
}

The example code below shows how to change the bit encoding and FCS for a given channel.

{
HMXF_CHANNEL tx; // Channel handle
uint32 rc;
...
//Sets the bit encoding on Manchester
if (!rc)
rc = mxfAttributeUint64Set(tx, KMXF_HDLC_DATA_ENCODING, VMXF_HDLC_ENCODING_MANCHESTER);
//Sets FCS type to none
if (!rc)
rc = mxfAttributeUint64Set(tx, KMXF_HDLC_FCS_TYPE, VMXF_HDLC_TX_RX_FCS_NONE);
...
}
Updated 10/23/2023