Skip to main content
. 2022 Sep 9;22(18):6839. doi: 10.3390/s22186839
Algorithm1: Neighbor Discovery.
Input: Ack,N
Output: NG
  •   1.

    Begin:

  •   2.

    Flush NGs

  •   3.

    i0

  •   4.

    S broadcast Hello packets

  •   5.

                 Repeat:

  •   6.

                      for Ack received from node ni

  •   7.

                      S updates the NGs

  •   8.

                          NGs (i, 1)NIDni

  •   9.

                          NGs (i, 2)CNPni

  •   10.

                         NGs (i, 3)𝜏ni

  •   11.

                         increment i

  •   12.

                  until: All the received Acks are processed or each cluster

  •   13.

       Return NG

  •   14.

    end