Skip to main content
. 2025 Oct 7;25(19):6213. doi: 10.3390/s25196213
Algorithm 2 PR Wi-SUN FAN discovery process on JS1
  • 1:

    C: number of available channels

  • 2:

    V[]← channel_function()

  • 3:

    Ic: channel index

  • 4:

    UDI: unicast dwell interval

  • 5:

    Ic← 0

  • 6:

    node = JS1

  • 7:

    start of PAS trickle timer

  • 8:

    CHscanV[Ic]

  • 9:

    while node is in the process of connecting do

  • 10:

        if UDI time has expired then

  • 11:

            resets the scan time

  • 12:

            Ic(Ic+1)

  • 13:

            CHscanV[Ic]

  • 14:

        end if

  • 15:

        if node = JS1 then

  • 16:

            node is not associated

  • 17:

            transmits PAS when the trickle timer allows

  • 18:

            if PA is received then

  • 19:

               stop of PAS trickle timer

  • 20:

               node ← JS5

  • 21:

            end if

  • 22:

            if PAS is received then

  • 23:

               PR_table ← unicast scheduling data

  • 24:

            end if

  • 25:

        end if

  • 26:

        if node = JS5 then

  • 27:

            node is associated

  • 28:

            start of PA trickle timer

  • 29:

            for each node in PR_table do

  • 30:

               predict and send PA_unicast to the node

  • 31:

            end for

  • 32:

        end if

  • 33:

    end while