hi ,
i hv written a program to read data from mote telosb.

the code is as below:
#include "Timer.h"

module PeriodicReaderC @safe()
{
   uses interface Timer<TMilli> as Timer0;
   uses interface Read<uint16_t>;
   uses interface Boot;
}

implementation {
   uint16_t lastVal = 0;

   event void Boot.booted()
   {
       call Timer0.startPeriodic(205);
   }
   event void Timer0.fired()
   {
       call Read.read();
   }

   event void Read.readDone(error_t err, uint16_t val)
   {
       if (err == SUCCESS)
        {
       lastVal = val;
        }
   }
}

and the configuration as:

#include "Timer.h"
configuration PeriodicReaderAppC{
}
implementation{
    components MainC,PeriodicReaderC;
    components new TimerMilliC() as Timer0;

    PeriodicReaderC->MainC.Boot;
    PeriodicReaderC.Timer0 ->Timer0;

    }
but am getting error like:
run:  "make" "-C" "/home/rakshitha/workspace/reading" "-f"
"/home/rakshitha/workspace/reading/TinyOS_Plugin_Makefile" "telosb"
at Aug 25, 2011 2:31:24 PM
set: TOSROOT = /opt/tinyos-2.1.1
set: TOSDIR = /opt/tinyos-2.1.1/tos
set: ECLIPSE_PROJECT = /home/rakshitha/workspace/reading
set: PFLAGS = \"-I/home/rakshitha/workspace/reading/src\"
\"-I/opt/tinyos-2.1.1/tos/lib/timer\"
\"-I/home/rakshitha/workspace/reading/build/telosb\"
set: MAKERULES = /opt/tinyos-2.1.1/support/make/Makerules
set: COMPONENT = /home/rakshitha/workspace/reading/src/PeriodicReaderAppC
make: Entering directory `/home/rakshitha/workspace/reading'
mkdir -p build/telosb
    compiling PeriodicReaderAppC to a telosb binary
ncc -o build/telosb/main.exe  -Os -O
"-I/home/rakshitha/workspace/reading/src"
"-I/opt/tinyos-2.1.1/tos/lib/timer"
"-I/home/rakshitha/workspace/reading/build/telosb" -mdisable-hwmul
-fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=telosb
-fnesc-cfile=build/telosb/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22
-DIDENT_APPNAME=\"PeriodicReaderA\" -DIDENT_USERNAME=\"rakshitha\"
-DIDENT_HOSTNAME=\"winext.srmri.ac\" -DIDENT_USERHASH=0x1a63ff17L
-DIDENT_TIMESTAMP=0x4e560f64L -DIDENT_UIDHASH=0x353d7f76L
PeriodicReaderAppC.nc -lm
In component `PeriodicReaderC':
PeriodicReaderC.nc: In function `Boot.booted':
PeriodicReaderC.nc:15: Timer.startPeriodic not connected
make: *** [exe0] Error 1
make: Leaving directory `/home/rakshitha/workspace/reading'
finished (exit code: '2', took: 00:00.184)

kindly help me..

-rakshitha
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to