X hits on this document

PDF document

February 10, 2006 - page 153 / 238

503 views

0 shares

0 downloads

0 comments

153 / 238

8.6. USING SENSORS IN OPENIPMI

141

i n t i p m i _ s e n s o r _ g e t _ p o s i t i v e _ g o i n g _ t h r e s h o l d _ h y s t e r e s i s ( i p m i _ s e n s o r _ t * s e n s o r ) ; i n t i p m i _ s e n s o r _ g e t _ n e g a t i v e _ g o i n g _ t h r e s h o l d _ h y s t e r e s i s ( i p m i _ s e n s o r _ t * s e n s o r ) ;

To fetch and set the current threshold values for a sensor (assuming it support these operations), use: typedef void (*ipmi_sensor__hysteresis_cb)(ipmi_sensor_t *sensor,

int

err,

unsigned int

positive_hysteresis,

unsigned int

negative_hysteresis,

void

*cb_data);

void

*cb_data);

i n t i p m i _ s e n s o r _ g e t _ h y s t e r e s i s ( i p m i _ s e n s o r _ t

*sensor,

i p m i _ h y s t e r e s i s _ g e t _ c b d o n e ,

unsigned int

positive_hysteresis,

unsigned int

negative_hysteresis,

_ _ _ ipmi sensor done cb done,

void

_ *cb data);

i n t i p m i _ s e n s o r _ s e t _ h y s t e r e s i s ( i p m i _ s e n s o r _ t

*sensor,

Threshold Sensor Reading Information in OpenIPMI

In addition to all this, IPMI gives some more information about the readings. The following allow the user to get the accuracy and tolerance of the readings from the sensor:

int ipmi_sensor_get_tolerance(ipmi_sensor_t *sensor,

int

val,

double

*tolerance);

int ipmi_sensor_get_accuracy(ipmi_sensor_t *sensor, int val, double *accuracy); The sensor also may have defined ranges and nominal readings. If a value of this type is specified, then

the

specified functions below will return true and the specific value will be available:

int int

ipmi_sensor_get_normal_min_specified(ipmi_sensor_t *sensor); i p m i _ s e n s o r _ g e t _ n o r m a l _ m i n ( i p m i _ s e n s o r _ t * s e n s o r , d o u b l e * n o r m a l _ m i n ) ;

int int

ipmi ipmi

_ _

s e n s o r _ g e t _ n o r m a l _ m a x _ s p e c i f i e d ( i p m i _ s e n s o r _ t * s e n s o r ) ; s e n s o r _ g e t _ n o r m a l _ m a x ( i p m i _ s e n s o r _ t * s e n s o r , d o u b l e * n o r m a l _ m a x ) ;

int int

ipmi

_

ipmi

_

s e n s o r _ g e t _ n o m i n a l _ r e a d i n g _ s p e c i f i e d ( i p m i _ s e n s o r _ t * s e n s o r ) ; s e n s o r _ g e t _ n o m i n a l _ r e a d i n g ( i p m i _ s e n s o r _ t * s e n s o r ,

double *nominal_reading);

The normal min and max give the standard operating range of a sensor. The nominal reading is the “normal” value the sensor should read.

The sensor may also have absolute minimum and maximum values. These can be fetched with the following functions:

i n t i p m i _ s e n s o r _ g e t _ s e n s o r _ m a x ( i p m i _ s e n s o r _ t * s e n s o r , d o u b l e * s e n s o r _ m a x ) ; i n t i p m i _ s e n s o r _ g e t _ s e n s o r _ m i n ( i p m i _ s e n s o r _ t * s e n s o r , d o u b l e * s e n s o r _ m i n ) ;

Document info
Document views503
Page views503
Page last viewedFri Dec 02 18:08:43 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments