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.

I have two questions:
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 ?
2. How can I get residual energy values in tinyos-2.x ?  I want to switch
clusterheads within a cluster based on energy values ?

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

Reply via email to