-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNodeC.nc
More file actions
62 lines (47 loc) · 1.58 KB
/
Copy pathNodeC.nc
File metadata and controls
62 lines (47 loc) · 1.58 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
61
62
/**
* ANDES Lab - University of California, Merced
* This class provides the basic functions of a network node.
*
* @author UCM ANDES Lab
* @date 2013/09/03
*
*/
#include <Timer.h>
#include "includes/CommandMsg.h"
#include "includes/packet.h"
#include "includes/socket.h"
configuration NodeC{
}
implementation {
components MainC;
components Node;
//components TransportC;
components RandomC as Random;
components new AMReceiverC(AM_PACK) as GeneralReceive;
components new TimerMilliC() as neighbortimer;
components new TimerMilliC() as routingtimer;
components new TimerMilliC() as TCPtimer;
Node -> MainC.Boot;
Node.routingtimer->routingtimer;
Node.Random -> Random;
Node.neighbortimer -> neighbortimer;
Node.TCPtimer -> TCPtimer;
Node.Receive -> GeneralReceive;
components new HashmapC(table,255) as RoutingTableC;
Node.RoutingTable -> RoutingTableC;
components ActiveMessageC;
Node.AMControl -> ActiveMessageC;
components new ListC(Neighbor, 20) as NeighborHoodC;
Node.NeighborHood -> NeighborHoodC;
components new HashmapC(pack, 500) as PacketCacheC; //Hash to store packets in circulatio
Node.PacketCache -> PacketCacheC;
components new SimpleSendC(AM_PACK);
Node.Sender -> SimpleSendC;
components CommandHandlerC;
Node.CommandHandler -> CommandHandlerC;
components new HashmapC(socket_store_t,10) as SocketsTable;
Node.SocketsTable -> SocketsTable;
components TransportC;
Node.Transport -> TransportC;
// Node.SocketsTable->TransportC.SocketsTable;
}