forked from UCMAndesLab/CSE160-Project-Skeleton-Code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNodeC.nc
36 lines (28 loc) · 768 Bytes
/
NodeC.nc
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
/**
* 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"
configuration NodeC{
}
implementation {
components MainC;
components Node;
components new AMReceiverC(AM_PACK) as GeneralReceive;
components NeighborDiscoveryC;
Node.NeighborDiscovery -> NeighborDiscoveryC;
Node -> MainC.Boot;
Node.Receive -> GeneralReceive;
components ActiveMessageC;
Node.AMControl -> ActiveMessageC;
components new SimpleSendC(AM_PACK);
Node.Sender -> SimpleSendC;
components CommandHandlerC;
Node.CommandHandler -> CommandHandlerC;
}