Everyone who works with the OMNeT++ Mobility Framework has to accept the following coding style appointments, so that files, classes, functions, etc. can immediately be recognized as what they are.
(1) Name module-classes, classes, etc. in C++ style like:
(2) Variables and methods start with a small letter (no underscores), e.g.:
(4) If OMNeT parameters are read in and used in a .h or .cc file, they have to have the same name like the variable used in the source code!
(5) Files must have the same names like the classes!!!
(6) Every SimpleModule is described in a .ned, a .h, as well as a .cc file, e.g. the SimpleModule TokenRing:
(6) The nicest option to build in debug messages is to define a macro "print" at the beginning of each .cc file:
#define print(text) ev <<"ID: "<<hostIndex()<<" ClassName: "<< text << endl //#define print(text)
Substitute "ClassName" with the name of your module, e.g. "BasicNetwLayer". Then you can easily print debug messages in the source code like this:
print("packet received"); print("packet received. msgId:"<<msgId);