Reputation: 311
I wish to increase the size of my gate vector within initialize()
in my simple module class file and make a connection to another node.
cModule *nodeA= getSimulation()->getModule(0);
cModule *nodeB= getSimulation()->getModule(1);
nodeA->gate("port$o")->connectTo(nodeB->gate("port$i"));
The gate vectors for nodeA
and nodeB
are already full, i.e. all gates of the gate vectors have been assigned. Within a NED file in the connections section, I would be able to write something like the following:
nodeA.port++ --> ned.IdealChannel --> nodeB.port++;
This allows me to expand the size of the gate vectors and make a connection between the nodes. Is it possible to do something similar in C++?
Upvotes: 0
Views: 38