ONLP
Open Network Linux Platform APIs
chassis.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  ********************************************************/
34 #ifndef __ONLP_CHASSIS_H__
35 #define __ONLP_CHASSIS_H__
36 
37 #include <onlp/onlp_config.h>
38 #include <onlp/onlp.h>
39 #include <onlplib/onie.h>
40 #include <onlplib/pi.h>
41 #include <onlp/oids.h>
42 
47 typedef struct onlp_chassis_info_s {
50 
51  /* Chassis objects have no dedicated fields. */
52 
54 
60 int onlp_chassis_sw_init(void);
61 
66 int onlp_chassis_hw_init(uint32_t flags);
67 
74 int onlp_chassis_sw_denit(void);
75 
82 
89 
96 int onlp_chassis_info_to_user_json(onlp_chassis_info_t* info, cJSON** cj, uint32_t flags);
97 
104 int onlp_chassis_info_to_json(onlp_chassis_info_t* info, cJSON** cj, uint32_t flags);
105 
112 
113 /******************************************************************************
114  *
115  * Standard Chassis Features
116  *
117  *****************************************************************************/
118 
130 int onlp_chassis_environment_to_json(cJSON** cjp, uint32_t flags);
131 
132 
139 int onlp_chassis_environment_show(aim_pvs_t* pvs, uint32_t flags);
140 
145 int onlp_chassis_debug_get_json(cJSON** rv);
146 
151 int onlp_chassis_debug_show(aim_pvs_t* pvs);
152 
153 #endif /* __ONLP_CHASSIS_H_ */
154 /* @} */
onlp Configuration Header
int onlp_chassis_info_to_json(onlp_chassis_info_t *info, cJSON **cj, uint32_t flags)
Convert a chassis info structure to JSON.
onlp_oid_hdr_t hdr
Definition: chassis.h:49
int onlp_chassis_hdr_get(onlp_oid_t oid, onlp_oid_hdr_t *hdr)
Get the Chassis Header structure.
Object Identifiers.
int onlp_chassis_info_to_user_json(onlp_chassis_info_t *info, cJSON **cj, uint32_t flags)
Convert a chassis info structure to user JSON.
uint32_t onlp_oid_t
Definition: oids.h:52
int onlp_chassis_debug_get_json(cJSON **rv)
Construct the Chassis debug JSON object.
int onlp_chassis_hw_init(uint32_t flags)
Initialize the chassis.
int onlp_chassis_sw_denit(void)
Deinitialize the chassis software module.
int onlp_chassis_environment_to_json(cJSON **cjp, uint32_t flags)
Get the user or full environmental json data.
int onlp_chassis_info_from_json(cJSON *cj, onlp_chassis_info_t *info)
Convert a JSON object to a chassis info structure.
Chassis Information Structure.
Definition: chassis.h:47
int onlp_chassis_environment_show(aim_pvs_t *pvs, uint32_t flags)
Show the environmental data.
int onlp_chassis_sw_init(void)
Initialize the chassis software module.
int onlp_chassis_debug_show(aim_pvs_t *pvs)
Show the Chassis debug information. `*.
int onlp_chassis_info_get(onlp_oid_t oid, onlp_chassis_info_t *info)
Get the chassis info structure.
Definition: oids.h:296
struct onlp_chassis_info_s onlp_chassis_info_t
Chassis Information Structure.