Hi All I am trying to implement a clustering algorithm and for that I want to make sure that the Receive mechanism applies only to the clusterhead.
Regular Nodes: - samples data - Transmit packets every few seconds Clusterhead - samples the data - Receives regular node packets - processes the data (including its own as well as received) - then transmits to the base station its results Since they both have the same sampling process I want to have the same code and just switch behavior at time intervals on whether its a clusterhead or just a regular node (state maintenance). I have a question: 1. How do I make sure that the same piece of code behaves differently at different nodes depending on whether its the clusterhead or not ? How do I restrict this receive mechanism to only clusterheads ? I am basically talking about a state variable for the cluster . Please guide me Thanks Akankshu -- First they ignore you, then they laugh at you, then they fight you, then you win. - Mahatma Gandhi
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
