X hits on this document

PDF document

February 10, 2006 - page 161 / 238

1000 views

0 shares

0 downloads

0 comments

161 / 238

9.1. CONTROLS

149

Each light setting has the settings for all lights for the control. If you allocate a light setting, you must pass in the number of lights the control manages. You can also fetch this from the setting using:

u n s i g n e d i n t i p m i _ l i g h t _ s e t t i n g _ g e t _ c o u n t ( i p m i _ l i g h t _ s e t t i n g _ t * s e t t i n g ) ;

Setting type lights have the concept of “local control”. When a light is in local control, the light is managed by the system it runs on. If local control is turned off, then the light can be directly managed. For instance, the system may have an LED that when under local control displays disk activity. However, it may be possible for the management system to take over that LED and use it for another purpose. Local control is set and modified in a setting using the functions:

_ _ _ _ _ int ipmi light setting_in local_control(ipmi light setting_t *setting,

int

num,

int

*lc);

_ _ _ _ _ _ int ipmi light setting_set local control(ipmi light setting_t *setting,

int

num,

int

lc);

The num parameter is the light number to set (which of the lights the control managers). The lc parameter is the local control control setting. These return error values if the parameters are out of range. If local control is not supported, this is generally ignored.

To know if a light supports a specific color, the function:

int ipmi

_

control

_

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

unsigned int

color);

To set the color in a setting and extract the color from a setting, use:

i n t i p m i _ l i g h t _ s e t t i n g _ g e t _ c o l o r ( i p m i _ l i g h t _ s e t t i n g _ t * s e t t i n g , i n t n u m ,

int *color); i n t i p m i _ l i g h t _ s e t t i n g _ s e t _ c o l o r ( i p m i _ l i g h t _ s e t t i n g _ t * s e t t i n g , i n t n u m ,

int color);

These types of lights also support on and off times. The on and off times are directly set, so the user has direct control of this. Note that on and off times may be approximate. To set or get the on and off times in a setting, use:

i n t i p m i _ l i g h t _ s e t t i n g _ g e t _ o n _ t i m e ( i p m i _ l i g h t _ s e t t i n g _ t * s e t t i n g , i n t n u m ,

int *time); i n t i p m i _ l i g h t _ s e t t i n g _ s e t _ o n _ t i m e ( i p m i _ l i g h t _ s e t t i n g _ t * s e t t i n g , i n t n u m ,

int time); i n t i p m i _ l i g h t _ s e t t i n g _ g e t _ o f f _ t i m e ( i p m i _ l i g h t _ s e t t i n g _ t * s e t t i n g , i n t n u m ,

int *time); i n t i p m i _ l i g h t _ s e t t i n g _ s e t _ o f f _ t i m e ( i p m i _ l i g h t _ s e t t i n g _ t * s e t t i n g , i n t n u m ,

int time);

The times are specified in milliseconds. To fetch the current settings of a light control, use:

Document info
Document views1000
Page views1000
Page last viewedWed Jan 18 04:11:01 UTC 2017
Pages238
Paragraphs8090
Words85809

Comments