Hi Om,
I've always wondered why CTP does not report arrived messages and received
beacons. Over time I've found these events very useful when debugging CTP.
Is there a reason for not reporting these events? If not, see proposed
changes below.
Morten.
CtpForwardingEngineP.nc
@@ -712,13 +712,17 @@ implementation {
}
// If I'm the root, signal receive.
- else if (call RootControl.isRoot())
+ else if (call RootControl.isRoot()) {
+ call CollectionDebug.logEventMsg(NET_C_FE_DST_MSG,
+ call
CollectionPacket.getSequenceNumber(msg),
+ call
CollectionPacket.getOrigin(msg),
+ thl--);
return signal Receive.receive[collectid](msg,
call Packet.getPayload(msg,
call Packet.payloadLength(msg)),
call
Packet.payloadLength(msg));
// I'm on the routing path and Intercept indicates that I
// should not forward the packet.
- else if (!signal Intercept.forward[collectid](msg,
+ } else if (!signal Intercept.forward[collectid](msg,
call
Packet.getPayload(msg, call Packet.payloadLength(msg)),
call
Packet.payloadLength(msg)))
return msg;
CtpRoutingEngineP.nc
@@ -485,6 +485,8 @@ implementation {
congested = call CtpRoutingPacket.getOption(msg, CTP_OPT_ECN);
+ call CollectionDebug.logEventSimple(NET_C_TREE_RCV_BEACON, call
AMPacket.source(msg));
+
dbg("TreeRouting","%s from: %d [ parent: %d etx: %d]\n",
__FUNCTION__, from,
rcvBeacon->parent, rcvBeacon->etx);
--
Morten Hansen, http://mortent.dk
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help