Renier Morales wrote: > Benoit Guillon <[EMAIL PROTECTED]> wrote on 07/11/2007 > 09:22:52 AM: > > > Hello, > > > > First of all, thanks much for providing a python interface to > openhpi. I > > want to read the event states of discrete sensors, but the python seems > > to not provide the SaHpiEventStateT class. > > There is no corresponding SaHpiEventStateT class because > SaHpiEventStateT is not a structure in C, but a group of defines. What > you will find in the python environment is that all the > SaHpiEventStateT defines (e.g SAHPI_ES_LOWER_MINOR, > SAHPI_ES_LOWER_MAJOR, etc.) exist as variables and can be used. > > > Moreover, the saHpiSensorReadingGet() function takes only 4 parameters > > instead of 5. My question is: how can i read the discrete sensor > values? > > Have I missed something? > > The python version of saHpiSensorReadingGet takes 4 values but returns > 2. One is the return code and the other is the missing 5th argument. > That 5th argument in C is just a place holder (pointer) for a > SaHpiEventStateT (a number), so instead of having to provide a pointer > to receive it in python, you get a tuple of two values (SaErrorT, > SaHpiEventStateT). > This is what I try to clarify in the readme file (line 78 of the > readme) because this is done for all the other APIs that have pointers > to numbers as arguments.
Thanks the explanations, I should have read the README more carefully. Regards, -- BenoƮt Guillon [EMAIL PROTECTED] TCT/3S tel. : 33 (0)4 98 16 33 90 THALES COMPUTERS ------------------------------------------------------------------------- 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/ _______________________________________________ Openhpi-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openhpi-devel
