Search code examples
omnet++veins

Why is DemoBaseApplLayer::myId different in Veins versions 4.7.1 and 5.0?


In Veins 5.0, the myId member accessible from, e.g., TraCIDemo11p::initialize(int stage), refers to the OMNeT++ module ID of the NIC (e.g., node[0].nic).

In Veins 4.7.1, myId used to refer to the OMNeT++ module ID of the host (e.g., node[0]).

Why was this changed?


Solution

  • As Veins is now supporting multiple NICs (as well as unicast communication via 802.11p), it makes sense to use a per-NIC identifier for addressing hosts on the application layer. This has therefore become the new default in Veins 5.0.

    The exact change (and how to revert it, if desired), is documented in the version history. It can be accessed, e.g., via https://github.com/sommer/veins/blame/veins-5.0/src/veins/modules/application/ieee80211p/DemoBaseApplLayer.cc#L83