You have to implement all the events of an interface you are using. It 
is one of the bad things in TinyOS. Hence create empty body of event 
changed and it should work.

Faisal

Gus Wirth wrote:
> I'm trying to understand why I am getting a
> "`ActiveMessageAddress.changed' not implemented" error when I try to
> compile a simple program using the ActiveMessageAddress interface with
> the ActiveMessageAddressC component.
>
> My test program is essentially the Blink app with the blinking parts
> stripped out.
>
> My Makefile:
>
> COMPONENT=AmaAppC
> include $(MAKERULES)
>
> My application AmaApp.nc:
>
> configuration AmaAppC
> {
> }
> implementation
> {
>   components MainC;
>   components AmaC;
>   components ActiveMessageAddressC;
>
>   AmaC -> MainC.Boot;
>   AmaC.ActiveMessageAddress -> ActiveMessageAddressC;
> }
>
> My module AmaC.nc:
>
> module AmaC @safe()
> {
>   uses interface Boot;
>   uses interface ActiveMessageAddress;
> }
> implementation
>
> {
>
>   event void Boot.booted()
>   {
>     uint16_t id = TOS_NODE_ID;
>   }
> }
>
> By my reading the TinyOS Programming guide (tinyos-programming.pdf) page
> 76 Chapter 6 Parameterized Wiring, a default function is used if there
> is no other function provided.
>
> The ActiveMessageAddressC component provides a default function for the
> changed() function that should be used if I don't provide one. However,
> when I try to compile this application, I get the following error:
>
> ubu...@ubuntu-desktop:/opt/tinyos-2.1.0/apps/AMA$ make telosb
> mkdir -p build/telosb
>     compiling AmaAppC to a telosb binary
> ncc -o build/telosb/main.exe  -Os -O -mdisable-hwmul -Wall -Wshadow
> -Wnesc-all -target=telosb -fnesc-cfile=build/telosb/app.c -board=
> -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"AmaAppC\"
> -DIDENT_USERNAME=\"ubuntu\" -DIDENT_HOSTNAME=\"ubuntu-desktop\"
> -DIDENT_USERHASH=0x53639238L -DIDENT_TIMESTAMP=0x49cd0d92L
> -DIDENT_UIDHASH=0x4221a7caL  AmaAppC.nc -lm
> In component `AmaC':
> AmaC.nc:6: `ActiveMessageAddress.changed' not implemented
> make: *** [exe0] Error 1
> ubu...@ubuntu-desktop:/opt/tinyos-2.1.0/apps/AMA
>
> The operating system is Ubuntu 8.04 using the TinyOS 2.1.0 packages
> provided by the Stanford repository. nescc version 1.3.0, ncc version 1.2.4
>
> Gus
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>   

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

Reply via email to