MX Foundation 4
Attributes

MIL-1553 parameters such as RT response time, response timeout, internal loopback and others can be read or modified using the 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 MIL-1553 bus controller channel and set the response timeout value.

int main()
{
MXF_ATTRIBUTE_INFO_UINT64_DETAILS info; // Attribute detail structure
HMXF_CHANNEL channel; // Channel handle
uint64 responseTmo;
uint32 rc;
...
// Obtains info on BC response timeout attribute
if (!rc)
rc = mxfAttributeInfoDetailsGet(channel, KMXF_MIL1553_BC_RESPONSE_TIMEOUT, &info);
// Gets the current BC response timeout value
if (!rc)
{
rc = mxfAttributeUint64Get(channel, KMXF_MIL1553_BC_RESPONSE_TIMEOUT, &responseTmo);
printf("BC response timeout=%llu\n", responseTmo);
}
// Sets BC response timeout to maximum value
if (!rc)
{
printf("BC response timeout min=%lld, max=%lld\n", info.details.range.min, info.details.range.max);
// Sets the BC response timeout max value to maximum allowed
rc = mxfAttributeUint64Set(channel, KMXF_MIL1553_BC_RESPONSE_TIMEOUT, info.details.range.max);
}
...
Updated 10/23/2023