Deleted obsolete sensinode examples

This commit is contained in:
George Oikonomou 2012-12-16 01:37:18 +00:00
parent 4c95be44ac
commit e38b419e84
5 changed files with 1 additions and 144 deletions

View File

@ -8,9 +8,6 @@ DEFINES+=MODEL_N740
# These examples don't need code banking so we turn it off
#HAVE_BANKING=1
CONTIKI_PROJECT = hello_world clock_test rf_test_rx rf_test_tx
# New examples added by George Oikonomou - Loughborough University
CONTIKI_PROJECT += timer-test blink-hello broadcast-rime
all: $(CONTIKI_PROJECT)

View File

@ -36,13 +36,6 @@ make hello_world DEFINES=MODEL_N601
These make options are defined in /platform/sensinode/Makefile.sensinode
Descriptions of applications:
hello_world A simple hello world app.
clock_test Test and example of sys/clock.h related features.
rf_test_tx Test for transmitting packets
rf_test_rc Test for receiving packets
Recent Additions:
udp-ipv6 UDP client-server example over uIPv6. Uses link-local and global
addresses. Button 1 on the client will send an echo request.
broadcast-rime Just a broadcast rime example, slightly modified
@ -54,4 +47,4 @@ event-post Demonstrating the interaction between two processes with custom
blink-hello Hello World with LED blinking.
timer-test Same as clock_test above + testing the rtimer-arch code
border-router 802.15.4 to SLIP bridge example. The node will forward packets
from the 15.4 network to its UART (and thus a connected PC over SLIP)
from the 15.4 network to its UART (and thus a connected PC over SLIP)

View File

@ -1,23 +0,0 @@
/**
* \file
* Basic hello world example
* \author
* Zach Shelby <zach@sensinode.com>
*/
#include "contiki.h"
#include <stdio.h> /* For printf() */
/*---------------------------------------------------------------------------*/
PROCESS(hello_world_process, "Hello world process");
AUTOSTART_PROCESSES(&hello_world_process);
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(hello_world_process, ev, data)
{
PROCESS_BEGIN();
printf("Hello World!\n");
PROCESS_END();
}
/*---------------------------------------------------------------------------*/

View File

@ -1,60 +0,0 @@
/**
* \file
* RF test suite, receiver
* \author
* Zach Shelby <zach@sensinode.com>
*/
#include "contiki.h"
#include "net/rime.h"
#include <stdio.h> /* For printf() */
/*---------------------------------------------------------------------------*/
PROCESS(rf_test_process, "RF test RX process");
AUTOSTART_PROCESSES(&rf_test_process);
static struct etimer et;
static struct broadcast_conn bc;
static const struct broadcast_callbacks broadcast_callbacks = {recv_bc};
static struct unicast_conn uc;
static const struct unicast_callbacks unicast_callbacks = {recv_uc};
static void
recv_bc(struct broadcast_conn *c, rimeaddr_t *from)
{
printf("broadcast from %02x.%02x len = %d buf = %s\n",
from->u8[0],
from->u8[1],
packetbuf_datalen(),
(char *)packetbuf_dataptr());
}
static void
recv_uc(struct unicast_conn *c, rimeaddr_t *from)
{
printf("unicast from %02x.%02x len = %d buf = %s\n",
from->u8[0],
from->u8[1],
packetbuf_datalen(),
(char *)packetbuf_dataptr());
}
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(rf_test_process, ev, data)
{
PROCESS_BEGIN();
printf("\nStarting CC2430 RF test suite...\n");
broadcast_open(&bc, 128, &broadcast_callbacks);
unicast_open(&uc, 128, &unicast_callbacks);
while(1) {
etimer_set(&et, CLOCK_SECOND);
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&et));
etimer_reset(&et);
}
PROCESS_END();
}
/*---------------------------------------------------------------------------*/

View File

@ -1,50 +0,0 @@
/**
* \file
* RF test suite, transmitter
* \author
* Zach Shelby <zach@sensinode.com>
*/
#include "contiki.h"
#include "net/rime.h"
#include <stdio.h> /* For printf() */
/*---------------------------------------------------------------------------*/
PROCESS(rf_test_process, "RF test TX process");
AUTOSTART_PROCESSES(&rf_test_process);
static struct etimer et;
static struct broadcast_conn bc;
static struct unicast_conn uc;
rimeaddr_t addr;
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(rf_test_process, ev, data)
{
PROCESS_BEGIN();
printf("\nStarting CC2430 RF test suite...\n");
broadcast_open(&bc, 128, 0);
unicast_open(&uc, 128, 0);
while(1) {
etimer_set(&et, CLOCK_SECOND);
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&et));
etimer_reset(&et);
printf("Sending broadcast packet\n");
packetbuf_copyfrom("Hello everyone", 14);
broadcast_send(&bc);
// TODO: Fix, freezes on unicast_send()
// printf("Sending unicast packet\n");
// addr.u8[0] = 0;
// addr.u8[1] = 2;
// packetbuf_copyfrom("Hello you", 9);
// unicast_send(&uc, &addr);
}
PROCESS_END();
}
/*---------------------------------------------------------------------------*/