C++ ?

Is all the reading in one big loop? Then how fast is your loop actually
cycling? The filesystem does an actual call to libow and so may block while
the temperature conversion is progressing if the cached value is old.

Paul Alfille.

On Tue, Mar 9, 2010 at 12:58 PM, Jaap Struyk <[email protected]> wrote:

> Hello,
>
> We are pretty close to a usable sdl frontend for owfs but I keep running
> into some timing problems.
> We read the sensors from the owfs mountpoint (not owcapi because this
> way it is also possible to read from proc or sys) but due to the amount
> of sensors the total reading time is a problem.
> The sensors are read every second with timeout_volatile=1 (the rpm
> counter twice a second uncached but that one is on a different adapter)
> but total reading time is about 1.3sec.
> Main problem is that the software now is showing updates every 1.3sec.
> even for rpm instead of 1sec. so somehow I am not reading it correctly
> (file lock?)
> We use the following code to read the sensors:
>
> int getFile_int(char* filename) {
>        std::ifstream infile( filename );
>        int i;
>        if( !infile )   {
>                char temp_str[80];
>                sprintf(temp_str, "Could not load file: %s", filename);
>                log(temp_str);
>                return 0;
>        }
>        while( infile >> i ){}
>        infile.close();
>        return i;
> }
>
> Project is available at:
> svn co https://dlogger.svn.sourceforge.net/svnroot/dlogger dlogger
>
> Greetings Japie
>
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to