ONLP
Open Network Linux Platform APIs
Macros | Functions

Macros

#define ONLP_THERMAL_INFO_ENTRY_INIT(_id, _desc, _parent)
 
#define ONLP_CHASSIS_THERMAL_INFO_ENTRY_INIT(_id, _desc)   ONLP_THERMAL_INFO_ENTRY_INIT(_id, _desc, ONLP_OID_CHASSIS)
 
#define ONLP_PSU_THERMAL_INFO_ENTRY_INIT(_id, _desc, _psu_id)   ONLP_THERMAL_INFO_ENTRY_INIT(_id, _desc, ONLP_PSU_ID_CREATE(_psu_id))
 

Functions

int onlp_thermali_sw_init (void)
 Software initialization of the Thermal module.
 
int onlp_thermali_hw_init (uint32_t flags)
 Hardware initialization of the Thermal module. More...
 
int onlp_thermali_sw_denit (void)
 Deinitialize the thermal software module. More...
 
int onlp_thermali_id_validate (onlp_oid_id_t id)
 Validate a thermal oid. More...
 
int onlp_thermali_hdr_get (onlp_oid_id_t id, onlp_oid_hdr_t *rv)
 Retrieve the thermal's oid header. More...
 
int onlp_thermali_info_get (onlp_oid_id_t id, onlp_thermal_info_t *rv)
 Get the information for the given thermal OID. More...
 

Detailed Description

Macro Definition Documentation

◆ ONLP_CHASSIS_THERMAL_INFO_ENTRY_INIT

#define ONLP_CHASSIS_THERMAL_INFO_ENTRY_INIT (   _id,
  _desc 
)    ONLP_THERMAL_INFO_ENTRY_INIT(_id, _desc, ONLP_OID_CHASSIS)

This macro should be used to statically initialize a chassis thermal info structure.

◆ ONLP_PSU_THERMAL_INFO_ENTRY_INIT

#define ONLP_PSU_THERMAL_INFO_ENTRY_INIT (   _id,
  _desc,
  _psu_id 
)    ONLP_THERMAL_INFO_ENTRY_INIT(_id, _desc, ONLP_PSU_ID_CREATE(_psu_id))

This macro should be used to statically initialize a PSU thermal info structure.

◆ ONLP_THERMAL_INFO_ENTRY_INIT

#define ONLP_THERMAL_INFO_ENTRY_INIT (   _id,
  _desc,
  _parent 
)
Value:
{ \
{ \
.id = ONLP_THERMAL_ID_CREATE(_id), \
.description = _desc, \
.poid = ONLP_OID_CHASSIS, \
.status = ONLP_OID_STATUS_FLAG_PRESENT, \
}, \
.caps = ONLP_THERMAL_CAPS_GET_TEMPERATURE, \
}
#define ONLP_THERMAL_ID_CREATE(_id)
Definition: oids.h:153
#define ONLP_OID_CHASSIS
Definition: oids.h:260

This macro should be used in your implementation to declare your static chassis thermal sensors.

Function Documentation

◆ onlp_thermali_hdr_get()

int onlp_thermali_hdr_get ( onlp_oid_id_t  id,
onlp_oid_hdr_t rv 
)

Retrieve the thermal's oid header.

Parameters
idThe thermal oid.
[out]rvReceives the header.

◆ onlp_thermali_hw_init()

int onlp_thermali_hw_init ( uint32_t  flags)

Hardware initialization of the Thermal module.

Parameters
flagsThe hardware initialization flags.

◆ onlp_thermali_id_validate()

int onlp_thermali_id_validate ( onlp_oid_id_t  id)

Validate a thermal oid.

Parameters
idThe thermal id.

◆ onlp_thermali_info_get()

int onlp_thermali_info_get ( onlp_oid_id_t  id,
onlp_thermal_info_t rv 
)

Get the information for the given thermal OID.

Parameters
idThe Thermal OID
[out]rvReceives the thermal information.

◆ onlp_thermali_sw_denit()

int onlp_thermali_sw_denit ( void  )

Deinitialize the thermal software module.

Note
The primary purpose of this API is to properly deallocate any resources used by the module in order faciliate detection of real resouce leaks.