Skip to main content
. 2021 Nov 19;21(22):7706. doi: 10.3390/s21227706
Algorithm 1 Message Handling
  •  1:

    procedure 1: At OnBoard Unit

  •  2:

        For OBU message:

  •  3:

        if (type==emergency) then

  •  4:

            assign weight = 1

  •  5:

        else  !type==normal

  •  6:

            assign weight = 0

  •  7:

        end if

  •  8:

    end procedure

  •  9:

    procedure 2: At Roadside Unit

  • 10:

        Check OBU Message

  • 11:

        if (weight == 1) then

  • 12:

            broadcast Message;

  • 13:

        else !weight == 0

  • 14:

            push Message (FIFO Queue)

  • 15:

            send data message using TMR in Algorithm 3

  • 16:

        end if

  • 17:

    end procedure