ONLP
Open Network Linux Platform APIs
Data Structures | Typedefs | Functions

Data Structures

struct  onlp_chassis_info_s
 Chassis Information Structure. More...
 

Typedefs

typedef struct onlp_chassis_info_s onlp_chassis_info_t
 Chassis Information Structure.
 

Functions

int onlp_chassis_sw_init (void)
 Initialize the chassis software module. More...
 
int onlp_chassis_hw_init (uint32_t flags)
 Initialize the chassis. More...
 
int onlp_chassis_sw_denit (void)
 Deinitialize the chassis software module. More...
 
int onlp_chassis_hdr_get (onlp_oid_t oid, onlp_oid_hdr_t *hdr)
 Get the Chassis Header structure. More...
 
int onlp_chassis_info_get (onlp_oid_t oid, onlp_chassis_info_t *info)
 Get the chassis info structure. More...
 
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. More...
 
int onlp_chassis_info_to_json (onlp_chassis_info_t *info, cJSON **cj, uint32_t flags)
 Convert a chassis info structure to JSON. More...
 
int onlp_chassis_info_from_json (cJSON *cj, onlp_chassis_info_t *info)
 Convert a JSON object to a chassis info structure. More...
 
int onlp_chassis_environment_to_json (cJSON **cjp, uint32_t flags)
 Get the user or full environmental json data. More...
 
int onlp_chassis_environment_show (aim_pvs_t *pvs, uint32_t flags)
 Show the environmental data. More...
 
int onlp_chassis_debug_get_json (cJSON **rv)
 Construct the Chassis debug JSON object. More...
 
int onlp_chassis_debug_show (aim_pvs_t *pvs)
 Show the Chassis debug information. `*. More...
 

Detailed Description

Function Documentation

◆ onlp_chassis_debug_get_json()

int onlp_chassis_debug_get_json ( cJSON **  rv)

Construct the Chassis debug JSON object.

Parameters
[out]rvReceives the JSON object.

◆ onlp_chassis_debug_show()

int onlp_chassis_debug_show ( aim_pvs_t *  pvs)

Show the Chassis debug information. `*.

Parameters
pvsThe output pvs.

◆ onlp_chassis_environment_show()

int onlp_chassis_environment_show ( aim_pvs_t *  pvs,
uint32_t  flags 
)

Show the environmental data.

Parameters
pvsThe output pvs.
flagsZero or ONLP_OID_JSON_FLAG_TO_USER_JSON only.
Note
See onlp_chassis_environment_to_json()

◆ onlp_chassis_environment_to_json()

int onlp_chassis_environment_to_json ( cJSON **  cjp,
uint32_t  flags 
)

Get the user or full environmental json data.

Parameters
[out]cjpReceives the JSON data.
flagsZero or ONLP_OID_JSON_FLAG_TO_USER_JSON only.
Note
This will provide the user view of the environmental data

with keys in the following order: Chassis Fans Chassis Thermals Chassis PSUs

◆ onlp_chassis_hdr_get()

int onlp_chassis_hdr_get ( onlp_oid_t  oid,
onlp_oid_hdr_t hdr 
)

Get the Chassis Header structure.

Parameters
oidThe Chassis oid.
[out]hdrReceives the hdr.

◆ onlp_chassis_hw_init()

int onlp_chassis_hw_init ( uint32_t  flags)

Initialize the chassis.

Parameters
flagsThe initialization flags.

◆ onlp_chassis_info_from_json()

int onlp_chassis_info_from_json ( cJSON *  cj,
onlp_chassis_info_t info 
)

Convert a JSON object to a chassis info structure.

Parameters
cjThe JSON object.
[out]infoReceives the chassis info.

◆ onlp_chassis_info_get()

int onlp_chassis_info_get ( onlp_oid_t  oid,
onlp_chassis_info_t info 
)

Get the chassis info structure.

Parameters
oidThe Chassis oid.
[out]info

◆ onlp_chassis_info_to_json()

int onlp_chassis_info_to_json ( onlp_chassis_info_t info,
cJSON **  cj,
uint32_t  flags 
)

Convert a chassis info structure to JSON.

Parameters
infoThe chassis info structure.
[out]cjReceives the JSON object.
flagsThe JSON format flags.

◆ onlp_chassis_info_to_user_json()

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.

Parameters
infoThe chassis info structure.
[out]cjReceives the JSON object.
flagsThe JSON format flags.

◆ onlp_chassis_sw_denit()

int onlp_chassis_sw_denit ( void  )

Deinitialize the chassis 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.

◆ onlp_chassis_sw_init()

int onlp_chassis_sw_init ( void  )

Initialize the chassis software module.

Note
This will be called at software initialization time. This should not initialize any hardware.