//Timer Constants #define BS_START_TIME 15000 #define BS_RESTART_TIME 5192 #define BS_WAIT_TO_FINISH 10240 #define DISCOVER_RETRY_TIME 1024 #define REPLY_TIME 512 #define REPLY_RETRANS_TIME 256 #define COUNT_RETRANS_TIME 512 #define NO_CHILD_COUNT_TIME 2048 #define ALL_CHILD_COUNT_TIME 2048 #define SOME_CHILD_COUNT_TIME 4096 //Message Types enum { DISCOVERY = 1, REPLY = 2, REPLY_ACK = 3, COUNT = 4, COUNT_ACK = 5, }; //Constants enum { BASESTATION = 0, MAX_RETRANS = 5, MY_APP_MSG = 8, MAX_MOTES = 256, }; //Mote Status enum { STANDBY = 0, TIME_TO_START = 1, TIME_TO_FINISH = 2, REPLY_MODE = 3, COUNT_MODE = 4, }; // Message structure typedef struct MyMsg { uint16_t source; uint16_t dest; uint8_t seqno; uint8_t type; uint8_t hop_count; } MyMsg;