-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGlider.ned
60 lines (54 loc) · 2.04 KB
/
Glider.ned
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see http://www.gnu.org/licenses/.
//
package skynet;
import org.mixim.modules.nic.NicCSMA;
//
// TODO auto-generated type
//
module Glider
{
parameters:
//type of the presentation layer
string applicationType = default("GliderAppLayer"); //type of the application layer
string mobilityType = default("GliderMobility"); //type of the mobility module
string nicType;
@display("bgb=210,450,white;i=device/palm;b=40,40,rect");
@node();
gates:
input radioIn; // gate for sendDirect
submodules:
mobility: GliderMobility {
parameters:
@display("p=140,30;i=block/cogwheel"); //??????
}
nic: NicCSMA {
parameters:
@display("p=70,380;i=block/wrxtx,#008000");
phyType = "PgPhyLayer";
macType = "PgMacLayer";
}
appl: GliderApplLayer {
parameters:
@display("p=70,30;i=app");
}
connections:
nic.upperLayerOut --> appl.lowerLayerIn;
nic.upperLayerIn <-- appl.lowerLayerOut;
nic.upperControlOut --> { @display("ls=red;m=m,70,0,70,0"); } --> appl.lowerControlIn;
nic.upperControlIn <-- { @display("ls=red;m=m,70,0,70,0"); } <-- appl.lowerControlOut;
//# connections of transport, session, and presentation layer depending of the
//# existence
radioIn --> nic.radioIn;
}