|
a |
|
b/src/CS/Host2AP.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 two Application Processes</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 two distinct APs - <i>applicationProcces1/2</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 |
module Host2AP
|
|
|
39 |
{
|
|
|
40 |
parameters:
|
|
|
41 |
@display("i=device/pc;bgb=340,422");
|
|
|
42 |
@node;
|
|
|
43 |
|
|
|
44 |
gates:
|
|
|
45 |
inout medium @loose;
|
|
|
46 |
|
|
|
47 |
submodules:
|
|
|
48 |
applicationProcess1: ApplicationProcess {
|
|
|
49 |
@display("p=72,57");
|
|
|
50 |
}
|
|
|
51 |
|
|
|
52 |
applicationProcess2: ApplicationProcess {
|
|
|
53 |
@display("p=268,57");
|
|
|
54 |
}
|
|
|
55 |
|
|
|
56 |
difAllocator: DIFAllocator {
|
|
|
57 |
@display("p=170,57");
|
|
|
58 |
}
|
|
|
59 |
|
|
|
60 |
ipcProcess0: IPCProcess {
|
|
|
61 |
@display("p=170,342");
|
|
|
62 |
}
|
|
|
63 |
|
|
|
64 |
ipcProcess1: IPCProcess {
|
|
|
65 |
@display("p=170,260");
|
|
|
66 |
}
|
|
|
67 |
|
|
|
68 |
ipcResourceManager: IPCResourceManager {
|
|
|
69 |
@display("p=170,168");
|
|
|
70 |
}
|
|
|
71 |
connections allowunconnected:
|
|
|
72 |
ipcProcess0.southIo++ <--> medium;
|
|
|
73 |
ipcProcess1.southIo++ <--> ipcProcess0.northIo++;
|
|
|
74 |
}
|