sorry guys i need travel and i can't work on it, maybe when i get back
here are some examples of what we can do:
URI:



XML version

http://127.0.0.1:90/simultaneous?output=XML

<?xml version="1.0" encoding="iso-8859-1"?>
*<owhttpd>*
*<file filename="/simultaneous/temperature">*0*</file>*
*<file filename="/simultaneous/voltage">*0*</file>*
*</***owhttpd***>*

http://127.0.0.1:90/?output=XML

<?xml version="1.0" encoding="iso-8859-1"?>
*<owhttpd>
**<dir>/structure</dir>
**<dir>/bus.0</dir>
**<dir>/uncached</dir>
**<dir>/setting</dir> 
.......
**</***owhttpd***>*
        

QUERY STRING version 
http://127.0.0.1:90/simultaneous?output=QUERYSTRING
type1=file&name1=/simultaneous/temperature&value1=0&type2=file&name2=/simultaneous/voltage&value2=0

http://127.0.0.1:90/?output=QUERYSTRING
type1=dir&name1=/structure&type2=dir&name2=/bus.0&.....

JAVASCRIPT version 
http://127.0.0.1:90/simultaneous?output=JAVASCRIPT
// we could use assoc array or normal array, normal array could be easier, but 
more heavy to load
var owhttpd_result=new Array();
owhttpd_result[0]=new Array();
owhttpd_result[0][0]="file";
owhttpd_result[0][1]="/simultaneous/temperature";
owhttpd_result[0][2]="0";
 .....

http://127.0.0.1:90/?output=JAVASCRIPT
// we could use assoc array or normal array, normal array could be easier, but 
more heavy to load
var owhttpd_result=new Array();
owhttpd_result[0]=new Array();
owhttpd_result[0][0]="dir";
owhttpd_result[0][1]="/structure";
owhttpd_result[0][2]=""; // maybe don't set it...
.....

that's what i was thinking...
on C code maybe macros could help for output fprintf(out,MACRO,variables...); 
maybe javascript need more code not just fprintf like others...
bye paul



Roberto Spadim escreveu:
> the most used style for html data is:
> javascript array (very usefull with AJAX or frame code):
> var variable={ 'blablbal' : 'value'};
>
>
> GET string (very usefull with PHP, just parse_str($result, $matches);)
> variable=value&variable2=value2
>
>
> XML (use with anything...)
> <data>
> <variable>value</variable>
> </data>
>
> i think that any one of this types could help
> the other style is today implemented, human readable :)
> any improvement could be done in owhttpd part of code, just look at C 
> code and change, i will work a little on it
> bye
>
>
> Matt escreveu:
>   
>> What about just adding a top level folder for xml data?
>> http://<ip>:<port>/xml/uncached/<path>
>>
>> <data>
>> <address>1034C8020108000C</address>
>> <crc8>0C</crc8>
>> <die>C2</die>
>> <family>10</family>
>> <id>C8020108000C</id>
>> <locator>FFFFFFFFFFFFFFFF</locator>
>> <power>NO</power>
>> <present>YES</present>
>> <r_address>0C00080102C83410</r_address>
>> <r_id>00080102C834</r_id>
>> <r_locator>FFFFFFFFFFFFFFFF</r_locator>
>> <temperature>26<temperature>
>> <trimvalid>YES</trimvalid>
>> <type>DS18S20</type>
>> </data>
>>
>> Or cvs
>> http://<ip>:<port>/cvs/uncached/<path>
>> Address,crc8,die,family,id,locator,power,present,r_address,r_id,r_locator,te
>> mperature,trimvalid,type
>> 1034C8020108000C,0C,C2,10,C8020108000C,FFFFFFFFFFFFFFFF,NO,YES,0C00080102C83
>> 410,00080102C834,FFFFFFFFFFFFFFFF,26,YES,DS18S20
>>
>> Or some sort of simple template system.
>> %address%,%temperature%
>> Owhttpd -s 3000 -p 3001 -t mytemplate.cfg
>> http://<ip>:<port>/mytemplate/uncached/<path>
>> 1034C8020108000C,26
>>
>>
>> It's not really what you suggested, but it's written now so I'll post it.
>>
>> ________________________________________
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Paul
>> Alfille
>> Sent: Sunday, 26 November 2006 2:29 PM
>> To: owfs-developers@lists.sourceforge.net
>> Subject: [Owfs-developers] owshell and owhttpd
>>
>> I'd like some comments on allowing the owshell routines (owdir, owread,
>> owwrite, owpresent) to read owhttpd as well as owserver. That would make
>> "web-scraping" owhttpd easier for scripts, and allow network use across
>> firewalls that only allow web traffic. 
>>
>> My thought is to have the program figure out which protocol to use
>> transparently.
>>
>> Paul Alfille
>>
>> -------------------------------------------------------------------------
>> 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
>> _______________________________________________
>> Owfs-developers mailing list
>> Owfs-developers@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>>
>> Esta mensagem foi verificada pelo E-mail Protegido Terra.
>> Scan engine: McAfee VirusScan / Atualizado em 24/11/2006 / Versão: 
>> 4.4.00/4904
>> Proteja o seu e-mail Terra: http://mail.terra.com.br/
>>
>>
>>   
>>     
>
>
> -------------------------------------------------------------------------
> 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
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
> Esta mensagem foi verificada pelo E-mail Protegido Terra.
> Scan engine: McAfee VirusScan / Atualizado em 24/11/2006 / Versão: 4.4.00/4904
> Proteja o seu e-mail Terra: http://mail.terra.com.br/
>
>
>
>   


-------------------------------------------------------------------------
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
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to