Switch to unified view

a b/src/CS/InteriorRouterNInt.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
// Author: Kewin Rausch <kewin.rausch@create-net.org>
17
18
package rina.CS;
19
20
import rina.DAF.DA.DIFAllocator;
21
import rina.DIF.IPCProcess;
22
23
module InteriorRouterNInt
24
{
25
    @display("i=abstract/switch;bgb=206,325");
26
    @node;
27
28
    int nofInt = default(1);
29
30
    gates:
31
        inout medium[nofInt];
32
33
    submodules:
34
        ipcProcess[nofInt]: IPCProcess {
35
            @display("p=104,245");
36
        }
37
        relayIpc: IPCProcess {
38
            @display("p=104,141;i=,#FFB000");
39
            relay = true;
40
        }
41
        difAllocator: DIFAllocator {
42
            @display("p=104,53");
43
        }
44
    connections allowunconnected:
45
46
        // Every IPC Process is connected to its medium and the Relay IPC.
47
        for i=0..nofInt-1 {
48
            relayIpc.southIo++ <--> ipcProcess[i].northIo++;
49
            ipcProcess[i].southIo++ <--> medium[i];
50
        }
51
}