[prev in list] [next in list] [prev in thread] [next in thread] 

List:       owfs-developers
Subject:    Re: [Owfs-developers] owhttp - ajax (json output) - javascript,
From:       Roberto Spadim <roberto () spadim ! com ! br>
Date:       2011-11-04 11:04:45
Message-ID: CABYL=TohMpY+k5Ww_ZPc6aiVFf-QNMmB6vsd8ODiSNpJ_+Zr2g () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


line 478
    if ( sscanf( structure_details,
"[\"%c\",\"%d\",\"%d\",\"%2s\",\"%d\",", &format_type, &extension,
&elements, rw, &size ) < 5 ) {

start "[" width sscanf

line 548
fprintf(out, "\"]");

end "]" with fprintf
----------------------------
[] array is used for null,error and structure directory
{} is used to group files
"" is used to send file content and file name (must check if a eeprom with
" character will work, since it must be escaped with \", and \n and \r)
i think thatīs all

after put at main we could test and check http code if itīs ok
itīs easy connect to json page
save file and put inside a html code

<html><script language='javascript'> put file here </script></html>

save the file and test at web browser

any help please contact me


2011/11/3 Paul Alfille <paul.alfille@gmail.com>

> I've been adding in your Json support. Nice code.
> A minor question:
> 
> In owhttpd_read.c StructureDetailJson the closing "]" seems to have no
> matching "["
> 
> Otherwise the change has been committed to the CVS code and will be added
> to the next release.
> 
> Paul
> 
> On Thu, Nov 3, 2011 at 12:56 AM, Roberto Spadim <roberto@spadim.com.br>wrote:
> 
> > hi paul, any doubt? problem or otherthing?
> > 
> > 
> > 2011/11/3 Roberto Spadim <roberto@spadim.com.br>
> > 
> > > well..
> > > i donīt have it here, but i will find at ftp some info...
> > > 
> > > 
> > > http://www.spadim.com.br/owfs-2.8p13-ajax/
> > > have the uncompressed version
> > > what changed...
> > > some file at owlib
> > > i donīt remember where, but is something that add json at source path,
> > > something like text path:
> > > http://someip/text/sensor/temperature but use
> > > http://someip/json/sensor/temperature
> > > 
> > > at owlib i add a json variable at a structure that have the text
> > > variable (.h file), and add info when path starts with json (.c file)
> > > 
> > > 
> > > http://www.spadim.com.br/owfs-2.8p13-ajax/owfs-2.8p13-ajax/owfs-2.8p13-ajax/module/owlib/src/c/ow_parsename.c
> > >  
> > > http://www.spadim.com.br/owfs-2.8p13-ajax/owfs-2.8p13-ajax/owfs-2.8p13-ajax/module/owlib/src/include/ow_parsedname.h
> > >  
> > > at owhttp you should copy every file from c path, cause many things(all
> > > .c, .h file) changed...
> > > 
> > > 
> > > http://www.spadim.com.br/owfs-2.8p13-ajax/owfs-2.8p13-ajax/owfs-2.8p13-ajax/module/owhttpd/src/c/
> > >  
> > > 
> > > i think its all
> > > 
> > 
> > 
> > 
> > --
> > Roberto Spadim
> > Spadim Technology / SPAEmpresarial
> > 
> > 
> > ------------------------------------------------------------------------------
> > RSA(R) Conference 2012
> > Save $700 by Nov 18
> > Register now
> > http://p.sf.net/sfu/rsa-sfdev2dev1
> > 
> > _______________________________________________
> > Owfs-developers mailing list
> > Owfs-developers@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/owfs-developers
> > 
> > 
> 
> 
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
> 
> 


-- 
Roberto Spadim
Spadim Technology / SPAEmpresarial


[Attachment #5 (text/html)]

line 478<br>    if ( sscanf( structure_details, \
&quot;[\&quot;%c\&quot;,\&quot;%d\&quot;,\&quot;%d\&quot;,\&quot;%2s\&quot;,\&quot;%d\&quot;,&quot;, \
&amp;format_type, &amp;extension, &amp;elements, rw, &amp;size ) &lt; 5 ) {<br> \
<br>start &quot;[&quot; width sscanf<br><br>line 548<br>fprintf(out, \
&quot;\&quot;]&quot;);<br><br>end &quot;]&quot; with \
fprintf<br>----------------------------<br>[] array is used for null,error and \
structure directory<br> {} is used to group files<br>&quot;&quot; is used to send \
file content and file name (must check if a eeprom with &quot; character will work, \
since it must be escaped with \&quot;, and \n and \r)<br>i think thatīs all<br> \
<br>after put at main we could test and check http code if itīs ok<br>itīs easy \
connect to json page<br>save file and put inside a html \
code<br><br>&lt;html&gt;&lt;script language=&#39;javascript&#39;&gt; put file here \
&lt;/script&gt;&lt;/html&gt;<br> <br>save the file and test at web browser<br><br>any \
help please contact me<br><br><br><div class="gmail_quote">2011/11/3 Paul Alfille \
<span dir="ltr">&lt;<a \
href="mailto:paul.alfille@gmail.com">paul.alfille@gmail.com</a>&gt;</span><br> \
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex;"><div>I&#39;ve been adding in your Json support. Nice \
code.</div><div>A minor question:</div><div><br></div>In owhttpd_read.c \
StructureDetailJson the closing &quot;]&quot; seems to have no matching \
&quot;[&quot;<div> <br></div>

<div>Otherwise the change has been committed to the CVS code and will be added to the \
next release.</div><div><br></div><div>Paul<br><div><br><div \
class="gmail_quote"><div><div class="h5">On Thu, Nov 3, 2011 at 12:56 AM, Roberto \
Spadim <span dir="ltr">&lt;<a href="mailto:roberto@spadim.com.br" \
target="_blank">roberto@spadim.com.br</a>&gt;</span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><div><div class="h5">hi paul, any doubt? problem or \
otherthing?<div><div><br><br><div class="gmail_quote"> 2011/11/3 Roberto Spadim <span \
dir="ltr">&lt;<a href="mailto:roberto@spadim.com.br" \
target="_blank">roberto@spadim.com.br</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> well..<br>i donīt have it here, but i will find at ftp some \
info...<br><br><br><a href="http://www.spadim.com.br/owfs-2.8p13-ajax/" \
target="_blank">http://www.spadim.com.br/owfs-2.8p13-ajax/</a><br>have the \
uncompressed version<br>



what changed...<br>
some file at owlib <br>i donīt remember where, but is something that add json at \
source path, something like text path: <br><a \
href="http://someip/text/sensor/temperature" \
target="_blank">http://someip/text/sensor/temperature</a> but use <br>




<a href="http://someip/json/sensor/temperature" \
target="_blank">http://someip/json/sensor/temperature</a><br><br>at owlib i add a \
json variable at a structure that have the text variable (.h file), and add info when \
path starts with json (.c file)<br>




<br><a href="http://www.spadim.com.br/owfs-2.8p13-ajax/owfs-2.8p13-ajax/owfs-2.8p13-ajax/module/owlib/src/c/ow_parsename.c" \
target="_blank">http://www.spadim.com.br/owfs-2.8p13-ajax/owfs-2.8p13-ajax/owfs-2.8p13-ajax/module/owlib/src/c/ow_parsename.c</a><br>





<a href="http://www.spadim.com.br/owfs-2.8p13-ajax/owfs-2.8p13-ajax/owfs-2.8p13-ajax/module/owlib/src/include/ow_parsedname.h" \
target="_blank">http://www.spadim.com.br/owfs-2.8p13-ajax/owfs-2.8p13-ajax/owfs-2.8p13-ajax/module/owlib/src/include/ow_parsedname.h</a><br>





<br>at owhttp you should copy every file from c path, cause many things(all .c, .h \
file) changed...<br><br><a \
href="http://www.spadim.com.br/owfs-2.8p13-ajax/owfs-2.8p13-ajax/owfs-2.8p13-ajax/module/owhttpd/src/c/" \
target="_blank">http://www.spadim.com.br/owfs-2.8p13-ajax/owfs-2.8p13-ajax/owfs-2.8p13-ajax/module/owhttpd/src/c/</a><br>





<br><br>i think its all<br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><div><div>-- \
<br>Roberto Spadim<br>Spadim Technology / SPAEmpresarial<br> \
</div></div><br></div></div>------------------------------------------------------------------------------<br>
 RSA(R) Conference 2012<br>
Save $700 by Nov 18<br>
Register now<br>
<a href="http://p.sf.net/sfu/rsa-sfdev2dev1" \
target="_blank">http://p.sf.net/sfu/rsa-sfdev2dev1</a><div \
class="im"><br>_______________________________________________<br> Owfs-developers \
mailing list<br> <a href="mailto:Owfs-developers@lists.sourceforge.net" \
target="_blank">Owfs-developers@lists.sourceforge.net</a><br> <a \
href="https://lists.sourceforge.net/lists/listinfo/owfs-developers" \
target="_blank">https://lists.sourceforge.net/lists/listinfo/owfs-developers</a><br> \
<br></div></blockquote></div><br></div></div> \
<br>------------------------------------------------------------------------------<br>
 RSA(R) Conference 2012<br>
Save $700 by Nov 18<br>
Register now<br>
<a href="http://p.sf.net/sfu/rsa-sfdev2dev1" \
target="_blank">http://p.sf.net/sfu/rsa-sfdev2dev1</a><br>_______________________________________________<br>
 Owfs-developers mailing list<br>
<a href="mailto:Owfs-developers@lists.sourceforge.net">Owfs-developers@lists.sourceforge.net</a><br>
 <a href="https://lists.sourceforge.net/lists/listinfo/owfs-developers" \
target="_blank">https://lists.sourceforge.net/lists/listinfo/owfs-developers</a><br> \
<br></blockquote></div><br><br clear="all"><br>-- <br>Roberto Spadim<br>Spadim \
Technology / SPAEmpresarial<br>



------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1

_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic