The answer depends on which version of Veins you run:
Later versions of Veins can be used together with INET 3.4.0. The process is detailed here: https://stackoverflow.com/a/41833646/4707703
Veins 4a2 can be used together with modules from the INET framework version 2.3.0. To allow this, you will need to either run ./configure --with-inet=PATH
(if you build Veins from the command line) or select the corresponding "With INET Framework" project feature (if you build Veins from the IDE).
Note that there is not (yet) a module included in Veins that can connect the INET module modeling the network layer to a Veins module modeling the MAC layer. This will need to be written by you.
Still, for a quick test, you can then add INET modules to your Scenario
(you probably want ChannelControl
and IPv4NetworkConfigurator
) and to your cars (you will probably want your Car
to extend AdhocHost
).
This will let you instantiate INET applications on your cars as common in INET, e.g., by configuring
**.nodeCount = 2
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 2500m
**.constraintAreaMaxY = 2500m
**.constraintAreaMaxZ = 50m
**.node[*].udpApp[*].sendInterval = uniform(250ms, 750ms)
**.node[*].udpApp[0].startTime = 0ms
**.node[*].wlan[0].**.bitrate = 11Mbps
**.node[*].wlan[0].**.globalARP = true
**.node[*].numUdpApps = 1
**.node[*].udpApp[0].typename = "UDPBasicApp"
**.node[*].udpApp[0].destAddresses = "224.0.0.1"
**.node[*].udpApp[0].localPort = 1
**.node[*].udpApp[0].destPort = 1
**.node[*].udpApp[0].messageLength = 100B
**.node[*].udpApp[0].joinLocalMulticastGroups = true