Hi all,
I am trying to implement static route using switch statements like this;

switch (TOS_LOCAL_ADDRESS) {
    case 0: ; //Do nothing , base node

    case 1: // parent of mote 1 is mote 0
        destination = 0x00;
        break;
    case 2: // parent of mote 2 is mote 1
        destination = 0x01;
        break;
    case 3: // parent of mote 3 is mote 1
        destination = 0x01;
        break;
    case 4: // parent of mote 4 is mote 0
        destination = 0x00;
        break;
    case 5: // parent of mote 5 is mote 4
        destination = 0x04;
        break;
    case 6: // parent of mote 6 is mote 4
        destination = 0x04;
        break;
    }

        if (call SendMsg.send(destination, sizeof(CounterMessage), &data))
              return SUCCESS;
 
..........................................................................................................................

It works but ... is this approach correct or do i need to use multihop or
anyother routing available in tinyos...??
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to