Graphing/plotting with embedded webserver? - Page 2

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Re: Graphing/plotting with embedded webserver?

Quoted text here. Click to load it

yup. patent. I shouldn't post at the end of the day.

Quoted text here. Click to load it
PNG.

Yes, only a couple dozen lines.

Quoted text here. Click to load it

Interesting. I didn't know there was an uncompressed PNG format.
Thanks,
Bob



Re: Graphing/plotting with embedded webserver?

Quoted text here. Click to load it

The GIF code I looked at needs a minimum of 12K. If you want
decent performance, you also need a hash table, which adds 19K.

Quoted text here. Click to load it

GIFSAVE by Sverre H. Huseby is public-domain:
http://www.scintilla.utwente.nl/~frank/gifsave.zip

The Unisys patent on LZW has expired.


Re: Graphing/plotting with embedded webserver?
Quoted text here. Click to load it
... snip ...
Quoted text here. Click to load it

However LZW requires more resources and is less effective than
other means, such as LZ77 and LZSS (which are the basis for ZIP et
al).  It also requires matching hash mechanisms between compressor
and decompressor.  So its only real purpose is to implement older
standards such as GIF.

The only real effect the Unisys patent has had is to inhibit any
further investigation of the LZW algorithms.  This is typical of
software patents.

--
Chuck F ( snipped-for-privacy@yahoo.com) ( snipped-for-privacy@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
We've slightly trimmed the long signature. Click to see the full one.
Re: Graphing/plotting with embedded webserver?
SNIP
Quoted text here. Click to load it
format
the
point
be

BMP also supports compression by RLE (Run Lenght Encoding).  Writing RLE
encoded line graphs is probably just as easy as writeng them uncompressed.

Wim



Re: Graphing/plotting with embedded webserver?
Quoted text here. Click to load it

Grant,

If you want a running strip tape, you'll need some client-side code.  If
you're looking for static charts that refresh, you have more options.

One that hasn't been mentioned yet - HTML re-sizing of images.
Bentham's book TCP/IP Lean (2nd Edition) has a few examples starting at
page 230.
(Amazon.com product link shortened)

In short, the HTML references tiny image files, but at specific
rendering dimensions; the browser shrinks or stretches the image to
accommodate.  By stacking the images vertically in a table cell, one can
create a line / bar / stacked bar / area chart, or X-Y graph.  Cells are
placed side by side to create the width.

This technique can use very tiny image files (like, 1 pixel), but
requires a lot of HTML on-the-fly tag creation.  No buffering needed
except the source data points.  I've used it for years in scripts for
quick health-check charts, and it's pretty slick.  Use nicer image files
(3D, gradient) for even better effect.

HTH,
Richard

Re: Graphing/plotting with embedded webserver?

Quoted text here. Click to load it

A running strip would be ideal, but the time scale is slow
enough that the latter will be quite sufficient.

Quoted text here. Click to load it

Thanks for the reference.  I should probably have a copy of
that book anyway.

Quoted text here. Click to load it

That sounds like something that might work for my application.

Quoted text here. Click to load it

That I can do.  I do have some limited server side dynamic
content generation capabilities.  I've also run across what
looks like the same thing done mosly in client-side JavaScript.

Quoted text here. Click to load it

--
Grant Edwards                   grante             Yow!  Half a mind is a
                                  at               terrible thing to waste!
We've slightly trimmed the long signature. Click to see the full one.
Re: Graphing/plotting with embedded webserver?

Quoted text here. Click to load it

I you are connected locally rather than over the internet, then use BMP
instead of GIF or PNG.  Once you have a few bits and pieces right for the
header, the rest is just a straight pixel map (assuming you don't need
palette handling - just pick a pixel depth that suits your application).
It won't help with your line drawing, but it will at least save you doing
the compression stuff.





Quoted text here. Click to load it


Re: Graphing/plotting with embedded webserver?
One approach would be to have the web server serve up a java APPLET
that has a simple strip-chart javabean on it.  Have the java applet
make a socket connection back to your embedded device to stream your
chart data, and voila, Grant Edwards wrote:
Quoted text here. Click to load it

I have done this with a java applet and activex control, it works
great.

www.netburner.com might have some example code for somethingsimilar


Quoted text here. Click to load it
something GOOD
today so
live!!


Re: Graphing/plotting with embedded webserver?

Quoted text here. Click to load it

I don't think Java is a viable option.  

Nobody I know (myself included) runs their browser with Java
enabled.  I don't even have a JVM installed on 90% of my
machines.

Quoted text here. Click to load it

I'm definitely not going to do something MS-Specific like
ActiveX.

Quoted text here. Click to load it

Thanks, I'll check it out.

--
Grant Edwards                   grante             Yow!  if it GLISTENS,
                                  at               gobble it!!
We've slightly trimmed the long signature. Click to see the full one.
Re: Graphing/plotting with embedded webserver?
I can understand your concern about java.  But unless you want to do a
lot of pixel-poking with html generation on the fly, you will need some
client side programming.  It is the only way that I know of to get a
good real-time data stream, as well.


Grant Edwards wrote:
Quoted text here. Click to load it
your
somethingsimilar.
GLISTENS,


Re: Graphing/plotting with embedded webserver?

Quoted text here. Click to load it

I'm willing to do that, if it's the most portable and
straight-forward way to do it.  I don't care if it's not
efficient.

Quoted text here. Click to load it

I know.  That's why I was asking about JavaScript. Like I said,
Java isn't going to be acceptible, but JavaScript would be.

Quoted text here. Click to load it

It's real-time, but it's not fast.  An update of once a minute
would be more than adequate.

--
Grant Edwards                   grante             Yow!  I'm having a MID-WEEK
                                  at               CRISIS!
We've slightly trimmed the long signature. Click to see the full one.
Re: Graphing/plotting with embedded webserver?

Quoted text here. Click to load it
MID-WEEK
Quoted text here. Click to load it

You can use a graphic JavaScript library from
http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm
It is under lgpl license.
You should write some code using their function to display your plot.
You can pass the values to be plotted from the web server as an array.
If you make the page to reload every minute you can change the palues
passed at each reload, so, it will be dynamic.

Adrian


Re: Graphing/plotting with embedded webserver?

Quoted text here. Click to load it

A nice little thing. But isn't it a lot overhead, since you need to
send the whole JS when updating the graphic. Or am I missing there
something (may I load a JS once, and the browser keeps it ?).

--
42Bastian
Do not email to snipped-for-privacy@yahoo.com, it's a spam-only account :-)
We've slightly trimmed the long signature. Click to see the full one.
Re: Graphing/plotting with embedded webserver?

Quoted text here. Click to load it
[...]
Quoted text here. Click to load it

Good question.  I'm going to give it a try and see if the
browser caches the .js library file.

--
Grant Edwards                   grante             Yow!  This is PLEASANT!
                                  at              
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline