-
Notifications
You must be signed in to change notification settings - Fork 1
/
mqttAppC.nc~
52 lines (40 loc) · 1.2 KB
/
mqttAppC.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
/**
* IOT - Project
* Configuration file for wiring of mqttC module to other common
* components needed for proper functioning
*
* @author Antoine Le Calvez - Mëmëdhe G. Ibrahimi
*/
#include "mqtt.h"
configuration mqttAppC {}
implementation {
components MainC, mqttC as App;
components new AMSenderC(AM_MY_MSG);
components new AMReceiverC(AM_MY_MSG);
components ActiveMessageC;
components new TimerMilliC() as Timer0;
components new TimerMilliC() as Timer1;
components new TimerMilliC() as Timer2;
components new TimerMilliC() as Timer3;
components new TimerMilliC() as Timer4;
components new FakeSensorC();
//Boot interface
App.Boot -> MainC.Boot;
//Send and Receive interfaces
App.Receive -> AMReceiverC;
App.AMSend -> AMSenderC;
//Radio Control
App.SplitControl -> ActiveMessageC;
//Interfaces to access package fields
App.AMPacket -> AMSenderC;
App.Packet -> AMSenderC;
App.PacketAcknowledgements->ActiveMessageC;
//Timer interface
App.Timer0 -> Timer0;
App.Timer1 -> Timer1;
App.Timer2 -> Timer2;
App.Timer3 -> Timer3;
App.Timer4 -> Timer4;
//Fake Sensor read
App.Read -> FakeSensorC; /*FakeSensor component, returns a random value*/
}