[EMAIL PROTECTED] wrote:
> Hii all,
>
>     I have the many qustions about the OpenIPMI the 
> questions as follows:
>
> My requirement as follows:
>  Using OpenIPMI API i have to send the the IPMI request from my local (over 
> the LAN) to the remote IPMI enabled server,then i have to receive the reponse 
> from the IPMI enabled server.
> my ipmi request as follows:
>
> 1) How to get how many sensors in the IPMI server,
>    for that i used the ipmi_ip_setup_con() for  
>    the remote LAN connection, then how to  the get  how many sensors in the 
> IPMI server , pls tell me 
> which API i am going to use for this .  
>
> 2) for the above condition (1)  how to get sensor type s,for that which IPMI 
> API i have to use , what are all the parameter i have to pass the API, pls 
> explain in detail i looked the \'sample\' directory
> also, i get confused.
>    
> 3)how to get a temperature sesnsor reading ,using 
>   OpenIPMI API, which API i have to use, what are all   the parameter i have 
> to pass that API, pls 
>   explain in detail.
>
> If You have the code for this pls send that is very useful for me
>
> Thanks
> barani 
>   
This is not hard, but you really need some understanding about what is 
going on.  The sample code shows everything you need (look at 
sample3.c), but you have to understand how the library works.  Reading 
the documentation is a must.

To understand how this code work, you must understand that it is 
event-driven.  Basically, you register with the library to tell you when 
interesting things happen.  And when you ask the library to do 
something, it returns immediately and then calls a function you supply 
when the operation is complete.

For instance, in sample3.s, you will notice:

    rv = ipmi_open_domain("", &con, 1, setup_done, NULL, NULL, NULL,
              NULL, 0, NULL);

That creates a "domain" (basically it represents an entire chassis or 
system).  However, the domain is not ready until "setup_done" is called.

In setup_done, it does:

    rv = ipmi_domain_add_entity_update_handler(domain, entity_change, 
domain);

That tells the library that if any entity in the domain is 
added/removed/changed, call the "entity_change" function.  And so forth, 
down to sensors and controls.

Further up in the file,  you see:

    rv = ipmi_sensor_get_reading(sensor, got_thresh_reading, sdata);

This requests a reading from the sensor.  When the reading is complete, 
got_thresh_reading will be called.


-corey

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to