Skip to main content
. 2020 Jan 19;20(2):548. doi: 10.3390/s20020548
Algorithm 1 Server device
Input:Rmsg (Request message containing node ID, message ID, and GPS coordinates)
Output:Ackmsg (Acknowledgment message)
    Alarmmsg (Alarm message generated)
  • 1:

    procedure

  • 2:

     Step 1: defining and initializing variables

  • 3:

     Step 2: detecting events

  • 4:

    while 1 do

  • 5:

      if Rmsg=true then

  • 6:

        Generate Alarmmsg

  • 7:

        send Ackmsg back

  • 8:

        Print request message on screen.

  • 9:

      end if

  • 10:

    end while

  • 11:

    end procedure