Hi,
You seem to have a problem with closing curly braces. A function
definition cannot be within another function definition. I pointed out
one missing closing curly brace below, but there are more problems in
the code. Make sure that you completely finish the function
implementation (including all closing curly braces) before starting a
new function implementation.
Cheers,
Urs
> event message_t* Receive.receive(message_t* msg, void* payload, uint8_t len){
> if (len == sizeof(AddressAllocationMsg)) {
> AddressAllocationMsg* btrpkt = (AddressAllocationMsg*)payload;
> flag=1;
> call Leds.led0On();
> }
> return msg;
//---------------------
// Missing closing curly brace here
}
//---------------------
>
> event void Timer1.fired() { --->>the problem should be here (syntex error
> and implementation)
> if (flag==0) {
> event void Boot.booted() {
> atomic {
> call setAmAddress(0x0001);
> }
> call AMControl.start();
> }
>
> }
> else {
> MAX_ID = btrpkt->maxid;
> TOS_NODE_ID = btrpkt->nodeid;
>
> event void Boot.booted() {
> atomic {
> call setAmAddress(TOS_NODE_ID);
> }
> call AMControl.start();
> }
> }
> }
> }
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help