rip_n.cc

来自「使用OMNET++实现RIP的核心算法,运行环境ubuntu7.04,omnet」· CC 代码 · 共 1,128 行 · 第 1/3 页

CC
1,128
字号
        RIP14_p->setDisplayString("i=abstract/router;p=136,160");    }    //    // submodule 'RIP15':    //    int RIP15_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP15_p = modtype->create("RIP15", mod);    {        cContextSwitcher __ctx(RIP15_p); // do the rest in this module's context        _readModuleParameters(RIP15_p);        RIP15_p->setDisplayString("i=abstract/router;p=72,160");    }    //    // submodule 'RIP16':    //    int RIP16_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP16_p = modtype->create("RIP16", mod);    {        cContextSwitcher __ctx(RIP16_p); // do the rest in this module's context        _readModuleParameters(RIP16_p);        RIP16_p->setDisplayString("i=abstract/router;p=72,232");    }    //    // submodule 'RIP17':    //    int RIP17_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP17_p = modtype->create("RIP17", mod);    {        cContextSwitcher __ctx(RIP17_p); // do the rest in this module's context        _readModuleParameters(RIP17_p);        RIP17_p->setDisplayString("i=abstract/router;p=48,368");    }    //    // submodule 'RIP18':    //    int RIP18_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP18_p = modtype->create("RIP18", mod);    {        cContextSwitcher __ctx(RIP18_p); // do the rest in this module's context        _readModuleParameters(RIP18_p);        RIP18_p->setDisplayString("i=abstract/router;p=120,368");    }    //    // submodule 'RIP19':    //    int RIP19_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP19_p = modtype->create("RIP19", mod);    {        cContextSwitcher __ctx(RIP19_p); // do the rest in this module's context        _readModuleParameters(RIP19_p);        RIP19_p->setDisplayString("i=abstract/router;p=88,304");    }    //    // submodule 'RIP20':    //    int RIP20_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP20_p = modtype->create("RIP20", mod);    {        cContextSwitcher __ctx(RIP20_p); // do the rest in this module's context        _readModuleParameters(RIP20_p);        RIP20_p->setDisplayString("i=abstract/router;p=136,232");    }    //    // submodule 'RIP21':    //    int RIP21_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP21_p = modtype->create("RIP21", mod);    {        cContextSwitcher __ctx(RIP21_p); // do the rest in this module's context        _readModuleParameters(RIP21_p);        RIP21_p->setDisplayString("i=abstract/router;p=464,296");    }    //    // submodule 'RIP22':    //    int RIP22_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP22_p = modtype->create("RIP22", mod);    {        cContextSwitcher __ctx(RIP22_p); // do the rest in this module's context        _readModuleParameters(RIP22_p);        RIP22_p->setDisplayString("i=abstract/router;p=400,296");    }    //    // submodule 'RIP23':    //    int RIP23_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP23_p = modtype->create("RIP23", mod);    {        cContextSwitcher __ctx(RIP23_p); // do the rest in this module's context        _readModuleParameters(RIP23_p);        RIP23_p->setDisplayString("i=abstract/router;p=528,296");    }    //    // submodule 'RIP24':    //    int RIP24_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP24_p = modtype->create("RIP24", mod);    {        cContextSwitcher __ctx(RIP24_p); // do the rest in this module's context        _readModuleParameters(RIP24_p);        RIP24_p->setDisplayString("i=abstract/router;p=456,240");    }    //    // submodule 'RIP25':    //    int RIP25_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP25_p = modtype->create("RIP25", mod);    {        cContextSwitcher __ctx(RIP25_p); // do the rest in this module's context        _readModuleParameters(RIP25_p);        RIP25_p->setDisplayString("i=abstract/router;p=440,352");    }    //    // submodule 'RIP26':    //    int RIP26_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP26_p = modtype->create("RIP26", mod);    {        cContextSwitcher __ctx(RIP26_p); // do the rest in this module's context        _readModuleParameters(RIP26_p);        RIP26_p->setDisplayString("i=abstract/router;p=256,232");    }    //    // submodule 'RIP27':    //    int RIP27_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP27_p = modtype->create("RIP27", mod);    {        cContextSwitcher __ctx(RIP27_p); // do the rest in this module's context        _readModuleParameters(RIP27_p);        RIP27_p->setDisplayString("i=abstract/router;p=216,288");    }    //    // submodule 'RIP28':    //    int RIP28_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP28_p = modtype->create("RIP28", mod);    {        cContextSwitcher __ctx(RIP28_p); // do the rest in this module's context        _readModuleParameters(RIP28_p);        RIP28_p->setDisplayString("i=abstract/router;p=304,280");    }    //    // submodule 'RIP29':    //    int RIP29_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP29_p = modtype->create("RIP29", mod);    {        cContextSwitcher __ctx(RIP29_p); // do the rest in this module's context        _readModuleParameters(RIP29_p);        RIP29_p->setDisplayString("i=abstract/router;p=184,344");    }    //    // submodule 'RIP30':    //    int RIP30_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP30_p = modtype->create("RIP30", mod);    {        cContextSwitcher __ctx(RIP30_p); // do the rest in this module's context        _readModuleParameters(RIP30_p);        RIP30_p->setDisplayString("i=abstract/router;p=240,344");    }    //    // submodule 'RIP31':    //    int RIP31_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP31_p = modtype->create("RIP31", mod);    {        cContextSwitcher __ctx(RIP31_p); // do the rest in this module's context        _readModuleParameters(RIP31_p);        RIP31_p->setDisplayString("i=abstract/router;p=160,416");    }    //    // submodule 'RIP32':    //    int RIP32_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP32_p = modtype->create("RIP32", mod);    {        cContextSwitcher __ctx(RIP32_p); // do the rest in this module's context        _readModuleParameters(RIP32_p);        RIP32_p->setDisplayString("i=abstract/router;p=216,416");    }    //    // submodule 'RIP33':    //    int RIP33_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP33_p = modtype->create("RIP33", mod);    {        cContextSwitcher __ctx(RIP33_p); // do the rest in this module's context        _readModuleParameters(RIP33_p);        RIP33_p->setDisplayString("i=abstract/router;p=296,352");    }    //    // submodule 'RIP34':    //    int RIP34_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP34_p = modtype->create("RIP34", mod);    {        cContextSwitcher __ctx(RIP34_p); // do the rest in this module's context        _readModuleParameters(RIP34_p);        RIP34_p->setDisplayString("i=abstract/router;p=360,352");    }    //    // submodule 'RIP35':    //    int RIP35_size = 1;    modtype = _getModuleType("RIP");    cModule *RIP35_p = modtype->create("RIP35", mod);    {        cContextSwitcher __ctx(RIP35_p); // do the rest in this module's context        _readModuleParameters(RIP35_p);        RIP35_p->setDisplayString("i=abstract/router;p=504,352");    }    //    // connections:    //    cGate *srcgate, *destgate;    cChannel *channel;    cPar *par;    // connection    srcgate = _getFirstUnusedSubmodGate(RIP_p, "out");    destgate = _getFirstUnusedSubmodGate(RIP1_p, "in");    channel = _createNonTypedBasicChannel(0.2, 0, 0);    srcgate->connectTo(destgate,channel);    // connection    srcgate = _getFirstUnusedSubmodGate(RIP1_p, "out");    destgate = _getFirstUnusedSubmodGate(RIP_p, "in");    channel = _createNonTypedBasicChannel(0.2, 0, 0);    srcgate->connectTo(destgate,channel);    // connection    srcgate = _getFirstUnusedSubmodGate(RIP2_p, "out");    destgate = _getFirstUnusedSubmodGate(RIP1_p, "in");    channel = _createNonTypedBasicChannel(0.2, 0, 0);    srcgate->connectTo(destgate,channel);    // connection    srcgate = _getFirstUnusedSubmodGate(RIP1_p, "out");    destgate = _getFirstUnusedSubmodGate(RIP2_p, "in");    channel = _createNonTypedBasicChannel(0.2, 0, 0);    srcgate->connectTo(destgate,channel);    // connection    srcgate = _getFirstUnusedSubmodGate(RIP2_p, "out");    destgate = _getFirstUnusedSubmodGate(RIP3_p, "in");    channel = _createNonTypedBasicChannel(0.2, 0, 0);    srcgate->connectTo(destgate,channel);    // connection    srcgate = _getFirstUnusedSubmodGate(RIP3_p, "out");    destgate = _getFirstUnusedSubmodGate(RIP2_p, "in");    channel = _createNonTypedBasicChannel(0.2, 0, 0);    srcgate->connectTo(destgate,channel);    // connection    srcgate = _getFirstUnusedSubmodGate(RIP3_p, "out");    destgate = _getFirstUnusedSubmodGate(RIP4_p, "in");    channel = _createNonTypedBasicChannel(0.2, 0, 0);    srcgate->connectTo(destgate,channel);    // connection    srcgate = _getFirstUnusedSubmodGate(RIP4_p, "out");    destgate = _getFirstUnusedSubmodGate(RIP3_p, "in");    channel = _createNonTypedBasicChannel(0.2, 0, 0);    srcgate->connectTo(destgate,channel);    // connection    srcgate = _getFirstUnusedSubmodGate(RIP4_p, "out");    destgate = _getFirstUnusedSubmodGate(RIP5_p, "in");    channel = _createNonTypedBasicChannel(0.2, 0, 0);    srcgate->connectTo(destgate,channel);    // connection    srcgate = _getFirstUnusedSubmodGate(RIP5_p, "out");    destgate = _getFirstUnusedSubmodGate(RIP4_p, "in");    channel = _createNonTypedBasicChannel(0.2, 0, 0);    srcgate->connectTo(destgate,channel);    // connection    srcgate = _getFirstUnusedSubmodGate(RIP5_p, "out");    destgate = _getFirstUnusedSubmodGate(RIP6_p, "in");    channel = _createNonTypedBasicChannel(0.2, 0, 0);    srcgate->connectTo(destgate,channel);    // connection    srcgate = _getFirstUnusedSubmodGate(RIP6_p, "out");    destgate = _getFirstUnusedSubmodGate(RIP5_p, "in");    channel = _createNonTypedBasicChannel(0.2, 0, 0);    srcgate->connectTo(destgate,channel);    // connection    srcgate = _getFirstUnusedSubmodGate(RIP6_p, "out");    destgate = _getFirstUnusedSubmodGate(RIP7_p, "in");    channel = _createNonTypedBasicChannel(0.2, 0, 0);    srcgate->connectTo(destgate,channel);    // connection    srcgate = _getFirstUnusedSubmodGate(RIP7_p, "out");    destgate = _getFirstUnusedSubmodGate(RIP6_p, "in");    channel = _createNonTypedBasicChannel(0.2, 0, 0);    srcgate->connectTo(destgate,channel);    // connection    srcgate = _getFirstUnusedSubmodGate(RIP7_p, "out");    destgate = _getFirstUnusedSubmodGate(RIP8_p, "in");    channel = _createNonTypedBasicChannel(0.2, 0, 0);    srcgate->connectTo(destgate,channel);    // connection    srcgate = _getFirstUnusedSubmodGate(RIP8_p, "out");    destgate = _getFirstUnusedSubmodGate(RIP7_p, "in");

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?