-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnode.ned
97 lines (83 loc) · 2.29 KB
/
node.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//
// This file is part of an OMNeT++/OMNEST simulation example.
//
// Copyright (C) 2003 Ahmet Sekercioglu
// Copyright (C) 2003-2015 Andras Varga
//
// This file is distributed WITHOUT ANY WARRANTY. See the file
// `license' for details on this and other legal matters.
//
package chord_proj;
package inet.mobility.static;
import inet.mobility.static.StationaryMobility;
simple Node
{
parameters:
@display("i=device/pc");
@display("p");
string IP = default("0.0.0.0");
string key = default("0");
volatile int successorListSize = default(0);
int stabilizeRetry; // retries before a successor is considered failed
double ping_timeoutdelay @unit(s);
//double joinDelay @unit(s); // delay between join retries (sec)
double stabilizeDelay @unit(s); // stabilize interval (sec)
double fixfingersDelay @unit(s); // fix_fingers interval (sec)
double checkPredecessorDelay @unit(s); // checkPredecessor interval (sec)
double stabilization_check_delay @unit(s);
double failing_delay @unit(s);
double firstJoinDelay @unit(s);
double timeout_notify_delay @unit(s);
double timeout_stabilize_delay @unit(s);
// do not use failed sucessor again and inform new successor
//bool memorizeFailedSuccessor;
gates:
input in @directIn;
}
simple FingerTable
{
parameters:
@display("i=block/table");
}
simple SuccessorList
{
parameters:
@display("i=block/queue");
}
module NodeHandle
{
parameters:
@display("p");
@display("i=device/pc");
string IP = default("0.0.0.0");
string KEY = default("0");
gates:
input io @directIn;
submodules:
positionModule: StationaryMobility;
fingertable: FingerTable {
@display("p=97,42");
}
successorlist: SuccessorList;
node: Node {
@display("p=457,142");
}
connections:
io --> node.in;
}
network Tictoc1
{
parameters:
int failedNodes;
int numNodes;
//bool debug;
submodules:
array[numNodes]: NodeHandle;
globalNodelist: GlobalNodeList;
}
simple GlobalNodeList
{
parameters:
int numNodes = default(10);
@display("i=device/router");
}