Cut-through switching is not working when integrating with Time Aware Shaper (TAS) in INET4.0 showcases - omnet++

Hello dear researchers:
I am trying to integrate three INET showcases: cut-through switching, Time Aware Shaper, gPTP.
The topology is simplpe as follows: Two senders, one clock, one switch, and one receiver. For simplicity, the gate is always open.
According to the sample code in combine features, I add the following codes to enable the cut-through switching.
#enable cut-through in all network nodes
*.*.hasCutthroughSwitching = true
*.switch.eth[*].typename = "LayeredEthernetInterface"
*.switch.eth[*].phyLayer.typename = "EthernetStreamingPhyLayer"
Currently, the simulation is working. However, the behavior from the animation is still like store and forward. The packets are not transmitted until the whole packets are inside the switch.
If we only enable the first line and comment the other two lines,
*.*.hasCutthroughSwitching = true
#*.switch.eth[*].typename = "LayeredEthernetInterface"
#*.switch.eth[*].phyLayer.typename = "EthernetStreamingPhyLayer"
then there is an error message showing :
Another packet streaming operation is already in progress -- in module (inet::physicallayer::EthernetPhyHeaderInserter) streamisolation.switch.eth[3].phyLayer.phyHeaderInserter (id=493), at t=0.000000226s, event #20
I would like to know how to fix this problem. Thank you.
My *.ini and *.ned files are below.
streamIsolation.ini
[General]
network = tsn_scalability.simulations.streamisolation
description = "stream isolation latency testing"
**.displayGateSchedules = true
**.gateFilter = "**.eth[1].**"#"**"#"**.eth[1].**"
**.gateScheduleVisualizer.height = 20
**.gateScheduleVisualizer.placementHint = "top"
# avoid ARP
#**.hasGlobalArp = true
#####################
# Clock Configuration
# use TSN clock
**.referenceClock = "tsnClock.clock"
*.tsnClock.clock.typename = "IdealClock"
*.tsnDevice.clock.typename = "OscillatorBasedClock"
*.switch.clock.typename = "OscillatorBasedClock"
*.server.clock.typename = "OscillatorBasedClock"
*.tsnClock.clock.oscillator.typename = "IdealOscillator"
*.tsnDevice.clock.oscillator.typename = "ConstantDriftOscillator"
*.switch.clock.oscillator.typename = "ConstantDriftOscillator"
*.server.clock.oscillator.typename = "ConstantDriftOscillator"
*.tsnDevice.clock.oscillator.driftRate = uniform(-100ppm, 100ppm)
*.switch.clock.oscillator.driftRate = uniform(-100ppm, 100ppm)
*.server.clock.oscillator.driftRate = uniform(-100ppm, 100ppm)
####################################
# Time Synchronization Configuration
# enable time synchronization in all network nodes
#*.*.hasTimeSynchronization = true
# time synchronization starts from the master clock
*.tsnClock.gptp.gptpNodeType = "MASTER_NODE"
*.tsnClock.gptp.masterPorts = ["eth0"]
*.switch.hasGptp = true
*.switch.gptp.gptpNodeType = "BRIDGE_NODE"
*.switch.gptp.masterPorts = ["eth1", "eth2"]
*.switch.gptp.syncInterval = 500us
*.switch.gptp.pdelayInterval = 1ms
*.switch.gptp.pdelayInitialOffset = 0ms
# application traffic sources use the local clock of the network node
*.*.app[*].source.clockModule = "^.^.clock"
# periodic gates in all traffic shapers use the local clock of the network node
*.*.eth[*].macLayer.queue.transmissionGate[*].clockModule = "^.^.^.^.clock"
# client application
*.tsnDevice.numApps = 1
*.tsnDevice.app[0].typename = "UdpSourceApp"
*.tsnDevice.app[0].io.destAddress = "server"
*.tsnDevice.app[0].io.destPort = 1000
*.tsnDevice.app[0].display-name = "tactile"
*.tsnDevice1.numApps = 1
*.tsnDevice1.app[0].typename = "UdpSourceApp"
*.tsnDevice1.app[0].io.destAddress = "server"
*.tsnDevice1.app[0].io.destPort = 1001
*.tsnDevice1.app[0].display-name = "besteff"
# server applications
*.server.numApps = 2
*.server.app[*].typename = "UdpSinkApp"
*.server.app[0].io.localPort = 1000
*.server.app[1].io.localPort = 1001
# enable outgoing streams
*.*.hasOutgoingStreams = true
# enable streams
# enable egress traffic shaping
*.switch.hasEgressTrafficShaping = true
# time-aware traffic shaping
*.switch.eth[*].macLayer.queue.numTrafficClasses = 2
*.switch.eth[*].macLayer.queue.queue[0].display-name = "q0"
*.switch.eth[*].macLayer.queue.queue[1].display-name = "q1"
# enable cut-through in all network nodes
*.*.hasCutthroughSwitching = true
*.switch.eth[*].typename = "LayeredEthernetInterface"
*.switch.eth[*].phyLayer.typename = "EthernetStreamingPhyLayer"
# client application
*.tsnDevice.app[0].source.packetLength = 1500B - 50B # 42B = 8B (UDP) + 20B (IP) + 14B (ETH MAC) + 4B (ETH FCS) + 8B (ETH PHY)
*.tsnDevice.app[0].source.productionInterval = 0.1ms
*.tsnDevice.bridging.streamIdentifier.identifier.mapping = [{stream: "tactile", packetFilter: expr(has(udp) && udp.destPort == 1000)}]
*.tsnDevice.bridging.streamCoder.encoder.mapping = [{stream: "tactile", pcp: 6}]
*.tsnDevice1.app[0].source.packetLength = 1500B - 50B # 42B = 8B (UDP) + 20B (IP) + 14B (ETH MAC) + 4B (ETH FCS) + 8B (ETH PHY)
*.tsnDevice1.app[0].source.productionInterval = 0.2ms
*.tsnDevice1.bridging.streamIdentifier.identifier.mapping = [{stream: "besteff", packetFilter: expr(has(udp) && udp.destPort == 1001)}]
*.tsnDevice1.bridging.streamCoder.encoder.mapping = [{stream: "besteff", pcp: 0}]
streamIsolation.ned
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see http://www.gnu.org/licenses/.
//
package tsn_scalability.simulations;
import inet.networks.base.TsnNetworkBase;
import inet.node.contract.IEthernetNetworkNode;
import inet.node.ethernet.EthernetLink;
import inet.common.scenario.ScenarioManager;
import inet.networks.base.TsnNetworkBase;
import inet.node.ethernet.EthernetLink;
import inet.node.ethernet.EthernetSwitch;
import inet.node.tsn.TsnClock;
import inet.node.tsn.TsnDevice;
import inet.node.tsn.TsnSwitch;
import inet.node.inet.StandardHost;
//import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
network streamisolation extends TsnNetworkBase
{
parameters:
*.eth[*].bitrate = default(1000Mbps);
submodules:
tsnClock: TsnClock {
#display("p=550,424");
}
tsnDevice: TsnDevice {
#display("p=350,200");
}
switch: TsnSwitch {
#display("p=550,200");
}
server: TsnDevice {
#display("p=750,200");
}
tsnDevice1: TsnDevice {
#display("p=350,300");
}
connections:
tsnClock.ethg++ <--> EthernetLink <--> switch.ethg++;
tsnDevice1.ethg++ <--> EthernetLink <--> switch.ethg++;
tsnDevice.ethg++ <--> EthernetLink <--> switch.ethg++;
switch.ethg++ <--> EthernetLink <--> server.ethg++;
}

This is a bug in the cut-through mechanism. The EthernetCuthroughSource modeul checks if the cut-through gate is ready to be pushed with a packet that is eligible for cut-through transmission. In your simulation two packets arrive at the switch from two different Ethernet interfaces at the same time. Both are eligible for cut-through transmission, but obviously only the first one should be transmitted using cut-through. For some reason the backpressure doesn't propagate back to the EthernetCuthroughtSource in the other incoming Ethernet interface from the outgoing interface PHY transmitter, so the other packet is also forwarded using cut-through, which is not possible and thus results in the above error.
Could you please create a bug in the github bug tracker, including your example?

This might be enough to activate cut-through switching:
*.*.hasCutthroughSwitching = true
The type of the Ethernet PHY and MAC is set automatically.

Related

Omnet++/INET Module PeriodicGate forwards Packets even if it is closed

I am new to Omnet and Inet.
I am modifying the network TsnLinearNetwork which is part of the Inet Library and looks like the following:
Client <-------> Switch <-------> Server
The client sends a continuous packet stream which the switch forwards to the server.
I am trying to set up a Periodic Gate which changes its state, so that the packets won't get forwarded, if the gate is closed.
The 1st second the gate should be closed and the 2nd second it should be open.
As a result the gate status changes which I configured in the omnetpp.ini file.
In contrast to that, the packets are forwarded even on a closed gate state.
I played around with the omnet.ini parameters without any success.
I am expecting that the packets are discarded when the periodic gate state is closed.
Like the documentation points out:
PeriodicGate
This module allows or forbids packets to pass through depending on whether the gate is open or closed. The gate is open and closed according to the list of change times periodically.
So here my questions:
Why are the packets forwarded even on a closed gate state?
How can I achieve that behaviour?
omnetpp.ini
[General]
[simpleStart03]
network = simpleStart
sim-time-limit = 2s
*.client.numApps = 1
*.client.app[*].typename = "UdpSourceApp"
*.client.app[0].display-name = "random traffic"
*.client.app[*].io.destAddress = "server"
*.client.app[0].io.destPort = 1000
*.client.app[0].source.packetLength = 1000B
*.client.app[0].source.productionInterval = 500us
*.client.hasOutgoingStreams = true
*.client.bridging.streamIdentifier.identifier.mapping = [{stream: "random traffic"}]
*.client.bridging.streamCoder.encoder.mapping = [{stream: "random traffic", pcp: 0}]
*.server.numApps = 1
*.server.app[*].typename = "UdpSinkApp"
*.server.app[0].io.localPort = 1000
*.switch.bridging.streamCoder.decoder.mapping = [{pcp: 0, stream: "random traffic"}]
*.switch.hasIngressTrafficFiltering = true
*.switch.bridging.streamFilter.ingress.numGates = 1
*.switch.bridging.streamFilter.ingress.numMeters = 1
*.switch.bridging.streamFilter.ingress.numStreams = 1
*.switch.bridging.streamFilter.ingress.classifier.mapping = {"random traffic": 0}
*.switch.bridging.streamFilter.ingress.meter[0].display-name = "random traffic"
*.switch.bridging.streamFilter.ingress.meter[*].typename = "SingleRateTwoColorMeter"
*.switch.bridging.streamFilter.ingress.meter[0].committedInformationRate = 40Mbps
*.switch.bridging.streamFilter.ingress.meter[0].committedBurstSize = 10kB
*.switch.bridging.streamFilter.ingress.gate[*].typename = "PeriodicGate"
*.switch.bridging.streamFilter.ingress.gate[0].display-name = "random traffic"
*.switch.bridging.streamFilter.ingress.gate[0].initiallyOpen = false
*.switch.bridging.streamFilter.ingress.gate[0].durations = [1s,1s]
*.switch.bridging.streamFilter.ingress.gate[*].initiallyOpen = false
omnetpp.ned
import inet.networks.tsn.TsnLinearNetwork;
network simpleStart extends TsnLinearNetwork
{
}
omnet Version: 6.0.1
Inet Version: inet4.4
This issue was stated as a bug
https://github.com/inet-framework/inet/issues/830
The bug is that the classifier doesn't check that the selected gate index can be pushed with the packet or not. In case the selected branch has back pressure then the default branch should be selected. If the default branch also has back pressure then an error should be raised.
This Commit fixes the issue and this commit changes the order of the submodules.

Omnet++ throwing an error in module, but I cant find it

I am running a simulation to compare two mobile routing protocols, AODV and DSDV. When I run the simulation for AODV I get no errors, but when I run it for DSDV I get error in module.
I have posted the config.
It is the same NED file and INI file for both simulations.
Thanks.
[General]
network = Net80211_DSR
tkenv-plugin-path = ../../../etc/plugins
sim-time-limit = 60s # set simulation time in second.
seed-0-mt = 5 # define numbers of seeds for results accuracy.
*.numFixHosts = 1
*.numHosts = 24
**.throughput.scalar-recording = true
**.jitter.scalar-recording = true
**.manetRouting.scalar-recording = true
**.udpApp*.vector-recording = false
**.vector-recording = false
**.scalar-recording = false
**.drawCoverage=false
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.constraintAreaMaxX = 1000m
**.constraintAreaMaxY = 1000m
**.constraintAreaMaxZ = 0m
**.host*.mobilityType = "RandomWPMobility"
**.host*.mobility.initFromDisplayString = false
**.host*.mobility.speed = 4mps
**.host[*].numUdpApps = 1
**.host[*].udpApp[0].typename = "UDPBasicBurst"
**.udpApp[0].localPort = 100
**.udpApp[0].destPort = 100
**.udpApp[0].messageLength = 512B
**.udpApp[0].sendInterval = 0.5s
**.udpApp[0].destAddresses = "fixhost[0]"
**.udpApp[0].chooseDestAddrMode = "perBurst"
**.udpApp[0].burstDuration = 100s
**.udpApp[0].sleepDuration = 1s
**.udpApp[0].startTime = 1s
**.udpApp[0].delayLimit = 2s
**.udpApp[0].destAddrRNG = 0
**.fixhost[0].udpApp[*].typename = "UDPSink"
**.fixhost[0].numUdpApps = 1
**.fixhost[0].udpApp[0].localPort = 100
**.wlan*.bitrate = 54Mbps
**.wlan*.typename="Ieee80211Nic"
**.wlan*.opMode="g"
**.wlan*.mac.EDCA = false
**.wlan*.mgmt.frameCapacity = 10
**.wlan*.mac.maxQueueSize = 14
**.wlan*.mac.rtsThresholdBytes = 3000B
**.wlan*.mac.basicBitrate = 6Mbps # 24Mbps
**.wlan*.mac.retryLimit = 7
**.wlan*.mac.cwMinData = 31 #
**.wlan*.mac.cwMaxData = 31#
*.channelControl.pMax = 2.0mW
**.wlan*.radio.transmitterPower=2.0mW
**.wlan*.radio.sensitivity=-90dBm
**.wlan*.radio.berTableFile="per_table_80211g_Trivellato.dat"
**.broadcastDelay=uniform(0s,0.005s)
[Config AODV]
**.routingProtocol="AODVUU"
**.numHosts = ${Density=5,10,15,20,25,30}
[Config DSDV]
**.routingProtocol="DSDV_2"
**.numHosts = ${Density=5,10,15,20,25,30}
NED.FILE
package inet.examples.CSN09114.Lab5_AODV_DSDV;
import inet.networklayer.autorouting.ipv4.IPv4NetworkConfigurator;
import inet.nodes.inet.AdhocHost;
import inet.util.ThruputMeteringChannel;
import inet.world.radio.ChannelControl;
//
// Example network for testing aodv routing. Contains
// fixed and mobile nodes. Mobile nodes are not moving,
// but are scattered randomly on the playground.
//
network Net80211_DSR
{
parameters:
#display("bgi=background/green,s");
int numHosts;
int numFixHosts;
submodules:
fixhost[numFixHosts]: AdhocHost {
parameters:
#display("i=device/pocketpc_s;r=,,#707070");
}
host[numHosts]: AdhocHost {
parameters:
#display("i=device/pocketpc_s;r=,,#707070");
}
channelControl: ChannelControl {
parameters:
#display("p=50,36;i=misc/sun");
}
configurator: IPv4NetworkConfigurator {
parameters:
config = xml("<config><interface hosts='*' address='145.236.x.x' netmask='255.255.0.0'/><interface fixhosts='0' address='145.236.x.x' netmask='255.255.0.0'/></config>");
#display("p=733,23;i=block/cogwheel_s");
}
connections allowunconnected:
}
This is the error:
OMNeT++ Discrete Event Simulation (C) 1992-2013 Andras Varga, OpenSim Ltd.
Version: 4.4.1, build: 140307-1086eab, edition: Academic Public License -- NOT FOR COMMERCIAL USE
See the license for distribution terms and warranty disclaimer
Setting up Cmdenv...
Loading NED files from ../../../RPL: 0
Loading NED files from ../..:
211 Loading NED files from ../../../src: 438
Preparing for running configuration DSDV, run #5... Scenario:
$Density=30, $repetition=0 Assigned
runID=DSDV-5-20210228-09:23:06-4386 Setting up network
`Net80211_DSR'... Initializing...
RUNTIME ERROR. A cRuntimeError exception is about to be thrown, and
you requested (by setting debug-on-errors=true in the ini file) that
errors abort execution and break into the debugger.
You should now probably be running the simulation under gdb or another
debugger. The simulation kernel will now raise a SIGABRT signal which
will get you into the debugger. If you are not running under a
debugger, you can still use the core dump for post-mortem debugging.
Once in the debugger, view the call stack (in gdb: "bt" command) to
see the context of the runtime error.
<!> Error in module (DSDV_2) Net80211_DSR.fixhost[0].manetrouting (id=44) during network initialization: RNG index 1 is out of range
(num-rngs=1, check the configuration).
TRAPPING on the exception above, due to a debug-on-errors=true
configuration option. Is your debugger ready?
Simulation terminated with exit code: 133 Working directory:
/home/napier/omnetpp-4.4.1/samples/inetmanet-2.0/examples/CSN09114/Lab5_AODV_DSDV
Command line: opp_run -r 5 -u Cmdenv -c DSDV -n
../../../RPL:../..:../../../src -l ../../../src/inet
--record-eventlog=false --debug-on-errors=true omnetpp.ini
Environment variables:
PATH=/home/napier/omnetpp-4.4.1/bin::/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
OMNETPP_IMAGE_PATH=/home/napier/omnetpp-4.4.1/images
LD_LIBRARY_PATH=/home/napier/omnetpp-4.4.1/lib::/home/napier/omnetpp-4.4.1/samples/inetmanet-2.0/src:

how to correctly set destmodule (destination module) for D2D Multicast simulation

I am trying to simulate car to car communication within simulate using the D2D Multicast configuration.
However, I notice that no messages are sent between the cars directly during the simulation due to this error found in the simulation log:
** Event #4666 t=1.09 Highway.car[0].udpApp[0] (CbrSender, id=246) on selfmsg initTraffic (omnetpp::cMessage, id=2592)
**INFO (CbrSender)Highway.car[0].udpApp[0]: 1.09CbrSender::initTraffic - destination 224.0.0.10 not found
INFO (CbrSender)Highway.car[0].udpApp[0]: 1.09CbrSender::initTraffic - the node will retry to initialize traffic in 0.01 seconds**
Destination module is set to NULL (see code reference below) hence, the destination is not found
void CbrSender::initTraffic()
{
std::string destAddress = par("destAddress").stringValue();
cModule* destModule = getModuleByPath(par("destAddress").stringValue());
EV<<"destModule:"<<destModule<<endl;
if (destModule == NULL)
{
// this might happen when users are created dynamically
EV << simTime() << "CbrSender::initTraffic - destination " << destAddress << " not found" << endl;
Is this error due to dynamically created users? How can this be fixed?
As mentioned in the readme.txt of the D2DMulticast, I have set the multicast cast group in demo.xml for UEs to receive the multicast message from the sender.
<multicast-group hosts="car[*]" interfaces="wlan" address="224.0.0.10"/>
The omnetpp.ini parameters are as follows :
[Config D2DMulticast]
### Enable D2D for the eNodeB and the UEs involved in direct communications ###
*.eNodeB*.d2dCapable = true
*.car[*].d2dCapable = true
**.amcMode = "D2D"
### Select CQI for D2D transmissions ###
# One-to-Many communications work with fixed CQI values only.
# Set the parameter **.usePreconfiguredTxParams and select the desired CQI using the parameter **.d2dCqi
**.usePreconfiguredTxParams = true
**.d2dCqi = ${cqi=7}
### Traffic configuration: one-to-many traffic between UEs (car[0] --> car[1..9]) ###
*.car[*].numUdpApps = 1
# Transmitter
*.car[0].udpApp[*].typename = "CbrSender"
*.car[0].udpApp[*].localPort = 3088+ancestorIndex(0)
*.car[0].udpApp[*].startTime = uniform(0s,0.02s)
*.car[0].udpApp[*].destAddress = "224.0.0.10" # IP address of the multicast group
*.car[0].udpApp[*].destPort = 1000
# Receivers (they must belong to the above multicast group)
*.car[1].udpApp[*].typename = "CbrReceiver"
*.car[1].udpApp[*].localPort = 1000
# enrolled multicast groups must be set in the HostAutoConfigurator (instead of demo.xml), seperated by a single space character
*.car[*].configurator.mcastGroups = "224.0.0.10"

How to create a FTP connection and send a file in OMNeT++

I want to create a FTP connection and send a big file via it and see its effect in my network. In order to do that, I wrote the following lines in OMNet++ scenario file. I am not sure whether this is a correct way of creating a FTP connection or not. I set "thinkTime" and "IdleInterval" parameters to zero to send the FTP data immediately and in one session. Since the file size is too big for my current simulation, I think I would have only one session through the whole simulation time. However the throughput of my FTP connection is too low and I am not sure. Can someone help me? All suggestions or FTP examples are welcome.
# FTPclusterMember FTP
**.clusterMember[0].tcpApp[1].typename = "TCPBasicClientApp"
**.clusterMember[0].tcpApp[1].connectAddress = "FTPserver"
**.clusterMember[0].tcpApp[1].connectPort = 21
# Download Scenario requestLength < replyLength
**.clusterMember[0].tcpApp[1].requestLength = 100B
**.clusterMember[0].tcpApp[1].replyLength = 1500MB
**.clusterMember[0].tcpApp[1].thinkTime = 0s
**.clusterMember[0].tcpApp[1].idleInterval = 0s
# FTPserver Settings
**.FTPserver.numTcpApps = 1
**.FTPserver.tcpApp[0].typename = "TCPSinkApp"
**.FTPserver.tcpApp[0].localAddress = "FTPserver"
**.FTPserver.tcpApp[0].localPort = 21
Since FTP uses TCP in transport layer, we can use "TCPBasicClientApp" and "TCPGenericSrvApp" for FTP client and server respectively. For simulating behavior of FTP protocol, we set the port to 21. In addition, for simulation upload and download scenario, you just need to change the size of request length and reply length. As an example, please take a look at codes below;
# FTPclusterMember FTP
**.clusterMember[0].numTcpApps = 1
**.clusterMember[0].tcpApp[0].typename = "TCPBasicClientApp"
**.clusterMember[0].tcpApp[0].connectAddress = "FTPserver"
**.clusterMember[0].tcpApp[0].connectPort = 21
# Download Scenario requestLength < replyLength
# Upload Scenario requestLength > replyLength
**.clusterMember[0].tcpApp[0].requestLength = 1500MB
**.clusterMember[0].tcpApp[0].replyLength = 100B
**.clusterMember[0].tcpApp[0].thinkTime = 0s
**.clusterMember[0].tcpApp[0].idleInterval = 0s
# FTPserver Settings
**.FTPserver.numTcpApps = 1
**.FTPserver.tcpApp[0].typename = "TCPGenericSrvApp"
**.FTPserver.tcpApp[0].localAddress = "FTPserver"
**.FTPserver.tcpApp[0].localPort = 21
As you can see, I set "idleInterval" abd "thinktime" to zero. With these values, you can be sure that you have a constant transmission of FTP packets during your simulation time.

Veins: I added extra accident message but can not see the data exchange between nodes

I added extra event like accident in TraCiMobility.cc including the accident message but I can only see the data exchange between nodes for the accident message and can not see the data exchange between nodes with the new "icyroad" event.
When using only "icy road", I can see the data exchange between the nodes. Where should I add/edit in Veins so that I can see data exchange when both or more events are active?
The .ini is as follows:
*.node[*].veinsmobilityType = "org.car2x.veins.modules.mobility.traci.TraCIMobility"
*.node[*].mobilityType = "TraCIMobility"
*.node[*].mobilityType.debug = true
*.node[*].veinsmobilityType.debug = true
*.node[*].veinsmobility.x = 0
*.node[*].veinsmobility.y = 0
*.node[*].veinsmobility.z = 1.895
*.node[4].veinsmobility.accidentCount = 1
*.node[4].veinsmobility.accidentStart = 45s
*.node[4].veinsmobility.accidentDuration = 30s #30s
*.node[3].veinsmobility.icyroadCount = 1
*.node[3].veinsmobility.icyStart = 15s
*.node[3].veinsmobility.icyDuration = 30s
The sample simulation that is included in Veins 4a2 uses an application layer that only relays the first message it receives. You will need to change this to a more full-featured application layer to make this work with more than one event type.

Resources