Paul Alfille napisaƂ(a):

Glad you are finding success! Let me answer your questions about owserver.

Good news. owserver is very flexible.

yeap it does 90% the magic i needed :-D

still need advice on this:

{"Temp_MAX", 12, NULL, ft_temperature, ft_stable, {f:FS_read_fs} , {f:FS_write_fs} , (void*) 0, } , {"Temp_MIN", 12, NULL, ft_temperature, ft_stable, {f:FS_read_fs} , {f:FS_write_fs} , (void*) 0, } , {"Phone", 12, NULL, ft_ascii , ft_volatile, {a:FS_read_a_fs} , {a:FS_write_a_fs} , (void*) 12, } ,

and the "read ascii from filesystem" function:

static int FS_read_a_fs(char *buf, const size_t size, const off_t offset, const struct parsedname * pn) {

       FILE*   f;
       char tmp[128];
       int i;

       bzero(tmp, sizeof(tmp));
       strcpy(tmp,pn->path);
       chdir("/config");

       for (i=0; i<128; i++) if (tmp[i]=='/') tmp[i]='_';
// quick hack

       if ((f=fopen(tmp,"r"))!=NULL)
               {
                       i=fscanf(f,"%s",buf);
                       fclose(f);
                       return strlen(buf);
               }
               else return 0;
}



What im doing wrong above?



--
Krzysztof Drewicz




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to