DSN Monitor (TinyOS 2.x)

If you want to use the DSN-monitor for your nesC project you need to make some changes:

  • Copy the ethz/snpk/lib/dsn directory from tinyos-2.x-contrib to your project folder
  • Makefile: add the following line at the end of your makefile:

CFLAGS += -I [path to the dsn directory]

  • ...AppC.nc File: add the following lines

components DSNC;
App.DSN -> DSNC;

  • ...C.nc File: add the following lines

uses interface DSN;
...
event void DSN.receive(void* message, uint8_t length) {
}

Short introduction

Print a message to the DSN

call DSN.log("hallo world");

Print a message with integers to the DSN

call DSN.logint(5);
call DSN.logint(7);
call DSN.logint(13);
call DSN.log("%i + %i = %i");

Create a target command listener
In your configuration:

new DsnCommandC("set lpl", uint16_t , 1) as LplCommand;
AppP.LplCommand->LplCommand;

In your module:

uses interface DsnCommand<uint16_t> as LplCommand;
..
implementation {
..
event void LplCommand.detected(uint16_t * values, uint8_t n) {
..
}

DSN.h
USART : [1=seriel|0=USB]
BUFFERSIZE : buffersize for the log messages
LOG_NR_BUFFERSIZE : number of integers that can be stored for a log message

The DSN-Monitor is known to work with Tmote Sky and TinyNode

!!! Dieses Dokument stammt aus dem ETH Web-Archiv und wird nicht mehr gepflegt !!!
!!! This document is stored in the ETH Web archive and is no longer maintained !!!