I have 2 types of submodules in my network.
AdhocHost
which is standard definition in INET framework.- module of type
IMobility
with its mobility type of typeRandomWPMobility
, both are standard INET modules.
I can get the location of modules of type AdhocHost
by this code:
module = simulation.getModuleByPath("Mynet.host[1]");
c = MobilityAccess().get(module)->getCurrentPosition();
host[*]
being of type AdhocHost
.
But when I replace host[1]
with blockage[1] (blockage is of type IMobility
), before running simulation this error appears:
Error in module (MyMobileController) Mynet.mymobilecontroller during network initialization: Model error: module (IMobility)mobility not found.
The module mymobilecontroller
is the module that contains this fraction of code. This module does not need to move. Its duty is just to record the location of mobile modules in the network.
What is the problem?