Research Article
Data Dissemination Based on Fuzzy Logic and Network Coding in Vehicular Networks
Algorithm 1
Data coding and forwarding algorithm for primary backbone
.
Input: , , ; | Output: NOP, DP; | if is a correct data packet then | ; | if satisfying decoding conditions then | obtain original packets by decoding ; | (5); | (6)while having do | (7) a coded packet ; | (8)send to and ; | (9)send two coded packets using to ; | (10); | (11)end | (12)create coded packets ; | (13)if then | (14)send to and ; | (15)else | (16)send to and ; | (17)end | (18)end | (19)end | (20)if is an incorrect data packet then | (21)send to ; | (22)end | (23)if is from node then | (24)if is carried by then | (25)if other original packet to be sent to then | (26)create one or several coded packets ; | (27)send to ; | (28)else | (29)send to ; | (30)end | (31)else | (32)if then | (33)send to ; | (34)else | (35)send to ; | (36)end | (37)end | (38)end |
|