How do I call a parameter for a compound module?
问题 I am using omnet++, and was wondering how do I get a parameter in a c++ file of a compound module. module server { parameters: int server; submodule: //Queue // processor } calling the par function in c++ is working for me. 回答1: Compound module doesn't have C++ code. Only simple modules have a C++ code. To get the value of a compound module's parameter from code of simple module one can use: getParentModule()->par("foo"); An example. NED file: module Server { parameters: int cpuNumber;