Skip to main content
. 2017 Jul 5;17(7):1573. doi: 10.3390/s17071573
Algorithm 4: The proposed modified protocol: MPH-M.
  • for each node i do

  •  Node i turns on;

  • Discovery.time=0;

  •  SEND HELLO packet;

  •  RECEIVE ACK packet;

  •  Detection testing algorithm (Algorithm 2);

  • if Discovery.time%10==0 then

  •   if Node i does not have this route then

  •    Route discovery;

  •    SEND HELLO packet;

  •    RECEIVE ACK packet;

  •   else

  •    DO nothing;

  •   end if

  • end if

  • if TRAFFIC packet then

  •   if Node i does not have this route then

  •    SEND TRAFFIC packet to its parents;

  •   else

  •    SEND TRAFFIC packet to specific parent;

  •   end if

  • end if

  • if a CONTROL packet is received from Node j then

  •   REMOVE Node j from neighbor table;

  • else

  •   DO nothing;

  • end if

  • Discovery.time++;

  • end for