owhttpd is fairly simple minded.

Each property  (like temperature, voltage, ...) has a type (interger,
boolian, raw binary, date, float, etc) and owfs just gets the value and
displays it based on type.

The code is in module/owhttpd/src/c/owhttpd_read.c

In fact, for read-write binary data, the display code is:
 switch (pn->selected_filetype->format) {
case ft_binary:
 {
int i = 0;
fprintf(out, "<CODE><FORM METHOD='GET'><TEXTAREA NAME='%s' COLS='64'
ROWS='%-d'>", file, read_return >> 5);
 while (i < read_return) {
fprintf(out, "%.2hhX", OWQ_buffer(owq)[i]);
 if (((++i) < read_return) && (i & 0x1F) == 0) {
fprintf(out, "\r\n");
 }
}
fprintf(out, "</TEXTAREA><INPUT TYPE='SUBMIT'
VALUE='CHANGE'></FORM></CODE>");
 Upload( out, pn ) ;
break;
}

My point earlier is that owhttpd is agnostic to the particular slave. All
it needs to know is their properties, types and values. Changing the
formatting for a particular slave and field is awkward in owhttpd.

It would be easier to add fields in owlib for your slave. Very much easier.

Paul Alfille

On Tue, Feb 11, 2014 at 11:02 PM, Colin Reese <[email protected]> wrote:

> Sorry, I didn't mean how does it generate content. I meant how does it
> format memory pages for viewing in owhttpd, i.e. big blocks of text,
> tabular, etc.
>
> Colin
>
>
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to