Switch to unified view

a b/src/CS/DC_CR.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
// NOTES:
19
// This module describes a cluster/core router in the DataCenter use-case.
20
// This router support the case 
21
//
22
// Colors of the IPC reflect the use case layers.
23
// Link: https://wiki.ict-pristine.eu/wp2/d21/D21-Datnet-RINA
24
25
package rina.CS;
26
27
import rina.Common.Test;
28
import rina.DAF.DA.DIFAllocator;
29
import rina.DIF.IPCProcess;
30
31
module DC_CR
32
{
33
    parameters:
34
        @display("i=abstract/router;bgb=294,396");
35
        @node;
36
37
        int nofInt = default(1);
38
39
    gates:
40
        // Types of gates out:
41
        // 0 - to/from the internet.
42
        // 1 to N - to/from the DC internals.
43
        inout medium[nofInt];
44
45
    submodules:
46
        difAllocator: DIFAllocator {
47
            @display("p=148,44;i=,grey");
48
        }
49
50
        TenantIPC: IPCProcess {
51
            @display("p=148,121;i=,#0080FF");
52
        }
53
54
        ShimIPC[nofInt]: IPCProcess {
55
            @display("p=74,313;i=,#800000");
56
        }
57
58
      // Should provide some sort of translation between TCP/IP and
59
      // Rina technologies. 
60
        DCIPC: IPCProcess {
61
            @display("p=74,214;i=,#008000");
62
        }
63
64
    connections allowunconnected:
65
66
        for i=0..nofInt-1 {
67
            ShimIPC[i].northIo++ <--> DCIPC.southIo++;
68
            ShimIPC[i].southIo++ <--> medium[i];
69
        }
70
71
        DCIPC.northIo++ <--> TenantIPC.southIo++;
72
}