Switch to unified view

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