ONLP
Open Network Linux Platform APIs
generic.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  ********************************************************/
29 #ifndef __ONLP_GENERIC_H__
30 #define __ONLP_GENERIC_H__
31 
32 #include <onlp/onlp_config.h>
33 #include <onlp/onlp.h>
34 #include <onlplib/onie.h>
35 #include <onlplib/pi.h>
36 #include <onlp/oids.h>
37 
41 typedef struct onlp_generic_info_s {
44 
45  /* Generic objects have no dedicated fields. */
47 
53 int onlp_generic_sw_init(void);
54 
59 int onlp_generic_hw_init(uint32_t flags);
60 
67 int onlp_generic_sw_denit(void);
68 
75 
82 
89 int onlp_generic_info_to_user_json(onlp_generic_info_t* info, cJSON** cj, uint32_t flags);
90 
97 int onlp_generic_info_to_json(onlp_generic_info_t* info, cJSON** cj, uint32_t flags);
98 
105 
106 #endif /* __ONLP_GENERIC_H_ */
107 /* @} */
onlp Configuration Header
int onlp_generic_sw_init(void)
Initialize the module software module.
struct onlp_generic_info_s onlp_generic_info_t
Generic OID Information Structure.
Object Identifiers.
uint32_t onlp_oid_t
Definition: oids.h:52
int onlp_generic_info_to_user_json(onlp_generic_info_t *info, cJSON **cj, uint32_t flags)
Convert a generic info structure to user JSON.
int onlp_generic_info_get(onlp_oid_t oid, onlp_generic_info_t *info)
Get the module info structure.
onlp_oid_hdr_t hdr
Definition: generic.h:43
Generic OID Information Structure.
Definition: generic.h:41
int onlp_generic_sw_denit(void)
Deinitialize the generic software module.
int onlp_generic_hw_init(uint32_t flags)
Initialize the module.
int onlp_generic_hdr_get(onlp_oid_t oid, onlp_oid_hdr_t *hdr)
Get the generic header structure.
int onlp_generic_info_to_json(onlp_generic_info_t *info, cJSON **cj, uint32_t flags)
Convert a generic info structure to JSON.
Definition: oids.h:296
int onlp_generic_info_from_json(cJSON *cj, onlp_generic_info_t *info)
Convert a JSON object to a generic info structure.