|
|
Algorithm 2: The emergency reporting performed inside a cluster. |
|
|
for
n ← 1 to
#non–elected
do
|
| Check the emergency degree (ED); |
| if
(EDn == critical) or (EDn == high)
then
|
| perform spectrum sensing; |
| if
a free band (FB) is available
then
|
| % share the medium in the primary network; |
| send an
emergency_message over FB; |
| wait for the detection of the CH or of the Vice-CH; |
| if
EDn == critical
then
|
| send the measured data over the maximum packet size; |
| else
|
| send the measured data over the restricted packet size; |
| end
|
| else
|
| % share the medium in the secondary network; |
| Access the secondary network over a CSMA protocol; |
| end
|
| else
|
| % share the medium in the secondary network; |
| Access the secondary network over a CSMA protocol; |
| end
|
| end |
|