MX Foundation 4
Channel Class

Accessing a physical ARINC 664 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 664 physical port regardless of the devices installed, use the mxfModuleChannelGet() function by specifying the physical port index.

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

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%08x", rc);
return rc;
}
// Inits MXF library
rc = mxfSystemInit(server);
// Gets handle of first device
if (!rc)
rc = mxfSystemDeviceGet(server, 0, &device);
// Gets handle of A664 module
if (!rc)
rc = mxfDeviceModuleGet(device, MXF_MODULE_A664, 1, &count, &module);
// Gets handle of first A664 channel
if (!rc && count)
rc = mxfModuleChannelAllGet(module, MXF_CLASS_A664, MXF_SCLASS_ALL, 1, &count, &channel);
// Queries channel infos using the channel handle
if (!rc && count)
{
// Gets the physical location of the channel
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%08x\n", rc);
}
Updated 10/23/2023