On Sep 9, 2007, at 5:54 AM, handsomezhu wrote:


*     10   TmpC.tmp[unique("tmp")] -> pvdtmp1.tmp;
*     11   TmpC.tmp[unique("tmp")] -> pvdtmp2.tmp;


TmpC.nc: uses a multiple tmp interface
       1 module TmpC
       2 {
       3   uses interface Boot;
*     4   uses interface tmp[uint8_t id];
       5 }
       6
       7 implementation
       8 {
       9   event void Boot.booted()
      10   {
      11     int i;
      12       for(i=0; i < uniqueCount("tmp"); i++) {
      13         call tmp.cmd1[i]();
      14       }
      15   }
      16
      17   event void tmp.evt1[uint8_t id] () {
      18      call tmp.cmd1[id]();
      19   }
      20 }
      21


When I compile this application, following compile error arose:
[EMAIL PROTECTED] tmp]# make mica2
mkdir -p build/mica2
compiling TmpAppC 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 -fnesc-dump=wiring
-fnesc-dump='interfaces(!abstract())'
-fnesc-dump='referenced(interfacedefs, components)'
-fnesc-dumpfile=build/mica2/wiring-check.xml TmpAppC.nc -lm In component
`TmpC':
TmpC.nc: In function `Boot.booted':
TmpC.nc:13: tmp.cmd1 not connected
make: *** [exe0] Error 1
[EMAIL PROTECTED] tmp]#

Please read section 6.1 of the TinyOS Programming manual. The short answer is that for all x where x > uniqueCount("tmp"), TmpC.tmp[x] is not wired.

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

Reply via email to