Good morning to all of you.
I am trying to build a centralized routing database with omnet++. I have an architecture like this one implemented in omnet++ :
module Node
{
parameters:
int address;
string appType;
@display("i=misc/node_vs,gold");
gates:
inout port[];
submodules:
app: <appType> like InterfaceApp {
parameters:
address = address;
@display("p=140,60");
}
routing: Routing {
parameters:
@display("p=140,130");
gates:
in[sizeof(port)];
out[sizeof(port)];
}
queue[sizeof(port)]: InterfaceReseau {
parameters:
@display("p=80,200,row");
}
connections:
routing.localIn <-- app.out;
for i=0..sizeof(port)-1 {
routing.out[i] --> queue[i].in;
queue[i].line <--> port[i];
}
}
I would like at the begining of the simulation, only one node builds all the rerouting paths an put them inside others nodes. I tried to create another module named "controller" containing submodules : "app" and "node". The "controller" module must build all the rerouting paths and put them inside all node's modules. here is my .ned file :
module Controller
{
parameters:
int address;
string appType;
@display("i=misc/node_vs,gold");
gates:
inout port[];
submodules:
app: <appType> like InterfaceApp {
parameters:
address = address;
@display("p=140,60");
}
node: Node{
parameters:
@display("p=140,130");
gates:
in[sizeof(port)];
out[sizeof(port)];
}
}
it seems like this "Controller" module code is not correct to achieve my needs. Please help me, it is urgent.
Thanks for all helps you could provide me.