MX Foundation 4
Channel Class

Accessing a physical ARINC 708 channel requires a handle to the channel.

A channel handle is a reference to a channel holding a physical resource (port). The channel handle is the first argument to be passed to many MXF channel oriented function.

To get the handle to an ARINC 708 physical port regardless of the installed devices, use the mxfModuleChannelGet() function by specifying the physical port index.

You can also use the mxfModuleChannelAllGet() function with the chnClass argument MXF_CLASS_A708.

If MXF_DEVICE_ALL is specified with mxfSystemDeviceAllGet() function, all handles of detected devices are returned.

{
HMXF_SERVER server=0;
HMXF_DEVICE device;
HMXF_MODULE module;
HMXF_CHANNEL rx;
uint32 rc;
uint64 deviceCount;
uint64 moduleCount;
uint64 channelCount;
uint64 device = MXF_DEVICE_ALL; // All devices
uint64 moduleType = MXF_MODULE_A708_EH; // ARINC 708 module
uint64 chnClass = MXF_CLASS_A708; // ARINC 708 channel class
uint64 subClass = MXF_SCLASS_RX_CHANNEL; // RX channel
// Connect to the local server
rc = mxfServerConnect("0.0.0.0", "", "", FALSE, &server);
if (rc)
{
printf("Error connection 0x%08lx", rc);
return rc;
}
// Init MXF library
rc = mxfSystemInit(server);
// Get the device handle
if (!rc)
{
rc = mxfSystemDeviceAllGet(server, device, 1, &deviceCount, &device);
// Get the module handle
if (!rc && deviceCount)
{
rc = mxfDeviceModuleAllGet(device, moduleType, 1, &moduleCount, &module);
// Get the channel handle
if (!rc && moduleCount)
rc = mxfModuleChannelAllGet(module, chnClass, subClass, 1, &channelCount, &rx);
}
}
}


Activating A708 module

The ARINC 708 module shares physical resources with MIL-STD-1553. ARINC 708 is by default configured to be deactivated and it is the MIL-STD-1553 channel that has access control to the bus. To be able to use the ARINC 708 module, it is necessary to activate the ARINC 708 module with KMXF_A708_MODULE_ACTIVE which must be used with mxfAttributeUint64Set(). Thus, MIL-STD-1553 and ARINC 708 can never be used at the same time. The following code shows how to use this attribute :

{
HMXF_SERVER server=0;
HMXF_DEVICE device;
HMXF_MODULE module;
uint32 rc;
uint64 deviceCount;
uint64 moduleCount;
uint64 device = MXF_DEVICE_ALL; // All devices
uint64 moduleType = MXF_MODULE_A708_EH; // ARINC 708 module
// Connect to the local server
rc = mxfServerConnect("0.0.0.0", "", "", FALSE, &server);
if (rc)
{
printf("Error connection 0x%08lx", rc);
return rc;
}
// Init MXF library
rc = mxfSystemInit(server);
if (!rc)
{
// Get the device handle
rc = mxfSystemDeviceAllGet(server, device, 1, &deviceCount, &device);
if (!rc && deviceCount)
{
// Get the module handle
rc = mxfDeviceModuleAllGet(device, moduleType, 1, &moduleCount, &module);
//Activate the ARINC 708 module
if (!rc && moduleCount)
rc = mxfAttributeUint64Set(module, KMXF_A708_MODULE_ACTIVE, TRUE);
}
}
}
Updated 10/23/2023