|
|
Algorithm 3: Communication between the clusters. The cooperative modulation diversity with spectrum sensing is invoked if errors occur. |
|
|
for
i ← 1 to
#packets
do
|
| CH transmits a new packet; |
| Receiver checks the CRC; |
| if
CRC== correct
then
|
| Receiver sends back an ACK; |
| else
|
| Receiver sends back a NACK; |
| Nr = 0; |
| for
j ← 1 to
do
|
| CH transmits Q2 and I1 in the time slot 1; |
| Vice-CH performs spectrum sensing in the time slot 1; |
| Vice-CH transmits Q1 and I2 in the time slot 2; |
| CH performs spectrum sensing in the time slot 2; |
| if
A request to emergency reporting is detected
then
|
| Vice-CH forwards the emergency information; |
| CH transmits the rest of the packet by simply QPSK; |
| else
|
| Both CH and Vice-CH keeps cooperating; |
| end
|
| Receiver checks the CRC; |
| if
CRC == correct
then
|
| Receiver sends back an ACK; |
| else
|
| Receiver sends back a NACK; |
| end
|
| end
|
| end
|
| end |
|