Skip to main content
. 2021 Nov 19;21(22):7706. doi: 10.3390/s21227706
Algorithm 2 Routing Path Establishment
  •  1:

    procedure 1 At RSU: Upon receiving a message from a vehicle to be forwarded to another vehicle

  •  2:

        Look Up routing table

  •  3:

        if (path to destination == null) then

  •  4:

            Produce RREQ (VID)

  •  5:

            Broadcast RREQ (VID) to all nodes (vehicles) in the range

  •  6:

        else

  •  7:

            Follow Algorithm 3

  •  8:

        end if

  •  9:

    end procedure

  • 10:

    procedure 2 at OBU and RSU: Receiving RREQ message

  • 11:

        For each RREQ (VID) received

  • 12:

        if (new VID == old VID) then

  • 13:

            Drop RREQ

  • 14:

        else

  • 15:

            Add new VID to CRL

  • 16:

        end if

  • 17:

    end procedure

  • 18:

    procedure 3 at OBU: Receiving RREQ message

  • 19:

        if (there is a path to the destination) then

  • 20:

            Send RREP to the RSU

  • 21:

            RTT is measured at the RSU

  • 22:

        else

  • 23:

            Broadcast RREQ (VID) to other neighboring nodes

  • 24:

        end if

  • 25:

    end procedure