I'm currently working with mica2 motes, and I would like to use this
interface, because I need to measure the energy level of my mote's
batteries.

I was modifying the BlinkC code, just in order to include the VoltageC
interface, and do something useless with it, for tests purposes.

My BlingAppC.nc code is this:
 40 configuration BlinkAppC
 41 {
 42 }
 43 implementation
 44 {
 45   components MainC, BlinkC, LedsC, VoltageC;
 46   components new TimerMilliC() as Timer0;
 47   components new TimerMilliC() as Timer1;
 48   components new TimerMilliC() as Timer2;
 49
 50
 51   BlinkC -> MainC.Boot;
 52
 53   BlinkC.Timer0 -> Timer0;
 54   BlinkC.Timer1 -> Timer1;
 55   BlinkC.Timer2 -> Timer2;
 56   BlinkC.Leds -> LedsC;
 57   BlinkC.Voltage -> VoltageC;
 58 }
 59

And the only modification on BlinC.nc code is the beginning:
 39 module BlinkC
 40 {
 41   uses interface Timer<TMilli> as Timer0;
 42   uses interface Timer<TMilli> as Timer1;
 43   uses interface Timer<TMilli> as Timer2;
 44   uses interface Leds;
 45   uses interface Boot;
 46   uses interface Voltage;
 47 }


But when I run $ make mica2, the following errors appear:

$ make mica2
mkdir -p build/mica2
    compiling BlinkAppC to a mica2 binary
ncc -o build/mica2/main.exe -Os -finline-limit=100000 -Wall -Wshadow
-Wnesc-all -target=mica2 -fnesc-cfile=build/mica2/app.c -board=micasb
-DIDENT_PROGRAM_NAME=\"BlinkAppC\" -DIDENT_USER_ID=\"fernando\"
-DIDENT_HOSTNAME=\"fhg07\" -DIDENT_USER_HASH=0x20ab3fcbL
-DIDENT_UNIX_TIME=0x48e38c89L -DIDENT_UID_HASH=0xee15f0c6L
-fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())'
-fnesc-dump='referenced(interfacedefs, components)'
-fnesc-dumpfile=build/mica2/wiring-check.xml BlinkAppC.nc -lm
In file included from BlinkAppC.nc:45:
In component `BlinkC':
BlinkC.nc:46: interface Voltage not found
In component `BlinkAppC':
BlinkAppC.nc:45: generic component `VoltageC' requires instantiation
arguments
BlinkAppC.nc:57: no match
make: *** [exe0] Error 1


Am I doing anything wrong? What would these "instantiation arguments"
needed for VoltageC be?



Thanks,
Fernando.

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

Reply via email to