|
Algorithm 1 Backoff-based beaconing algorithm. |
-
1:
-
2:
while isDaaGWorking() do
-
3:
for each
in C
do
-
4:
▹ Update remaining backoff time of
-
5:
if
then
-
6:
= runBeaconing() ▹ Broadcast beacon message with
-
7:
if
then
-
8:
-
9:
D = runCommunication( ) ▹ Collect data D from nearby nodes with
-
10:
else
-
11:
▹ Update backoff time of
-
12:
end if
-
13:
end if
-
14:
end for
-
15:
if DaaG moves more than reset boundary length then
-
16:
-
17:
end if
-
18:
sleep() ▹ Wait for
-
19:
end while
|