Device health
Overview
These APIs are for health More…
// global functions XPUM_API xpum_result_t xpumSetHealthConfig( xpum_device_id_t deviceId, xpum_health_config_type_t key, void* value ); XPUM_API xpum_result_t xpumSetHealthConfigByGroup( xpum_group_id_t groupId, xpum_health_config_type_t key, void* value ); XPUM_API xpum_result_t xpumGetHealthConfig( xpum_device_id_t deviceId, xpum_health_config_type_t key, void* value ); XPUM_API xpum_result_t xpumGetHealthConfigByGroup( xpum_group_id_t groupId, xpum_health_config_type_t key, xpum_device_id_t deviceIdList[], void* valueList[], int* count ); XPUM_API xpum_result_t xpumGetHealth( xpum_device_id_t deviceId, xpum_health_type_t type, xpum_health_data_t* data ); XPUM_API xpum_result_t xpumGetHealthByGroup( xpum_group_id_t groupId, xpum_health_type_t type, xpum_health_data_t dataList[], int* count );
Detailed Documentation
These APIs are for health
Global Functions
XPUM_API xpum_result_t xpumSetHealthConfig( xpum_device_id_t deviceId, xpum_health_config_type_t key, void* value )
Set health configuration by device.
Support Platform: Linux
Parameters:
deviceId |
IN: Device id |
key |
IN: Configuration key to set |
value |
IN: Pointer to configuration value to set, the type of value is decided by key type, which should be documented |
Returns:
xpum_result_t
XPUM_API xpum_result_t xpumSetHealthConfigByGroup( xpum_group_id_t groupId, xpum_health_config_type_t key, void* value )
Set health configuration by group.
Support Platform: Linux
Parameters:
groupId |
IN: Group id |
key |
IN: Configuration key to set |
value |
IN: Pointer to health configuration value to set the type of value is decided by key type, which should be documented |
Returns:
xpum_result_t
XPUM_API xpum_result_t xpumGetHealthConfig( xpum_device_id_t deviceId, xpum_health_config_type_t key, void* value )
Get health configuration by device.
Support Platform: Linux
Parameters:
deviceId |
IN: Device id |
key |
IN: Configuration key to get |
value |
OUT: Pointer to configuration value to get the type of value is decided by key type, which should be documented |
Returns:
xpum_result_t
XPUM_API xpum_result_t xpumGetHealthConfigByGroup( xpum_group_id_t groupId, xpum_health_config_type_t key, xpum_device_id_t deviceIdList[], void* valueList[], int* count )
Get health configuration by group.
Support Platform: Linux
Parameters:
groupId |
IN: Group id |
key |
IN: Configuration key to get |
deviceIdList |
OUT: Array of device ids in this group |
valueList |
OUT: Array to store configuration values for devices’ key in deviceIdList |
count |
IN/OUT: The number of entries that deviceIdList and valueList array can store, count should equal to or larger than device count of the group (groupid); when return, the count will store real number of entries returned by deviceIdList and valueList |
Returns:
XPUM_OK if query successfully
XPUM_BUFFER_TOO_SMALL if count is smaller than device count of group
XPUM_API xpum_result_t xpumGetHealth( xpum_device_id_t deviceId, xpum_health_type_t type, xpum_health_data_t* data )
Get health status by device for specific health type.
Support Platform: Linux
Parameters:
deviceId |
IN: Device id |
type |
IN: Health type to get |
data |
OUT: Health status data |
Returns:
xpum_result_t
XPUM_API xpum_result_t xpumGetHealthByGroup( xpum_group_id_t groupId, xpum_health_type_t type, xpum_health_data_t dataList[], int* count )
Get health status by group for specific health type.
Support Platform: Linux
Parameters:
groupId |
IN: Group id |
type |
IN: Health type to get |
dataList |
OUT: Array of health status datas, the array length should equal to device count of this group. |
count |
IN/OUT: The number of entries that dataList array can store, count should equal to or larger than device count of the group (groupid); when return, the count will store real number of entries returned by dataList |
Returns:
XPUM_OK if query successfully
XPUM_BUFFER_TOO_SMALL if count is smaller than device count of group