|
a |
|
b/examples/SimpleRelayCongestion/SimpleRelayCongestion.ned |
|
|
1 |
//
|
|
|
2 |
// This program is free software: you can redistribute it and/or modify
|
|
|
3 |
// it under the terms of the GNU Lesser General Public License as published by
|
|
|
4 |
// the Free Software Foundation, either version 3 of the License, or
|
|
|
5 |
// (at your option) any later version.
|
|
|
6 |
//
|
|
|
7 |
// This program is distributed in the hope that it will be useful,
|
|
|
8 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
9 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
10 |
// GNU Lesser General Public License for more details.
|
|
|
11 |
//
|
|
|
12 |
// You should have received a copy of the GNU Lesser General Public License
|
|
|
13 |
// along with this program. If not, see http://www.gnu.org/licenses/.
|
|
|
14 |
//
|
|
|
15 |
|
|
|
16 |
package rina.examples.SimpleRelayCongestion;
|
|
|
17 |
import ned.DatarateChannel;
|
|
|
18 |
import rina.CS.Host1AP;
|
|
|
19 |
import rina.CS.InteriorRouter2Int;
|
|
|
20 |
|
|
|
21 |
network SimpleRelayCongestion
|
|
|
22 |
{
|
|
|
23 |
parameters:
|
|
|
24 |
@display("bgb=368,202");
|
|
|
25 |
|
|
|
26 |
types:
|
|
|
27 |
channel FastChannel extends ned.DatarateChannel {
|
|
|
28 |
@defaultname(FChan);
|
|
|
29 |
datarate = 100Mbps;
|
|
|
30 |
delay = 100us;
|
|
|
31 |
ber = 0;
|
|
|
32 |
}
|
|
|
33 |
channel SlowChannel extends ned.DatarateChannel {
|
|
|
34 |
@defaultname(SChan);
|
|
|
35 |
datarate = 100Mbps;
|
|
|
36 |
delay = 5s;
|
|
|
37 |
ber = 0;
|
|
|
38 |
}
|
|
|
39 |
|
|
|
40 |
submodules:
|
|
|
41 |
host1: Host1AP {
|
|
|
42 |
@display("p=70,101");
|
|
|
43 |
}
|
|
|
44 |
interiorRouter: InteriorRouter2Int {
|
|
|
45 |
@display("p=180,101");
|
|
|
46 |
}
|
|
|
47 |
host2: Host1AP {
|
|
|
48 |
@display("p=290,101");
|
|
|
49 |
}
|
|
|
50 |
|
|
|
51 |
connections allowunconnected:
|
|
|
52 |
host1.medium <--> e1: FastChannel <--> interiorRouter.medium++;
|
|
|
53 |
host2.medium <--> e2: SlowChannel <--> interiorRouter.medium++;
|
|
|
54 |
|
|
|
55 |
}
|