MX Foundation 4
|
Functions | |
uint32 | mxfDeviceFileUpload (HMXF_DEVICE device, uint64 type, const char *name) |
uint32 | mxfStandAloneFileGenerate (const char *app, const char *trapHandlers, uint64 fileNum, const char **files, const char *name) |
uint32 | mxfStandAloneOptionSet (HMXF_DEVICE device, uint64 options) |
uint32 | mxfDeviceInfoGet (HMXF_DEVICE device, MXF_DEVICE_INFO *info) |
uint32 | mxfDeviceFlashInfoRead (HMXF_DEVICE device, int64 index, MXF_FLASH_INFO *info) |
uint32 | mxfDeviceBuffersFree (HMXF_DEVICE device) |
uint32 | mxfDeviceLocationGet (HMXF_DEVICE device, uint64 *index) |
uint32 | mxfDeviceIpAddressSet (HMXF_DEVICE device, const char *ipAddress, const char *ipNetMask) |
uint32 | mxfDeviceIpAddressGet (HMXF_DEVICE device, uint64 ipAddressSize, uint64 ipNetMaskSize, char *ipAddress, char *ipNetMask) |
uint32 | mxfDeviceLedSet (HMXF_DEVICE device, uint64 mask, uint64 state) |
uint32 | mxfDeviceLedGet (HMXF_DEVICE device, uint64 *mask, uint64 *state) |
uint32 | mxfSensorsCountGet (HMXF_HANDLE handle, uint64 *count) |
uint32 | mxfSensorsRead (HMXF_HANDLE handle, uint64 id, double *value) |
uint32 | mxfSensorsReadAll (HMXF_HANDLE handle, uint64 maxCount, uint64 *count, MXF_SENSOR_VALUE *value) |
uint32 | mxfSensorsInfoGet (HMXF_HANDLE handle, uint64 id, MXF_SENSOR_INFO *info) |
uint32 | mxfDeviceStatisticsErrorDetailsGet (HMXF_DEVICE device, MXF_DEVICE_STAT_ERROR_DETAILS *stats) |
uint32 | mxfDeviceStatisticsResourcesGet (HMXF_DEVICE device, MXF_DEVICE_STAT_RESOURCES *stats) |
uint32 | mxfDeviceStatisticReset (HMXF_DEVICE device, uint64 options) |
uint32 mxfDeviceFileUpload | ( | HMXF_DEVICE | device, |
uint64 | type, | ||
const char * | name | ||
) |
Uploads a file or an user application on specified device.
If an application is uploaded, it will also be launched. The application must be compiled to run in embedded environment. Once embedded application is started, most of MX Foundation function calls from the host are not allowed. Some functions are still allowed and can be used to exchange information with embedded application. mxfDeviceCommBufferWrite() and mxfDeviceCommBufferRead() are example of allowed functions.
Only one embedded application can be started and running on the device.
Asynchronous event handler must be detached from host application before calling mxfDeviceFileUpload() for an application. Asynchronous event handler can be attached when an embedded application is running, but only these asynchronous event conditions are supported when an embedded application is started:
When the embedded application terminates, the library must be unloaded and reloaded (with mxfSystemInit() or mxfSystemResourcesRelease() followed by mxfSystemResourcesInit()) for host application to continue. Handles obtained before that are now invalid and must be obtained again.
[in] | device | device handle | ||||||
[in] | type |
| ||||||
[in] | name | complete filename (with path) to the file or application to upload. |
uint32 mxfStandAloneFileGenerate | ( | const char * | app, |
const char * | trapHandlers, | ||
uint64 | fileNum, | ||
const char ** | files, | ||
const char * | name | ||
) |
Generates the necessary package for an auto-run application. This package can then be uploaded to the device nor-flash by using deviceprog utility. This function can also be used to generate the package to update MXF Server configuration and password files.
[in] | app | complete filename (with path) to embedded linux auto-run application (.mxf file). Optional, can be NULL if no application is wanted in the package. |
[in] | trapHandlers | complete filename (with path) to MX-Embedded trap handler application (.trap file). Optional, can be NULL if no application is wanted in the package. |
[in] | fileNum | number of user files |
[in] | files | complete filename (with path) to user files (optional, NULL if not used). |
[in] | name | complete filename (with path) to auto-run package to generate. |
uint32 mxfStandAloneOptionSet | ( | HMXF_DEVICE | device, |
uint64 | options | ||
) |
Sets the options for stand-alone operation of the devive.
[in] | device | device handle. | ||||
[in] | options | stand-alone options.
|
uint32 mxfDeviceInfoGet | ( | HMXF_DEVICE | device, |
MXF_DEVICE_INFO * | info | ||
) |
Gets information of the specified device. This function can be called before the initialization of MX Foundation.
This function can be called from within the initialization callback handler. In this case, MXF_DEVICE_INFO.modules array will contain MXF_DEVICE_INFO.moduleCount modules, but they will be returned at the index of the physical module index, not logical index. Iteration on MXF_DEVICE_INFO.moduleCount will not be sufficient because some indexes can hold no modules, in that case the module type will be 0. This is done this way so that the moduleIndex parameter of the initialization callback handler can be used to directly index MXF_DEVICE_INFO.modules array.
[in] | device | Device handle |
[out] | info | Information |
uint32 mxfDeviceFlashInfoRead | ( | HMXF_DEVICE | device, |
int64 | index, | ||
MXF_FLASH_INFO * | info | ||
) |
Reads the flash information of a specified device or module.
[in] | device | Device handle |
[in] | index | Module index (-1 to get info of the device) |
[out] | info | Flash information |
uint32 mxfDeviceBuffersFree | ( | HMXF_DEVICE | device | ) |
Frees all the buffers allocated on the device.
[in] | device | device handle |
Before calling this function, all services must be stopped and all buffers empty.
uint32 mxfDeviceLocationGet | ( | HMXF_DEVICE | device, |
uint64 * | index | ||
) |
Returns the device logical position.
[in] | device | device handle |
[out] | index | logical location index for the device |
uint32 mxfDeviceIpAddressSet | ( | HMXF_DEVICE | device, |
const char * | ipAddress, | ||
const char * | ipNetMask | ||
) |
Changes the IP address (IPv4) and netmask of the specified device. This change is valid until next reset of the device when the values programmed on the device will be reloaded. To change permanently the boot default value you must use flex_change_ip utility.
[in] | device | device handle |
[in] | ipAddress | Network address in dot-decimal notation (ex: “192.168.0.1”) |
[in] | ipNetMask | Network mask in dot-decimal notation (ex: “255.255.255.0”) |
uint32 mxfDeviceIpAddressGet | ( | HMXF_DEVICE | device, |
uint64 | ipAddressSize, | ||
uint64 | ipNetMaskSize, | ||
char * | ipAddress, | ||
char * | ipNetMask | ||
) |
Returns the actual IP address (IPv4) and netmask of the specified device.
[in] | device | device handle |
[in] | ipAddressSize | size of the network address return buffer (minimum 15) |
[in] | ipNetMaskSize | size of the network mask return buffer (minimum 15) |
[out] | ipAddress | pointer to network address return buffer. IP address is in dot-decimal notation (ex: “192.168.0.1”) |
[out] | ipNetMask | pointer to network mask return buffer. Netmask is in dot-decimal notation (ex: “255.255.255.0”) |
uint32 mxfDeviceLedSet | ( | HMXF_DEVICE | device, |
uint64 | mask, | ||
uint64 | state | ||
) |
Sets the user LEDs state.
[in] | device | device handle |
[in] | mask | LED mask bitmap |
[in] | state | LED state for the bimap mask; (0: LED OFF, 1: LED ON). |
For instance, if the mask is 0x3 and the stateMask is 0x1, then LED #0 will turn ON, LED #1 will turn OFF and the others will not change.
uint32 mxfDeviceLedGet | ( | HMXF_DEVICE | device, |
uint64 * | mask, | ||
uint64 * | state | ||
) |
Returns the current state of user LEDs on the device.
[in] | device | device handle |
[out] | mask | pointer to LED mask bitmap variable (1: LED available, 0: No LED) |
[out] | state | LED state for the bimap mask; (0: LED OFF, 1: LED ON). |
uint32 mxfSensorsCountGet | ( | HMXF_HANDLE | handle, |
uint64 * | count | ||
) |
Returns the number of sensors on the device. This function can be called with a device handle before the initialization of MX Foundation.
[in] | handle | device or module handle |
[out] | count | pointer to the count variable |
uint32 mxfSensorsRead | ( | HMXF_HANDLE | handle, |
uint64 | id, | ||
double * | value | ||
) |
Returns specific sensor value based on the id. This function can be called with a device handle before the initialization of MX Foundation.
[in] | handle | device or module handle |
[in] | id | sensor identification |
Sensor ID | Description | Note |
---|---|---|
MXF_DEVICE_SENSOR_ID_FPGA_TEMP | FPGA Temperature (°C) | All Flex devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_CPU_TEMP | CPU Temperature (°C) | All FlexMulti and Flex1553 devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_3_3V_VOLTAGE | +3.3 V voltage (V) | All FlexMulti, Flex1553 and PMC/XMC devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_3_3V_CURRENT | +3.3 V current (A) | All FlexMulti, Flex1553 and PMC/XMC devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_12V_VOLTAGE | +12 V voltage (V) | All Flex and PMC/XMC devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_12V_CURRENT | +12 V current (A) | All Flex and PMC/XMC devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_5V_VOLTAGE | +5 V voltage (V) | All FlexMulti family and PMC/XMC devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_5V_CURRENT | +5 V current (A) | All FlexMulti family and PMC/XMC devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_3_3V_SWITCHERS_VOLTAGE | +3.3 V switchers voltage (V) | FlexMulti 629 and FlexMulti 1553 devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_3_3V_SWITCHERS_CURRENT | +3.3 V switchers current (A) | FlexMulti 629 and FlexMulti 1553 devices. Use device handle. |
MXF_MODULE_SENSOR_ID_MULTI_UST0_3_TEMP | MULTI UST 0-3 Temperature (°C) | All FlexMulti family devices. Use device handle. IPM-MULTI. Use module handle. |
MXF_MODULE_SENSOR_ID_MULTI_UST4_7_TEMP | MULTI UST 4-7 Temperature (°C) | All FlexMulti family devices. Use device handle. IPM-MULTI. Use module handle. |
MXF_DEVICE_SENSOR_ID_2_5V_VOLTAGE | +2.5 V voltage (V) | FlexMulti 664, FlexMulti 429 and FlexMulti. Use device handle. |
MXF_DEVICE_SENSOR_ID_2_5V_CURRENT | +2.5 V current (A) | FlexMulti 664, FlexMulti 429 and FlexMulti. Use device handle. |
MXF_DEVICE_SENSOR_ID_POWER_TEMP | Temperature power section (°C) | 500 series. Use device handle. |
MXF_DEVICE_SENSOR_ID_PARAMETRIC_TEMP | Temperature parametric section (°C) | FlexMobile 429+. Use device handle. |
MXF_DEVICE_SENSOR_ID_AVIONICS_TEMP | Temperature avionics section (°C) | PMC/XMC. Use device handle. |
MXF_MODULE_SENSOR_ID_TEMP | Temperature (°C) | FlexMAX modules. Use module handle. |
MXF_DEVICE_SENSOR_ID_12V_MODULE_VOLTAGE | +12 V module voltage (V) | FlexMAX. Use device handle. |
MXF_DEVICE_SENSOR_ID_12V_MODULE_CURRENT | +12 V module current (A) | FlexMAX. Use device handle. |
MXF_MODULE_SENSOR_ID_TEMP_IO | Temperature IO section (°C) | All FlexMAX modules except FlexDIO. Use module handle. |
[out] | value | sensor value returned |
uint32 mxfSensorsReadAll | ( | HMXF_HANDLE | handle, |
uint64 | maxCount, | ||
uint64 * | count, | ||
MXF_SENSOR_VALUE * | value | ||
) |
Returns the value of all hardware sensors for the specified device. This function can be called with a device handle before the initialization of MX Foundation.
[in] | handle | device or module handle |
[in] | maxCount | maximum number of sensor values to read |
[out] | count | number of sensors variable returned |
[out] | value | Array of sensor values |
uint32 mxfSensorsInfoGet | ( | HMXF_HANDLE | handle, |
uint64 | id, | ||
MXF_SENSOR_INFO * | info | ||
) |
Returns information on the sensor specified by id. This function can be called with a device handle before the initialization of MX Foundation.
[in] | handle | device or module handle |
[in] | id | sensor id |
Sensor ID | Description | Unit | Minimum | Maximum | Note |
---|---|---|---|---|---|
MXF_DEVICE_SENSOR_ID_FPGA_TEMP | FPGA Temperature | °C | 0 | 85 | All FlexMulti and Flex1553 devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_CPU_TEMP | CPU Temperature | °C | 0 | 85 | All FlexMulti and Flex1553 devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_3_3V_VOLTAGE | +3.3 V voltage | V | 3.1 | 3.4 | All FlexMulti and Flex1553 devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_3_3V_CURRENT | +3.3 V current | A | 0 | 3.1 | All FlexMulti and Flex1553 devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_12V_VOLTAGE | +12 V voltage | V | 11.8 | 12.1 | All Flex devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_12V_CURRENT | +12 V current | A | 0 | 5.5 | All Flex devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_5V_VOLTAGE | +5 V voltage | V | 4.8 | 5.2 | All FlexMulti family devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_5V_CURRENT | +5 V current | A | 0 | 2.5 | All FlexMulti family devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_3_3V_SWITCHERS_VOLTAGE | +3.3 V switchers voltage | V | 3.1 | 3.4 | FlexMulti 629 and FlexMulti 1553 devices. Use device handle. |
MXF_DEVICE_SENSOR_ID_3_3V_SWITCHERS_CURRENT | +3.3 V switchers current | A | 0 | 4.0 | FlexMulti 629 and FlexMulti 1553 devices. Use device handle. |
MXF_MODULE_SENSOR_ID_MULTI_UST0_3_TEMP | MULTI UST 0-3 Temperature | °C | 0 | 115 | All FlexMulti family devices. Use device handle. IPM-MULTI. Use module handle. |
MXF_MODULE_SENSOR_ID_MULTI_UST4_7_TEMP | MULTI UST 4-7 Temperature | °C | 0 | 115 | All FlexMulti family devices. Use device handle. IPM-MULTI. Use module handle. |
MXF_DEVICE_SENSOR_ID_2_5V_VOLTAGE | +2.5 V voltage (V) | V | 2.4 | 2.6 | FlexMulti 664, FlexMulti 429 and FlexMulti. Use device handle. |
MXF_DEVICE_SENSOR_ID_2_5V_CURRENT | +2.5 V current (A) | A | 0 | 1.5 | FlexMulti 664, FlexMulti 429 and FlexMulti. Use device handle. |
MXF_DEVICE_SENSOR_ID_POWER_TEMP | Temperature power section | °C | 20 | 85 | 500 series. Use device handle. |
MXF_DEVICE_SENSOR_ID_PARAMETRIC_TEMP | Temperature parametric section | °C | 20 | 115 | FlexMobile 429+. Use device handle. |
MXF_DEVICE_SENSOR_ID_AVIONICS_TEMP | Temperature avionics section | °C | 20 | 85 | PMC/XMC. Use device handle. |
MXF_MODULE_SENSOR_ID_TEMP | Temperature | °C | 10 | 70 | FlexMAX modules. Use module handle. |
MXF_DEVICE_SENSOR_ID_12V_MODULE_VOLTAGE | +12 V module voltage | V | 11.8 | 12.1 | FlexMAX. Use device handle. |
MXF_DEVICE_SENSOR_ID_12V_MODULE_CURRENT | +12 V module current | A | 0 | 6 | FlexMAX. Use device handle. |
MXF_MODULE_SENSOR_ID_TEMP_IO | Temperature IO section | °C | 0 | 85 | All FlexMAX modules except FlexDIO. Use module handle. |
[out] | info | sensor info |
uint32 mxfDeviceStatisticsErrorDetailsGet | ( | HMXF_DEVICE | device, |
MXF_DEVICE_STAT_ERROR_DETAILS * | stats | ||
) |
Returns the error statistics for the specified device.
[in] | device | device handle |
[out] | stats | returned device error statistics |
uint32 mxfDeviceStatisticsResourcesGet | ( | HMXF_DEVICE | device, |
MXF_DEVICE_STAT_RESOURCES * | stats | ||
) |
Returns the resources statistics for the specified device.
[in] | device | device handle |
[out] | stats | returned device resources statistics |
uint32 mxfDeviceStatisticReset | ( | HMXF_DEVICE | device, |
uint64 | options | ||
) |
Resets all error statistics.
[in] | device | device handle |
[in] | options | Reserved for future use. Must be set to 0. |