Switch to unified view

a b/src/CS/Host1AP.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>Host with one Application Process</h1> 
18
//
19
// This models simulates host node that has two different rank DIFs:
20
//  * 1x (N)-DIF <i>ipcProcess1</i> is used by AP for communication 
21
//  * 1x (N-1)-DIF <i>ipcProcess0</i> underlaying DIF for <i>ipcProcess1</i>   
22
//
23
// It contains one AP called <i>applicationProcces1</i>
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
30
package rina.CS;
31
32
import rina.Common.Test;
33
import rina.DAF.ApplicationProcess;
34
import rina.DAF.DA.DIFAllocator;
35
import rina.DAF.IRM.IPCResourceManager;
36
import rina.DIF.IPCProcess;
37
//import rina.DIF.EFCP.DTP.PushBackChannel;
38
39
40
module Host1AP
41
{
42
    parameters:
43
        @display("i=device/pc;bgb=255,410");
44
        @node;
45
        //int numOfDIFs = 1;
46
        //int numOfAPs = 1;
47
48
    gates:
49
        inout medium @loose;
50
51
    submodules:
52
        applicationProcess1: ApplicationProcess {
53
            @display("p=70,56");
54
            //numOfDIFs = numOfDIFs;            
55
        }
56
57
        difAllocator: DIFAllocator {
58
            @display("p=210,56");
59
        }
60
61
        ipcProcess0: IPCProcess {
62
            @display("p=133,323");
63
          //numOfAPs = numOfAPs;
64
        }
65
66
        ipcProcess1: IPCProcess {
67
            @display("p=133,241");
68
          //numOfAPs = numOfAPs;
69
        }
70
71
        ipcResourceManager: IPCResourceManager {
72
            @display("p=133,141");
73
        }
74
    connections allowunconnected:
75
        ipcProcess0.southIo++ <--> medium;
76
//        ipcProcess0.northIo++ <--> PushBackChannel <--> ipcProcess1.southIo++;
77
        ipcProcess0.northIo++ <--> ipcProcess1.southIo++;
78
}