X hits on this document

PDF document

February 10, 2006 - page 159 / 238

668 views

0 shares

0 downloads

0 comments

159 / 238

_ typedef int (*ipmi_control_val_event_cb)(ipmi_control t *control,

int

*valid_vals,

int

*vals,

void

*cb_data,

_ _ ipmi event t

*event);

147

In the callback, not all values may be present. The valid_vals parameter is an array of booleans telling if specific values are present. If an item in that array is true, then the corresponding value in the vals array is a valid value. This is a standard event handler as defined in section 2.2.5 on page 20.

9.1. CONTROLS

i n t i p m i _ c o n t r o l _ a d d _ v a l _ e v e n t _ h a n d l e r ( i p m i _ c o *control, n t r o l _ t i p m i _ c o n t r o l _ v a l _ e v e n t _ c b h a n d l e r ,

void

* c b _ d a t a ) ;

9.1.2

Controls and Events

Controls may support events, much like sensors. The function:

*cb_data); *control, void i n t i p m i _ c o n t r o l _ r e m o v e _ v a l _ e v e n t _ h a n d l e r ( i p m i _ c o n t r o l _ t i p m i _ c o n t r o l _ v a l _ e v e n t _ c b h a n d l e r ,

tells if a control supports events. To register/unregister for control events, use the functions:

int

i p m i _ c o n t r o l _ h a s _ e v e n t s ( i p m i _ c o n t r o l

_

t *control);

9.1.3

Basic

Type

Controls

This section describes the more “normal” controls, that generally have a single value that is a binary or some type of direct setting. These take an integer value per control for their setting. These control types are:

relay alarm reset power fan speed one-shot reset output one-shot output

To set the value of one of these controls, use the following:

int

*val,

_ ipmi control_op_cb handler,

void

_ *cb data);

i n t i p m i _ c o n t r o l _ s e t _ v a l ( i p m i _ c o n t r o l _ t

*control,

Document info
Document views668
Page views668
Page last viewedFri Dec 09 19:43:25 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments