MX Foundation 4
Channel Class

Accessing a physical ARINC 629 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 functions.

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

The mxfModuleChannelAllGet() function with the chnClass argument MXF_CLASS_A629 can also be used.

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

int main()
{
HMXF_SERVER server;
HMXF_DEVICE device;
HMXF_MODULE module;
HMXF_CHANNEL channel;
uint64 dev, mod, port;
uint64 count;
uint32 rc;
// Connects to the local server
rc = mxfServerConnect("0.0.0.0", "", "", FALSE, &server);
if (rc)
{
printf("Error connection 0x%08lx", rc);
return rc;
}
// Inits MXF library
rc = mxfSystemInit(server);
if (!rc)
{
// Gets the device handle
rc = mxfSystemDeviceAllGet(server, MXF_DEVICE_ALL, 1, &count, &device);
if (!rc && count)
{
// Gets the module handle
rc = mxfDeviceModuleAllGet(device, MXF_MODULE_A629MRT_EH, 1, &count, &module);
if (!rc && count)
// Gets the channel handle
rc = mxfModuleChannelAllGet(module, MXF_CLASS_A629, MXF_SCLASS_TX_CHANNEL, 1, &count, &channel);
}
// Queries channel infos using the channel handle
if (!rc && count)
{
// Gets the physical location of the channel
if (!rc)
{
rc = mxfChannelLocationGet(channel, &dev, &mod, &port);
// Shows information found on the channel
if (!rc)
{
printf("Channel location is Device:%llu Module:%llu Port:%llu\n", dev, mod, port);
}
}
}
}
// Checks for any previous errors
if (rc)
printf("Error code=0x%lX\n", rc);
}
Updated 10/23/2023