|
Algorithm 1 The CoR-MAC algorithm for the coordinator. |
-
1:
← The node that generates urgent data;
-
2:
← The node that generates time-critical data;
-
3:
M← The maximum allowable number of time slots in CFP;
-
4:
← The slot that is located at the i’-th position;
-
5:
← The node whose ID is i;
-
6:
loop
-
7:
if Current time = start of beacon phase then
-
8:
Send beacon with CFP allocation map
-
9:
end if
-
10:
if
or joins the network then
-
11:
if # of time slots in the CFP < M
then
-
12:
Allocate to the or
-
13:
Update CFP allocation map
-
14:
else
-
15:
Reject the join request
-
16:
end if
-
17:
end if
-
18:
if DATA is received from
then
-
19:
Send ACK to after SIFS
-
20:
else
if RTS is received from
then
-
21:
Send CTS to after SIFS
-
22:
end if
-
23:
end loop
|