Repository navigation
Expand file tree
/
Copy pathSRTreeAppC.nc
More file actions
50 lines (39 loc) · 1.77 KB
/
Copy pathSRTreeAppC.nc
File metadata and controls
50 lines (39 loc) · 1.77 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
#include "SimpleRoutingTree.h"
configuration SRTreeAppC @safe() { }
implementation{
components SRTreeC;
#if defined(DELUGE) //defined(DELUGE_BASESTATION) || defined(DELUGE_LIGHT_BASESTATION)
components DelugeC;
#endif
components MainC, ActiveMessageC,RandomC;//,RandomMlcgC;
components new TimerMilliC() as RoutingMsgTimerC;
components new TimerMilliC() as RandomTimerC;
components new TimerMilliC() as EpochTimerC;
components new AMSenderC(AM_ROUTINGMSG) as RoutingSenderC;
components new AMReceiverC(AM_ROUTINGMSG) as RoutingReceiverC;
components new AMSenderC(AM_NOTIFYPARENTMSG) as NotifySenderC;
components new AMReceiverC(AM_NOTIFYPARENTMSG) as NotifyReceiverC;
components new PacketQueueC(SENDER_QUEUE_SIZE) as RoutingSendQueueC;
components new PacketQueueC(RECEIVER_QUEUE_SIZE) as RoutingReceiveQueueC;
components new PacketQueueC(SENDER_QUEUE_SIZE) as NotifySendQueueC;
components new PacketQueueC(RECEIVER_QUEUE_SIZE) as NotifyReceiveQueueC;
SRTreeC.Boot->MainC.Boot;
SRTreeC.RadioControl -> ActiveMessageC;
SRTreeC.RoutingMsgTimer->RoutingMsgTimerC;
SRTreeC.RandomTimer->RandomTimerC;
SRTreeC.EpochTimer->EpochTimerC;
SRTreeC.RoutingPacket->RoutingSenderC.Packet;
SRTreeC.RoutingAMPacket->RoutingSenderC.AMPacket;
SRTreeC.RoutingAMSend->RoutingSenderC.AMSend;
SRTreeC.RoutingReceive->RoutingReceiverC.Receive;
SRTreeC.NotifyPacket->NotifySenderC.Packet;
SRTreeC.NotifyAMPacket->NotifySenderC.AMPacket;
SRTreeC.NotifyAMSend->NotifySenderC.AMSend;
SRTreeC.NotifyReceive->NotifyReceiverC.Receive;
SRTreeC.RoutingSendQueue->RoutingSendQueueC;
SRTreeC.RoutingReceiveQueue->RoutingReceiveQueueC;
SRTreeC.NotifySendQueue->NotifySendQueueC;
SRTreeC.NotifyReceiveQueue->NotifyReceiveQueueC;
SRTreeC.Random->RandomC.Random;
SRTreeC.Seed->RandomC.SeedInit;
}