ONLP
Open Network Linux Platform APIs
thermali.h
Go to the documentation of this file.
1 /************************************************************
2  * <bsn.cl fy=2014 v=onl>
3  *
4  * Copyright 2014, 2015 Big Switch Networks, Inc.
5  *
6  * Licensed under the Eclipse Public License, Version 1.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.eclipse.org/legal/epl-v10.html
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
15  * either express or implied. See the License for the specific
16  * language governing permissions and limitations under the
17  * License.
18  *
19  * </bsn.cl>
20  ********************************************************/
28 #ifndef __ONLP_THERMALI_H__
29 #define __ONLP_THERMALI_H__
30 
31 #include <onlp/thermal.h>
32 
36 int onlp_thermali_sw_init(void);
37 
42 int onlp_thermali_hw_init(uint32_t flags);
43 
50 int onlp_thermali_sw_denit(void);
51 
57 
64 
71 
76 #define ONLP_THERMAL_INFO_ENTRY_INIT(_id, _desc, _parent) \
77  { \
78  { \
79  .id = ONLP_THERMAL_ID_CREATE(_id), \
80  .description = _desc, \
81  .poid = ONLP_OID_CHASSIS, \
82  .status = ONLP_OID_STATUS_FLAG_PRESENT, \
83  }, \
84  .caps = ONLP_THERMAL_CAPS_GET_TEMPERATURE, \
85  }
86 
91 #define ONLP_CHASSIS_THERMAL_INFO_ENTRY_INIT(_id, _desc) \
92  ONLP_THERMAL_INFO_ENTRY_INIT(_id, _desc, ONLP_OID_CHASSIS)
93 
98 #define ONLP_PSU_THERMAL_INFO_ENTRY_INIT(_id, _desc, _psu_id) \
99  ONLP_THERMAL_INFO_ENTRY_INIT(_id, _desc, ONLP_PSU_ID_CREATE(_psu_id))
100 
101 #endif /* __ONLP_THERMALI_H__ */
102 /* @} */
int onlp_thermali_id_validate(onlp_oid_id_t id)
Validate a thermal oid.
int onlp_thermali_sw_denit(void)
Deinitialize the thermal software module.
Definition: thermal.h:76
int onlp_thermali_sw_init(void)
Software initialization of the Thermal module.
Thermal Sensor Management.
int onlp_thermali_hdr_get(onlp_oid_id_t id, onlp_oid_hdr_t *rv)
Retrieve the thermal&#39;s oid header.
uint32_t onlp_oid_id_t
Definition: oids.h:55
int onlp_thermali_info_get(onlp_oid_id_t id, onlp_thermal_info_t *rv)
Get the information for the given thermal OID.
int onlp_thermali_hw_init(uint32_t flags)
Hardware initialization of the Thermal module.
Definition: oids.h:296