Skip to main content
. 2020 Jan 19;20(2):548. doi: 10.3390/s20020548
Algorithm 5 Client device
Input:Pb (Push button)
   Ackmsg (Acknowledgment message)
   GPScor (GPS coordinates )
   AVBnet (Available Networks)
Output:Rmsg (Request message containing node ID, message ID, and GPS coordinates)
  • 1:

    procedure

  • 2:

     Step 1: defining and initializing variables

  • 3:

        Scan AVBnet

  • 4:

        Apply MMN Algorithm ( returns Min & Max ID)

  • 5:

     Step 2: detecting events

  • 6:

    while 1 do

  • 7:

      if Pb=true then

  • 8:

        read GPScor

  • 9:

        send Rmsg to MinID

  • 10:

      end if

  • 11:

      if Ackmsg=true then

  • 12:

        Pring Ackmsg on screen

  • 13:

      end if

  • 14:

    end while

  • 15:

    end procedure