Skip to main content
. 2022 Jan 5;22(1):401. doi: 10.3390/s22010401
Algorithm 3: Messages forwarding to vehicles for information and cloud
Input:W1 & W2 (Two list one of safety messages while the other one of non-safety messages)
Output: Sending messages receipt and database storage
  1.   For 1 to n

  2.    Send W1 (ascending order)//Send priority basis/safety messages

  3.    Send to Fog Nodes by using Algorithm 4

  4.   End of for loop

  5.   For 1 to n

  6.    Send W2 (first come first serve basis)

  7.    Send to Fog Nodes by using Algorithm 4

  8.   End of for loop

  9.   Save record to cloud for future use