Skip to main content
. 2015 Dec 15;15(12):31620–31643. doi: 10.3390/s151229875
Algorithm 3 Sensory data gathering and aggregation.
Require:
  • -

    uvrel : a relay sensor node

  • -

    UVevt : a set of sensor nodes whose sensory data should be relayed by uvrel

Ensure:
  • -

    SRYDTuv : a set of sensory data to be gathered and routed by uvrel

  • 1:

    uvrel sends a getData = <iduv, {iduv-}, pid, HC(uvrel)> control packet to ∀ uvevtUVevt

  • 2:

    cntsryDt ← 0

  • 3:

    while uvrel receives a sryDtuv data packet from a sensor node uvevtUVevt do

  • 4:

    SRYDTuvSRYDTuv ∪ {sryDtuv}

  • 5:

    cntsryDtcntsryDt + 1

  • 6:

    if cntsryDtsizeOf(UVevt) then

  • 7:

       break

  • 8:

    end if

  • 9:

    end while

  • 10:

    uvrel relays SRYDTuv to SN