Skip to main content
. 2015 Dec 15;15(12):31620–31643. doi: 10.3390/s151229875
Algorithm 1 Response for HeartBtevt control packets.
Require:
  • -

    uvrelUV : a sensor node in the network

  • -

    UVhb = UVcldUVsib : a set of sensor nodes whose hop count is no smaller than that of uvrel and whose HeartBtevt control packets have been received by uvrel

Ensure:
  • -

    uvrel may broadcast an EPONG control packet

  • 1:

    cnt ← get the number of sensor nodes in UVhb whose tag is 1

  • 2:

    if (cnt = 0) or (cnt = 1 and uvrel(tag) = 0) then

  • 3:

    return

  • 4:

    end if

  • 5:

    uvrel broadcasts the control packet EPONG = <uvrel, null, pid, HC(uvrel), energy, queue, null, bit_maskLpkt, bit_maskJR, cnt>