Research Article

A Vehicular Service-Oriented Dynamical Routing Searching Algorithm in Software-Defined BusNet

Algorithm 1

Data filtering.
input: thisMessage, lastMessages
output: messages
(1)newMsgFlag ⟵ true
(2)For i = 0 ⟶ lastMessages.size ()-1 do
(3)if lastMessages [i].srcId = thisMessage.srcId then
(4)  newMsgFlag ⟵ false
(5)  if allSame (lastMessages [i], thisMessage) then
(6)   throwMessage (thisMessage)
(7)  else
(8)   updateMessage (thisMessage)
(9)   newMsgFlag ⟵ true
(10)  end if
(11)end if
(12)end for
(13)if newMsgFlag = true then
(14) addMessage (thisMessage)
(15)end if
(16)return lastMessages