Adapting user-written models to work with newer Veins versions.
Since Veins 5.0, releases follow a semantic versioning scheme:
Each release is assigned a version number consisting of two or three parts seperated by dots (
Newer releases carry higher version numbers, with the most significant number being the one on the left (
2.0.0 is newer than
Any user-written model that was written for a specific Veins release should also work with any newer release that has the same major version number (the
Releases that only introduce new features are assigned newer minor version numbers (the
Bugfix releases are assigned a patch number (the
Preview versions are assigned a label that does not follow this scheme (e.g.,
The label is an indication of what release the preview will correspond to (in this case: the first Veins release with a major version of
Yet, no assumptions should be made with respect to compatibility or stability of these versions.
Note: In particular, preview versions should not be relied upon for producing valid results.
A number of backwards-incompatible changes are introduced with Veins 5. These changes require user-written models to be adapted and are pointed out below.
Additionally, the code of Veins 5 is structured and written slightly differently to that of Veins 4. For ease of reading, it is recommended to follow this structure for user-written code as well. These changes are pointed out below as well.
uncrustifycode formatter (version 0.68.1) and run
clang-formatcode formatter (version 6.0.0) and run
#include "veins/veins.h"at the top of every header file
VEINS_VERSION_MAJORmacro is set as expected and the
VEINS_VERSION_MINORis no smaller than expected.
thresholding="true"where appropriate if you want to make use of the faster PHY implementation of Veins 5
<AnalogueModel type="SimplePathlossModel" thresholding="true">
<AnalogueModel type="SimpleObstacleShadowing" thresholding="true">
<AnalogueModel type="VehicleObstacleShadowing" thresholding="true">
gdbattached as a debugger, use
./run --debug --tool gdb -- -u Cmdenv
.coreDebugparameters from your
.inifile (and, optionally, your own simulation models); remove
#define DBGstatements from your own simulation models
EV_DEBUG << "..."or
EV_INFO << "..."instead. See the OMNeT++ user manual for details
**.manager.cmdenv-log-level = warnto selectively set the amount of debug information printed
cmdenv-express-mode = falseand
cmdenv-log-prefix = "[%c%?-%l] t=%t %d (%f:%i) -> "to configure how debug information is printed
.veinsmobility.hostPositionOffsetas appropriate and set
.veinsmobility.z = 0
.hfiles, replace include guards (
#ifndef XYZ ... #define XYZ ... #endif) with
orientation==direction; if your mobility model needs to enforce this, do it yourself.
par("...").longValue()to implicit casts from
simsignalwrap_tthat uses a macro like
.nic.phy80211p.noiseFloorand pick a sane value
.nic.phy80211p.minPowerLeveland pick a sane value