Name | Description |
---|---|
ICN_Net (network) |
The ICN Simulation Ground |
// // Copyright (C) 2011 Nikolaos Vastardis; University of Essex, Colchester // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program; if not, see <http://www.gnu.org/licenses/>. // import inet.nodes.inet.StandardHostWithDLThruputMeter; import pubsub_sim.TM.TMBoost; import pubsub_sim.IITable.IITable; import inet.nodes.inet.BurstHost; //import inet.underTest.linklayer.Ieee80216.MACSublayer.QoS.ConvergenceSublayerTrafficClassification; import inet.applications.udpapp.UDPSink; import inet.applications.generic.IPTrafSink; import inet.base.Sink; import inet.world.ChannelControl; import pubsub_sim.PSRouter; import pubsub_sim.PubHost; import pubsub_sim.SubHost; import inet.nodes.inet.Router; import inet.nodes.inet.ExtRouter; import inet.nodes.ethernet.EtherHost2; import inet.nodes.inet.StandardHost; import inet.nodes.ethernet.EtherHost; import inet.nodes.adhoc.MFMobileHost; import pubsub_sim.TM.TMInterface; // // <b> The ICN Simulation Ground </b> // // This simulation ground implements a publish subscribe network. The main // component is the PSRouter, which forwards the published messages towards // the proper destination. All the pub-sub functionality is incorporated // inside the Topology Manager. The general topology is created in the // initialization phase and it is random, according to the random seeds // given in the ini file of the simulation. // // @see PSRouter, PubHost, SubHost, TMInterface, IITable // // @author Nikolaos Vastardis // network ICN_Net { parameters: int numRouters = 5; int numPubs = 2; int numSubs = 2; double connectedness; //0.0<x<1.0 int Datarate @unit(Mbps); double PubSubProportion = default(0.5); string TopManager = default("TMBoost"); @display("bgb=756,491;i=old/earth1"); types: channel G extends ned.DatarateChannel { datarate = 1Gbps; } submodules: iiTable: IITable { @display("p=31,444"); } tm: <TopManager> like TMInterface { @display("p=31,367"); } psRouter[numRouters]: PSRouter; Publisher[numPubs]: PubHost; Subscriber[numSubs]: SubHost; connections allowunconnected: psRouter[0].ethg++ <--> { datarate = Datarate; delay = 450us; } <--> psRouter[1].ethg++; psRouter[0].ethg++ <--> { datarate = Datarate; delay = 450us; } <--> psRouter[3].ethg++; psRouter[1].ethg++ <--> { datarate = Datarate; delay = 450us; } <--> psRouter[2].ethg++; psRouter[2].ethg++ <--> { datarate = Datarate; delay = 450us; } <--> psRouter[4].ethg++; psRouter[4].ethg++ <--> { datarate = Datarate; delay = 450us; } <--> psRouter[0].ethg++; psRouter[3].ethg++ <--> { datarate = Datarate; delay = 450us; } <--> psRouter[2].ethg++; Publisher[0].ethg++ <--> G <--> psRouter[0].ethg++; Publisher[1].ethg++ <--> G <--> psRouter[2].ethg++; Subscriber[0].ethg++ <--> G <--> psRouter[1].ethg++; Subscriber[1].ethg++ <--> G <--> psRouter[3].ethg++; }