omnet++ - Getting the location of two different modules -


i have 2 types of submodules in network.

  1. adhochost standard definition in inet framework.
  2. module of type imobility mobility type of type randomwpmobility, 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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -