
274
Wireless Ad Hoc and Sensor Networks
Algorithm 16: The DDC Algorithm
input : CDS-based data collection tree T, R
0
-PCR
output: a distributed asynchronous data collection plan
1 counter(s
i
)←0;
2 s
i
(i ∈[1,n]) sets its CR as R
0
-PCR according to the required threshold of data
receiving rate R
0
;
3 while s
i
has some data packets for transmission do
4 counter(s
i
)← counter(s
i
)+1;
5 j ←counter(s
i
);
6 s
i
randomly sets a backoff time t
j
i
for the transmission of the j-th packet in
window (0,
τ
w
];
7 if j > 1 then
8 t
j
i
← (
τ
w
−t
j−1
i
)+t
j
i
;
9 while t
j
i
is not countdown to 0 do
10 s
i
senses the channel with R
0
-PCR;
11 if s
i
senses that the channel is busy then
12 s
i
stops the countdo ...