forked from Project-GrADyS/gradys-simulations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MobileNode.ned
35 lines (27 loc) · 1020 Bytes
/
MobileNode.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
package projeto;
import inet.node.inet.AdhocHost;
import inet.mobility.base.MovingMobilityBase;
import inet.common.geometry.common.OsgGeographicCoordinateSystem;
import inet.environment.common.PhysicalEnvironment;
import inet.mobility.contract.IMobility;
import projeto.protocols.base.IProtocol;
import projeto.mobility.failures.base.IFailureGenerator;
module MobileNode extends AdhocHost
{
parameters:
@class(MobileNode);
int numFailures = default(0);
submodules:
protocol: <default("CommunicationProtocolBase")> like IProtocol {
@display("p=237.825,75.6");
}
failures[numFailures]: <default("FailureGeneratorBase")> like IFailureGenerator {
@display("p=40.949997,159.075");
}
connections:
app[0].protocolGate <--> protocol.communicationGate++;
protocol.mobilityGate++ <--> mobility.protocolGate++;
for i=0..numFailures-1 {
failures[i].mobilityGate <--> mobility.protocolGate++;
}
}