MX Foundation 4
Attributes

CSDB parameters such as bus speed, block count, word parity, and others can be read or modified using mxfAttributeUint64Get(), mxfAttributeDoubleGet(), mxfAttributeUint64Set() and mxfAttributeDoubleSet() functions, 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 utility functions are used to get information about attributes:

The example code below shows how to initialize a CSDB transmitter channel and set some of the transmission parameters like the bit-rate, parity and block count.

{
HMXF_SERVER server; // Server handle
HMXF_DEVICE device; // Device handle
HMXF_MODULE module; // Module handle
HMXF_CHANNEL tx; // Channel handle
uint64 deviceIdx = 0; // Device index #0
uint64 moduleType = MXF_MODULE_ASYNC_EH; // ASYNC-ENHANCED module
uint64 chnClass = MXF_CLASS_CSDB; // CSDB
uint64 subClass = MXF_SCLASS_TX_CHANNEL; // Transmitter
uint64 moduleCount;
uint64 channelCount;
uint32 rc;
//Connects to the server
rc=mxfServerConnect("0.0.0.0", "", "", 0, &server);
if (!rc)
//MXF initialization
rc = mxfSystemInit(server);
if(!rc)
//Obtains the first device handle
rc = mxfSystemDeviceGet(server, deviceIdx, &device);
if(!rc)
//Obtains the first module handle
rc = mxfDeviceModuleAllGet(device, moduleType, 1, &moduleCount, &module);
if(!rc && moduleCount)
//Obtains channel handle
rc = mxfModuleChannelAllGet(module, chnClass, subClass, 1, &channelCount, &tx);
if (!rc)
//Sets speed to 50000 bps
rc = mxfAttributeUint64Set(tx, KMXF_CSDB_SPEED, 50000);
if (!rc)
//Sets ODD parity
rc = mxfAttributeUint64Set(tx, KMXF_CSDB_PARITY, VMXF_CSDB_PARITY_ODD);
if (!rc)
//Sets block count to 6
rc = mxfAttributeUint64Set(tx, KMXF_CSDB_BLOCKCOUNT, 6);
}
Updated 10/23/2023