-
Notifications
You must be signed in to change notification settings - Fork 0
/
SmartBraceletsAppC.nc
65 lines (45 loc) · 1.49 KB
/
SmartBraceletsAppC.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
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
/**
* Configuration file for wiring of SmartBraceletsC module to other common
* components needed for proper functioning
*
* @author Michele Lucio
*/
#include "SmartBracelets.h"
configuration SmartBraceletsAppC {}
implementation {
/****** COMPONENTS *****/
components MainC, RandomC, SmartBraceletsC as App;
//add the other components here
components new AMSenderC(AM_MY_MSG);
components new AMReceiverC(AM_MY_MSG);
components new TimerMilliC() as PairingTimer;
components new TimerMilliC() as OperationTimer;
components new TimerMilliC() as MissingTimer;
components ActiveMessageC;
components SerialActiveMessageC;
components new FakeSensorC();
/****** INTERFACES *****/
//Boot interface
App.Boot -> MainC.Boot;
/****** Wire the other interfaces down here *****/
//Send and Receive interfaces
App.Receive -> AMReceiverC;
App.AMSend -> AMSenderC;
App.AMSerialSend -> SerialActiveMessageC.AMSend[AM_SERIAL_MSG];
//Radio Control
App.SplitControl -> ActiveMessageC;
App.SerialSplitControl -> SerialActiveMessageC;
//Interfaces to access package fields
App.Packet -> AMSenderC;
App.SerialPacket -> SerialActiveMessageC;
//Timer interface
App.PairingTimer -> PairingTimer;
App.OperationTimer -> OperationTimer;
App.MissingTimer -> MissingTimer;
//Fake Sensor read
App.Read -> FakeSensorC;
//Random number generator
App.Random -> RandomC;
RandomC <- MainC.SoftwareInit;
App.PacketAcknowledgements -> ActiveMessageC;
}