Algorithm 1 Response for control packets. |
Require:
|
Ensure:
|
-
1:
← get the number of sensor nodes in whose tag is 1
-
2:
if ( = 0) or ( = 1 and
(tag) = 0) then
-
3:
return
-
4:
end if
-
5:
broadcasts the control packet EPONG = <, , pid, HC(), energy, queue, null, , , >
|