Skip to main content
. 2020 Jan 10;20(2):406. doi: 10.3390/s20020406
Algorithm 1 Algorithm of the sending node
for each node(i) wakes up do
  broadcast HP
  if T>RWT&&noHPR
  //T is time after this node broadcasts HP
   node(i) = SN
  else if receive HPR
   if node(i).re > SN.re
    node(i) = SN
   else
    get node(i).starttime and go to Sleep
   end if
  end if
end for