[Tinyos-help] RE: Getting Mote RF Power Level

Philip Levis pal at eecs.berkeley.edu
Wed Jan 7 09:01:56 PST 2004


CC1000RadioC should be a component, not an includes. that is

components CC1000RadioC, Main, MyAppM;

instead of

includes CC1000RadioC;

It is a  component, after all.

Phil

On Wednesday, January 7, 2004, at 05:54 AM, Chris Murray wrote:

> All,
>  
> I have tried the suggestion posted below to get the RF power level 
> from the mote to no avail.  Can someone please help me figure out what 
> I am doing wrong.
>  
> < from Joe Polastre >
> in your application's configuration (MyAppC):
>
> includes CC1000RadioC;
> implementation {
>   MyAppM.RadioControl -> CC1000RadioC.CC1000Control;
> }
>
> now in your app (MyAppM):
>
> uses {
>   interface CC1000Control;
> }
>
> implementation {
>
>   void myfunc() {
>     uint8_t rfpower = call CC1000Control.getRFPower();
>   }
>
> }
>  
>  
> Here is my code and the error I am getting.
>  
> /*********** MyApp.nc **********/
> includes CC1000RadioC;
>  
> configuration MyApp {
> }
>  
> implementation {
>   components Main, MyAppM;
>   Main.StdControl -> MyAppM.StdControl;
>   MyAppM.RadioControl -> CC1000RadioC.CC1000Control;
> }
>  
> /************** MyAppM.nc ***************/
> module MyAppM {
>   provides {
>     interface StdControl;
>   }
>   uses {
>  interface CC1000Control as RadioControl;
>   }
> }
> implementation {
>  
>   command result_t StdControl.init() {
>     return SUCCESS;
>   }
>  
>   command result_t StdControl.start() {
>     return SUCCESS;
>   }
>  
>   command result_t StdControl.stop() {
>     return SUCCESS;
>   }
>  
>   void myfunc() {
>     uint8_t rfpower = call RadioControl.GetRFPower();
>   }
> }
>  
> /************** ERROR MESSAGE *************/
> $ make mica2dot
>     compiling MyApp to a mica2dot binary
> ncc -o build/mica2dot/main.exe -Os -board=basicsb -target=mica2dot 
> -DCC1K_DEF_FREQ=433000000 -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d 
> -Wnesc-all -finline-limit=10
> 0000 -fnesc-cfile=build/mica2dot/app.c  MyApp.nc -lm
>
> MyApp.nc:1: C file CC1000RadioC not found
> MyApp.nc:9: cannot find `CC1000RadioC'
> make: *** [build/mica2dot/main.exe] Error 1
>  
> Thanks,
> Chris Murrray
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-help
>
-------

"We shall not cease from exploration
And the end of all our exploring
Will be to arrive where we started
And know the place for the first time."

- T. S. Eliot,  'Little Gidding'




More information about the Tinyos-help mailing list