-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDroneNet.ned
59 lines (55 loc) · 2.37 KB
/
DroneNet.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
//
// 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/.
//
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import inet.node.inet.INetworkNode;
import inet.physicallayer.contract.packetlevel.IRadioMedium;
import inet.visualizer.contract.IIntegratedVisualizer;
import inet.environment.common.PhysicalEnvironment;
network DroneNet
{
parameters:
@display("bgb=602.784,911.23206;bgg=100,1,grey95");
@figure[title](type=label; pos=0,-1; anchor=sw; color=darkblue);
@figure[rcvdPkText](type=indicatorText; pos=380,20; anchor=w; font=,18; textFormat="packets received: %g"; initialValue=0);
@statistic[packetReceived](source=hostB.app[0].packetReceived; record=figure(count); targetFigure=rcvdPkText);
submodules:
visualizer: <default("IntegratedCanvasVisualizer")> like IIntegratedVisualizer if hasVisualizer() {
@display("p=580,125");
}
configurator: Ipv4NetworkConfigurator {
@display("p=580,200");
}
radioMedium: <default("UnitDiskRadioMedium")> like IRadioMedium {
@display("p=580,275");
}
physicalEnvironment: PhysicalEnvironment {
@display("p=580,425");
}
hostA: <default("WirelessHost")> like INetworkNode {
@display("p=135.072,699.552");
}
hostB: <default("WirelessHost")> like INetworkNode {
@display("p=395.13602,402.19202");
}
hostC: <default("WirelessHost")> like INetworkNode {
@display("p=80.64,284.256");
}
hostD: <default("WirelessHost")> like INetworkNode {
@display("p=314.496,42.336002");
}
hostR1: <default("WirelessHost")> like INetworkNode {
@display("p=295.344,841.68005");
}
}