1
votes

Whenever I run the OMNet++ simulation it is giving me a runtime exception

" Error in module (cModule) CompleteScenarioIncludingGateway (id=1) during network initialization: Module is not inside a Node (Node must be marked by @node property in ned module)."

I would like to know what does it mean and how to resolve it.

1
you should provide code from your *.ned file (CompleteScenarioIncludingGateway) - user4786271

1 Answers

1
votes

Each module that represent a node in the network (e.g. a host, router) should be marked with the @node property (in recent versions of INET it is called @networkNode instead of @node). Here is how it is done in INET's NodeBase.ned:

module NodeBase like INetworkNode
{
    parameters:
        @networkNode
        @display("bgb=,448");
        ...

The @networkNode is actually a marker so any module placed inside the node can travel up in the module parent chain and find which module represents the actual host it is residing in. This helps the modules inside the host to more easily navigate. For example, if a module is interested in the physical position of the host, it starts traveling upwards on the module chain and check each time whether this module has the @networkNode property. If it does, then by convention, it should have a submodule named "mobility" which can be used to retrieve the location.