X hits on this document

PDF document

February 10, 2006 - page 140 / 238

630 views

0 shares

0 downloads

0 comments

140 / 238

128

CHAPTER 8. SENSORS

Sensor Entity Information

Every sensor is associated with a specific entity, these calls let you fetch the entity information. The following calls return the numeric entity id and instance:

int ipmi_sensor_get_entity_id(ipmi_sensor_t *sensor); int ipmi_sensor_get_entity_instance(ipmi_sensor_t *sensor);

Generally, though, that is note what you want. You want the actual entity object, which may be fetched with the following:

ipmi_entity_t *ipmi_sensor_get_entity(ipmi_sensor_t *sensor);

Note that the entity is refcounted when the sensor is claimed, so the entity will exist while you have a valid reference to a sensor it contains.

Sensor Name

The SDR contains a string giving a name for the sensor. This is useful for printing out sensor information. The functions to get this are:

int ipmi_sensor_get_id_length(ipmi_sensor_t *sensor); enum ipmi_str_type_e ipmi_sensor_get_id_type(ipmi_sensor_t *sensor); int ipmi_sensor_get_id(ipmi_sensor_t *sensor, char *id, int length);

See appendix A.1 for more information about these strings. The function

int ipmi_sensor_get_name(ipmi_sensor_t *sensor, char *name, int length);

returns a fully qualified name for the sensor with the entity name prepended. The name array is filled with the name, up to the length given. This is useful for printing string names for the sensor.

Sensor Event Support in OpenIPMI

Sensors may support event enables in different ways. The following function returns what type of event enable is supported:

int ipmi_sensor_get_event_support(ipmi_sensor_t *sensor); The return values are all prepended with IPMI EVENT SUPPORT , values are:

PER STATE

Each individual state or threshold may individually have its events

ENTIRE SENSOR

GLOBAL ENABLE

NONE

turned off and on. This means that the individual thresholds and states may be individually enabled. The entire sensor may have events enabled and disabled using the events enabled setting when setting the event enables. Section 8.6.1 describes this setting. Events may only be enabled and disabled for the whole managment controller. Events are disabled by setting the event receiver to 00h, or enabled by setting them to the proper event receiver. See section 4.1.5 for more details. The sensor does not support events.

Document info
Document views630
Page views630
Page last viewedThu Dec 08 06:14:16 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments