-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNodeC.nc
More file actions
60 lines (47 loc) · 1.66 KB
/
NodeC.nc
File metadata and controls
60 lines (47 loc) · 1.66 KB
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
#include <Timer.h>
#include "includes/CommandMsg.h"
#include "includes/packet.h"
configuration NodeC{
}
implementation {
components MainC;
components Node;
components new AMReceiverC(AM_PACK) as GeneralReceive;
Node -> MainC.Boot;
Node.Receive -> GeneralReceive;
components ActiveMessageC;
Node.AMControl -> ActiveMessageC;
Node.AMPacket -> ActiveMessageC;
components new SimpleSendC(AM_PACK);
Node.SS -> SimpleSendC;
components CommandHandlerC;
Node.Cmd -> CommandHandlerC;
components new TimerMilliC();
Node.NDTimer -> TimerMilliC;
components new TimerMilliC() as ServerTimerC;
components new TimerMilliC() as ClientTimerC;
Node.ServerTimer -> ServerTimerC;
Node.ClientTimer -> ClientTimerC;
// Neighbor Discovery module
components new NeighborDiscoveryC(6) as NeighborDiscoveryC;
Node.ND -> NeighborDiscoveryC.NeighborDiscovery;
// Flooding module
components FloodingC;
Node.Flood -> FloodingC.Flooding;
FloodingC.NeighborDiscovery -> NeighborDiscoveryC.NeighborDiscovery;
// Link-State Routing module
components LinkStateC;
Node.LS -> LinkStateC.LinkState;
LinkStateC.NeighborDiscovery -> NeighborDiscoveryC.NeighborDiscovery;
// Transport module
components TransportC;
TransportC.LinkState -> LinkStateC.LinkState;
Node.Transport -> TransportC;
// Chat/Server module
components ChatClientC;
components ChatServerC;
Node.ChatClient -> ChatClientC;
ChatClientC.Transport -> TransportC;
Node.ChatServer -> ChatServerC;
ChatServerC.Transport -> TransportC;
}