I need clarificatio of sendDirect() method in OMNET
I need clarificatio of sendDirect() method in OMNET
Code below is from OMNeT++
manual. My question is: do I use this method only when I am sending message from compound module to submodules?
If I can use this for communication between modules (simpleModule A
sends msg
to compound moduleB
-> submodule B1) then isn't this violation of rules that communication must comply on the same level of hierarchy?
OMNeT++
simpleModule A
msg
moduleB
This is example code:
cModule *targetModule = getParentModule()->getSubmodule("node2");
sendDirect(new cMessage("msg"), targetModule, "in");
1 Answer
1
No. Usually communication between simple modules inside a compound module doesn't require sendDirect()
. This kind of communication predominantly uses IdealChannel
- i.e. a standard OMNeT++
channel with no errors, zero delay and infinite bandwidth.
sendDirect()
IdealChannel
OMNeT++
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.