uses interface SplitControl as RadioControl;
uses interface SplitControl as SerialControl;
uses interface StdControl as RoutingControl;
+ uses interface StdControl as DisseminationControl;
uses interface DisseminationValue<uint16_t> as DisseminationPeriod;
uses interface Send;
uses interface Leds;
call RadioControl.start();
}
else {
+ call DisseminationControl.start();
call RoutingControl.start();
if (TOS_NODE_ID % 500 == 0) {
call RootControl.setRoot();
else if (!uartbusy) {
message_t* msg = call Queue.dequeue();
dbg("Traffic", "Sending packet to UART.\n");
- if (call UARTSend.send(0xffff, recvPtr, call Receive.payloadLength(msg) + 4) == SUCCESS) {
+ if (call UARTSend.send(0xffff, msg, call Receive.payloadLength(msg)) == SUCCESS) {
uartbusy = TRUE;
}
else {
call CollectionDebug.logEventMsg(NET_C_DBG_2,
- call CollectionPacket.getSequenceNumber(recvPtr),
- call CollectionPacket.getOrigin(recvPtr),
- call AMPacket.destination(recvPtr));
+ call CollectionPacket.getSequenceNumber(msg),
+ call CollectionPacket.getOrigin(msg),
+ call AMPacket.destination(msg));
}
}
}