X hits on this document

PDF document

February 10, 2006 - page 145 / 238

1041 views

0 shares

0 downloads

0 comments

145 / 238

8.6. USING SENSORS IN OPENIPMI

133

8.6.2

Threshold

Sensors

in

OpenIPMI

As mentioned before, threshold sensors monitor analog values. This means that they have a lot of information about how to convert the values from the raw readings (the 0-255 value returned from the sensor) into useful readings, what thresholds are supported, hysteresis settings, and a plethora of other settings. Lots of things

can be set up for threshold sensors.

int

err,

_ _ enum ipmi value_present e value_present,

unsigned int

raw_value,

double

val,

_ ipmi_states t

*states,

void

*cb_data);

Threshold Sensor Readings in OpenIPMI The reading of a threshold sensor is done with the following:

t y p e d e f v o i d ( * i p m i _ s e n s o r _ r e a d i n g _ c b ) ( i p m i _ s e n s o r _ t

*sensor,

IPMI NO VALUES PRESENT - Neither the raw or the converted values are present. Only the states are valid. This will be the case for thresholds sensors that cannot have their value read.

Assuming there was no error, the value present field will be set to one of the following:

void

* c b _ d a t a ) ;

i n t i p m i _ s e n s o r _ g e t _ r e a d i n g ( i p m i _ s e n s *sensor, o r _ t i p m i _ r e a d i n g _ d o n e _ c b d o n e ,

enum ipmi_thresh

_

e thresh,

int

*val);

IPMI RAW VALUE PRESENT - Only the raw value is present. This will be the case if there was no conversion algorithm available for the sensor.

will return true if the given threshold is out of range and false if not.

IPMI BOTH VALUES PRESENT - Both the raw and converted values are present.

This may not mean that the threshold will generate events (although it will almost certainly mean that, the spec is not clear on this). It is only defined to mean that the threshold is returned in the reading.

For threshold sensors, the function:

The current states of the various thresholds (whether they are out of range or note) is returned in the states parameter. To know if a sensor sets a threshold state setting when the value is read, use the following

function:

i n t i p m i _ s e n s o r _ t h r e s h o l d _ r e a d i n g _ s u p p o r t e d ( i p m i _ s e n s o r _ t

*sensor,

*states, e thresh);

i n t i p m i _ i s _ t h r e s h o l d _ o u t _ o f _ r a n g e ( i p m i _ s t a t e enum ipmi_thresh s _ t

_

Document info
Document views1041
Page views1041
Page last viewedThu Jan 19 17:22:56 UTC 2017
Pages238
Paragraphs8090
Words85809

Comments