|
Algorithm 1 Route selection between the primary route (via D2D) and the secondary route (via MC BS) |
-
1:
procedureRoute selection
-
2:
for
and
do
-
3:
if route is available then
-
4:
send packet to
-
5:
if
is not available then
-
6:
packet goes through (secondary route) to
-
7:
end if
-
8:
if
is available then
-
9:
check the second condition:
-
10:
if
is
then
-
11:
send packet to
-
12:
end if
-
13:
end if
-
14:
if
is not available then
-
15:
packet goes through to
-
16:
end if
-
17:
if
is available then
-
18:
check the second condition:
-
19:
if
is
then
-
20:
send packet to
-
21:
end if
-
22:
end if
-
23:
if
is not available then
-
24:
packet goes through to
-
25:
end if
-
26:
if
is available then
-
27:
check the second condition:
-
28:
if
is
then
-
29:
send the packet to
-
30:
send the packet to destination
-
31:
else packet goes through to
-
32:
end if
-
33:
end if
-
34:
end if
-
35:
end for
-
36:
end procedure
|