## 4 Methodology
### Methodology Flow  
1. OBU: This unit present in the source vehicle is used to send data messages to other vehicles through RSU. Messages produced in the OBU consist of the source vehicle ID (VID) and are assigned a priority value that decides the type of messages. 2. Roadside Unit (RSU): The messages received at RSU are checked for the priority value (0 or 1) to decide which message should be sent first [3]. Therefore, RSU is crucial to control the data traffic in the network; otherwise, every OBU would have access to the whole network and broadcasts an excessive amount of low-priority data packets. Consequently, RSU alleviates traffic problems such as data congestion. 3. Priority Check: As shown in Figure 1, the priority check happens once the messages are received by RSU. If the priority value is 0, then it is considered as a normal message, whereas if the priority value is 1, this is considered as an emergency message and is given the most priority among all the messages received from the OBU. 4. Messages: The messages have information regarding the sender's vehicle. Based on the content of the message, the priority is determined. These messages are transmitted in the VANETs to disseminate network state or emergency incident information to other vehicles in the network. 1. Normal message: Normal message consists of general information about the sender's vehicle such as the speed of the vehicle, the time at which the message is sent, direction, and location of the vehicle. This information will allow vehicles to get more information about the status of the road in the sense of its crowdedness and hence avoid accidents. The normal messages are sent through unicast communication and are given less priority. These messages are pushed into the queue following the FIFO mechanism to be transmitted to the destination using TMR. 2. Emergency message: This message type is time sensitive so it is given a higher priority compared to the normal message because it has the information regarding emergencies (i.e., a collision of vehicles or functional disorder of the vehicle which leads to traffic problems). This message is sent to alert vehicles about such emergencies and, therefore, vehicles should reduce their speed to avoid making such emergency incidents worse particularly on slippery roads. These messages are immediately transmitted among all the vehicles in the network within the RSU range without any delay. So, the approaching vehicles in that range can avoid traffic jams and advance to take a detour. 5. Broadcast: The emergency messages received by RSU are broadcast immediately to all other vehicles in the network [35]. These are alert messages aimed to provide road safety for vehicles of any possible risk. 6. Queue: Queue consists of a list of normal messages to be transmitted sequentially following FIFO. 7. Routing Protocol (TMR): This protocol was implemented to transfer the messages from the source to the destination. The normal message goes through routing protocol which uses the path with the minimum RTT among multiple paths generated. Alternative paths can be used in case there is a link failure. The unicast transmission also happens in some cases where there is no need to interfere with the entire network in the range of an RSU, even if these messages are somewhat urgent. For example, unicast communication is needed when two cars traveling in different streets are about to meet each other in a blind corner [10]. In such a scenario, vehicles cannot see the other side of the intersection due to hindrance caused by high buildings or trees. At such an instance, the source vehicle communicates with the RSU which in turn sends a message to another vehicle in the opposite direction which is likely to collide. Each road segment is equipped with RSU nodes acting as cluster heads. All communications between OBU nodes take place via RSU. In this case, TMR protocol is utilized to avoid this collision for a message from RSU to the other vehicle(s) in danger in a specific road zone.