imtithal
imtithal

Reputation: 174

How signals mechanism works in omnet++

I am new in omnet++ and I have a problem in understanding signals mechanism. I know what module, network, submodule channel and all that. I also know how to declare, register and emit signals in a module. But I am confused about how signals work between submodules in a network. Is there any way for signaling between submodules of a network. for example if I have the following network:

  submodules:
   host[numclients]: StandardHost;
    server1: StandardHost {
        @display("i=device/server;p=790.86,56.489998"; "p=683.9325,149.295");
    }
    server2: StandardHost {
        parameters:
            @display("i=device/server;p=1028.9249,219.9075");        }
    server3: StandardHost {
        parameters:
            @display("i=device/server;p=587.09247,219.9075");        }
    attacker1: StandardHost {
        @display("p=197.715,760.5975");        }
    attacker2: StandardHost {
        @display("p=1377.9525,760.5975","i=device/cellphone_l,gold");        }
    router0: Router {
        @display("p=627.4425,574.9875");        }
    router2: Router {
        @display("p=972.435,574.9875");        }
    router1: Router {
        @display("p=790.86,415.60498");        }

is there any way to make signals between a router application and the servers or at least one server?

Thanks in advance

Upvotes: 0

Views: 1157

Answers (1)

Jerzy D.
Jerzy D.

Reputation: 7002

Actually, signals do not work between submodules of different modules. According to OMNeT++ Simulation Manual:

Signals propagate on the module hierarchy up to the root.

It means, that signal emitted from a module may be received only by the parent module, and by the parent of the parent module, etc.
Therefore, you cannot use signals to publish information between the router and the server.


It should be noticed, that in OMNeT++ there is the ability to send a direct message between any modules in network without using channel (i.e. without delay and loss).

Upvotes: 2

Related Questions