|
Algorithm 3 New channel access scheme. |
|
Require:
, and packet duration time . |
Ensure: Transmission success/failure.
-
1:
-
2:
if Beacon received then
-
3:
Calculate the and wakeup at start of the ;
-
4:
else
-
5:
Wait for beacon;
-
6:
end if
-
7:
Generate a random backoff time = ;
-
8:
if
or
then
-
9:
Wait for next superframe and go to step 2;
-
10:
else
-
11:
Perform CCA1 after duration;
-
12:
if Channel found busy then
-
13:
Switch to sleep state for the and go to step 30;
-
14:
else
-
15:
Wait for and perform CCA2;
-
16:
if Channel found busy then
-
17:
Switch to sleep state for and go to step 30;
-
18:
else
-
19:
Start transmission;
-
20:
if Transmission failure then
-
21:
;
-
22:
if
≤
then
-
23:
Go to step 7;
-
24:
else
-
25:
Transmission failure;
-
26:
end if
-
27:
end if
-
28:
end if
-
29:
end if
-
30:
, ;
-
31:
if
then
-
32:
Transmission failure;
-
33:
else
-
34:
Go to step 7;
-
35:
end if
-
36:
end if
|