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=3DXML
<?xml version=3D"1.0" encoding=3D"iso-8859-1"?>
*<owhttpd>*
*<file filename=3D"/simultaneous/temperature">*0*</file>*
*<file filename=3D"/simultaneous/voltage">*0*</file>*
*</***owhttpd***>*
http://127.0.0.1:90/?output=3DXML
<?xml version=3D"1.0" encoding=3D"iso-8859-1"?>
*<owhttpd>
**<dir>/structure</dir>
**<dir>/bus.0</dir>
**<dir>/uncached</dir>
**<dir>/setting</dir>=20
.......
**</***owhttpd***>*
=09
QUERY STRING version=20
http://127.0.0.1:90/simultaneous?output=3DQUERYSTRING
type1=3Dfile&name1=3D/simultaneous/temperature&value1=3D0&type2=3Dfile&na=
me2=3D/simultaneous/voltage&value2=3D0
http://127.0.0.1:90/?output=3DQUERYSTRING
type1=3Ddir&name1=3D/structure&type2=3Ddir&name2=3D/bus.0&.....
JAVASCRIPT version=20
http://127.0.0.1:90/simultaneous?output=3DJAVASCRIPT
// we could use assoc array or normal array, normal array could be easier=
, but more heavy to load
var owhttpd_result=3Dnew Array();
owhttpd_result[0]=3Dnew Array();
owhttpd_result[0][0]=3D"file";
owhttpd_result[0][1]=3D"/simultaneous/temperature";
owhttpd_result[0][2]=3D"0";
.....
http://127.0.0.1:90/?output=3DJAVASCRIPT
// we could use assoc array or normal array, normal array could be easier=
, but more heavy to load
var owhttpd_result=3Dnew Array();
owhttpd_result[0]=3Dnew Array();
owhttpd_result[0][0]=3D"dir";
owhttpd_result[0][1]=3D"/structure";
owhttpd_result[0][2]=3D""; // 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=3D{ 'blablbal' : 'value'};
>
>
> GET string (very usefull with PHP, just parse_str($result, $matches);)
> variable=3Dvalue&variable2=3Dvalue2
>
>
> 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=20
> code and change, i will work a little on it
> bye
>
>
> Matt escreveu:
> =20
>> 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_loca=
tor,te
>> mperature,trimvalid,type
>> 1034C8020108000C,0C,C2,10,C8020108000C,FFFFFFFFFFFFFFFF,NO,YES,0C00080=
102C83
>> 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: owfs-developers-bounces@...
>> [mailto:owfs-developers-bounces@...] On Behalf Of Pa=
ul
>> Alfille
>> Sent: Sunday, 26 November 2006 2:29 PM
>> To: owfs-developers@...
>> 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 ma=
ke
>> "web-scraping" owhttpd easier for scripts, and allow network use acros=
s
>> firewalls that only allow web traffic.=20
>>
>> 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 shar=
e your
>> opinions on IT & business topics through brief surveys - and earn cash
>> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=
=3DDEVDEV
>> _______________________________________________
>> Owfs-developers mailing list
>> Owfs-developers@...
>> 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=E3o: 4=
.4.00/4904
>> Proteja o seu e-mail Terra: http://mail.terra.com.br/
>>
>>
>> =20
>> =20
>
>
> -----------------------------------------------------------------------=
--
> 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=3Djoin.php&p=3Dsourceforge&CID=3D=
DEVDEV
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@...
> 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=E3o: 4.=
4.00/4904
> Proteja o seu e-mail Terra: http://mail.terra.com.br/
>
>
>
> =20
|