asyncnetwork.ned

来自「基于omnet++开发的Mf框架下的802.11协议仿真。」· NED 代码 · 共 49 行

NED
49
字号
//***************************************************************************
//* file:        AsyncNetwork.ned
// *
// * author:      yupeng.hu
// *
// * copyright:   (C) 2006 HUNAN Univer, China
//
// * part of:     Asynchronous Simulation
// * 
// *
// ***************************************************************************/

import
    "AsyncHost",
    "ChannelControl";

module AsyncNetwork
    parameters:
        // parametes for the framework
        playgroundSizeX : numeric const,
       	playgroundSizeY : numeric const,
         numHosts : numeric const;
         
    submodules:
        channelcontrol: ChannelControl;
            parameters:
                playgroundSizeX = playgroundSizeX,
		playgroundSizeY = playgroundSizeY;
            ///display: "p=50,25;i=eye14";
        host: AsyncHost[numHosts];            
            display: "p=50,50;i=node";

    connections nocheck:
    //??????
    //all connections and gates are to be generated dynamically

    display: "p=5,5;b=$playgroundSizeX,$playgroundSizeY,rect;o=white";
endmodule




network AsyncSim : AsyncNetwork
    parameters:
        playgroundSizeX = input(40,"playgroundSizeX"),
	playgroundSizeY = input(40,"playgroundSizeY"),
        numHosts =input(8,"Number of hosts:");
endnetwork

⌨️ 快捷键说明

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