omnet++ - Getting the location of two different modules -
i have 2 types of submodules in network.
adhochost
standard definition in inet framework.- module of type
imobility
mobility type of typerandomwpmobility
, both standard inet modules.
i can location of modules of type adhochost
code:
module = simulation.getmodulebypath("mynet.host[1]"); c = mobilityaccess().get(module)->getcurrentposition();
host[*]
being of type adhochost
.
but when replace host[1]
blockage[1] (blockage of type imobility
), before running simulation error appears:
error in module (mymobilecontroller) mynet.mymobilecontroller during network initialization: model error: module (imobility)mobility not found.
the module mymobilecontroller
module contains fraction of code. module not need move. duty record location of mobile modules in network.
what problem?
the 'mobilityaccess' code expects pass networknode contains submodule named mobility
type imobility
. in first case true (with standardhost) in second case pass directly module has type of imobility.
long story short, module type of imobility meant exist inside of network node , not @ network level.
solution: i'm not sure blockage module supposed do, should not type of imobility, instead should module contains submodule type imobility.
Comments
Post a Comment