Repository navigation
Expand file tree
/
Copy pathDynamicTest2.ned
More file actions
98 lines (94 loc) · 3.38 KB
/
Copy pathDynamicTest2.ned
File metadata and controls
98 lines (94 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package sotuken;
import inet.common.misc.ThruputMeteringChannel;
import inet.common.scenario.ScenarioManager;
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import inet.node.inet.StandardHost;
import inet.node.ospfv2.OspfRouter;
import ned.IdealChannel;
import inet.node.ethernet.Eth10M;
import inet.node.ethernet.Eth100M;
import inet.node.ethernet.Eth1G;
import inet.node.ethernet.Eth40G;
network DynamicTest2
{
parameters:
@display("p=10,10;b=712,152");
types:
channel C extends ThruputMeteringChannel
{
datarate = 40Gbps;
thruputDisplayFormat = "#N";
}
channel wired extends ThruputMeteringChannel
{
double length @unit(km) = 100km; // 距離 100km
delay = (length * 10^3) * (3/2)/ 299792458m * 1s; // 光ファイバーの遅延計算
datarate = 1Gbps; // データレート
@display("ls=blue"); // 表示設定(青線)
thruputDisplayFormat = "#N";
}
//channel wireless extends DynamicChannel
channel wireless extends ThruputMeteringChannel
{
double length @unit(km) = 1km; // 距離 1km
delay = (length * 10^3) / 299792458m * 1s; // 遅延計算
datarate = 100Mbps;//ned.DatarateChannel時に使用
@display("ls=red"); // 表示設定(赤線)
thruputDisplayFormat = "#N";
}
submodules:
WiredDummyClient: StandardHost {
parameters:
@display("p=250,200");
}
ClientRouter: OspfRouter {
parameters:
@display("p=400,200");
}
WiredRouter: OspfRouter {
parameters:
@display("p=550,100");
}
WirelessRouter: OspfRouter {
parameters:
@display("p=550,300");
}
ServerRouter: OspfRouter {
parameters:
@display("p=700,200");
}
WiredDummyServer: StandardHost {
parameters:
@display("p=850,200");
}
configurator: Ipv4NetworkConfigurator {
parameters:
@display("p=100,100;is=s");
}
scenarioManager: ScenarioManager {
@display("p=100,200;is=s");
}
WirelessDummyClient: StandardHost {
@display("p=239,100");
}
VideoClient: StandardHost {
@display("p=243,320");
}
WirelessDummyServer: StandardHost {
@display("p=849,98");
}
VideoServer: StandardHost {
@display("p=849,319");
}
connections:
WiredDummyClient.ethg++ <--> C <--> ClientRouter.ethg++;
ClientRouter.ethg++ <--> wired { @display("ls=,3"); } <--> WiredRouter.ethg++;
ClientRouter.ethg++ <--> wireless { @display("ls=,3"); } <--> WirelessRouter.ethg++;
WiredRouter.ethg++ <--> wired { @display("ls=,3"); } <--> ServerRouter.ethg++;
WirelessRouter.ethg++ <--> wireless { @display("ls=,3"); } <--> ServerRouter.ethg++;
ServerRouter.ethg++ <--> C <--> WiredDummyServer.ethg++;
WirelessDummyClient.ethg++ <--> C <--> ClientRouter.ethg++;
VideoClient.ethg++ <--> C <--> ClientRouter.ethg++;
WirelessDummyServer.ethg++ <--> C <--> ServerRouter.ethg++;
VideoServer.ethg++ <--> C <--> ServerRouter.ethg++;
}