build a central routing database using the routing example in omnet++

9 views
Skip to first unread message

ygest...@gmail.com

unread,
Oct 6, 2017, 7:20:40 AM10/6/17
to OMNeT++ Users
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.localOut --> app.in;
        routing.localIn <-- app.out;
        for i=0..sizeof(port)-1 {
            routing.out[i] --> queue[i].in;
            routing.in[i] <-- queue[i].out;
            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.

Reply all
Reply to author
Forward
0 new messages