[EMAIL PROTECTED] wrote on 04/13/2007 04:53:37 
AM:

> Hi,
> 
> For several days, i play with OpenHPI 2.8.1 to try to figure out how it
> works. Since the online documentation is not very helpful when you go to
> the details (i know that a documentation update is expected for the
> 2.9.0), i hope to get missing informations thanks to this mailing-list.
> 
> I have slightly modified the simulator plugin to change a fan sensor
> value (which actually is hard coded) to try to force OpenHPI to generate
> an event when the sensor value exceed a warning threshold.

In reality, the hardware is what generates the event ideally and the 
plugin catches the event an generates an HPI event in OpenHPI. So the 
plugin needs to generate it, not the top infrastructure, whether because 
it saw the hardware event or because it saw the right conditions to do so.

> 
> For that, i have modified the oh_get_sensor_reading() equivalent
> function to change the value previously hard-coded (in fact, i read a
> file which contains the value i want to display). But when the sensor
> value exceed the up critical threshold, nothing happen (i modified the
> sim_fan_sensors structure).

You need to add code in the simulator plugin instead, to check the sensor 
value whenever get_event is called, and generate the sensor event if it 
detected a change.

> 
> And whereas i expected that the reading of all sensors value was
> automatic, i needed to call a client by hand ("hpitree" for instance) to

A better one to use is hpisensor.

> force OpenHPI to reread all values. Except oh_get_event() which is
> called regularly, OpenHPI don't seems to try to reread all sensor values
> in a regular manner ; so it's unclear for me how OpenHPI can generate
> alone (without the interaction of a client) an event when a sensor value
> (or what you want) exceed a threshold.

The reading of sensors is not automatic, but the events coming from the 
plugins are automatic.

> 
> Am i wrong ? Maybe OpenHPI consider that a client need to check values
> regularly to be able to generate events ? And why no event is generate ?
> 
> thanks in advance,
> Lionel Tricon
> 
> 
------------------------------------------------------------------------------
> C-S DIGINEXT
> 45, impasse de la Draille
> Parc d'Activités La Duranne
> 13857 AIX-EN-PROVENCE CEDEX 3
> Tél. : 04 42 90 45 84
> Fax : 04 42 90 82 80
> Mail : [EMAIL PROTECTED]
> 
> 
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Openhpi-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel

Reply via email to