Switch to unified view

a b/src/CS/TestHost1AP.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
38
39
module TestHost1AP
40
{
41
    parameters:
42
        @display("i=device/pc;bgb=255,410");
43
        @node;
44
        //int numOfDIFs = 1;
45
        //int numOfAPs = 1;
46
47
    gates:
48
        inout medium @loose;
49
50
    submodules:
51
        applicationProcess1: ApplicationProcess {
52
            @display("p=70,56");
53
            //numOfDIFs = numOfDIFs;            
54
        }
55
56
        difAllocator: DIFAllocator {
57
            @display("p=210,56");
58
        }
59
60
        ipcProcess0: IPCProcess {
61
            @display("p=133,323");
62
          //numOfAPs = numOfAPs;
63
        }
64
65
        ipcResourceManager: IPCResourceManager {
66
            @display("p=133,141");
67
        }
68
    connections allowunconnected:
69
        ipcProcess0.southIo++ <--> medium;
70
}