From 2b1f62afea6a16d7ad0077292f4fd090fd2719a4 Mon Sep 17 00:00:00 2001 From: nifi Date: Fri, 12 Nov 2010 17:46:56 +0000 Subject: [PATCH] Example application that runs the Contiki Shell with Collect View --- examples/collect/Makefile | 7 + examples/collect/collect-view-shell.c | 88 +++++ examples/collect/example-collect-view.csc | 439 ++++++++++++++++++++++ 3 files changed, 534 insertions(+) create mode 100644 examples/collect/Makefile create mode 100644 examples/collect/collect-view-shell.c create mode 100644 examples/collect/example-collect-view.csc diff --git a/examples/collect/Makefile b/examples/collect/Makefile new file mode 100644 index 000000000..4e535f711 --- /dev/null +++ b/examples/collect/Makefile @@ -0,0 +1,7 @@ +CONTIKI_PROJECT = collect-view-shell +all: $(CONTIKI_PROJECT) + +APPS = serial-shell powertrace collect-view +CONTIKI = ../.. + +include $(CONTIKI)/Makefile.include diff --git a/examples/collect/collect-view-shell.c b/examples/collect/collect-view-shell.c new file mode 100644 index 000000000..92980bb46 --- /dev/null +++ b/examples/collect/collect-view-shell.c @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2010, 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: collect-view-shell.c,v 1.1 2010/11/12 17:46:56 nifi Exp $ + */ + +/** + * \file + * Contiki Collect View Shell + * \author + * Adam Dunkels + */ + +#include "contiki.h" +#include "shell.h" +#include "serial-shell.h" +#include "collect-view.h" + +#define WITH_COFFEE 0 + +/*---------------------------------------------------------------------------*/ +PROCESS(collect_view_shell_process, "Contiki Collect View Shell"); +AUTOSTART_PROCESSES(&collect_view_shell_process); +/*---------------------------------------------------------------------------*/ +PROCESS_THREAD(collect_view_shell_process, ev, data) +{ + PROCESS_BEGIN(); + + serial_shell_init(); + shell_blink_init(); + +#if WITH_COFFEE + shell_file_init(); + shell_coffee_init(); +#endif /* WITH_COFFEE */ + + /* shell_download_init(); */ + /* shell_rime_sendcmd_init(); */ + /* shell_ps_init(); */ + shell_reboot_init(); + shell_rime_init(); + shell_rime_netcmd_init(); + /* shell_rime_ping_init(); */ + /* shell_rime_debug_init(); */ + /* shell_rime_debug_runicast_init(); */ + shell_powertrace_init(); + /* shell_base64_init(); */ + shell_text_init(); + shell_time_init(); + /* shell_checkpoint_init(); */ + /* shell_sendtest_init(); */ + +#if CONTIKI_TARGET_SKY + shell_sky_init(); +#endif /* CONTIKI_TARGET_SKY */ + + shell_collect_view_init(); + + PROCESS_END(); +} +/*---------------------------------------------------------------------------*/ diff --git a/examples/collect/example-collect-view.csc b/examples/collect/example-collect-view.csc new file mode 100644 index 000000000..4b09bf0ef --- /dev/null +++ b/examples/collect/example-collect-view.csc @@ -0,0 +1,439 @@ + + + [CONTIKI_DIR]/tools/cooja/apps/mrm + [CONTIKI_DIR]/tools/cooja/apps/mspsim + [CONTIKI_DIR]/tools/cooja/apps/avrora + [CONTIKI_DIR]/tools/cooja/apps/serial_socket + [CONTIKI_DIR]/tools/cooja/apps/collect-view + + CollectView - Demo + 0 + 123456 + 1000000 + + se.sics.cooja.radiomediums.UDGM + 50.0 + 100.0 + 1.0 + 1.0 + + + 40000 + + + se.sics.cooja.mspmote.SkyMoteType + sky1 + Collect View Shell #sky1 + [CONTIKI_DIR]/examples/collect/collect-view-shell.c + make collect-view-shell.sky TARGET=sky + [CONTIKI_DIR]/examples/collect/collect-view-shell.sky + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.RimeAddress + se.sics.cooja.interfaces.IPAddress + se.sics.cooja.interfaces.Mote2MoteRelations + se.sics.cooja.interfaces.MoteAttributes + se.sics.cooja.mspmote.interfaces.MspClock + se.sics.cooja.mspmote.interfaces.MspMoteID + se.sics.cooja.mspmote.interfaces.SkyButton + se.sics.cooja.mspmote.interfaces.SkyFlash + se.sics.cooja.mspmote.interfaces.SkyCoffeeFilesystem + se.sics.cooja.mspmote.interfaces.SkyByteRadio + se.sics.cooja.mspmote.interfaces.MspSerial + se.sics.cooja.mspmote.interfaces.SkyLED + se.sics.cooja.mspmote.interfaces.MspDebugOutput + se.sics.cooja.mspmote.interfaces.SkyTemperature + + + + + se.sics.cooja.interfaces.Position + 47.447589188296796 + 6.493794191652634 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 1 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 31.354300798086324 + 27.956947207632854 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 2 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 74.3829989341562 + 30.580648313490777 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 3 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 112.16429485851025 + 44.22389406395196 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 4 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 68.61085650126878 + 84.62889109416392 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 5 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 56.15423831110357 + 64.07252546725537 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 6 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 87.73274591684346 + 60.66871896134617 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 7 + + sky1 + + + + + se.sics.cooja.interfaces.Position + -2.2290733568950474 + 33.204349419348695 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 8 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 38.7006638944885 + 92.49999441173767 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 9 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 15.612094162938806 + 63.639282247300564 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 10 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 141.5408533420652 + 115.36621659194348 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 11 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 147.32188967700637 + 142.49261785589826 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 12 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 120.89539128042348 + 87.32905614555476 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 13 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 103.7684513197649 + 131.3307707784349 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 14 + + sky1 + + + + + se.sics.cooja.interfaces.Position + -11.674397337983558 + 68.36194423784482 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 15 + + sky1 + + + + + se.sics.cooja.interfaces.Position + -43.897004478740314 + 75.78835245273079 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 16 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 95.12464106933497 + 96.12882451031668 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 17 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 31.354300798086324 + 121.88544679734638 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 18 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 121.97426882380275 + 155.38877583384397 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 19 + + sky1 + + + + + se.sics.cooja.interfaces.Position + -32.139265963675335 + 109.81642171039995 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 20 + + sky1 + + + + + se.sics.cooja.interfaces.Position + -47.35673237765127 + 142.87505564420977 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 21 + + sky1 + + + + + se.sics.cooja.interfaces.Position + -32.66400618484692 + 168.06258626044578 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 22 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 21.38423659582623 + 155.99356117349936 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 23 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 88.0262446846174 + 154.9440807311562 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 24 + + sky1 + + + + + se.sics.cooja.interfaces.Position + 146.27240923466323 + 176.9831700203627 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 25 + + sky1 + + + + se.sics.cooja.plugins.SimControl + 259 + 1 + 205 + 0 + 0 + + + se.sics.cooja.plugins.Visualizer + + se.sics.cooja.plugins.skins.IDVisualizerSkin + se.sics.cooja.plugins.skins.UDGMVisualizerSkin + 2.5200269517125586 0.0 0.0 2.5200269517125586 163.78987943671984 3.0766125491598224 + + 577 + 0 + 523 + 526 + 0 + + + se.sics.cooja.plugins.LogListener + + + + 1103 + 3 + 300 + 0 + 522 + + + se.sics.cooja.plugins.collectview.CollectView + 0 + 270 + 2 + 81 + 258 + 1 + + +