-
Notifications
You must be signed in to change notification settings - Fork 0
/
World.ned
114 lines (107 loc) · 3.64 KB
/
World.ned
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
//
// 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 3 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 Cell;
import primarystation.PrimaryStation;
import masterrouter.MasterRouter;
network World
{
types:
channel idealchannel extends ned.IdealChannel
{
}
submodules:
cell0: Cell {
parameters:
Id = 0;
numPs = 1;
@display("p=200,50");
}
cell1: Cell {
parameters:
Id = 1;
numPs = 2;
@display("p=50,200");
}
cell2: Cell {
parameters:
Id = 2;
numPs = 3;
@display("p=200,200");
}
cell3: Cell {
parameters:
Id = 3;
numPs = 2;
@display("p=350,200");
}
cell4: Cell {
parameters:
Id = 4;
numPs = 1;
@display("p=50,350");
}
cell5: Cell {
parameters:
Id = 5;
numPs = 2;
@display("p=200,350");
}
cell6: Cell {
parameters:
Id = 6;
numPs = 1;
@display("p=350,350");
}
ps0: PrimaryStation {
parameters:
Id = 0;
@display("p=200,125");
}
ps1: PrimaryStation {
parameters:
Id = 1;
@display("p=125,275");
}
ps2: PrimaryStation {
parameters:
Id = 2;
@display("p=285,275");
}
masterrouter: MasterRouter {
@display("p=200,265");
}
connections:
// Primary station <--> Cells
ps0.cell[0] <--> idealchannel <--> cell0.pchdetect[0];
ps0.cell[1] <--> idealchannel <--> cell1.pchdetect[0];
ps0.cell[2] <--> idealchannel <--> cell2.pchdetect[0];
ps0.cell[3] <--> idealchannel <--> cell3.pchdetect[0];
ps1.cell[0] <--> idealchannel <--> cell1.pchdetect[1];
ps1.cell[1] <--> idealchannel <--> cell2.pchdetect[1];
ps1.cell[2] <--> idealchannel <--> cell4.pchdetect[0];
ps1.cell[3] <--> idealchannel <--> cell5.pchdetect[0];
ps2.cell[0] <--> idealchannel <--> cell2.pchdetect[2];
ps2.cell[1] <--> idealchannel <--> cell3.pchdetect[1];
ps2.cell[2] <--> idealchannel <--> cell5.pchdetect[1];
ps2.cell[3] <--> idealchannel <--> cell6.pchdetect[0];
// Cells <--> Cells
cell0.intercell <--> idealchannel <--> masterrouter.intercell[0];
cell1.intercell <--> idealchannel <--> masterrouter.intercell[1];
cell2.intercell <--> idealchannel <--> masterrouter.intercell[2];
cell3.intercell <--> idealchannel <--> masterrouter.intercell[3];
cell4.intercell <--> idealchannel <--> masterrouter.intercell[4];
cell5.intercell <--> idealchannel <--> masterrouter.intercell[5];
cell6.intercell <--> idealchannel <--> masterrouter.intercell[6];
}