Skip to main content
. 2019 Apr 5;19(7):1640. doi: 10.3390/s19071640
Algorithm 1 Link scheduling algorithm at the coordinator on DataCh.
Input:N CRBANs, at each CRBAN {List of idle channels CIi(t), list of neighbors NBIi(t, Ck), maximum transmit power PTxdata}
Output: A set of valid data channels {Cx} for N CRBANs
1. While all WBANs are not scheduled
2.  At coordinator of CBi: received the NBIi(t) (list of neighbors)
3.  For each CByNBIi(t)
4.   Check the list of idle channels CIy(t) of each CBy
5.   CINBI(t) = CINBI(t) ∪CIy(t)
6.  End for
7.  If (CINBI(t) == CIi(t))
8.   Find CBx with the highest priority value in Prio(CBx) = max(Prio(NBIi(t))
9.   If (Prio(CBi) > (Prio(CBx))
10.    Broadcast Grouping_Mesg = {CBx, CBi} to NBIi(t)
11.    CBi, CBx takes the first channel in CzCIi(t),
12.    Set TNB2 as (24)
13.    Set Bi(ti, Cz) = 1; Bx(tx,Cz) = 1;
14.    Broadcast the Update_Used_Channel = {Bi(t, Cz), Bx(tx, Cz)}
15.   Else
16.    Waiting for the Grouping_Mesg
17.    If (CBiGrouping_Mesg)
18.     Update Bi(ti, Cz) = 1
19.    Else
20.     CBi takes the random channel CzCIi(t)
21.    End if
22.   End if
23.  Else
24.   CBi will select a channel Cz = {Ck|CkCIi(t), max(ΔTt(Ck))} as in (17b)
25.    Broadcast the Update_Used_Channel = {Bi(t, Cz)}
26.  End if
27.  Update_Used_Channel = set of valid data channels {Cx} for N CRBANs
28. End while