mbltml C API#
|
mbltml Test Preview
mbltml — EN
|
C API provides Mobilint NPU monitoring and telemetry. More...
Classes | |
| struct | mbltmlCoreId_t |
| Composite identifier of an NPU core (cluster + core). More... | |
| struct | mbltmlCoreInfo_t |
| Per-core usage record returned by mbltmlGetCoreInfos(). More... | |
| struct | mbltmlProcessInfo_t |
| Per-process usage record returned by mbltmlGetProcessInfos(). More... | |
Macros | |
| #define | MBLTML_DRIVER_VERSION_BUFFER_SIZE 80 |
| #define | MBLTML_FIRMWARE_VERSION_BUFFER_SIZE 80 |
| #define | MBLTML_NODE_NAME_BUFFER_SIZE 80 |
Functions | |
| MBLTML_EXPORT mbltmlStatusCode_t | mobilint::mbltmlInit () |
| Initialize the mbltml library for all supported device types. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mobilint::mbltmlInitDevices (const std::unordered_set< mbltmlDeviceType_t > &device_types) |
| Initialize the mbltml library for a selected set of device types. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mobilint::mbltmlShutdown () |
| Release all resources held by the mbltml library. | |
| MBLTML_EXPORT int | mobilint::mbltmlGetDeviceCount (mbltmlStatusCode_t &sc) |
| Get the total number of devices detected by the library. | |
| MBLTML_EXPORT std::string | mobilint::mbltmlGetDriverVersion (mbltmlDeviceType_t dt, mbltmlStatusCode_t &sc) |
| Get the driver version string for a specific device family. | |
| MBLTML_EXPORT uint32_t | mobilint::mbltmlGetDriverRevision (mbltmlDeviceType_t dt, mbltmlStatusCode_t &sc) |
| Get the driver revision number for a specific device family. | |
| MBLTML_EXPORT std::string | mobilint::mbltmlGetNodeName (int dev_no, mbltmlStatusCode_t &sc) |
| Get the node name of a device. | |
| MBLTML_EXPORT mbltmlDeviceType_t | mobilint::mbltmlGetDeviceType (int dev_no, mbltmlStatusCode_t &sc) |
| Get the device family type of a device. | |
| MBLTML_EXPORT mbltmlHardwareVersion_t | mobilint::mbltmlGetHardwareVersion (int dev_no, mbltmlStatusCode_t &sc) |
| Get the hardware version of a device. | |
| MBLTML_EXPORT std::string | mobilint::mbltmlGetFirmwareVersion (int dev_no, mbltmlStatusCode_t &sc) |
| Get the firmware version string of a device. | |
| MBLTML_EXPORT int | mobilint::mbltmlGetFirmwareRevision (int dev_no, mbltmlStatusCode_t &sc) |
| Get the firmware revision number of a device. | |
| MBLTML_EXPORT int | mobilint::mbltmlGetFirmwareCRC (int dev_no, mbltmlStatusCode_t &sc) |
| Get the CRC of the currently-loaded firmware image. | |
| MBLTML_EXPORT int | mobilint::mbltmlGetTemperature (int dev_no, mbltmlStatusCode_t &sc) |
| Get the current die temperature of a device. | |
| MBLTML_EXPORT int | mobilint::mbltmlGetSignalType (int dev_no, mbltmlStatusCode_t &sc) |
| Get the current signal-type indicator reported by the device. | |
| MBLTML_EXPORT int | mobilint::mbltmlGetNPUClock (int dev_no, mbltmlStatusCode_t &sc) |
| Get the current NPU clock frequency of a device. | |
| MBLTML_EXPORT int | mobilint::mbltmlGetBusClock (int dev_no, mbltmlStatusCode_t &sc) |
| Get the current bus clock frequency of a device. | |
| MBLTML_EXPORT int | mobilint::mbltmlGetFanDuty (int dev_no, mbltmlStatusCode_t &sc) |
| Get the current cooling-fan duty cycle of a device. | |
| MBLTML_EXPORT int | mobilint::mbltmlGetVendorId (int dev_no, mbltmlStatusCode_t &sc) |
| Get the PCIe vendor ID of a device. | |
| MBLTML_EXPORT int | mobilint::mbltmlGetDeviceId (int dev_no, mbltmlStatusCode_t &sc) |
| Get the PCIe device ID of a device. | |
| MBLTML_EXPORT int | mobilint::mbltmlGetSubVendorId (int dev_no, mbltmlStatusCode_t &sc) |
| Get the PCIe subsystem vendor ID of a device. | |
| MBLTML_EXPORT int | mobilint::mbltmlGetSubDeviceId (int dev_no, mbltmlStatusCode_t &sc) |
| Get the PCIe subsystem device ID of a device. | |
| MBLTML_EXPORT int | mobilint::mbltmlGetPcieGen (int dev_no, mbltmlStatusCode_t &sc) |
| Get the negotiated PCIe link generation of a device. | |
| MBLTML_EXPORT int | mobilint::mbltmlGetPcieLanes (int dev_no, mbltmlStatusCode_t &sc) |
| Get the negotiated PCIe link width (in lanes) of a device. | |
| MBLTML_EXPORT int | mobilint::mbltmlGetPcieRev (int dev_no, mbltmlStatusCode_t &sc) |
| Get the PCIe configuration-space revision ID of a device. | |
| MBLTML_EXPORT int | mobilint::mbltmlGetPcieClassCode (int dev_no, mbltmlStatusCode_t &sc) |
| Get the PCIe configuration-space class code of a device. | |
| MBLTML_EXPORT double | mobilint::mbltmlGetTotalPower (int dev_no, mbltmlStatusCode_t &sc) |
| Get the total instantaneous power consumption of a device (W). | |
| MBLTML_EXPORT double | mobilint::mbltmlGetTotalCurrent (int dev_no, mbltmlStatusCode_t &sc) |
| Get the total instantaneous current draw of a device (A). | |
| MBLTML_EXPORT double | mobilint::mbltmlGetTotalVoltage (int dev_no, mbltmlStatusCode_t &sc) |
| Get the total instantaneous supply voltage of a device (V). | |
| MBLTML_EXPORT double | mobilint::mbltmlGetExtraPmicPower (int dev_no, mbltmlStatusCode_t &sc) |
| Get the power consumption of the extra PMIC rail currently selected for the device (W). | |
| MBLTML_EXPORT double | mobilint::mbltmlGetExtraPmicCurrent (int dev_no, mbltmlStatusCode_t &sc) |
| Get the current of the extra PMIC rail currently selected for the device (A). | |
| MBLTML_EXPORT double | mobilint::mbltmlGetExtraPmicVoltage (int dev_no, mbltmlStatusCode_t &sc) |
| Get the voltage of the extra PMIC rail currently selected for the device (V). | |
| MBLTML_EXPORT mbltmlExtraPmicId_t | mobilint::mbltmlGetExtraPmicId (int dev_no, mbltmlStatusCode_t &sc) |
| Get the extra PMIC rail currently selected for the device. | |
| MBLTML_EXPORT double | mobilint::mbltmlGetTotalUtilization (int dev_no, mbltmlStatusCode_t &sc) |
| Get the overall NPU utilization of a device. | |
| MBLTML_EXPORT int64_t | mobilint::mbltmlGetMemoryUsage (int dev_no, mbltmlStatusCode_t &sc) |
| Get the amount of device memory currently in use. | |
| MBLTML_EXPORT int64_t | mobilint::mbltmlGetMemoryTotal (int dev_no, mbltmlStatusCode_t &sc) |
| Get the total amount of device memory available. | |
| MBLTML_EXPORT std::vector< mbltmlProcessInfo_t > | mobilint::mbltmlGetProcessInfos (int dev_no, mbltmlStatusCode_t &sc) |
| Get per-process usage information for a device. | |
| MBLTML_EXPORT std::vector< mbltmlCoreInfo_t > | mobilint::mbltmlGetCoreInfos (int dev_no, mbltmlStatusCode_t &sc) |
| Get per-core usage information for a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mobilint::mbltmlSetExtraPmicID (int dev_no, mbltmlExtraPmicId_t pmic_id) |
| Select which extra PMIC rail subsequent mbltmlGetExtraPmic*() queries refer to. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlInit () |
| Initialize the mbltml library for all supported device types. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlInitDevices (unsigned int device_types) |
| Initialize the mbltml library for a selected set of device types. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlShutdown () |
| Release all resources held by the mbltml library. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetDeviceCount (unsigned int *counts) |
| Get the total number of devices detected by the library. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetDriverVersion (mbltmlDeviceType_t dt, char *version, unsigned int length) |
| Get the driver version string for a specific device family. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetDriverRevision (mbltmlDeviceType_t dt, uint32_t *revision) |
| Get the driver revision number for a specific device family. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetNodeName (int dev_no, char *name, unsigned int length) |
| Get the node name of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetDeviceType (int dev_no, mbltmlDeviceType_t *device_type) |
| Get the device family type of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetHardwareVersion (int dev_no, mbltmlHardwareVersion_t *version) |
| Get the hardware version of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetFirmwareVersion (int dev_no, char *version, unsigned int length) |
| Get the firmware version string of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetFirmwareRevision (int dev_no, uint32_t *revision) |
| Get the firmware revision number of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetFirmwareCRC (int dev_no, uint32_t *crc) |
| Get the CRC of the currently-loaded firmware image. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetTemperature (int dev_no, int *temperature) |
| Get the current die temperature of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetSignalType (int dev_no, uint32_t *signal_type) |
| Get the current signal-type indicator reported by the device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetNPUClock (int dev_no, uint32_t *clock) |
| Get the current NPU clock frequency of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetBusClock (int dev_no, uint32_t *clock) |
| Get the current bus clock frequency of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetFanDuty (int dev_no, int *fan_duty) |
| Get the current cooling-fan duty cycle of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetVendorId (int dev_no, uint32_t *vendor_id) |
| Get the PCIe vendor ID of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetDeviceId (int dev_no, uint32_t *device_id) |
| Get the PCIe device ID of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetSubVendorId (int dev_no, uint32_t *sub_vendor_id) |
| Get the PCIe subsystem vendor ID of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetSubDeviceId (int dev_no, uint32_t *sub_device_id) |
| Get the PCIe subsystem device ID of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetPcieGen (int dev_no, uint32_t *pcie_gen) |
| Get the negotiated PCIe link generation of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetPcieLanes (int dev_no, uint32_t *pcie_lanes) |
| Get the negotiated PCIe link width (in lanes) of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetPcieRev (int dev_no, uint32_t *pcie_rev) |
| Get the PCIe configuration-space revision ID of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetPcieClassCode (int dev_no, uint32_t *pcie_class_code) |
| Get the PCIe configuration-space class code of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetTotalPower (int dev_no, double *power) |
| Get the total instantaneous power consumption of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetTotalCurrent (int dev_no, double *current) |
| Get the total instantaneous current draw of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetTotalVoltage (int dev_no, double *voltage) |
| Get the total instantaneous supply voltage of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetExtraPmicPower (int dev_no, double *power) |
| Get the power consumption of the extra PMIC rail currently selected for the device (W). | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetExtraPmicCurrent (int dev_no, double *current) |
| Get the current of the extra PMIC rail currently selected for the device (A). | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetExtraPmicVoltage (int dev_no, double *voltage) |
| Get the voltage of the extra PMIC rail currently selected for the device (V). | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetExtraPmicId (int dev_no, mbltmlExtraPmicId_t *pmic_id) |
| Get the extra PMIC rail currently selected for the device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetTotalUtilization (int dev_no, double *utilization) |
| Get the overall NPU utilization of a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetMemoryUsage (int dev_no, int64_t *memory_usage) |
| Get the amount of device memory currently in use. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetMemoryTotal (int dev_no, int64_t *memory_total) |
| Get the total amount of device memory available. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetProcessInfos (int dev_no, mbltmlProcessInfo_t *infos, unsigned int *info_count) |
| Get per-process usage information for a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlGetCoreInfos (int dev_no, mbltmlCoreInfo_t *infos, unsigned int *info_count) |
| Get per-core usage information for a device. | |
| MBLTML_EXPORT mbltmlStatusCode_t | mbltmlSetExtraPmicID (int dev_no, mbltmlExtraPmicId_t pmic_id) |
| Select which extra PMIC rail subsequent mbltmlGetExtraPmic*() queries refer to. | |
Detailed Description
C API provides Mobilint NPU monitoring and telemetry.
Macro Definition Documentation
◆ MBLTML_DRIVER_VERSION_BUFFER_SIZE
| #define MBLTML_DRIVER_VERSION_BUFFER_SIZE 80 |
Buffer size (bytes) guaranteed sufficient for mbltmlGetDriverVersion().
◆ MBLTML_FIRMWARE_VERSION_BUFFER_SIZE
| #define MBLTML_FIRMWARE_VERSION_BUFFER_SIZE 80 |
Buffer size (bytes) guaranteed sufficient for mbltmlGetFirmwareVersion().
◆ MBLTML_NODE_NAME_BUFFER_SIZE
| #define MBLTML_NODE_NAME_BUFFER_SIZE 80 |
Buffer size (bytes) guaranteed sufficient for mbltmlGetNodeName().
Enumeration Type Documentation
◆ mbltmlDeviceType_t
| enum mbltmlDeviceType_t |
Identifier of a Mobilint NPU device family.
Used to select a device family when calling family-scoped APIs such as mbltmlGetDriverVersion(), and to describe the family of an individual device returned by mbltmlGetDeviceType().
◆ mbltmlHardwareVersion_t
Specific hardware revision of a Mobilint NPU.
◆ mbltmlStatusCode_t
| enum mbltmlStatusCode_t |
Status code returned by mbltml APIs.
◆ mbltmlExtraPmicId_t
| enum mbltmlExtraPmicId_t |
Identifier of an extra PMIC rail.
Selects which auxiliary PMIC rail is reported by the mbltmlGetExtraPmic*() APIs. The active selection is changed with mbltmlSetExtraPmicID() and can be queried via mbltmlGetExtraPmicId().
| Enumerator | ||
|---|---|---|
| MBLTML_EXTRA_PMIC_ID_NPU | 0 | NPU rail. |
| MBLTML_EXTRA_PMIC_ID_DDR | 1 | DDR rail. |
| MBLTML_EXTRA_PMIC_ID_PMIC | 2 | PMIC rail. |
| MBLTML_EXTRA_PMIC_ID_GOLDFINGER | 3 | Goldfinger rail. |
◆ mbltmlCluster_t
| enum mbltmlCluster_t |
◆ mbltmlCore_t
| enum mbltmlCore_t |
Function Documentation
◆ mbltmlInit() [1/2]
| MBLTML_EXPORT mbltmlStatusCode_t mobilint::mbltmlInit | ( | ) |
Initialize the mbltml library for all supported device types.
Equivalent to calling mbltmlInitDevices() with every mbltmlDeviceType_t enabled. Must be called (directly or via mbltmlInitDevices()) before any other mbltml API.
- Returns
- MBLTML_SUCCESS on success, otherwise an appropriate mbltmlStatusCode_t error code.
◆ mbltmlInitDevices() [1/2]
| MBLTML_EXPORT mbltmlStatusCode_t mobilint::mbltmlInitDevices | ( | const std::unordered_set< mbltmlDeviceType_t > & | device_types | ) |
Initialize the mbltml library for a selected set of device types.
- Parameters
-
[in] device_types Set of mbltmlDeviceType_t values indicating which device families to enumerate and monitor.
- Returns
- MBLTML_SUCCESS on success, otherwise an appropriate mbltmlStatusCode_t error code.
◆ mbltmlShutdown() [1/2]
| MBLTML_EXPORT mbltmlStatusCode_t mobilint::mbltmlShutdown | ( | ) |
Release all resources held by the mbltml library.
After this call, any further API usage requires re-initialization via mbltmlInit() or mbltmlInitDevices().
- Returns
- MBLTML_SUCCESS on success, otherwise an appropriate mbltmlStatusCode_t error code.
◆ mbltmlGetDeviceCount() [1/2]
| MBLTML_EXPORT int mobilint::mbltmlGetDeviceCount | ( | mbltmlStatusCode_t & | sc | ) |
Get the total number of devices detected by the library.
- Note
- Supported on all device types.
- Parameters
-
[out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The number of devices detected. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetDriverVersion() [1/2]
| MBLTML_EXPORT std::string mobilint::mbltmlGetDriverVersion | ( | mbltmlDeviceType_t | dt, |
| mbltmlStatusCode_t & | sc ) |
Get the driver version string for a specific device family.
- Note
- Supported on all device types.
- Parameters
-
[in] dt Device family whose driver version is queried. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The driver version string. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetDriverRevision() [1/2]
| MBLTML_EXPORT uint32_t mobilint::mbltmlGetDriverRevision | ( | mbltmlDeviceType_t | dt, |
| mbltmlStatusCode_t & | sc ) |
Get the driver revision number for a specific device family.
- Note
- Supported on all device types.
- Parameters
-
[in] dt Device family whose driver revision is queried. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The driver revision number. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetNodeName() [1/2]
| MBLTML_EXPORT std::string mobilint::mbltmlGetNodeName | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the node name of a device.
- Note
- Supported on all device types.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The node name string. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetDeviceType() [1/2]
| MBLTML_EXPORT mbltmlDeviceType_t mobilint::mbltmlGetDeviceType | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the device family type of a device.
- Note
- Supported on all device types.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The mbltmlDeviceType_t of the device. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetHardwareVersion() [1/2]
| MBLTML_EXPORT mbltmlHardwareVersion_t mobilint::mbltmlGetHardwareVersion | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the hardware version of a device.
- Note
- Supported on all device types.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The mbltmlHardwareVersion_t of the device. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetFirmwareVersion() [1/2]
| MBLTML_EXPORT std::string mobilint::mbltmlGetFirmwareVersion | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the firmware version string of a device.
- Note
- Supported on all device types.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The firmware version string. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetFirmwareRevision() [1/2]
| MBLTML_EXPORT int mobilint::mbltmlGetFirmwareRevision | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the firmware revision number of a device.
- Note
- Supported on all device types.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The firmware revision. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetFirmwareCRC() [1/2]
| MBLTML_EXPORT int mobilint::mbltmlGetFirmwareCRC | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the CRC of the currently-loaded firmware image.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The firmware CRC. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetTemperature() [1/2]
| MBLTML_EXPORT int mobilint::mbltmlGetTemperature | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the current die temperature of a device.
- Note
- Supported on all device types.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The temperature reading. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetSignalType() [1/2]
| MBLTML_EXPORT int mobilint::mbltmlGetSignalType | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the current signal-type indicator reported by the device.
- Note
- Supported on all device types.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The signal-type value. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetNPUClock() [1/2]
| MBLTML_EXPORT int mobilint::mbltmlGetNPUClock | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the current NPU clock frequency of a device.
- Note
- Supported on all device types.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The NPU clock value. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetBusClock() [1/2]
| MBLTML_EXPORT int mobilint::mbltmlGetBusClock | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the current bus clock frequency of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The bus clock value. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetFanDuty() [1/2]
| MBLTML_EXPORT int mobilint::mbltmlGetFanDuty | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the current cooling-fan duty cycle of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The fan duty value. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetVendorId() [1/2]
| MBLTML_EXPORT int mobilint::mbltmlGetVendorId | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the PCIe vendor ID of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The vendor ID. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetDeviceId() [1/2]
| MBLTML_EXPORT int mobilint::mbltmlGetDeviceId | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the PCIe device ID of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The device ID. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetSubVendorId() [1/2]
| MBLTML_EXPORT int mobilint::mbltmlGetSubVendorId | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the PCIe subsystem vendor ID of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The subsystem vendor ID. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetSubDeviceId() [1/2]
| MBLTML_EXPORT int mobilint::mbltmlGetSubDeviceId | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the PCIe subsystem device ID of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The subsystem device ID. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetPcieGen() [1/2]
| MBLTML_EXPORT int mobilint::mbltmlGetPcieGen | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the negotiated PCIe link generation of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The PCIe generation. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetPcieLanes() [1/2]
| MBLTML_EXPORT int mobilint::mbltmlGetPcieLanes | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the negotiated PCIe link width (in lanes) of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The lane count. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetPcieRev() [1/2]
| MBLTML_EXPORT int mobilint::mbltmlGetPcieRev | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the PCIe configuration-space revision ID of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The revision value. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetPcieClassCode() [1/2]
| MBLTML_EXPORT int mobilint::mbltmlGetPcieClassCode | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the PCIe configuration-space class code of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The class code. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetTotalPower() [1/2]
| MBLTML_EXPORT double mobilint::mbltmlGetTotalPower | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the total instantaneous power consumption of a device (W).
- Note
- Supported on MBLTML_DEVICE_ARIES only.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The power reading. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetTotalCurrent() [1/2]
| MBLTML_EXPORT double mobilint::mbltmlGetTotalCurrent | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the total instantaneous current draw of a device (A).
- Note
- Supported on MBLTML_DEVICE_ARIES only.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The current reading. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetTotalVoltage() [1/2]
| MBLTML_EXPORT double mobilint::mbltmlGetTotalVoltage | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the total instantaneous supply voltage of a device (V).
- Note
- Supported on MBLTML_DEVICE_ARIES only.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The voltage reading. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetExtraPmicPower() [1/2]
| MBLTML_EXPORT double mobilint::mbltmlGetExtraPmicPower | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the power consumption of the extra PMIC rail currently selected for the device (W).
- Note
- Supported on MBLTML_DEVICE_ARIES only.
The selected rail is controlled by mbltmlSetExtraPmicID() and can be queried via mbltmlGetExtraPmicId().
The firmware refreshes this reading once per second. After changing the selected rail with mbltmlSetExtraPmicID(), allow up to 1 second for the new rail's value to be reported.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The power reading. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetExtraPmicCurrent() [1/2]
| MBLTML_EXPORT double mobilint::mbltmlGetExtraPmicCurrent | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the current of the extra PMIC rail currently selected for the device (A).
- Note
- Supported on MBLTML_DEVICE_ARIES only.
The firmware refreshes this reading once per second. After changing the selected rail with mbltmlSetExtraPmicID(), allow up to 1 second for the new rail's value to be reported.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The current reading. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetExtraPmicVoltage() [1/2]
| MBLTML_EXPORT double mobilint::mbltmlGetExtraPmicVoltage | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the voltage of the extra PMIC rail currently selected for the device (V).
- Note
- Supported on MBLTML_DEVICE_ARIES only.
The firmware refreshes this reading once per second. After changing the selected rail with mbltmlSetExtraPmicID(), allow up to 1 second for the new rail's value to be reported.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The voltage reading. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetExtraPmicId() [1/2]
| MBLTML_EXPORT mbltmlExtraPmicId_t mobilint::mbltmlGetExtraPmicId | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the extra PMIC rail currently selected for the device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The selected mbltmlExtraPmicId_t value. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetTotalUtilization() [1/2]
| MBLTML_EXPORT double mobilint::mbltmlGetTotalUtilization | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the overall NPU utilization of a device.
- Note
- Supported on all device types.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The utilization value (typically a ratio in
[0.0, 1.0] or a percentage). Meaningful only whenscis MBLTML_SUCCESS.
◆ mbltmlGetMemoryUsage() [1/2]
| MBLTML_EXPORT int64_t mobilint::mbltmlGetMemoryUsage | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the amount of device memory currently in use.
- Note
- Supported on all device types.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The in-use memory in bytes. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetMemoryTotal() [1/2]
| MBLTML_EXPORT int64_t mobilint::mbltmlGetMemoryTotal | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get the total amount of device memory available.
- Note
- Supported on all device types.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The total memory in bytes. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetProcessInfos() [1/2]
| MBLTML_EXPORT std::vector< mbltmlProcessInfo_t > mobilint::mbltmlGetProcessInfos | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get per-process usage information for a device.
- Note
- Supported on all device types.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The vector of process records. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlGetCoreInfos() [1/2]
| MBLTML_EXPORT std::vector< mbltmlCoreInfo_t > mobilint::mbltmlGetCoreInfos | ( | int | dev_no, |
| mbltmlStatusCode_t & | sc ) |
Get per-core usage information for a device.
- Note
- Supported on all device types.
sc is set to MBLTML_INVALID_ARGUMENT if dev_no is out of range of the device count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sc Status code (see mbltmlStatusCode_t).
- Returns
- The vector of core records. Meaningful only when
scis MBLTML_SUCCESS.
◆ mbltmlSetExtraPmicID() [1/2]
| MBLTML_EXPORT mbltmlStatusCode_t mobilint::mbltmlSetExtraPmicID | ( | int | dev_no, |
| mbltmlExtraPmicId_t | pmic_id ) |
Select which extra PMIC rail subsequent mbltmlGetExtraPmic*() queries refer to.
- Note
- Supported on Aries2 hardware (MBLTML_HARDWARE_VERSION_ARIES2) only.
The underlying readings are refreshed by firmware once per second; allow up to 1 second after this call before mbltmlGetExtraPmicPower(), mbltmlGetExtraPmicCurrent() and mbltmlGetExtraPmicVoltage() reflect the newly selected rail.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [in] pmic_id Identifier of the extra PMIC rail to select.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
dev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlInit() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlInit | ( | ) |
Initialize the mbltml library for all supported device types.
Equivalent to calling mbltmlInitDevices() with every bit of mbltmlDeviceType_t enabled. Must be called (directly or via mbltmlInitDevices()) before any other mbltml API.
- Returns
- MBLTML_SUCCESS on success, otherwise an appropriate mbltmlStatusCode_t error code.
◆ mbltmlInitDevices() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlInitDevices | ( | unsigned int | device_types | ) |
Initialize the mbltml library for a selected set of device types.
- Parameters
-
[in] device_types Bitwise OR of mbltmlDeviceType_t values indicating which device families to enumerate and monitor.
- Returns
- MBLTML_SUCCESS on success, otherwise an appropriate mbltmlStatusCode_t error code.
◆ mbltmlShutdown() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlShutdown | ( | ) |
Release all resources held by the mbltml library.
After this call, any further API usage requires re-initialization via mbltmlInit() or mbltmlInitDevices().
- Returns
- MBLTML_SUCCESS on success, otherwise an appropriate mbltmlStatusCode_t error code.
◆ mbltmlGetDeviceCount() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetDeviceCount | ( | unsigned int * | counts | ) |
Get the total number of devices detected by the library.
- Note
- Supported on all device types.
- Parameters
-
[out] counts Pointer that receives the device count.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
countsisNULL, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetDriverVersion() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetDriverVersion | ( | mbltmlDeviceType_t | dt, |
| char * | version, | ||
| unsigned int | length ) |
Get the driver version string for a specific device family.
- Note
- Supported on all device types.
A buffer of MBLTML_DRIVER_VERSION_BUFFER_SIZE bytes guarantees success. The resulting string is NUL-terminated.
- Parameters
-
[in] dt Device family whose driver version is queried. [out] version Output buffer that receives the version string. [in] length Size, in bytes, of version.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
versionisNULL, MBLTML_INSUFFICIENT_LENGTH iflengthis too small, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetDriverRevision() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetDriverRevision | ( | mbltmlDeviceType_t | dt, |
| uint32_t * | revision ) |
Get the driver revision number for a specific device family.
- Note
- Supported on all device types.
- Parameters
-
[in] dt Device family whose driver revision is queried. [out] revision Pointer that receives the revision number.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
revisionisNULL, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetNodeName() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetNodeName | ( | int | dev_no, |
| char * | name, | ||
| unsigned int | length ) |
Get the node name of a device.
- Note
- Supported on all device types.
A buffer of MBLTML_NODE_NAME_BUFFER_SIZE bytes guarantees success. The resulting string is NUL-terminated.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] name Output buffer that receives the node name. [in] length Size, in bytes, of name.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
nameisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, MBLTML_INSUFFICIENT_LENGTH iflengthis too small, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetDeviceType() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetDeviceType | ( | int | dev_no, |
| mbltmlDeviceType_t * | device_type ) |
Get the device family type of a device.
- Note
- Supported on all device types.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] device_type Pointer that receives the mbltmlDeviceType_t value.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
device_typeisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetHardwareVersion() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetHardwareVersion | ( | int | dev_no, |
| mbltmlHardwareVersion_t * | version ) |
Get the hardware version of a device.
- Note
- Supported on all device types.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] version Pointer that receives the mbltmlHardwareVersion_t value.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
versionisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetFirmwareVersion() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetFirmwareVersion | ( | int | dev_no, |
| char * | version, | ||
| unsigned int | length ) |
Get the firmware version string of a device.
- Note
- Supported on all device types.
A buffer of MBLTML_FIRMWARE_VERSION_BUFFER_SIZE bytes guarantees success. The resulting string is NUL-terminated.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] version Output buffer that receives the version string. [in] length Size, in bytes, of version.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
versionisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, MBLTML_INSUFFICIENT_LENGTH iflengthis too small, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetFirmwareRevision() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetFirmwareRevision | ( | int | dev_no, |
| uint32_t * | revision ) |
Get the firmware revision number of a device.
- Note
- Supported on all device types.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] revision Pointer that receives the firmware revision.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
revisionisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetFirmwareCRC() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetFirmwareCRC | ( | int | dev_no, |
| uint32_t * | crc ) |
Get the CRC of the currently-loaded firmware image.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] crc Pointer that receives the firmware CRC.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
crcisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetTemperature() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetTemperature | ( | int | dev_no, |
| int * | temperature ) |
Get the current die temperature of a device.
- Note
- Supported on all device types.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] temperature Pointer that receives the temperature reading.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
temperatureisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetSignalType() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetSignalType | ( | int | dev_no, |
| uint32_t * | signal_type ) |
Get the current signal-type indicator reported by the device.
- Note
- Supported on all device types.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] signal_type Pointer that receives the signal-type value.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
signal_typeisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetNPUClock() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetNPUClock | ( | int | dev_no, |
| uint32_t * | clock ) |
Get the current NPU clock frequency of a device.
- Note
- Supported on all device types.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] clock Pointer that receives the NPU clock value.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
clockisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetBusClock() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetBusClock | ( | int | dev_no, |
| uint32_t * | clock ) |
Get the current bus clock frequency of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] clock Pointer that receives the bus clock value.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
clockisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetFanDuty() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetFanDuty | ( | int | dev_no, |
| int * | fan_duty ) |
Get the current cooling-fan duty cycle of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] fan_duty Pointer that receives the fan duty value.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
fan_dutyisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetVendorId() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetVendorId | ( | int | dev_no, |
| uint32_t * | vendor_id ) |
Get the PCIe vendor ID of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] vendor_id Pointer that receives the vendor ID.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
vendor_idisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetDeviceId() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetDeviceId | ( | int | dev_no, |
| uint32_t * | device_id ) |
Get the PCIe device ID of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] device_id Pointer that receives the device ID.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
device_idisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetSubVendorId() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetSubVendorId | ( | int | dev_no, |
| uint32_t * | sub_vendor_id ) |
Get the PCIe subsystem vendor ID of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sub_vendor_id Pointer that receives the subsystem vendor ID.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
sub_vendor_idisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetSubDeviceId() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetSubDeviceId | ( | int | dev_no, |
| uint32_t * | sub_device_id ) |
Get the PCIe subsystem device ID of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] sub_device_id Pointer that receives the subsystem device ID.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
sub_device_idisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetPcieGen() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetPcieGen | ( | int | dev_no, |
| uint32_t * | pcie_gen ) |
Get the negotiated PCIe link generation of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] pcie_gen Pointer that receives the PCIe generation.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
pcie_genisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetPcieLanes() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetPcieLanes | ( | int | dev_no, |
| uint32_t * | pcie_lanes ) |
Get the negotiated PCIe link width (in lanes) of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] pcie_lanes Pointer that receives the lane count.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
pcie_lanesisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetPcieRev() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetPcieRev | ( | int | dev_no, |
| uint32_t * | pcie_rev ) |
Get the PCIe configuration-space revision ID of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] pcie_rev Pointer that receives the revision value.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
pcie_revisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetPcieClassCode() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetPcieClassCode | ( | int | dev_no, |
| uint32_t * | pcie_class_code ) |
Get the PCIe configuration-space class code of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] pcie_class_code Pointer that receives the class code.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
pcie_class_codeisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetTotalPower() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetTotalPower | ( | int | dev_no, |
| double * | power ) |
Get the total instantaneous power consumption of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] power Pointer that receives the power reading.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
powerisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetTotalCurrent() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetTotalCurrent | ( | int | dev_no, |
| double * | current ) |
Get the total instantaneous current draw of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] current Pointer that receives the current reading.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
currentisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetTotalVoltage() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetTotalVoltage | ( | int | dev_no, |
| double * | voltage ) |
Get the total instantaneous supply voltage of a device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] voltage Pointer that receives the voltage reading.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
voltageisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetExtraPmicPower() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetExtraPmicPower | ( | int | dev_no, |
| double * | power ) |
Get the power consumption of the extra PMIC rail currently selected for the device (W).
- Note
- Supported on MBLTML_DEVICE_ARIES only.
The selected rail is controlled by mbltmlSetExtraPmicID() and can be queried via mbltmlGetExtraPmicId().
The firmware refreshes this reading once per second. After changing the selected rail with mbltmlSetExtraPmicID(), allow up to 1 second for the new rail's value to be reported.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] power Pointer that receives the power reading.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
powerisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetExtraPmicCurrent() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetExtraPmicCurrent | ( | int | dev_no, |
| double * | current ) |
Get the current of the extra PMIC rail currently selected for the device (A).
- Note
- Supported on MBLTML_DEVICE_ARIES only.
The firmware refreshes this reading once per second. After changing the selected rail with mbltmlSetExtraPmicID(), allow up to 1 second for the new rail's value to be reported.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] current Pointer that receives the current reading.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
currentisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetExtraPmicVoltage() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetExtraPmicVoltage | ( | int | dev_no, |
| double * | voltage ) |
Get the voltage of the extra PMIC rail currently selected for the device (V).
- Note
- Supported on MBLTML_DEVICE_ARIES only.
The firmware refreshes this reading once per second. After changing the selected rail with mbltmlSetExtraPmicID(), allow up to 1 second for the new rail's value to be reported.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] voltage Pointer that receives the voltage reading.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
voltageisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetExtraPmicId() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetExtraPmicId | ( | int | dev_no, |
| mbltmlExtraPmicId_t * | pmic_id ) |
Get the extra PMIC rail currently selected for the device.
- Note
- Supported on MBLTML_DEVICE_ARIES only.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] pmic_id Pointer that receives the selected mbltmlExtraPmicId_t value.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
pmic_idisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetTotalUtilization() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetTotalUtilization | ( | int | dev_no, |
| double * | utilization ) |
Get the overall NPU utilization of a device.
- Note
- Supported on all device types.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] utilization Pointer that receives the utilization value (typically a ratio in [0.0, 1.0] or a percentage).
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
utilizationisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetMemoryUsage() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetMemoryUsage | ( | int | dev_no, |
| int64_t * | memory_usage ) |
Get the amount of device memory currently in use.
- Note
- Supported on all device types.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] memory_usage Pointer that receives the in-use memory, in bytes.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
memory_usageisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetMemoryTotal() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetMemoryTotal | ( | int | dev_no, |
| int64_t * | memory_total ) |
Get the total amount of device memory available.
- Note
- Supported on all device types.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] memory_total Pointer that receives the total memory, in bytes.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
memory_totalisNULL, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetProcessInfos() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetProcessInfos | ( | int | dev_no, |
| mbltmlProcessInfo_t * | infos, | ||
| unsigned int * | info_count ) |
Get per-process usage information for a device.
- Note
- Supported on all device types.
This call supports the standard two-step query pattern:
- Pass
*info_count==0(withinfoseitherNULLor unused) to learn the required entry count, which is written back toinfo_count. - Pass a buffer with
*info_countset to its capacity to retrieve up to that many entries; the actual entry count is written back toinfo_count.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] infos Output array that receives the process records. May be NULLwhen*info_countis0.[in,out] info_count On input, the capacity of infosin entries (or0to query the required size). On output, the number of entries written or required.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
info_countisNULL, or ifinfosisNULLwhile*info_countis non-zero, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, MBLTML_INSUFFICIENT_LENGTH ifinfosis too small to hold all entries, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlGetCoreInfos() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlGetCoreInfos | ( | int | dev_no, |
| mbltmlCoreInfo_t * | infos, | ||
| unsigned int * | info_count ) |
Get per-core usage information for a device.
- Note
- Supported on all device types.
The two-step query pattern documented in mbltmlGetProcessInfos() applies.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [out] infos Output array that receives the core records. May be NULLwhen*info_countis0.[in,out] info_count On input, the capacity of infosin entries (or0to query the required size). On output, the number of entries written or required.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
info_countisNULL, or ifinfosisNULLwhile*info_countis non-zero, MBLTML_INVALID_ARGUMENT ifdev_nois out of range of the device count, MBLTML_INSUFFICIENT_LENGTH ifinfosis too small to hold all entries, or another mbltmlStatusCode_t error code on failure.
◆ mbltmlSetExtraPmicID() [2/2]
| MBLTML_EXPORT mbltmlStatusCode_t mbltmlSetExtraPmicID | ( | int | dev_no, |
| mbltmlExtraPmicId_t | pmic_id ) |
Select which extra PMIC rail subsequent mbltmlGetExtraPmic*() queries refer to.
- Note
- Supported on Aries2 hardware (MBLTML_HARDWARE_VERSION_ARIES2) only.
The underlying readings are refreshed by firmware once per second; allow up to 1 second after this call before mbltmlGetExtraPmicPower(), mbltmlGetExtraPmicCurrent() and mbltmlGetExtraPmicVoltage() reflect the newly selected rail.
- Parameters
-
[in] dev_no Device index. See mbltmlGetDeviceCount() for the count. [in] pmic_id Identifier of the extra PMIC rail to select.
- Returns
- MBLTML_SUCCESS on success, MBLTML_INVALID_ARGUMENT if
dev_nois out of range of the device count, or another mbltmlStatusCode_t error code on failure.
Generated by