ONLP
Open Network Linux Platform APIs
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
thermal.h File Reference

Thermal Sensor Management. More...

#include <onlp/onlp_config.h>
#include <onlp/onlp.h>
#include <onlp/oids.h>

Go to the source code of this file.

Data Structures

struct  onlp_thermal_info_s
 

Macros

#define ONLP_THERMAL_CAPS_ALL   0xF
 
#define ONLP_THERMAL_CAPS_GET_ANY_THRESHOLD
 
#define ONLP_THERMAL_THRESHOLD_INIT_DEFAULTS
 
#define ONLP_THERMAL_INFO_CAP_IS_SET(_pinfo, _name)   ((_pinfo)->caps & ONLP_THERMAL_CAPS_##_name)
 
#define ONLP_THERMAL_CAPS_VALID(_e)   (onlp_thermal_caps_valid((_e)))
 
#define ONLP_THERMAL_THRESHOLD_VALID(_e)   (onlp_thermal_threshold_valid((_e)))
 

Typedefs

typedef enum onlp_thermal_caps_e onlp_thermal_caps_t
 
typedef enum onlp_thermal_threshold_e onlp_thermal_threshold_t
 
typedef struct onlp_thermal_info_s onlp_thermal_info_t
 

Enumerations

enum  onlp_thermal_caps_e {
  ONLP_THERMAL_CAPS_GET_TEMPERATURE = (1 << 0),
  ONLP_THERMAL_CAPS_GET_WARNING_THRESHOLD = (1 << 1),
  ONLP_THERMAL_CAPS_GET_ERROR_THRESHOLD = (1 << 2),
  ONLP_THERMAL_CAPS_GET_SHUTDOWN_THRESHOLD = (1 << 3)
}
 
enum  onlp_thermal_threshold_e {
  ONLP_THERMAL_THRESHOLD_WARNING_DEFAULT = 45000,
  ONLP_THERMAL_THRESHOLD_ERROR_DEFAULT = 55000,
  ONLP_THERMAL_THRESHOLD_SHUTDOWN_DEFAULT = 60000
}
 

Functions

int onlp_thermal_sw_init (void)
 Software initialization of the thermal module.
 
int onlp_thermal_hw_init (uint32_t flags)
 Hardware initialization of the thermal module. More...
 
int onlp_thermal_sw_denit (void)
 Deinitialize the thermal software module. More...
 
int onlp_thermal_hdr_get (onlp_oid_t oid, onlp_oid_hdr_t *rv)
 Retrieve the thermal's oid header. More...
 
int onlp_thermal_info_get (onlp_oid_t oid, onlp_thermal_info_t *rv)
 Retrieve information about the given thermal id. More...
 
int onlp_thermal_info_to_json (onlp_thermal_info_t *info, cJSON **rv, uint32_t flags)
 Convert a thermal info structure to json. More...
 
int onlp_thermal_info_from_json (cJSON *cj, onlp_thermal_info_t *info)
 Convert a JSON object to a thermal info structure. More...
 
int onlp_thermal_info_to_user_json (onlp_thermal_info_t *info, cJSON **rv, uint32_t flags)
 Convert a thermal info structure to user json. More...
 
const char * onlp_thermal_caps_name (onlp_thermal_caps_t e)
 
int onlp_thermal_caps_value (const char *str, onlp_thermal_caps_t *e, int substr)
 
const char * onlp_thermal_caps_desc (onlp_thermal_caps_t e)
 
int onlp_thermal_caps_valid (onlp_thermal_caps_t e)
 
const char * onlp_thermal_threshold_name (onlp_thermal_threshold_t e)
 
int onlp_thermal_threshold_value (const char *str, onlp_thermal_threshold_t *e, int substr)
 
const char * onlp_thermal_threshold_desc (onlp_thermal_threshold_t e)
 
int onlp_thermal_threshold_valid (onlp_thermal_threshold_t e)
 

Variables

aim_map_si_t onlp_thermal_caps_map []
 
aim_map_si_t onlp_thermal_caps_desc_map []
 
aim_map_si_t onlp_thermal_threshold_map []
 
aim_map_si_t onlp_thermal_threshold_desc_map []
 

Detailed Description

Thermal Sensor Management.