ONLP
Open Network Linux Platform APIs
Functions

Functions

int onlp_fani_sw_init (void)
 Software initialization of the Fan module.
 
int onlp_fani_hw_init (uint32_t flags)
 Hardware initialization of the Fan module. More...
 
int onlp_fani_sw_denit (void)
 Deinitialize the fan software module. More...
 
int onlp_fani_id_validate (onlp_oid_id_t id)
 Validate a fan id. More...
 
int onlp_fani_hdr_get (onlp_oid_id_t id, onlp_oid_hdr_t *hdr)
 Retrieve the fan's OID hdr. More...
 
int onlp_fani_info_get (onlp_oid_id_t id, onlp_fan_info_t *rv)
 Get the information structure for the given fan OID. More...
 
int onlp_fani_caps_get (onlp_oid_id_t id, uint32_t *rv)
 Get the fan capabilities. More...
 
int onlp_fani_rpm_set (onlp_oid_id_t id, int rpm)
 Set the fan speed in RPM. More...
 
int onlp_fani_percentage_set (onlp_oid_id_t id, int p)
 Set the fan speed in percentage. More...
 
int onlp_fani_dir_set (onlp_oid_id_t id, onlp_fan_dir_t dir)
 Set the fan direction (if supported). More...
 

Detailed Description

Function Documentation

◆ onlp_fani_caps_get()

int onlp_fani_caps_get ( onlp_oid_id_t  id,
uint32_t *  rv 
)

Get the fan capabilities.

Parameters
idThe fan id.
[out]rvThe fan capabilities

◆ onlp_fani_dir_set()

int onlp_fani_dir_set ( onlp_oid_id_t  id,
onlp_fan_dir_t  dir 
)

Set the fan direction (if supported).

Parameters
idThe fan OID
dirThe direction.

◆ onlp_fani_hdr_get()

int onlp_fani_hdr_get ( onlp_oid_id_t  id,
onlp_oid_hdr_t hdr 
)

Retrieve the fan's OID hdr.

Parameters
idThe fan id.
[out]hdrReceives the OID header.

◆ onlp_fani_hw_init()

int onlp_fani_hw_init ( uint32_t  flags)

Hardware initialization of the Fan module.

Parameters
flagsThe hardware initialization flags.

◆ onlp_fani_id_validate()

int onlp_fani_id_validate ( onlp_oid_id_t  id)

Validate a fan id.

Parameters
idThe fan id.

◆ onlp_fani_info_get()

int onlp_fani_info_get ( onlp_oid_id_t  id,
onlp_fan_info_t rv 
)

Get the information structure for the given fan OID.

Parameters
idThe fan id
[out]rvReceives the fan information.

◆ onlp_fani_percentage_set()

int onlp_fani_percentage_set ( onlp_oid_id_t  id,
int  p 
)

Set the fan speed in percentage.

Parameters
idThe fan OID.
pThe new fan speed percentage.
Note
This is only relevant if the PERCENTAGE capability is set.

◆ onlp_fani_rpm_set()

int onlp_fani_rpm_set ( onlp_oid_id_t  id,
int  rpm 
)

Set the fan speed in RPM.

Parameters
idThe fan OID
rpmThe new RPM
Note
This is only relevant if the RPM capability is set.

◆ onlp_fani_sw_denit()

int onlp_fani_sw_denit ( void  )

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