CHAPTER 9. CONTROLS AND MISCELLANY
_ _ _ _ _ typedef void (*ipmi control val cb)(ipmi control t *control,
Pass in an array of integers for the values, the length of which should be the number of values the control supports. To get the value of a control, use:
The val returns is an array of integers, the length is the number of values the control supports.
* c b _ d a t a ) ;
i n t i p m i _ c o n t r o l _ g e t _ v a l ( i p m i _ c o n t r *control, o l _ t i p m i _ c o n t r o l _ v a l _ c b h a n d l e r ,
Lights come in two flavors. Some lights have absolute control of the color, on time, and off time. OpenIPMI call these “setting” lights. Other lights have fixed functions; they have a few settings that have fixed color and on/off values. OpenIPMI calles these “transition” lights. Both types are fully supported.
To know if a light control is a setting or transition light, the following function returns true for a setting light and false for a transition light:
int ipmi_control_light_set_with_setting(ipmi_control_t *control);
Lights can be different colors, and the interface allows the supported colors to be check and set. The supported colors are: IPMI CONTROL COLOR BLACK IPMI CONTROL COLOR WHITE IPMI CONTROL COLOR RED IPMI CONTROL COLOR GREEN IPMI CONTROL COLOR BLUE IPMI CONTROL COLOR YELLOW IPMI CONTROL COLOR ORANGE
Setting Light Setting lights are managed with an abstract data structure:
typedef struct ipmi_light_setting_s ipmi_light_setting_t;
This is a standard OpenIPMI opaque data structure. Like most other data structures of this type, this does not directly modify the light, this is used to transmit the settings to a light and to receive the settings from a light. To allocate/free these, use the following:
i p m i _ l i g h t _ s e t t i n g _ t * i p m i _ a l l o c _ l i g h t _ s e t t i n g s ( u n s i g n e d i n t c o u n t ) void ipmi_free_light_settings(ipmi_light_setting_t *settings); ;
A function is also available to duplicate these objects: i p m i _ l i g h t _ s e t t i n g _ t * i p m i _ l i g h t _ s e t t i n g s _ d u p ( i p m i _ l i g h t _ s e t t i n g _ t * s e t t i n g s ) ;