|
a |
|
b/src/CS/InteriorRouter3Int.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 |
//
|
|
|
17 |
// <h1>Interior router simulation module with three interfaces</h1>
|
|
|
18 |
//
|
|
|
19 |
// This models simulates interior router node that has four different rank DIFs:
|
|
|
20 |
// * 1x (N)-DIF <i>relayIpc</i> is used as bridge between <i>ipcProccesses</i> for relaying
|
|
|
21 |
// * 3x (N-1)-DIF <i>ipcProccesses0/1/2</i>
|
|
|
22 |
//
|
|
|
23 |
// It also contains <i>DIFAllocator</i> module as NameSpaceManager interface
|
|
|
24 |
//
|
|
|
25 |
// @author Vladimir Vesely (ivesely@fit.vutbr.cz), Tomas Hykel
|
|
|
26 |
// @date Last refactorized and documented on 2015-01-12
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
package rina.CS;
|
|
|
30 |
|
|
|
31 |
import rina.DAF.DA.DIFAllocator;
|
|
|
32 |
import rina.DIF.IPCProcess;
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
module InteriorRouter3Int
|
|
|
36 |
{
|
|
|
37 |
@display("i=abstract/switch;bgb=282,267");
|
|
|
38 |
@node;
|
|
|
39 |
gates:
|
|
|
40 |
inout medium[3];
|
|
|
41 |
submodules:
|
|
|
42 |
ipcProcess0: IPCProcess {
|
|
|
43 |
@display("p=65,145");
|
|
|
44 |
}
|
|
|
45 |
ipcProcess1: IPCProcess {
|
|
|
46 |
@display("p=205,145");
|
|
|
47 |
}
|
|
|
48 |
relayIpc: IPCProcess {
|
|
|
49 |
@display("p=135,53;i=,#FFB000");
|
|
|
50 |
relay = true;
|
|
|
51 |
}
|
|
|
52 |
difAllocator: DIFAllocator {
|
|
|
53 |
@display("p=65,53");
|
|
|
54 |
}
|
|
|
55 |
ipcProcess2: IPCProcess {
|
|
|
56 |
@display("p=135,201");
|
|
|
57 |
}
|
|
|
58 |
connections allowunconnected:
|
|
|
59 |
ipcProcess0.southIo++ <--> medium[0];
|
|
|
60 |
ipcProcess1.southIo++ <--> medium[1];
|
|
|
61 |
ipcProcess2.southIo++ <--> medium[2];
|
|
|
62 |
relayIpc.southIo++ <--> ipcProcess0.northIo++;
|
|
|
63 |
relayIpc.southIo++ <--> ipcProcess1.northIo++;
|
|
|
64 |
relayIpc.southIo++ <--> ipcProcess2.northIo++;
|
|
|
65 |
}
|