Accessing a physical MIL-1553 channel requires a handle to the channel.
A channel handle is a reference to a channel holding a physical resource (port), and is the first argument to be passed to many MXF channel oriented functions.
To get the handle to an MIL-1553 physical port, regardless of the installed devices, use the mxfModuleChannelGet() function by specifying the physical port index.
The mxfModuleChannelAllGet() function with the chnClass
argument MXF_CLASS_MIL1553
can also be used.
If MXF_DEVICE_ALL
is specified with mxfSystemDeviceAllGet() function, all handles of detected devices are returned.
HMXF_SERVER server=0;
HMXF_DEVICE devices[2];
HMXF_MODULE module;
HMXF_CHANNEL bm;
uint32 rc;
uint64 deviceCount;
uint64 moduleCount;
uint64 channelCount;
uint64 deviceIndex;
uint32 deviceType = MXF_DEVICE_ALL;
uint32 moduleType = MXF_MODULE_MIL1553MRT_EH;
uint32 chnClass = MXF_CLASS_MIL1553;
uint32 subClass = MXF_SCLASS_BM_CHANNEL;
if(rc == MAXT_SUCCESS)
for(deviceIndex=0; rc==MAXT_SUCCESS && deviceIndex<deviceCount; deviceIndex++)
{
if(rc == MAXT_SUCCESS && moduleCount != 0)
{
if(rc == MAXT_SUCCESS && channelCount != 0)
{
break;
}
}
}
To obtain the handle for a specific channel location on a specific device model, pass the device type constant to the device
argument and physical location.
HMXF_SERVER server=0;
HMXF_DEVICE device=0;
HMXF_MODULE module=0;
HMXF_CHANNEL bc;
uint32 rc;
uint64 deviceCount=0;
uint64 deviceType = MXF_DEVICE_FLEX1553_PCIE;
uint64 moduleIndex = 0;
uint64 channelIndex = 2;
if(rc == MAXT_SUCCESS)
if(rc == MAXT_SUCCESS && deviceCount == 1)
{
if(rc == MAXT_SUCCESS)
}