forked from Project-GrADyS/gradys-simulations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MobileNodeMam.ned
38 lines (31 loc) · 1.13 KB
/
MobileNodeMam.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
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 MobileNodeMam extends AdhocHost
{
parameters:
int internalMobNodeId = -1;
int simulationIndexOfFirstNode = 6;
int nodeType = 171;
int numFailures = default(0);
@class(MobileNode);
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++;
app[1].protocolGate <--> protocol.communicationGate++;
for i=0..numFailures-1 {
failures[i].mobilityGate <--> mobility.protocolGate++;
}
}