From a61a9459ea47b795011640d34bb825199e686578 Mon Sep 17 00:00:00 2001 From: salvopitru Date: Mon, 25 Oct 2010 13:34:28 +0000 Subject: [PATCH] Added examples for MB851 platform. --- examples/mb851/acc-sensor/Makefile | 6 + examples/mb851/acc-sensor/Makefile.target | 1 + examples/mb851/acc-sensor/acc-example.c | 81 +++ examples/mb851/button/Makefile | 6 + examples/mb851/button/Makefile.target | 1 + examples/mb851/button/test-button.c | 67 +++ examples/mb851/mb851-shell/Makefile | 12 + examples/mb851/mb851-shell/Makefile.target | 1 + examples/mb851/mb851-shell/mb851-shell.c | 65 +++ examples/mb851/telnet-server/Makefile | 14 + examples/mb851/telnet-server/Makefile.target | 1 + examples/mb851/telnet-server/telnet-server.c | 67 +++ examples/mb851/temperature/Makefile | 6 + examples/mb851/temperature/Makefile.target | 1 + examples/mb851/temperature/temp-sensor.c | 74 +++ examples/mb851/webserver-ajax/Makefile | 17 + examples/mb851/webserver-ajax/Makefile.target | 1 + examples/mb851/webserver-ajax/README | 9 + examples/mb851/webserver-ajax/ajax-cgi.c | 288 ++++++++++ examples/mb851/webserver-ajax/httpd-fs.c | 128 +++++ .../mb851/webserver-ajax/httpd-fs/404.html | 8 + .../mb851/webserver-ajax/httpd-fs/footer.html | 3 + .../mb851/webserver-ajax/httpd-fs/header.html | 12 + .../mb851/webserver-ajax/httpd-fs/index.html | 15 + .../webserver-ajax/httpd-fs/neighbors.shtml | 49 ++ .../webserver-ajax/httpd-fs/sensordata.shtml | 1 + .../webserver-ajax/httpd-fs/sensors.shtml | 121 ++++ .../mb851/webserver-ajax/httpd-fs/spin.gif | Bin 0 -> 496 bytes examples/mb851/webserver-ajax/httpd-fsdata.c | 539 ++++++++++++++++++ .../mb851/webserver-ajax/mb851-webserver.c | 50 ++ .../webserver-ajax/webserver-ajax-conf.h | 24 + 31 files changed, 1668 insertions(+) create mode 100644 examples/mb851/acc-sensor/Makefile create mode 100644 examples/mb851/acc-sensor/Makefile.target create mode 100644 examples/mb851/acc-sensor/acc-example.c create mode 100644 examples/mb851/button/Makefile create mode 100644 examples/mb851/button/Makefile.target create mode 100644 examples/mb851/button/test-button.c create mode 100644 examples/mb851/mb851-shell/Makefile create mode 100644 examples/mb851/mb851-shell/Makefile.target create mode 100644 examples/mb851/mb851-shell/mb851-shell.c create mode 100644 examples/mb851/telnet-server/Makefile create mode 100644 examples/mb851/telnet-server/Makefile.target create mode 100644 examples/mb851/telnet-server/telnet-server.c create mode 100644 examples/mb851/temperature/Makefile create mode 100644 examples/mb851/temperature/Makefile.target create mode 100644 examples/mb851/temperature/temp-sensor.c create mode 100644 examples/mb851/webserver-ajax/Makefile create mode 100644 examples/mb851/webserver-ajax/Makefile.target create mode 100644 examples/mb851/webserver-ajax/README create mode 100644 examples/mb851/webserver-ajax/ajax-cgi.c create mode 100644 examples/mb851/webserver-ajax/httpd-fs.c create mode 100644 examples/mb851/webserver-ajax/httpd-fs/404.html create mode 100644 examples/mb851/webserver-ajax/httpd-fs/footer.html create mode 100644 examples/mb851/webserver-ajax/httpd-fs/header.html create mode 100644 examples/mb851/webserver-ajax/httpd-fs/index.html create mode 100644 examples/mb851/webserver-ajax/httpd-fs/neighbors.shtml create mode 100644 examples/mb851/webserver-ajax/httpd-fs/sensordata.shtml create mode 100644 examples/mb851/webserver-ajax/httpd-fs/sensors.shtml create mode 100644 examples/mb851/webserver-ajax/httpd-fs/spin.gif create mode 100644 examples/mb851/webserver-ajax/httpd-fsdata.c create mode 100644 examples/mb851/webserver-ajax/mb851-webserver.c create mode 100644 examples/mb851/webserver-ajax/webserver-ajax-conf.h diff --git a/examples/mb851/acc-sensor/Makefile b/examples/mb851/acc-sensor/Makefile new file mode 100644 index 000000000..1e332446c --- /dev/null +++ b/examples/mb851/acc-sensor/Makefile @@ -0,0 +1,6 @@ +CONTIKI_PROJECT = acc-example + +all: $(CONTIKI_PROJECT) + +CONTIKI = ../../.. +include $(CONTIKI)/Makefile.include diff --git a/examples/mb851/acc-sensor/Makefile.target b/examples/mb851/acc-sensor/Makefile.target new file mode 100644 index 000000000..3c56fcd9a --- /dev/null +++ b/examples/mb851/acc-sensor/Makefile.target @@ -0,0 +1 @@ +TARGET = mb851 diff --git a/examples/mb851/acc-sensor/acc-example.c b/examples/mb851/acc-sensor/acc-example.c new file mode 100644 index 000000000..663af6df6 --- /dev/null +++ b/examples/mb851/acc-sensor/acc-example.c @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2010, STMicroelectronics. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of the Contiki operating system. + * + * $Id: acc-example.c,v 1.1 2010/10/25 13:34:28 salvopitru Exp $ + */ + +/** + * \file + * Example showing use of the accelerometer. + * \author + * Salvatore Pitrulli + * + */ + +#include "contiki.h" + +#include "dev/acc-sensor.h" + +#include /* For printf() */ +/*---------------------------------------------------------------------------*/ +PROCESS(acc_process, "Accelerometer process"); +AUTOSTART_PROCESSES(&acc_process); +/*---------------------------------------------------------------------------*/ +PROCESS_THREAD(acc_process, ev, data) +{ + static struct etimer etimer; + + PROCESS_BEGIN(); + + printf("Starting measuring acceleration\r\n"); + + SENSORS_ACTIVATE(acc_sensor); + + // Enable High Range. + //acc_sensor.configure(ACC_RANGE, ACC_HIGH_RANGE); + + // Enable High Pass Filter. + //acc_sensor.configure(ACC_HPF, ACC_1HZ); + + + while(1) { + etimer_set(&etimer, CLOCK_SECOND/2); + + PROCESS_WAIT_UNTIL(etimer_expired(&etimer)); + + printf("(X,Y,Z): (%d,%d,%d) mg \r",acc_sensor.value(ACC_X_AXIS),acc_sensor.value(ACC_Y_AXIS),acc_sensor.value(ACC_Z_AXIS)); + + } + + + PROCESS_END(); +} +/*---------------------------------------------------------------------------*/ + diff --git a/examples/mb851/button/Makefile b/examples/mb851/button/Makefile new file mode 100644 index 000000000..25d0441de --- /dev/null +++ b/examples/mb851/button/Makefile @@ -0,0 +1,6 @@ +CONTIKI_PROJECT = test-button + +all: $(CONTIKI_PROJECT) + +CONTIKI = ../../.. +include $(CONTIKI)/Makefile.include diff --git a/examples/mb851/button/Makefile.target b/examples/mb851/button/Makefile.target new file mode 100644 index 000000000..3c56fcd9a --- /dev/null +++ b/examples/mb851/button/Makefile.target @@ -0,0 +1 @@ +TARGET = mb851 diff --git a/examples/mb851/button/test-button.c b/examples/mb851/button/test-button.c new file mode 100644 index 000000000..ca2245a6a --- /dev/null +++ b/examples/mb851/button/test-button.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2010, STMicroelectronics. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of the Contiki operating system. + * + * $Id: test-button.c,v 1.1 2010/10/25 13:34:29 salvopitru Exp $ + */ + +/** + * \file + * Example showing use of the button on board. + * \author + * Salvatore Pitrulli + * + */ + +#include "contiki.h" +#include "dev/button-sensor.h" +#include "dev/leds.h" +#include + +/*---------------------------------------------------------------------------*/ +PROCESS(test_button_process, "Test button"); +AUTOSTART_PROCESSES(&test_button_process); +/*---------------------------------------------------------------------------*/ +PROCESS_THREAD(test_button_process, ev, data) +{ + PROCESS_BEGIN(); + + SENSORS_ACTIVATE(button_sensor); + + printf("Press the button to toggle the leds."); + + while(1) { + PROCESS_WAIT_EVENT_UNTIL(ev == sensors_event && + data == &button_sensor); + leds_toggle(LEDS_ALL); + } + + PROCESS_END(); +} +/*---------------------------------------------------------------------------*/ diff --git a/examples/mb851/mb851-shell/Makefile b/examples/mb851/mb851-shell/Makefile new file mode 100644 index 000000000..4c25d524b --- /dev/null +++ b/examples/mb851/mb851-shell/Makefile @@ -0,0 +1,12 @@ +CONTIKI_PROJECT = mb851-shell + +PROJECTDIRS = $(CONTIKI)/platform/mb851/apps + +APPS = serial-shell + +PROJECT_SOURCEFILES = shell-sensors.c + +all: $(CONTIKI_PROJECT) + +CONTIKI = ../../.. +include $(CONTIKI)/Makefile.include diff --git a/examples/mb851/mb851-shell/Makefile.target b/examples/mb851/mb851-shell/Makefile.target new file mode 100644 index 000000000..3c56fcd9a --- /dev/null +++ b/examples/mb851/mb851-shell/Makefile.target @@ -0,0 +1 @@ +TARGET = mb851 diff --git a/examples/mb851/mb851-shell/mb851-shell.c b/examples/mb851/mb851-shell/mb851-shell.c new file mode 100644 index 000000000..e27304a6c --- /dev/null +++ b/examples/mb851/mb851-shell/mb851-shell.c @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2010, STMicroelectronics. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of the Contiki operating system. + * + * $Id: mb851-shell.c,v 1.1 2010/10/25 13:34:29 salvopitru Exp $ + */ + +/** + * \file + * MB851-specific Contiki shell + * \author + * Salvatore Pitrulli + * + */ + +#include "contiki.h" +#include "serial-shell.h" + +#include "shell-sensors.h" + +/*---------------------------------------------------------------------------*/ +PROCESS(mb851_shell_process, "MB851 Contiki shell"); +AUTOSTART_PROCESSES(&mb851_shell_process); +/*---------------------------------------------------------------------------*/ +PROCESS_THREAD(mb851_shell_process, ev, data) +{ + PROCESS_BEGIN(); + + serial_shell_init(); + shell_blink_init(); + shell_ps_init(); + shell_reboot_init(); + shell_text_init(); + shell_time_init(); + shell_sensors_init(); + + PROCESS_END(); +} +/*---------------------------------------------------------------------------*/ diff --git a/examples/mb851/telnet-server/Makefile b/examples/mb851/telnet-server/Makefile new file mode 100644 index 000000000..0ec33a0a9 --- /dev/null +++ b/examples/mb851/telnet-server/Makefile @@ -0,0 +1,14 @@ +CONTIKI_PROJECT = telnet-server + +UIP_CONF_IPV6=1 + +APPS = telnetd + +PROJECTDIRS = $(CONTIKI)/platform/mb851/apps +PROJECT_SOURCEFILES = shell-sensors.c + + +all: $(CONTIKI_PROJECT) + +CONTIKI = ../../.. +include $(CONTIKI)/Makefile.include diff --git a/examples/mb851/telnet-server/Makefile.target b/examples/mb851/telnet-server/Makefile.target new file mode 100644 index 000000000..3c56fcd9a --- /dev/null +++ b/examples/mb851/telnet-server/Makefile.target @@ -0,0 +1 @@ +TARGET = mb851 diff --git a/examples/mb851/telnet-server/telnet-server.c b/examples/mb851/telnet-server/telnet-server.c new file mode 100644 index 000000000..3f52c0901 --- /dev/null +++ b/examples/mb851/telnet-server/telnet-server.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2006, Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of the Contiki operating system. + * + * $Id: telnet-server.c,v 1.1 2010/10/25 13:34:29 salvopitru Exp $ + */ + +/** + * \file + * Example showing how to use the Telnet server + * \author + * Adam Dunkels + */ + +#include "contiki-net.h" +#include "telnetd.h" +#include "shell.h" + +#include "shell-sensors.h" + +/*---------------------------------------------------------------------------*/ +PROCESS(shell_init_process, "Shell init process"); +/*---------------------------------------------------------------------------*/ +PROCESS_THREAD(shell_init_process, ev, data) +{ + PROCESS_BEGIN(); + + + shell_blink_init(); + shell_ps_init(); + + shell_reboot_init(); + //shell_text_init(); + //shell_time_init(); + shell_sensors_init(); + + PROCESS_END(); +} +/*---------------------------------------------------------------------------*/ +AUTOSTART_PROCESSES(&telnetd_process, &shell_init_process); +/*---------------------------------------------------------------------------*/ diff --git a/examples/mb851/temperature/Makefile b/examples/mb851/temperature/Makefile new file mode 100644 index 000000000..7b1518efd --- /dev/null +++ b/examples/mb851/temperature/Makefile @@ -0,0 +1,6 @@ +CONTIKI_PROJECT = temp-sensor + +all: $(CONTIKI_PROJECT) + +CONTIKI = ../../.. +include $(CONTIKI)/Makefile.include diff --git a/examples/mb851/temperature/Makefile.target b/examples/mb851/temperature/Makefile.target new file mode 100644 index 000000000..3c56fcd9a --- /dev/null +++ b/examples/mb851/temperature/Makefile.target @@ -0,0 +1 @@ +TARGET = mb851 diff --git a/examples/mb851/temperature/temp-sensor.c b/examples/mb851/temperature/temp-sensor.c new file mode 100644 index 000000000..cb05899d8 --- /dev/null +++ b/examples/mb851/temperature/temp-sensor.c @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2010, STMicroelectronics. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of the Contiki operating system. + * + * $Id: temp-sensor.c,v 1.1 2010/10/25 13:34:29 salvopitru Exp $ + */ + +/** + * \file + * A very simple Contiki application showing how to use the temperature + * sensor. + * \author + * Salvatore Pitrulli + * + */ + +#include "contiki.h" + +#include "dev/temperature-sensor.h" + +#include /* For printf() */ +/*---------------------------------------------------------------------------*/ +PROCESS(temp_process, "Temperature process"); +AUTOSTART_PROCESSES(&temp_process); +/*---------------------------------------------------------------------------*/ +PROCESS_THREAD(temp_process, ev, data) +{ + static struct etimer etimer; + + PROCESS_BEGIN(); + + printf("Starting measuring temperature\r\n"); + + while(1) { + etimer_set(&etimer, CLOCK_SECOND); + + PROCESS_WAIT_UNTIL(etimer_expired(&etimer)); + + unsigned int temp = temperature_sensor.value(0); + printf("Temp: %d.%d °C \r",temp/10,temp-(temp/10)*10); + + } + + + PROCESS_END(); +} +/*---------------------------------------------------------------------------*/ + diff --git a/examples/mb851/webserver-ajax/Makefile b/examples/mb851/webserver-ajax/Makefile new file mode 100644 index 000000000..fb5e5ab08 --- /dev/null +++ b/examples/mb851/webserver-ajax/Makefile @@ -0,0 +1,17 @@ +CONTIKI_PROJECT = mb851-webserver +all: $(CONTIKI_PROJECT) + +DEFINES=PROJECT_CONF_H=\"webserver-ajax-conf.h\" +UIP_CONF_IPV6=1 + +#APPS = webserver + +PROJECTDIRS = . $(CONTIKI)/apps/webserver +PROJECT_SOURCEFILES = ajax-cgi.c httpd-fs.c http-strings.c \ + httpd.c webserver-dsc.c webserver-nogui.c + + + + +CONTIKI = ../../.. +include $(CONTIKI)/Makefile.include diff --git a/examples/mb851/webserver-ajax/Makefile.target b/examples/mb851/webserver-ajax/Makefile.target new file mode 100644 index 000000000..3c56fcd9a --- /dev/null +++ b/examples/mb851/webserver-ajax/Makefile.target @@ -0,0 +1 @@ +TARGET = mb851 diff --git a/examples/mb851/webserver-ajax/README b/examples/mb851/webserver-ajax/README new file mode 100644 index 000000000..4d2aa51ca --- /dev/null +++ b/examples/mb851/webserver-ajax/README @@ -0,0 +1,9 @@ +Compile with WITH_RIME 1 for neighbor discovery and with ENERGEST_CONF_ON +for energy estimation. + +Estimated consumption with batteries (2.4 V): + Curr Power +ENERGEST_TYPE_CPU: 7.5 mA 18 mW +ENERGEST_TYPE_LPM: 3 mA 7.2 mW +ENERGEST_TYPE_TRANSMIT: 21 mA 50.4 mW +ENERGEST_TYPE_LISTEN: 19 mA 45.6 mW \ No newline at end of file diff --git a/examples/mb851/webserver-ajax/ajax-cgi.c b/examples/mb851/webserver-ajax/ajax-cgi.c new file mode 100644 index 000000000..68c0f20d6 --- /dev/null +++ b/examples/mb851/webserver-ajax/ajax-cgi.c @@ -0,0 +1,288 @@ +/* + * Copyright (c) 2001, Adam Dunkels. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This file is part of the uIP TCP/IP stack. + * + * $Id: ajax-cgi.c,v 1.1 2010/10/25 13:34:29 salvopitru Exp $ + * + */ + +/* + * This file includes functions that are called by the web server + * scripts. The functions takes no argument, and the return value is + * interpreted as follows. A zero means that the function did not + * complete and should be invoked for the next packet as well. A + * non-zero value indicates that the function has completed and that + * the web server should move along to the next script line. + * + */ + +#include +#include + +#include "contiki-net.h" +#include "net/rime/collect-neighbor.h" +#include "httpd.h" +#include "httpd-cgi.h" +#include "httpd-fs.h" + +#include "lib/petsciiconv.h" + +#include "dev/temperature-sensor.h" +#include "dev/acc-sensor.h" + +static struct httpd_cgi_call *calls = NULL; + +/*---------------------------------------------------------------------------*/ +static +PT_THREAD(nullfunction(struct httpd_state *s, char *ptr)) +{ + PSOCK_BEGIN(&s->sout); + PSOCK_END(&s->sout); +} +/*---------------------------------------------------------------------------*/ +httpd_cgifunction +httpd_cgi(char *name) +{ + struct httpd_cgi_call *f; + + /* Find the matching name in the table, return the function. */ + for(f = calls; f != NULL; f = f->next) { + if(strncmp(f->name, name, strlen(f->name)) == 0) { + return f->function; + } + } + return nullfunction; +} +/*---------------------------------------------------------------------------*/ +static +PT_THREAD(nodeidcall(struct httpd_state *s, char *ptr)) +{ + static char buf[24]; + PSOCK_BEGIN(&s->sout); + snprintf(buf, sizeof(buf), "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X", + rimeaddr_node_addr.u8[0], + rimeaddr_node_addr.u8[1], + rimeaddr_node_addr.u8[2], + rimeaddr_node_addr.u8[3], + rimeaddr_node_addr.u8[4], + rimeaddr_node_addr.u8[5], + rimeaddr_node_addr.u8[6], + rimeaddr_node_addr.u8[7]); + PSOCK_SEND_STR(&s->sout, buf); + PSOCK_END(&s->sout); +} +/*---------------------------------------------------------------------------*/ +void +httpd_cgi_add(struct httpd_cgi_call *c) +{ + struct httpd_cgi_call *l; + + c->next = NULL; + if(calls == NULL) { + calls = c; + } else { + for(l = calls; l->next != NULL; l = l->next); + l->next = c; + } +} +/*---------------------------------------------------------------------------*/ +static +PT_THREAD(sensorscall(struct httpd_state *s, char *ptr)) +{ + static struct timer t; + static int i; + static char buf[100]; + static unsigned long last_cpu, last_lpm, last_listen, last_transmit; + + PSOCK_BEGIN(&s->sout); + + timer_set(&t, CLOCK_SECOND); + + SENSORS_ACTIVATE(acc_sensor); + + snprintf(buf, sizeof(buf), + "t(%d);ax(%d);ay(%d);az(%d);", + temperature_sensor.value(0), + acc_sensor.value(ACC_X_AXIS), + acc_sensor.value(ACC_Y_AXIS), + acc_sensor.value(ACC_Z_AXIS)); + + SENSORS_DEACTIVATE(acc_sensor); + + PSOCK_SEND_STR(&s->sout, buf); + + + snprintf(buf, sizeof(buf), + "p(%lu,%lu,%lu,%lu);v(%d);", + energest_type_time(ENERGEST_TYPE_CPU) - last_cpu, + energest_type_time(ENERGEST_TYPE_LPM) - last_lpm, + energest_type_time(ENERGEST_TYPE_TRANSMIT) - last_transmit, + energest_type_time(ENERGEST_TYPE_LISTEN) - last_listen, + i++); + last_cpu = energest_type_time(ENERGEST_TYPE_CPU); + last_lpm = energest_type_time(ENERGEST_TYPE_LPM); + last_transmit = energest_type_time(ENERGEST_TYPE_TRANSMIT); + last_listen = energest_type_time(ENERGEST_TYPE_LISTEN); + PSOCK_SEND_STR(&s->sout, buf); + + PSOCK_END(&s->sout); +} +/*---------------------------------------------------------------------------*/ +#if 0 +static unsigned short +make_neighbor(void *arg) +{ + struct httpd_state *s = (struct httpd_state *)arg; + struct collect_neighbor *n = collect_neighbor_get(s->u.count); + + if(n == NULL) { + return 0; + } + +#if !UIP_CONF_IPV6 + return snprintf((char *)uip_appdata, uip_mss(), + "
  • %d.%d\r\n", + n->addr.u8[0], n->addr.u8[1], + n->addr.u8[0], n->addr.u8[1]); +#else +#if 0 + uip_ipaddr_t ipaddr; + char ipaddr_str[41]; + + uip_ip6addr(&ipaddr, NET_ADDR_A, NET_ADDR_B, NET_ADDR_C, NET_ADDR_D, + (u16_t)(((u16_t)(n->addr.u8[0]^0x02))<<8 | (u16_t)n->addr.u8[1]), + ((u16_t)(n->addr.u8[2]))<<8 | (u16_t)n->addr.u8[3], + (u16_t)(n->addr.u8[4])<<8 | n->addr.u8[5], + (u16_t)(n->addr.u8[6])<<8 | n->addr.u8[7]); + httpd_sprint_ip6(ipaddr, ipaddr_str); + + return snprintf((char *)uip_appdata, uip_mss(), + "
  • %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\r\n", + ipaddr_str, + n->addr.u8[0], + n->addr.u8[1], + n->addr.u8[2], + n->addr.u8[3], + n->addr.u8[4], + n->addr.u8[5], + n->addr.u8[6], + n->addr.u8[7]); +#endif + /* Automatic generation of node address. Javascript funcion required. + * Client-side generation is simpler than server-side, as parsing http header + * would be requied. + */ + return snprintf((char *)uip_appdata, uip_mss(), + "
  • %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\r\n", + (u16_t)(((u16_t)(n->addr.u8[0]^0x02))<<8 | (u16_t)n->addr.u8[1]), + ((u16_t)(n->addr.u8[2]))<<8 | (u16_t)n->addr.u8[3], + (u16_t)(n->addr.u8[4])<<8 | n->addr.u8[5], + (u16_t)(n->addr.u8[6])<<8 | n->addr.u8[7], + n->addr.u8[0], + n->addr.u8[1], + n->addr.u8[2], + n->addr.u8[3], + n->addr.u8[4], + n->addr.u8[5], + n->addr.u8[6], + n->addr.u8[7]); + +#endif /* UIP_CONF_IPV6 */ +} +/*---------------------------------------------------------------------------*/ +static +PT_THREAD(neighborscall(struct httpd_state *s, char *ptr)) +{ + PSOCK_BEGIN(&s->sout); + + announcement_listen(1); + + /* printf("neighbor_num %d\n", neighbor_num());*/ + + for(s->u.count = 0; s->u.count < collect_neighbor_num(); s->u.count++) { + /* printf("count %d\n", s->u.count);*/ + if(collect_neighbor_get(s->u.count) != NULL) { + /* printf("!= NULL\n");*/ + PSOCK_GENERATOR_SEND(&s->sout, make_neighbor, s); + } + } + + PSOCK_END(&s->sout); +} +/*---------------------------------------------------------------------------*/ + +static void +received_announcement(struct announcement *a, const rimeaddr_t *from, + uint16_t id, uint16_t value) +{ + struct collect_neighbor *n; + + /* printf("adv_received %d.%d\n", from->u8[0], from->u8[1]);*/ + + n = collect_neighbor_find(from); + + if(n == NULL) { + collect_neighbor_add(from, value, 1); + } else { + collect_neighbor_update(n, value); + } +} +#endif + +/*static const struct neighbor_discovery_callbacks neighbor_discovery_callbacks = + { adv_received, NULL};*/ + + +HTTPD_CGI_CALL(sensors, "sensors", sensorscall); +HTTPD_CGI_CALL(nodeid, "nodeid", nodeidcall); +//HTTPD_CGI_CALL(neighbors, "neighbors", neighborscall); + +/*static struct neighbor_discovery_conn conn;*/ +//static struct announcement announcement; + +void +httpd_cgi_init(void) +{ + + httpd_cgi_add(&sensors); + httpd_cgi_add(&nodeid); +/* httpd_cgi_add(&neighbors); + + announcement_register(&announcement, 31, + received_announcement); + announcement_listen(2);*/ + + /* neighbor_discovery_open(&conn, 31, + CLOCK_SECOND * 4, + CLOCK_SECOND * 20, + CLOCK_SECOND * 60, + &neighbor_discovery_callbacks); + neighbor_discovery_start(&conn, 0);*/ +} +/*---------------------------------------------------------------------------*/ diff --git a/examples/mb851/webserver-ajax/httpd-fs.c b/examples/mb851/webserver-ajax/httpd-fs.c new file mode 100644 index 000000000..26ec392bf --- /dev/null +++ b/examples/mb851/webserver-ajax/httpd-fs.c @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2001, Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of the lwIP TCP/IP stack. + * + * Author: Adam Dunkels + * + * $Id: httpd-fs.c,v 1.1 2010/10/25 13:34:29 salvopitru Exp $ + */ + +#include "contiki-net.h" +#include "httpd.h" +#include "httpd-fs.h" +#include "httpd-fsdata.h" + +#include "httpd-fsdata.c" + +#if HTTPD_FS_STATISTICS +static u16_t count[HTTPD_FS_NUMFILES]; +#endif /* HTTPD_FS_STATISTICS */ + +/*-----------------------------------------------------------------------------------*/ +static u8_t +httpd_fs_strcmp(const char *str1, const char *str2) +{ + u8_t i; + i = 0; + +loop: + if(str2[i] == 0 || + str1[i] == '\r' || + str1[i] == '\n') { + return 0; + } + + if(str1[i] != str2[i]) { + return 1; + } + + ++i; + goto loop; +} +/*-----------------------------------------------------------------------------------*/ +int +httpd_fs_open(const char *name, struct httpd_fs_file *file) +{ +#if HTTPD_FS_STATISTICS + u16_t i = 0; +#endif /* HTTPD_FS_STATISTICS */ + struct httpd_fsdata_file_noconst *f; + + for(f = (struct httpd_fsdata_file_noconst *)HTTPD_FS_ROOT; + f != NULL; + f = (struct httpd_fsdata_file_noconst *)f->next) { + + if(httpd_fs_strcmp(name, f->name) == 0) { + file->data = f->data; + file->len = f->len - 1; +#if HTTPD_FS_STATISTICS + ++count[i]; +#endif /* HTTPD_FS_STATISTICS */ + return 1; + } +#if HTTPD_FS_STATISTICS + ++i; +#endif /* HTTPD_FS_STATISTICS */ + + } + return 0; +} +/*-----------------------------------------------------------------------------------*/ +void +httpd_fs_init(void) +{ +#if HTTPD_FS_STATISTICS + u16_t i; + for(i = 0; i < HTTPD_FS_NUMFILES; i++) { + count[i] = 0; + } +#endif /* HTTPD_FS_STATISTICS */ +} +/*-----------------------------------------------------------------------------------*/ +#if HTTPD_FS_STATISTICS +u16_t +httpd_fs_count(char *name) +{ + struct httpd_fsdata_file_noconst *f; + u16_t i; + + i = 0; + for(f = (struct httpd_fsdata_file_noconst *)HTTPD_FS_ROOT; + f != NULL; + f = (struct httpd_fsdata_file_noconst *)f->next) { + + if(httpd_fs_strcmp(name, f->name) == 0) { + return count[i]; + } + ++i; + } + return 0; +} +#endif /* HTTPD_FS_STATISTICS */ +/*-----------------------------------------------------------------------------------*/ diff --git a/examples/mb851/webserver-ajax/httpd-fs/404.html b/examples/mb851/webserver-ajax/httpd-fs/404.html new file mode 100644 index 000000000..a17711d02 --- /dev/null +++ b/examples/mb851/webserver-ajax/httpd-fs/404.html @@ -0,0 +1,8 @@ + + +
    +

    404 - file not found

    +

    Go here instead.

    +
    + + \ No newline at end of file diff --git a/examples/mb851/webserver-ajax/httpd-fs/footer.html b/examples/mb851/webserver-ajax/httpd-fs/footer.html new file mode 100644 index 000000000..81d8c883c --- /dev/null +++ b/examples/mb851/webserver-ajax/httpd-fs/footer.html @@ -0,0 +1,3 @@ + + + diff --git a/examples/mb851/webserver-ajax/httpd-fs/header.html b/examples/mb851/webserver-ajax/httpd-fs/header.html new file mode 100644 index 000000000..33ee39fa0 --- /dev/null +++ b/examples/mb851/webserver-ajax/httpd-fs/header.html @@ -0,0 +1,12 @@ + + + +Contiki + + +
    +

    Contiki 

    +Front page
    +Neighbors
    +Sensors
    +
    diff --git a/examples/mb851/webserver-ajax/httpd-fs/index.html b/examples/mb851/webserver-ajax/httpd-fs/index.html new file mode 100644 index 000000000..27e09443d --- /dev/null +++ b/examples/mb851/webserver-ajax/httpd-fs/index.html @@ -0,0 +1,15 @@ + + + +Contiki + + +
    +

    Contiki 

    +Front page
    +Neighbors
    +Sensors
    +
    +
    + + diff --git a/examples/mb851/webserver-ajax/httpd-fs/neighbors.shtml b/examples/mb851/webserver-ajax/httpd-fs/neighbors.shtml new file mode 100644 index 000000000..900d05565 --- /dev/null +++ b/examples/mb851/webserver-ajax/httpd-fs/neighbors.shtml @@ -0,0 +1,49 @@ +%!: /header.html + +

    Node +%! nodeid +

    +

    Neighbors

    +
      +%! neighbors +
    +%!: /footer.html + diff --git a/examples/mb851/webserver-ajax/httpd-fs/sensordata.shtml b/examples/mb851/webserver-ajax/httpd-fs/sensordata.shtml new file mode 100644 index 000000000..d53bfbd14 --- /dev/null +++ b/examples/mb851/webserver-ajax/httpd-fs/sensordata.shtml @@ -0,0 +1 @@ +%! sensors diff --git a/examples/mb851/webserver-ajax/httpd-fs/sensors.shtml b/examples/mb851/webserver-ajax/httpd-fs/sensors.shtml new file mode 100644 index 000000000..bc62223e2 --- /dev/null +++ b/examples/mb851/webserver-ajax/httpd-fs/sensors.shtml @@ -0,0 +1,121 @@ +%!: /header.html + +

    Node +%! nodeid +

    +Reload + + +

    Environment

    +
    +
    +
    +
    +

    Power

    +
    +
    +
    +
    +
    +

    +
    +%!: /footer.html diff --git a/examples/mb851/webserver-ajax/httpd-fs/spin.gif b/examples/mb851/webserver-ajax/httpd-fs/spin.gif new file mode 100644 index 0000000000000000000000000000000000000000..2538b9c7adb3885fe577202cbb9529668f948f69 GIT binary patch literal 496 zcmZ?wbhEHb6k_0K_{6~Q|NnmmFo=nX*|KE|gbgGW|8x7fh6Fo12DlpO889<~g#Jl6 z7o{eaq^2m8XO?6rBxWU6Zz^Vo4>(*m)> zOX0{Ki`5Gc{*b+{$+B>2YTGO=>wUpk?GOjrvG38zpT`zhWV>%uTEJeClsPY>OBI{p zA|SPoPpYdZ8oxff`+tH)pUMniIAHn|tnkT6^JRN2^cO-DPQa>A80l)r?GTxvpmo@xF=jFYgEc4~zyJUO C-HF5i literal 0 HcmV?d00001 diff --git a/examples/mb851/webserver-ajax/httpd-fsdata.c b/examples/mb851/webserver-ajax/httpd-fsdata.c new file mode 100644 index 000000000..ec94bd8a7 --- /dev/null +++ b/examples/mb851/webserver-ajax/httpd-fsdata.c @@ -0,0 +1,539 @@ +static const char data_sensordata_shtml[] = { + /* /sensordata.shtml */ + 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0, + 0x25, 0x21, 0x20, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, + 0xa, 0}; + +static const char data_sensors_shtml[] = { + /* /sensors.shtml */ + 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0, + 0x25, 0x21, 0x3A, 0x20, 0x2F, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2E, + 0x68, 0x74, 0x6D, 0x6C, 0x0A, 0x3C, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x20, 0x74, 0x79, 0x70, 0x65, 0x3D, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2F, + 0x6A, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x3E, + 0x0A, 0x76, 0x61, 0x72, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x3B, 0x0A, + 0x0A, 0x69, 0x20, 0x3D, 0x20, 0x6E, 0x65, 0x77, 0x20, 0x49, 0x6D, 0x61, + 0x67, 0x65, 0x28, 0x35, 0x30, 0x2C, 0x36, 0x30, 0x29, 0x0A, 0x69, 0x2E, + 0x73, 0x72, 0x63, 0x20, 0x3D, 0x20, 0x22, 0x73, 0x70, 0x69, 0x6E, 0x2E, + 0x67, 0x69, 0x66, 0x22, 0x0A, 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, + 0x6F, 0x6E, 0x20, 0x6C, 0x6F, 0x61, 0x64, 0x28, 0x29, 0x20, 0x7B, 0x0A, + 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x6D, 0x67, 0x20, 0x3D, 0x20, + 0x64, 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74, + 0x45, 0x6C, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, + 0x22, 0x73, 0x70, 0x69, 0x6E, 0x22, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x69, + 0x6D, 0x67, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D, 0x4C, + 0x20, 0x3D, 0x20, 0x27, 0x26, 0x6E, 0x62, 0x73, 0x70, 0x3B, 0x27, 0x3B, + 0x0A, 0x20, 0x20, 0x6C, 0x6F, 0x61, 0x64, 0x53, 0x65, 0x6E, 0x73, 0x6F, + 0x72, 0x64, 0x61, 0x74, 0x61, 0x28, 0x29, 0x3B, 0x0A, 0x7D, 0x0A, 0x0A, + 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x6C, 0x6F, 0x61, + 0x64, 0x53, 0x65, 0x6E, 0x73, 0x6F, 0x72, 0x64, 0x61, 0x74, 0x61, 0x28, + 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x72, 0x3B, + 0x0A, 0x20, 0x20, 0x74, 0x72, 0x79, 0x20, 0x7B, 0x20, 0x72, 0x20, 0x3D, + 0x20, 0x6E, 0x65, 0x77, 0x20, 0x58, 0x4D, 0x4C, 0x48, 0x74, 0x74, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x29, 0x3B, 0x20, 0x7D, + 0x0A, 0x20, 0x20, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x65, 0x29, 0x20, + 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x74, 0x72, 0x79, 0x20, 0x7B, 0x20, + 0x72, 0x20, 0x3D, 0x20, 0x6E, 0x65, 0x77, 0x20, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x58, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x28, 0x22, 0x4D, + 0x73, 0x78, 0x6D, 0x6C, 0x32, 0x2E, 0x58, 0x4D, 0x4C, 0x48, 0x54, 0x54, + 0x50, 0x22, 0x29, 0x3B, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x63, + 0x61, 0x74, 0x63, 0x68, 0x28, 0x65, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x74, 0x72, 0x79, 0x20, 0x7B, 0x20, 0x72, 0x20, + 0x3D, 0x20, 0x6E, 0x65, 0x77, 0x20, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x58, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x28, 0x22, 0x4D, 0x69, 0x63, + 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x2E, 0x58, 0x4D, 0x4C, 0x48, 0x54, + 0x54, 0x50, 0x22, 0x29, 0x3B, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x63, 0x61, 0x74, 0x63, 0x68, 0x28, 0x65, 0x29, 0x20, 0x7B, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x6C, 0x65, + 0x72, 0x74, 0x28, 0x22, 0x59, 0x6F, 0x75, 0x72, 0x20, 0x62, 0x72, 0x6F, + 0x77, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6F, 0x65, 0x73, 0x20, 0x6E, 0x6F, + 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6F, 0x72, 0x74, 0x20, 0x41, 0x4A, + 0x41, 0x58, 0x21, 0x22, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6E, 0x20, 0x66, 0x61, + 0x6C, 0x73, 0x65, 0x3B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x7D, 0x0A, 0x20, + 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x3D, 0x20, 0x6E, 0x65, 0x77, + 0x20, 0x44, 0x61, 0x74, 0x65, 0x28, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x72, + 0x2E, 0x6F, 0x70, 0x65, 0x6E, 0x28, 0x22, 0x47, 0x45, 0x54, 0x22, 0x2C, + 0x20, 0x22, 0x2F, 0x73, 0x65, 0x6E, 0x73, 0x6F, 0x72, 0x64, 0x61, 0x74, + 0x61, 0x2E, 0x73, 0x68, 0x74, 0x6D, 0x6C, 0x22, 0x2C, 0x20, 0x74, 0x72, + 0x75, 0x65, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x72, 0x2E, 0x73, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x28, 0x22, 0x49, 0x66, 0x2D, 0x4D, 0x6F, 0x64, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x2D, 0x53, 0x69, 0x6E, 0x63, 0x65, 0x22, 0x2C, 0x22, 0x53, + 0x61, 0x74, 0x2C, 0x20, 0x31, 0x20, 0x4A, 0x61, 0x6E, 0x20, 0x32, 0x30, + 0x30, 0x30, 0x20, 0x30, 0x30, 0x3A, 0x30, 0x30, 0x3A, 0x30, 0x30, 0x20, + 0x47, 0x4D, 0x54, 0x22, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x72, 0x2E, 0x6F, + 0x6E, 0x72, 0x65, 0x61, 0x64, 0x79, 0x73, 0x74, 0x61, 0x74, 0x65, 0x63, + 0x68, 0x61, 0x6E, 0x67, 0x65, 0x20, 0x3D, 0x20, 0x66, 0x75, 0x6E, 0x63, + 0x74, 0x69, 0x6F, 0x6E, 0x28, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x69, 0x66, 0x28, 0x72, 0x2E, 0x72, 0x65, 0x61, 0x64, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x3D, 0x3D, 0x31, 0x29, 0x20, 0x7B, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x76, 0x61, 0x72, 0x20, 0x69, 0x6D, 0x67, + 0x20, 0x3D, 0x20, 0x64, 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, + 0x67, 0x65, 0x74, 0x45, 0x6C, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79, + 0x49, 0x64, 0x28, 0x22, 0x73, 0x70, 0x69, 0x6E, 0x22, 0x29, 0x3B, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x6D, 0x67, 0x2E, 0x69, 0x6E, + 0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D, 0x4C, 0x20, 0x3D, 0x20, 0x27, 0x3C, + 0x69, 0x6D, 0x67, 0x20, 0x73, 0x72, 0x63, 0x3D, 0x22, 0x73, 0x70, 0x69, + 0x6E, 0x2E, 0x67, 0x69, 0x66, 0x22, 0x3E, 0x27, 0x3B, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x28, 0x72, + 0x2E, 0x72, 0x65, 0x61, 0x64, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x3D, + 0x3D, 0x34, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x76, 0x61, 0x72, 0x20, 0x69, 0x6D, 0x67, 0x20, 0x3D, 0x20, 0x64, 0x6F, + 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C, + 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x22, 0x73, + 0x70, 0x69, 0x6E, 0x22, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x69, 0x6D, 0x67, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, + 0x4D, 0x4C, 0x20, 0x3D, 0x20, 0x27, 0x74, 0x6F, 0x6F, 0x6B, 0x20, 0x27, + 0x20, 0x20, 0x2B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x28, 0x28, 0x6E, 0x65, 0x77, 0x20, 0x44, 0x61, 0x74, 0x65, + 0x28, 0x29, 0x29, 0x2E, 0x67, 0x65, 0x74, 0x54, 0x69, 0x6D, 0x65, 0x28, + 0x29, 0x2D, 0x73, 0x74, 0x61, 0x72, 0x74, 0x2E, 0x67, 0x65, 0x74, 0x54, + 0x69, 0x6D, 0x65, 0x28, 0x29, 0x29, 0x2F, 0x31, 0x30, 0x30, 0x30, 0x2B, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x27, + 0x20, 0x73, 0x65, 0x63, 0x6F, 0x6E, 0x64, 0x73, 0x27, 0x3B, 0x0A, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x76, 0x61, 0x6C, 0x28, 0x72, 0x2E, + 0x72, 0x65, 0x73, 0x70, 0x6F, 0x6E, 0x73, 0x65, 0x54, 0x65, 0x78, 0x74, + 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x7D, + 0x0A, 0x20, 0x20, 0x72, 0x2E, 0x73, 0x65, 0x6E, 0x64, 0x28, 0x6E, 0x75, + 0x6C, 0x6C, 0x29, 0x3B, 0x0A, 0x7D, 0x0A, 0x0A, 0x66, 0x75, 0x6E, 0x63, + 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x65, 0x28, 0x65, 0x6C, 0x29, 0x20, 0x7B, + 0x0A, 0x20, 0x20, 0x64, 0x20, 0x3D, 0x20, 0x64, 0x6F, 0x63, 0x75, 0x6D, + 0x65, 0x6E, 0x74, 0x3B, 0x0A, 0x20, 0x20, 0x69, 0x66, 0x28, 0x64, 0x2E, + 0x67, 0x65, 0x74, 0x45, 0x6C, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79, + 0x49, 0x64, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, + 0x74, 0x75, 0x72, 0x6E, 0x20, 0x64, 0x2E, 0x67, 0x65, 0x74, 0x45, 0x6C, + 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x65, 0x6C, + 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x7D, 0x20, 0x65, 0x6C, 0x73, 0x65, 0x20, + 0x69, 0x66, 0x20, 0x28, 0x64, 0x2E, 0x61, 0x6C, 0x6C, 0x29, 0x20, 0x7B, + 0x0A, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6E, 0x20, + 0x64, 0x2E, 0x61, 0x6C, 0x6C, 0x5B, 0x65, 0x6C, 0x5D, 0x3B, 0x0A, 0x20, + 0x20, 0x7D, 0x0A, 0x7D, 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, + 0x6E, 0x20, 0x73, 0x28, 0x65, 0x6C, 0x2C, 0x6E, 0x2C, 0x6D, 0x61, 0x78, + 0x2C, 0x74, 0x65, 0x78, 0x74, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x65, + 0x28, 0x65, 0x6C, 0x29, 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, + 0x4D, 0x4C, 0x20, 0x3D, 0x20, 0x27, 0x3C, 0x74, 0x61, 0x62, 0x6C, 0x65, + 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3D, 0x35, 0x30, 0x34, 0x20, 0x62, + 0x6F, 0x72, 0x64, 0x65, 0x72, 0x3D, 0x30, 0x20, 0x63, 0x65, 0x6C, 0x6C, + 0x70, 0x61, 0x64, 0x64, 0x69, 0x6E, 0x67, 0x3D, 0x31, 0x20, 0x63, 0x65, + 0x6C, 0x6C, 0x73, 0x70, 0x61, 0x63, 0x69, 0x6E, 0x67, 0x3D, 0x30, 0x3E, + 0x27, 0x2B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x27, + 0x3C, 0x74, 0x72, 0x3E, 0x3C, 0x74, 0x64, 0x20, 0x77, 0x69, 0x64, 0x74, + 0x68, 0x3D, 0x32, 0x30, 0x30, 0x3E, 0x27, 0x20, 0x2B, 0x0A, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x65, 0x78, 0x74, 0x20, 0x2B, + 0x20, 0x27, 0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x27, 0x20, 0x2B, 0x0A, 0x09, + 0x09, 0x20, 0x20, 0x20, 0x20, 0x27, 0x3C, 0x74, 0x64, 0x20, 0x77, 0x69, + 0x64, 0x74, 0x68, 0x3D, 0x27, 0x20, 0x2B, 0x20, 0x28, 0x33, 0x30, 0x30, + 0x2A, 0x6E, 0x2F, 0x6D, 0x61, 0x78, 0x29, 0x20, 0x2B, 0x20, 0x27, 0x20, + 0x62, 0x67, 0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x3D, 0x22, 0x67, 0x72, 0x61, + 0x79, 0x22, 0x3E, 0x26, 0x6E, 0x62, 0x73, 0x70, 0x3B, 0x3C, 0x2F, 0x74, + 0x64, 0x3E, 0x27, 0x20, 0x2B, 0x0A, 0x09, 0x09, 0x20, 0x20, 0x20, 0x20, + 0x27, 0x3C, 0x74, 0x64, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3D, 0x27, + 0x20, 0x2B, 0x20, 0x28, 0x33, 0x30, 0x30, 0x2D, 0x33, 0x30, 0x30, 0x2A, + 0x6E, 0x2F, 0x6D, 0x61, 0x78, 0x29, 0x20, 0x2B, 0x20, 0x27, 0x20, 0x62, + 0x67, 0x63, 0x6F, 0x6C, 0x6F, 0x72, 0x3D, 0x22, 0x6C, 0x69, 0x67, 0x68, + 0x74, 0x67, 0x72, 0x61, 0x79, 0x22, 0x3E, 0x26, 0x6E, 0x62, 0x73, 0x70, + 0x3B, 0x3C, 0x2F, 0x74, 0x64, 0x3E, 0x27, 0x20, 0x2B, 0x0A, 0x09, 0x09, + 0x20, 0x20, 0x20, 0x20, 0x27, 0x3C, 0x2F, 0x74, 0x61, 0x62, 0x6C, 0x65, + 0x3E, 0x27, 0x3B, 0x0A, 0x7D, 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, + 0x6F, 0x6E, 0x20, 0x64, 0x63, 0x28, 0x6E, 0x2C, 0x64, 0x29, 0x20, 0x7B, + 0x0A, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6E, 0x20, 0x6E, 0x2E, + 0x74, 0x6F, 0x46, 0x69, 0x78, 0x65, 0x64, 0x28, 0x64, 0x29, 0x3B, 0x0A, + 0x7D, 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x74, + 0x28, 0x6D, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x6E, 0x20, 0x3D, 0x20, + 0x64, 0x63, 0x28, 0x6D, 0x2F, 0x31, 0x30, 0x2C, 0x20, 0x31, 0x29, 0x3B, + 0x0A, 0x20, 0x20, 0x73, 0x28, 0x27, 0x74, 0x65, 0x6D, 0x70, 0x27, 0x2C, + 0x6E, 0x2C, 0x34, 0x30, 0x2C, 0x27, 0x54, 0x65, 0x6D, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x27, 0x2B, 0x6E, 0x2B, 0x27, 0x20, + 0x26, 0x64, 0x65, 0x67, 0x3B, 0x43, 0x27, 0x29, 0x3B, 0x0A, 0x7D, 0x0A, + 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x61, 0x78, 0x28, + 0x6D, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x6E, 0x20, 0x3D, 0x20, 0x6D, + 0x3B, 0x0A, 0x20, 0x20, 0x73, 0x28, 0x27, 0x61, 0x63, 0x63, 0x78, 0x27, + 0x2C, 0x6E, 0x2B, 0x32, 0x30, 0x30, 0x30, 0x2C, 0x34, 0x30, 0x30, 0x30, + 0x2C, 0x27, 0x41, 0x63, 0x63, 0x65, 0x6C, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6F, 0x6E, 0x20, 0x28, 0x58, 0x2D, 0x61, 0x78, 0x69, 0x73, 0x29, 0x20, + 0x27, 0x2B, 0x6E, 0x2B, 0x27, 0x6D, 0x67, 0x27, 0x29, 0x3B, 0x0A, 0x7D, + 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x61, 0x79, + 0x28, 0x6D, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x6E, 0x20, 0x3D, 0x20, + 0x6D, 0x3B, 0x0A, 0x20, 0x20, 0x73, 0x28, 0x27, 0x61, 0x63, 0x63, 0x79, + 0x27, 0x2C, 0x6E, 0x2B, 0x32, 0x30, 0x30, 0x30, 0x2C, 0x34, 0x30, 0x30, + 0x30, 0x2C, 0x27, 0x41, 0x63, 0x63, 0x65, 0x6C, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6F, 0x6E, 0x20, 0x28, 0x59, 0x2D, 0x61, 0x78, 0x69, 0x73, 0x29, + 0x20, 0x27, 0x2B, 0x6E, 0x2B, 0x27, 0x6D, 0x67, 0x27, 0x29, 0x3B, 0x0A, + 0x7D, 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x61, + 0x7A, 0x28, 0x6D, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x6E, 0x20, 0x3D, + 0x20, 0x6D, 0x3B, 0x0A, 0x20, 0x20, 0x73, 0x28, 0x27, 0x61, 0x63, 0x63, + 0x7A, 0x27, 0x2C, 0x6E, 0x2B, 0x32, 0x30, 0x30, 0x30, 0x2C, 0x34, 0x30, + 0x30, 0x30, 0x2C, 0x27, 0x41, 0x63, 0x63, 0x65, 0x6C, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x28, 0x5A, 0x2D, 0x61, 0x78, 0x69, 0x73, + 0x29, 0x20, 0x27, 0x2B, 0x6E, 0x2B, 0x27, 0x6D, 0x67, 0x27, 0x29, 0x3B, + 0x0A, 0x7D, 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, + 0x72, 0x73, 0x28, 0x6D, 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x6E, 0x20, + 0x3D, 0x20, 0x6D, 0x20, 0x2B, 0x20, 0x34, 0x35, 0x3B, 0x0A, 0x20, 0x20, + 0x73, 0x28, 0x27, 0x72, 0x73, 0x27, 0x2C, 0x6E, 0x2C, 0x31, 0x30, 0x30, + 0x2C, 0x27, 0x52, 0x53, 0x53, 0x49, 0x20, 0x27, 0x2B, 0x6E, 0x29, 0x3B, + 0x0A, 0x7D, 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, + 0x70, 0x28, 0x63, 0x2C, 0x6C, 0x2C, 0x74, 0x2C, 0x72, 0x29, 0x20, 0x7B, + 0x0A, 0x20, 0x20, 0x74, 0x6D, 0x3D, 0x63, 0x2B, 0x6C, 0x3B, 0x0A, 0x20, + 0x20, 0x63, 0x70, 0x3D, 0x63, 0x2A, 0x31, 0x38, 0x2F, 0x74, 0x6D, 0x3B, + 0x0A, 0x20, 0x20, 0x6C, 0x70, 0x3D, 0x6C, 0x2A, 0x37, 0x2E, 0x32, 0x2F, + 0x74, 0x6D, 0x3B, 0x0A, 0x20, 0x20, 0x6C, 0x74, 0x3D, 0x74, 0x2A, 0x35, + 0x30, 0x2E, 0x34, 0x2F, 0x74, 0x6D, 0x3B, 0x0A, 0x20, 0x20, 0x6C, 0x72, + 0x3D, 0x72, 0x2A, 0x34, 0x35, 0x2E, 0x36, 0x2F, 0x74, 0x6D, 0x3B, 0x0A, + 0x20, 0x20, 0x6E, 0x3D, 0x63, 0x70, 0x2B, 0x6C, 0x70, 0x2B, 0x6C, 0x74, + 0x2B, 0x6C, 0x72, 0x3B, 0x0A, 0x20, 0x20, 0x73, 0x28, 0x27, 0x70, 0x27, + 0x2C, 0x6E, 0x2C, 0x31, 0x30, 0x30, 0x2C, 0x27, 0x50, 0x6F, 0x77, 0x65, + 0x72, 0x20, 0x63, 0x6F, 0x6E, 0x73, 0x75, 0x6D, 0x70, 0x74, 0x69, 0x6F, + 0x6E, 0x20, 0x27, 0x2B, 0x64, 0x63, 0x28, 0x6E, 0x2C, 0x32, 0x29, 0x2B, + 0x27, 0x20, 0x6D, 0x57, 0x27, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x73, 0x28, + 0x27, 0x70, 0x63, 0x27, 0x2C, 0x63, 0x70, 0x2C, 0x31, 0x30, 0x30, 0x2C, + 0x27, 0x43, 0x50, 0x55, 0x20, 0x70, 0x6F, 0x77, 0x65, 0x72, 0x20, 0x27, + 0x2B, 0x64, 0x63, 0x28, 0x63, 0x70, 0x2C, 0x32, 0x29, 0x2B, 0x27, 0x20, + 0x6D, 0x57, 0x27, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x73, 0x28, 0x27, 0x70, + 0x6C, 0x27, 0x2C, 0x6C, 0x70, 0x2C, 0x31, 0x30, 0x30, 0x2C, 0x27, 0x4C, + 0x50, 0x4D, 0x20, 0x70, 0x6F, 0x77, 0x65, 0x72, 0x20, 0x27, 0x2B, 0x64, + 0x63, 0x28, 0x6C, 0x70, 0x2C, 0x32, 0x29, 0x2B, 0x27, 0x20, 0x6D, 0x57, + 0x27, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x73, 0x28, 0x27, 0x70, 0x72, 0x27, + 0x2C, 0x6C, 0x72, 0x2C, 0x31, 0x30, 0x30, 0x2C, 0x27, 0x52, 0x61, 0x64, + 0x69, 0x6F, 0x20, 0x52, 0x58, 0x20, 0x70, 0x6F, 0x77, 0x65, 0x72, 0x20, + 0x27, 0x2B, 0x64, 0x63, 0x28, 0x6C, 0x72, 0x2C, 0x32, 0x29, 0x2B, 0x27, + 0x20, 0x6D, 0x57, 0x27, 0x29, 0x3B, 0x0A, 0x20, 0x20, 0x73, 0x28, 0x27, + 0x70, 0x74, 0x27, 0x2C, 0x6C, 0x74, 0x2C, 0x31, 0x30, 0x30, 0x2C, 0x27, + 0x52, 0x61, 0x64, 0x69, 0x6F, 0x20, 0x54, 0x58, 0x20, 0x70, 0x6F, 0x77, + 0x65, 0x72, 0x20, 0x27, 0x2B, 0x64, 0x63, 0x28, 0x6C, 0x74, 0x2C, 0x32, + 0x29, 0x2B, 0x27, 0x20, 0x6D, 0x57, 0x27, 0x29, 0x3B, 0x0A, 0x7D, 0x0A, + 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x76, 0x28, 0x6E, + 0x29, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x65, 0x28, 0x27, 0x76, 0x27, 0x29, + 0x2E, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x48, 0x54, 0x4D, 0x4C, 0x20, 0x3D, + 0x20, 0x6E, 0x3B, 0x0A, 0x7D, 0x0A, 0x3C, 0x2F, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x3E, 0x0A, 0x3C, 0x68, 0x31, 0x3E, 0x4E, 0x6F, 0x64, 0x65, + 0x0A, 0x25, 0x21, 0x20, 0x6E, 0x6F, 0x64, 0x65, 0x69, 0x64, 0x0A, 0x3C, + 0x2F, 0x68, 0x31, 0x3E, 0x0A, 0x3C, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, + 0x3D, 0x22, 0x6A, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x3A, 0x6C, 0x6F, 0x61, 0x64, 0x53, 0x65, 0x6E, 0x73, 0x6F, 0x72, 0x64, + 0x61, 0x74, 0x61, 0x28, 0x29, 0x3B, 0x22, 0x3E, 0x52, 0x65, 0x6C, 0x6F, + 0x61, 0x64, 0x3C, 0x2F, 0x61, 0x3E, 0x0A, 0x0A, 0x3C, 0x73, 0x70, 0x61, + 0x6E, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x73, 0x70, 0x69, 0x6E, 0x22, 0x3E, + 0x20, 0x3C, 0x2F, 0x73, 0x70, 0x61, 0x6E, 0x3E, 0x0A, 0x3C, 0x68, 0x32, + 0x3E, 0x45, 0x6E, 0x76, 0x69, 0x72, 0x6F, 0x6E, 0x6D, 0x65, 0x6E, 0x74, + 0x3C, 0x2F, 0x68, 0x32, 0x3E, 0x0A, 0x3C, 0x64, 0x69, 0x76, 0x20, 0x69, + 0x64, 0x3D, 0x22, 0x74, 0x65, 0x6D, 0x70, 0x22, 0x3E, 0x3C, 0x2F, 0x64, + 0x69, 0x76, 0x3E, 0x0A, 0x3C, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3D, + 0x22, 0x61, 0x63, 0x63, 0x78, 0x22, 0x3E, 0x3C, 0x2F, 0x64, 0x69, 0x76, + 0x3E, 0x0A, 0x3C, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x61, + 0x63, 0x63, 0x79, 0x22, 0x3E, 0x3C, 0x2F, 0x64, 0x69, 0x76, 0x3E, 0x0A, + 0x3C, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x61, 0x63, 0x63, + 0x7A, 0x22, 0x3E, 0x3C, 0x2F, 0x64, 0x69, 0x76, 0x3E, 0x0A, 0x3C, 0x68, + 0x32, 0x3E, 0x50, 0x6F, 0x77, 0x65, 0x72, 0x3C, 0x2F, 0x68, 0x32, 0x3E, + 0x0A, 0x3C, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x70, 0x22, + 0x3E, 0x3C, 0x2F, 0x64, 0x69, 0x76, 0x3E, 0x0A, 0x3C, 0x64, 0x69, 0x76, + 0x20, 0x69, 0x64, 0x3D, 0x22, 0x70, 0x63, 0x22, 0x3E, 0x3C, 0x2F, 0x64, + 0x69, 0x76, 0x3E, 0x0A, 0x3C, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3D, + 0x22, 0x70, 0x6C, 0x22, 0x3E, 0x3C, 0x2F, 0x64, 0x69, 0x76, 0x3E, 0x0A, + 0x3C, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x70, 0x72, 0x22, + 0x3E, 0x3C, 0x2F, 0x64, 0x69, 0x76, 0x3E, 0x0A, 0x3C, 0x64, 0x69, 0x76, + 0x20, 0x69, 0x64, 0x3D, 0x22, 0x70, 0x74, 0x22, 0x3E, 0x3C, 0x2F, 0x64, + 0x69, 0x76, 0x3E, 0x0A, 0x3C, 0x62, 0x72, 0x3E, 0x3C, 0x2F, 0x62, 0x72, + 0x3E, 0x0A, 0x3C, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3D, 0x22, 0x76, + 0x22, 0x3E, 0x3C, 0x2F, 0x64, 0x69, 0x76, 0x3E, 0x0A, 0x25, 0x21, 0x3A, + 0x20, 0x2F, 0x66, 0x6F, 0x6F, 0x74, 0x65, 0x72, 0x2E, 0x68, 0x74, 0x6D, + 0x6C, 0x0A, 0}; + +static const char data_footer_html[] = { + /* /footer.html */ + 0x2f, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0, + 0x3c, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3e, 0xa, 0x3c, + 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0xa, 0x3c, 0x2f, 0x68, + 0x74, 0x6d, 0x6c, 0x3e, 0xa, 0}; + +static const char data_spin_gif[] = { + /* /spin.gif */ + 0x2f, 0x73, 0x70, 0x69, 0x6e, 0x2e, 0x67, 0x69, 0x66, 0, + 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x12, 00, 0xf, 00, + 0xf2, 00, 00, 0xff, 0xff, 0xff, 00, 00, 00, 00, + 00, 00, 0x5c, 0x5c, 0x5c, 0xb4, 0xb4, 0xb4, 00, 00, + 00, 00, 00, 00, 00, 00, 00, 0x21, 0xff, 0xb, + 0x4e, 0x45, 0x54, 0x53, 0x43, 0x41, 0x50, 0x45, 0x32, 0x2e, + 0x30, 0x3, 0x1, 00, 00, 00, 0x21, 0xfe, 0x1a, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, + 0x68, 0x20, 0x61, 0x6a, 0x61, 0x78, 0x6c, 0x6f, 0x61, 0x64, + 0x2e, 0x69, 0x6e, 0x66, 0x6f, 00, 0x21, 0xf9, 0x4, 0x9, + 0x5, 00, 00, 00, 0x2c, 00, 00, 00, 00, 0x12, + 00, 0xf, 00, 00, 0x3, 0x1c, 0x8, 0xba, 0xdc, 0xfe, + 0x30, 0xca, 0x49, 0xab, 0xbd, 0x38, 0x57, 0x21, 0x2e, 0xe7, + 0xd6, 0xd7, 0x1, 0x3, 0x5, 0x92, 0x43, 0x9, 0x10, 0x4, + 0xa5, 0x6a, 0x4e, 0x2, 00, 0x21, 0xf9, 0x4, 0x9, 0x5, + 00, 00, 00, 0x2c, 00, 00, 00, 00, 0x12, 00, + 0xf, 00, 00, 0x3, 0x1e, 0x8, 0xba, 0xdc, 0xfe, 0x30, + 0xca, 0x49, 0xab, 0x6d, 0xe2, 0x2, 0xc1, 0x75, 0xd6, 0xca, + 0x30, 0x5c, 0xa2, 0x68, 0x95, 0x23, 0x40, 0x50, 0xa6, 0x4a, + 0xac, 0x17, 0xc, 0x3e, 0x9, 00, 0x21, 0xf9, 0x4, 0x9, + 0x5, 00, 00, 00, 0x2c, 00, 00, 00, 00, 0x12, + 00, 0xf, 00, 00, 0x3, 0x1c, 0x8, 0xba, 0xdc, 0xfe, + 0x30, 0x4a, 0x20, 0xc4, 0xbc, 0x38, 0xab, 0xa1, 0xc1, 0xf8, + 0x1d, 0xd7, 0x29, 0x4, 0xa1, 0x95, 0x65, 0x86, 0x9a, 0x2a, + 0x3b, 0xbe, 0x53, 0x2, 00, 0x21, 0xf9, 0x4, 0x9, 0x5, + 00, 00, 00, 0x2c, 00, 00, 00, 00, 0x12, 00, + 0xf, 00, 00, 0x3, 0x17, 0x8, 0xba, 0xdc, 0xbe, 0xe2, + 0xc9, 0xf9, 0xc6, 0xa0, 0x38, 0x6b, 0x47, 0xb6, 0x22, 0xa0, + 0x7, 0x74, 0x62, 0x69, 0x9e, 0x68, 0x8a, 0x25, 00, 0x21, + 0xf9, 0x4, 0x9, 0x5, 00, 00, 00, 0x2c, 00, 00, + 00, 00, 0x12, 00, 0xf, 00, 00, 0x3, 0x14, 0x8, + 0xba, 0xdc, 0xbe, 0xe3, 0xc9, 0x27, 0x24, 0x21, 0x33, 0xeb, + 0xcd, 0xbb, 0xff, 0x60, 0x28, 0x8e, 0x24, 0x98, 00, 00, + 0x21, 0xf9, 0x4, 0x9, 0x5, 00, 00, 00, 0x2c, 00, + 00, 00, 00, 0x12, 00, 0xf, 00, 00, 0x3, 0x14, + 0x8, 0xba, 0xdc, 0xbe, 0xe4, 0xc9, 0x37, 0xa6, 0xbd, 0x38, + 0x2f, 0xa1, 0xbb, 0xff, 0x60, 0x28, 0x8e, 0x24, 0x90, 00, + 00, 0x21, 0xf9, 0x4, 0x9, 0x5, 00, 00, 00, 0x2c, + 00, 00, 00, 00, 0x12, 00, 0xf, 00, 00, 0x3, + 0x13, 0x8, 0xba, 0xdc, 0xfe, 0x30, 0x2a, 0x22, 0xab, 0xbd, + 0x76, 0xe0, 0xcd, 0xbb, 0x8f, 0xc2, 0x27, 0x8e, 0x57, 0x2, + 00, 0x21, 0xf9, 0x4, 0x9, 0x5, 00, 00, 00, 0x2c, + 00, 00, 00, 00, 0x12, 00, 0xf, 00, 00, 0x3, + 0x14, 0x8, 0xba, 0xdc, 0xfe, 0x30, 0xca, 0x49, 0xab, 0x5, + 0xe4, 0xea, 0xcd, 0x3b, 0x1b, 0x1e, 0x25, 0x8, 0x21, 0x97, + 00, 00, 0x21, 0xf9, 0x4, 0x9, 0x5, 00, 00, 00, + 0x2c, 00, 00, 00, 00, 0x12, 00, 0xf, 00, 00, + 0x3, 0x17, 0x8, 0xba, 0xdc, 0xfe, 0x30, 0xca, 0x49, 0xab, + 0xbd, 0x38, 0xeb, 0xed, 0x88, 0x14, 0x98, 0x20, 0x2a, 0xc3, + 0x40, 0x81, 0x5c, 0x93, 00, 00, 0x3b, 00, 00, 00, + 00, 00, 00, 00, 00, 00, 0}; + +static const char data_neighbors_shtml[] = { + /* /neighbors.shtml */ + 0x2f, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0, + 0x25, 0x21, 0x3A, 0x20, 0x2F, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2E, + 0x68, 0x74, 0x6D, 0x6C, 0x0A, 0x3C, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x20, 0x74, 0x79, 0x70, 0x65, 0x3D, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2F, + 0x6A, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x3E, + 0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x6C, 0x6F, + 0x61, 0x64, 0x28, 0x29, 0x20, 0x7B, 0x0A, 0x09, 0x61, 0x3D, 0x64, 0x6F, + 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, 0x61, 0x6E, 0x63, 0x68, 0x6F, + 0x72, 0x73, 0x3B, 0x0A, 0x09, 0x66, 0x6F, 0x72, 0x28, 0x69, 0x3D, 0x30, + 0x3B, 0x20, 0x69, 0x3C, 0x61, 0x2E, 0x6C, 0x65, 0x6E, 0x67, 0x74, 0x68, + 0x3B, 0x69, 0x2B, 0x2B, 0x29, 0x7B, 0x0A, 0x09, 0x09, 0x69, 0x66, 0x28, + 0x61, 0x5B, 0x69, 0x5D, 0x2E, 0x69, 0x64, 0x3D, 0x3D, 0x27, 0x6E, 0x6F, + 0x64, 0x65, 0x27, 0x29, 0x0A, 0x09, 0x09, 0x09, 0x61, 0x5B, 0x69, 0x5D, + 0x2E, 0x68, 0x72, 0x65, 0x66, 0x3D, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3A, + 0x2F, 0x2F, 0x22, 0x2B, 0x61, 0x64, 0x64, 0x72, 0x67, 0x65, 0x6E, 0x28, + 0x61, 0x5B, 0x69, 0x5D, 0x2E, 0x6E, 0x61, 0x6D, 0x65, 0x29, 0x2B, 0x22, + 0x2F, 0x22, 0x0A, 0x09, 0x7D, 0x0A, 0x7D, 0x0A, 0x66, 0x75, 0x6E, 0x63, + 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x61, 0x64, 0x64, 0x72, 0x67, 0x65, 0x6E, + 0x28, 0x69, 0x69, 0x64, 0x29, 0x0A, 0x7B, 0x0A, 0x09, 0x68, 0x61, 0x64, + 0x64, 0x72, 0x3D, 0x64, 0x6F, 0x63, 0x75, 0x6D, 0x65, 0x6E, 0x74, 0x2E, + 0x6C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2E, 0x68, 0x6F, 0x73, + 0x74, 0x3B, 0x0A, 0x09, 0x61, 0x64, 0x64, 0x72, 0x3D, 0x68, 0x61, 0x64, + 0x64, 0x72, 0x3B, 0x0A, 0x09, 0x69, 0x65, 0x37, 0x6C, 0x6C, 0x3D, 0x30, + 0x3B, 0x73, 0x65, 0x70, 0x3D, 0x27, 0x3A, 0x27, 0x3B, 0x65, 0x73, 0x63, + 0x3D, 0x27, 0x25, 0x32, 0x35, 0x27, 0x3B, 0x0A, 0x09, 0x69, 0x66, 0x28, + 0x61, 0x64, 0x64, 0x72, 0x2E, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x28, + 0x2F, 0x69, 0x70, 0x76, 0x36, 0x2D, 0x6C, 0x69, 0x74, 0x65, 0x72, 0x61, + 0x6C, 0x2E, 0x6E, 0x65, 0x74, 0x2F, 0x29, 0x21, 0x3D, 0x2D, 0x31, 0x29, + 0x7B, 0x0A, 0x09, 0x09, 0x69, 0x65, 0x37, 0x6C, 0x6C, 0x3D, 0x31, 0x3B, + 0x73, 0x65, 0x70, 0x3D, 0x27, 0x2D, 0x27, 0x3B, 0x65, 0x73, 0x63, 0x3D, + 0x27, 0x73, 0x27, 0x3B, 0x69, 0x69, 0x64, 0x3D, 0x69, 0x69, 0x64, 0x2E, + 0x72, 0x65, 0x70, 0x6C, 0x61, 0x63, 0x65, 0x28, 0x2F, 0x3A, 0x2F, 0x67, + 0x2C, 0x27, 0x2D, 0x27, 0x29, 0x3B, 0x0A, 0x09, 0x7D, 0x0A, 0x09, 0x6E, + 0x63, 0x6F, 0x6C, 0x3D, 0x61, 0x64, 0x64, 0x72, 0x2E, 0x72, 0x65, 0x70, + 0x6C, 0x61, 0x63, 0x65, 0x28, 0x2F, 0x69, 0x70, 0x76, 0x36, 0x2D, 0x6C, + 0x69, 0x74, 0x65, 0x72, 0x61, 0x6C, 0x2E, 0x6E, 0x65, 0x74, 0x2F, 0x2C, + 0x27, 0x27, 0x29, 0x2E, 0x6D, 0x61, 0x74, 0x63, 0x68, 0x28, 0x2F, 0x5B, + 0x3A, 0x2D, 0x5D, 0x2F, 0x67, 0x29, 0x2E, 0x6C, 0x65, 0x6E, 0x67, 0x74, + 0x68, 0x3B, 0x0A, 0x09, 0x6E, 0x3D, 0x30, 0x3B, 0x69, 0x6E, 0x64, 0x74, + 0x6F, 0x74, 0x3D, 0x30, 0x3B, 0x0A, 0x09, 0x61, 0x64, 0x64, 0x72, 0x3D, + 0x68, 0x61, 0x64, 0x64, 0x72, 0x3B, 0x0A, 0x09, 0x77, 0x68, 0x69, 0x6C, + 0x65, 0x28, 0x6E, 0x3C, 0x34, 0x20, 0x26, 0x26, 0x20, 0x28, 0x69, 0x6E, + 0x64, 0x3D, 0x61, 0x64, 0x64, 0x72, 0x2E, 0x69, 0x6E, 0x64, 0x65, 0x78, + 0x4F, 0x66, 0x28, 0x73, 0x65, 0x70, 0x29, 0x29, 0x21, 0x3D, 0x2D, 0x31, + 0x29, 0x7B, 0x0A, 0x09, 0x09, 0x6E, 0x2B, 0x2B, 0x3B, 0x0A, 0x09, 0x09, + 0x69, 0x66, 0x28, 0x61, 0x64, 0x64, 0x72, 0x2E, 0x63, 0x68, 0x61, 0x72, + 0x41, 0x74, 0x28, 0x69, 0x6E, 0x64, 0x2B, 0x31, 0x29, 0x3D, 0x3D, 0x73, + 0x65, 0x70, 0x29, 0x0A, 0x09, 0x09, 0x09, 0x6E, 0x2B, 0x3D, 0x37, 0x2D, + 0x6E, 0x63, 0x6F, 0x6C, 0x3B, 0x09, 0x09, 0x0A, 0x09, 0x09, 0x61, 0x64, + 0x64, 0x72, 0x3D, 0x61, 0x64, 0x64, 0x72, 0x2E, 0x73, 0x6C, 0x69, 0x63, + 0x65, 0x28, 0x69, 0x6E, 0x64, 0x2B, 0x31, 0x29, 0x3B, 0x0A, 0x09, 0x09, + 0x69, 0x6E, 0x64, 0x74, 0x6F, 0x74, 0x2B, 0x3D, 0x69, 0x6E, 0x64, 0x2B, + 0x31, 0x3B, 0x0A, 0x09, 0x7D, 0x0A, 0x09, 0x69, 0x66, 0x28, 0x69, 0x6E, + 0x64, 0x3D, 0x3D, 0x2D, 0x31, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, + 0x6E, 0x3B, 0x0A, 0x09, 0x6E, 0x65, 0x77, 0x61, 0x64, 0x64, 0x72, 0x20, + 0x3D, 0x20, 0x68, 0x61, 0x64, 0x64, 0x72, 0x2E, 0x73, 0x6C, 0x69, 0x63, + 0x65, 0x28, 0x30, 0x2C, 0x69, 0x6E, 0x64, 0x74, 0x6F, 0x74, 0x29, 0x2B, + 0x69, 0x69, 0x64, 0x3B, 0x0A, 0x09, 0x6F, 0x6C, 0x64, 0x69, 0x69, 0x64, + 0x20, 0x3D, 0x20, 0x68, 0x61, 0x64, 0x64, 0x72, 0x2E, 0x73, 0x6C, 0x69, + 0x63, 0x65, 0x28, 0x69, 0x6E, 0x64, 0x74, 0x6F, 0x74, 0x29, 0x3B, 0x0A, + 0x09, 0x65, 0x6E, 0x64, 0x3D, 0x6F, 0x6C, 0x64, 0x69, 0x69, 0x64, 0x2E, + 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x28, 0x2F, 0x5B, 0x5E, 0x30, 0x2D, + 0x39, 0x61, 0x2D, 0x66, 0x3A, 0x2D, 0x5D, 0x2F, 0x69, 0x29, 0x3B, 0x0A, + 0x09, 0x69, 0x66, 0x28, 0x65, 0x6E, 0x64, 0x21, 0x3D, 0x2D, 0x31, 0x29, + 0x0A, 0x09, 0x09, 0x6E, 0x65, 0x77, 0x61, 0x64, 0x64, 0x72, 0x20, 0x3D, + 0x20, 0x6E, 0x65, 0x77, 0x61, 0x64, 0x64, 0x72, 0x2B, 0x6F, 0x6C, 0x64, + 0x69, 0x69, 0x64, 0x2E, 0x73, 0x6C, 0x69, 0x63, 0x65, 0x28, 0x65, 0x6E, + 0x64, 0x29, 0x3B, 0x0A, 0x09, 0x69, 0x66, 0x28, 0x21, 0x69, 0x65, 0x37, + 0x6C, 0x6C, 0x26, 0x26, 0x6E, 0x65, 0x77, 0x61, 0x64, 0x64, 0x72, 0x2E, + 0x63, 0x68, 0x61, 0x72, 0x41, 0x74, 0x28, 0x30, 0x29, 0x21, 0x3D, 0x27, + 0x5B, 0x27, 0x29, 0x0A, 0x09, 0x09, 0x6E, 0x65, 0x77, 0x61, 0x64, 0x64, + 0x72, 0x3D, 0x27, 0x5B, 0x27, 0x2B, 0x6E, 0x65, 0x77, 0x61, 0x64, 0x64, + 0x72, 0x2B, 0x27, 0x5D, 0x27, 0x3B, 0x0A, 0x09, 0x69, 0x66, 0x28, 0x6E, + 0x61, 0x76, 0x69, 0x67, 0x61, 0x74, 0x6F, 0x72, 0x2E, 0x75, 0x73, 0x65, + 0x72, 0x41, 0x67, 0x65, 0x6E, 0x74, 0x2E, 0x73, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x28, 0x2F, 0x46, 0x69, 0x72, 0x65, 0x66, 0x6F, 0x78, 0x2F, 0x69, + 0x29, 0x3D, 0x3D, 0x2D, 0x31, 0x29, 0x0A, 0x09, 0x09, 0x6E, 0x65, 0x77, + 0x61, 0x64, 0x64, 0x72, 0x3D, 0x6E, 0x65, 0x77, 0x61, 0x64, 0x64, 0x72, + 0x2E, 0x72, 0x65, 0x70, 0x6C, 0x61, 0x63, 0x65, 0x28, 0x27, 0x25, 0x27, + 0x2C, 0x65, 0x73, 0x63, 0x29, 0x3B, 0x0A, 0x09, 0x72, 0x65, 0x74, 0x75, + 0x72, 0x6E, 0x20, 0x6E, 0x65, 0x77, 0x61, 0x64, 0x64, 0x72, 0x3B, 0x0A, + 0x7D, 0x0A, 0x3C, 0x2F, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3E, 0x0A, + 0x3C, 0x68, 0x31, 0x3E, 0x4E, 0x6F, 0x64, 0x65, 0x0A, 0x25, 0x21, 0x20, + 0x6E, 0x6F, 0x64, 0x65, 0x69, 0x64, 0x0A, 0x3C, 0x2F, 0x68, 0x31, 0x3E, + 0x0A, 0x3C, 0x68, 0x32, 0x3E, 0x4E, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6F, + 0x72, 0x73, 0x3C, 0x2F, 0x68, 0x32, 0x3E, 0x0A, 0x3C, 0x75, 0x6C, 0x3E, + 0x0A, 0x25, 0x21, 0x20, 0x6E, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6F, 0x72, + 0x73, 0x0A, 0x3C, 0x2F, 0x75, 0x6C, 0x3E, 0x0A, 0x25, 0x21, 0x3A, 0x20, + 0x2F, 0x66, 0x6F, 0x6F, 0x74, 0x65, 0x72, 0x2E, 0x68, 0x74, 0x6D, 0x6C, + 0x0A, 0x0A, 0}; + +static const char data_404_html[] = { + /* /404.html */ + 0x2f, 0x34, 0x30, 0x34, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0, + 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, 0x20, 0x20, 0x3c, + 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c, + 0x6f, 0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x22, + 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x63, 0x65, 0x6e, + 0x74, 0x65, 0x72, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x3c, 0x68, 0x31, 0x3e, 0x34, 0x30, 0x34, 0x20, 0x2d, + 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, + 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x3c, 0x2f, 0x68, 0x31, 0x3e, + 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x68, 0x33, + 0x3e, 0x47, 0x6f, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, + 0x66, 0x3d, 0x22, 0x2f, 0x22, 0x3e, 0x68, 0x65, 0x72, 0x65, + 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, + 0x61, 0x64, 0x2e, 0x3c, 0x2f, 0x68, 0x33, 0x3e, 0xa, 0x20, + 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x63, 0x65, 0x6e, 0x74, 0x65, + 0x72, 0x3e, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x62, 0x6f, 0x64, + 0x79, 0x3e, 0xa, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, +0}; + +static const char data_header_html[] = { + /* /header.html */ + 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0, + 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, + 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, + 0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f, + 0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, + 0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45, + 0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, + 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34, + 0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64, + 0x22, 0x3e, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, + 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 0xa, 0x3c, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x3e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6b, + 0x69, 0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0xa, + 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0xa, 0x3c, 0x62, + 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c, 0x6f, + 0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x22, 0x20, + 0x6f, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x3d, 0x22, 0x6c, 0x6f, + 0x61, 0x64, 0x28, 0x29, 0x22, 0x3e, 0xa, 0x3c, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x3d, 0x30, 0x20, 0x63, 0x65, 0x6c, 0x6c, 0x70, 0x61, 0x64, + 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x34, 0x20, 0x63, 0x65, 0x6c, + 0x6c, 0x73, 0x70, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x3d, 0x34, + 0x3e, 0x3c, 0x74, 0x72, 0x3e, 0x3c, 0x74, 0x64, 0x20, 0x76, + 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x74, 0x6f, 0x70, + 0x22, 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x72, + 0x69, 0x67, 0x68, 0x74, 0x22, 0x3e, 0xa, 0x3c, 0x68, 0x31, + 0x3e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6b, 0x69, 0x26, 0x6e, + 0x62, 0x73, 0x70, 0x3b, 0x3c, 0x2f, 0x68, 0x31, 0x3e, 0xa, + 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, + 0x22, 0x3e, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x20, 0x70, 0x61, + 0x67, 0x65, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x62, 0x72, 0x3e, + 0xa, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, + 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x2e, + 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x4e, 0x65, 0x69, + 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x3c, 0x2f, 0x61, 0x3e, + 0x3c, 0x62, 0x72, 0x3e, 0xa, 0x3c, 0x61, 0x20, 0x68, 0x72, + 0x65, 0x66, 0x3d, 0x22, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, + 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x53, + 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x3c, 0x2f, 0x61, 0x3e, + 0x3c, 0x62, 0x72, 0x3e, 0xa, 0x3c, 0x2f, 0x74, 0x64, 0x3e, + 0x3c, 0x74, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x67, 0x6e, + 0x3d, 0x22, 0x74, 0x6f, 0x70, 0x22, 0x20, 0x61, 0x6c, 0x69, + 0x67, 0x6e, 0x3d, 0x22, 0x6c, 0x65, 0x66, 0x74, 0x22, 0x3e, + 0xa, 0}; + +static const char data_index_html[] = { + /* /index.html */ + 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0, + 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, + 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, + 0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f, + 0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20, + 0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45, + 0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, + 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34, + 0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64, + 0x22, 0x3e, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, + 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 0xa, 0x3c, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x3e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6b, + 0x69, 0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0xa, + 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0xa, 0x3c, 0x62, + 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c, 0x6f, + 0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x22, 0x3e, + 0xa, 0x3c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x62, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x3d, 0x30, 0x20, 0x63, 0x65, 0x6c, + 0x6c, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x34, + 0x20, 0x63, 0x65, 0x6c, 0x6c, 0x73, 0x70, 0x61, 0x63, 0x69, + 0x6e, 0x67, 0x3d, 0x34, 0x3e, 0x3c, 0x74, 0x72, 0x3e, 0x3c, + 0x74, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, + 0x22, 0x74, 0x6f, 0x70, 0x22, 0x20, 0x61, 0x6c, 0x69, 0x67, + 0x6e, 0x3d, 0x22, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0x3e, + 0xa, 0x3c, 0x68, 0x31, 0x3e, 0x43, 0x6f, 0x6e, 0x74, 0x69, + 0x6b, 0x69, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x3c, 0x2f, + 0x68, 0x31, 0x3e, 0xa, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, + 0x66, 0x3d, 0x22, 0x2f, 0x22, 0x3e, 0x46, 0x72, 0x6f, 0x6e, + 0x74, 0x20, 0x70, 0x61, 0x67, 0x65, 0x3c, 0x2f, 0x61, 0x3e, + 0x3c, 0x62, 0x72, 0x3e, 0xa, 0x3c, 0x61, 0x20, 0x68, 0x72, + 0x65, 0x66, 0x3d, 0x22, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, + 0x6f, 0x72, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, + 0x3e, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, + 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x62, 0x72, 0x3e, 0xa, 0x3c, + 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x73, 0x65, + 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, + 0x6c, 0x22, 0x3e, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, + 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x62, 0x72, 0x3e, 0xa, 0x3c, + 0x2f, 0x74, 0x64, 0x3e, 0x3c, 0x74, 0x64, 0x20, 0x76, 0x61, + 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x74, 0x6f, 0x70, 0x22, + 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x6c, 0x65, + 0x66, 0x74, 0x22, 0x3e, 0xa, 0x3c, 0x2f, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x3e, 0xa, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, + 0x3e, 0xa, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, +0}; + +const struct httpd_fsdata_file file_sensordata_shtml[] = {{NULL, data_sensordata_shtml, data_sensordata_shtml + 18, sizeof(data_sensordata_shtml) - 18}}; + +const struct httpd_fsdata_file file_sensors_shtml[] = {{file_sensordata_shtml, data_sensors_shtml, data_sensors_shtml + 15, sizeof(data_sensors_shtml) - 15}}; + +const struct httpd_fsdata_file file_footer_html[] = {{file_sensors_shtml, data_footer_html, data_footer_html + 13, sizeof(data_footer_html) - 13}}; + +const struct httpd_fsdata_file file_spin_gif[] = {{file_footer_html, data_spin_gif, data_spin_gif + 10, sizeof(data_spin_gif) - 10}}; + +const struct httpd_fsdata_file file_neighbors_shtml[] = {{file_spin_gif, data_neighbors_shtml, data_neighbors_shtml + 17, sizeof(data_neighbors_shtml) - 17}}; + +const struct httpd_fsdata_file file_404_html[] = {{file_neighbors_shtml, data_404_html, data_404_html + 10, sizeof(data_404_html) - 10}}; + +const struct httpd_fsdata_file file_header_html[] = {{file_404_html, data_header_html, data_header_html + 13, sizeof(data_header_html) - 13}}; + +const struct httpd_fsdata_file file_index_html[] = {{file_header_html, data_index_html, data_index_html + 12, sizeof(data_index_html) - 12}}; + +#define HTTPD_FS_ROOT file_index_html + +#define HTTPD_FS_NUMFILES 8 diff --git a/examples/mb851/webserver-ajax/mb851-webserver.c b/examples/mb851/webserver-ajax/mb851-webserver.c new file mode 100644 index 000000000..737dbf257 --- /dev/null +++ b/examples/mb851/webserver-ajax/mb851-webserver.c @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2006, Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of the Contiki operating system. + * + */ + +/** + * \file + * Multi-hop webserver for the Tmote Sky. + * \author + * Adam Dunkels + */ +/* + * salvopitru: example adapted to MB851. + */ + + +#include "webserver-nogui.h" + +#include "contiki.h" + +/*---------------------------------------------------------------------------*/ +AUTOSTART_PROCESSES(&webserver_nogui_process); +/*---------------------------------------------------------------------------*/ diff --git a/examples/mb851/webserver-ajax/webserver-ajax-conf.h b/examples/mb851/webserver-ajax/webserver-ajax-conf.h new file mode 100644 index 000000000..f51049438 --- /dev/null +++ b/examples/mb851/webserver-ajax/webserver-ajax-conf.h @@ -0,0 +1,24 @@ + + +#ifndef __WEBSERVER_AJAX_CONF_H__ +#define __WEBSERVER_AJAX_CONF_H__ + +#undef WITH_RIME +#define WITH_RIME 1 + +#undef ENERGEST_CONF_ON +#define ENERGEST_CONF_ON 1 + +#undef UIP_CONF_ROUTER +#define UIP_CONF_ROUTER 0 + +#undef WITH_SERIAL_LINE_INPUT +#define WITH_SERIAL_LINE_INPUT 0 + +/* Needed for communicating with other nodes outside the LoWPAN, + as UDP checksum is not optional in IPv6. */ +#undef UIP_CONF_UDP_CHECKSUMS +#define UIP_CONF_UDP_CHECKSUMS 1 + + +#endif /* __WEBSERVER_AJAX_CONF_H__ */