| Algorithm 3: Static Sleeping Scenario | |
| Definitions | |
| the set of CHs | |
| TH: Threshold value N: Normal node |
|
|
Vnew: the new data value Vpre: the previously stored data value |
|
| Δ: the relative difference | |
| 1: | begin |
| 2: | for each (CH[m]) |
| 3: | transmit Vnew to the BS; |
| 4: | for each (Vnew received by BS from CH[m]) |
| 5: | Compute Δ; |
| 6: | if (Δ < TH) |
| 7: | mark cluster [m] as deactivated; |
| 8: | send broadcast message (CH[m]_ID, mode_bit = 1); |
| 9: | else |
| 10: | mark CH[m] as activated; |
| 11: | end if |
| 12: | end for |
| 13: | if (CH[m] received broadcast message from the BS) |
| 14: | CH[m] broadcasts a sleep message to its Ns; |
| 15: | Ns enter sleep mode; |
| 16: | remain CH[m] active; |
| 17: | else |
| 18: | remain Ns active; |
| 19: | end if |
| 20: | end for |