[Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/wustl/apps/Agilla/opcodes
OPgetClosestAgent.nc, 1.2, 1.3 OPgetClosestAgentM.nc, 1.9,
1.10 OPgetlocation.nc, 1.4, 1.5 OPgetlocationM.nc, 1.8, 1.9
Chien-Liang Fok
chien-liang at users.sourceforge.net
Sun Apr 9 23:16:40 PDT 2006
Update of /cvsroot/tinyos/tinyos-1.x/contrib/wustl/apps/Agilla/opcodes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24382/opcodes
Modified Files:
OPgetClosestAgent.nc OPgetClosestAgentM.nc OPgetlocation.nc
OPgetlocationM.nc
Log Message:
Added ExpLogger code to OPgetClosestAgent.
Index: OPgetClosestAgent.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/wustl/apps/Agilla/opcodes/OPgetClosestAgent.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** OPgetClosestAgent.nc 7 Apr 2006 01:14:53 -0000 1.2
--- OPgetClosestAgent.nc 10 Apr 2006 06:16:36 -0000 1.3
***************
*** 55,58 ****
--- 55,59 ----
components NetworkInterfaceProxy as Comm, AddressMgrC, MessageBufferM;
components TimerC;
+
#if ENABLE_CLUSTERING
components ClusterheadDirectoryM;
***************
*** 64,67 ****
--- 65,73 ----
#endif
+ #if ENABLE_EXP_LOGGING
+ components ExpLoggerC;
+ components LocalTimeMicroC;
+ #endif
+
BytecodeI = OPgetClosestAgent;
***************
*** 93,96 ****
--- 99,107 ----
OPgetClosestAgent.ClusterheadDirectoryI -> ClusterheadDirectoryM;
#endif
+
+ #if ENABLE_EXP_LOGGING
+ OPgetClosestAgent.ExpLoggerI -> ExpLoggerC;
+ OPgetClosestAgent.LocalTime -> LocalTimeMicroC;
+ #endif
}
Index: OPgetClosestAgentM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/wustl/apps/Agilla/opcodes/OPgetClosestAgentM.nc,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** OPgetClosestAgentM.nc 9 Apr 2006 08:13:08 -0000 1.9
--- OPgetClosestAgentM.nc 10 Apr 2006 06:16:36 -0000 1.10
***************
*** 213,221 ****
call MessageBufferI.freeMsg(msg);
else {
! #if ENABLE_EXP_LOGGING
! AgillaLocation loc;
! loc.x = loc.y = 0;
call ExpLoggerI.sendTraceQid(_currAgent->id.id, TOS_LOCAL_ADDRESS,
! QUERY_GET_CLOSEST_AGENT_ISSUED, qMsg->qid, SUCCESS, loc);
_start = call LocalTime.read();
#endif
--- 213,219 ----
call MessageBufferI.freeMsg(msg);
else {
! #if ENABLE_EXP_LOGGING
call ExpLoggerI.sendTraceQid(_currAgent->id.id, TOS_LOCAL_ADDRESS,
! QUERY_GET_CLOSEST_AGENT_ISSUED, qMsg->qid, SUCCESS, qMsg->loc);
_start = call LocalTime.read();
#endif
***************
*** 313,317 ****
#if DEBUG_OP_GET_CLOSEST_AGENT
dbg(DBG_USR1, "OPgetClosestAgentM: Received Results ID = %i, (%i, %i)\n",
! reply->nearest_agent_id.id, reply->nearest_agent_loc.x, reply->nearest_agent_loc.y);
#endif
--- 311,316 ----
#if DEBUG_OP_GET_CLOSEST_AGENT
dbg(DBG_USR1, "OPgetClosestAgentM: Received Results ID = %i, (%i, %i)\n",
! reply->nearest_agent_id.id, reply->nearest_agent_loc.x,
! reply->nearest_agent_loc.y);
#endif
***************
*** 346,349 ****
--- 345,354 ----
if (!call SendResults.send(oneHopDest, sizeof(AgillaQueryReplyNearestAgentMsg), msg))
call MessageBufferI.freeMsg(msg);
+ else {
+ #if ENABLE_EXP_LOGGING
+ call ExpLoggerI.sendTraceQid(reply->agent_id.id, TOS_LOCAL_ADDRESS,
+ QUERY_GET_CLOSEST_AGENT_RESULTS_FORWARDED, reply->qid, SUCCESS, reply->nearest_agent_loc);
+ #endif
+ }
}
}
***************
*** 355,359 ****
#if ENABLE_EXP_LOGGING
AgillaLocation loc;
! call LocationMgrI.getLocation(TOS_LOCAL_ADDRESS, &loc);
call ExpLoggerI.sendTraceQid(_currAgent->id.id, TOS_LOCAL_ADDRESS,
QUERY_GET_CLOSEST_AGENT_RESULTS_RECEIVED,
--- 360,364 ----
#if ENABLE_EXP_LOGGING
AgillaLocation loc;
! loc.x = loc.y = 0;
call ExpLoggerI.sendTraceQid(_currAgent->id.id, TOS_LOCAL_ADDRESS,
QUERY_GET_CLOSEST_AGENT_RESULTS_RECEIVED,
***************
*** 380,383 ****
--- 385,397 ----
if (!sendQueryMsg(msg))
call MessageBufferI.freeMsg(msg);
+ else
+ {
+ #if ENABLE_EXP_LOGGING
+ struct AgillaQueryNearestAgentMsg *qMsg = (struct AgillaQueryNearestAgentMsg *)msg->data;
+ AgillaLocation loc;
+ call LocationMgrI.getLocation(qMsg->dest, &loc);
+ call ExpLoggerI.sendTraceQid(qMsg->agent_id.id, TOS_LOCAL_ADDRESS, QUERY_GET_CLOSEST_AGENT_FORWARDED, qMsg->qid, SUCCESS, loc);
+ #endif
+ }
}
return m;
Index: OPgetlocation.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/wustl/apps/Agilla/opcodes/OPgetlocation.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** OPgetlocation.nc 7 Apr 2006 01:14:53 -0000 1.4
--- OPgetlocation.nc 10 Apr 2006 06:16:36 -0000 1.5
***************
*** 70,78 ****
#endif
! BytecodeI = OPgetlocation;
!
!
!
!
Main.StdControl -> OPgetlocation;
--- 70,74 ----
#endif
! BytecodeI = OPgetlocation;
Main.StdControl -> OPgetlocation;
Index: OPgetlocationM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/wustl/apps/Agilla/opcodes/OPgetlocationM.nc,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** OPgetlocationM.nc 8 Apr 2006 21:27:35 -0000 1.8
--- OPgetlocationM.nc 10 Apr 2006 06:16:36 -0000 1.9
***************
*** 206,210 ****
AgillaLocation loc;
loc.x = loc.y = 0;
! call ExpLoggerI.sendTraceQid(_currAgent->id.id, TOS_LOCAL_ADDRESS, QUERY_GET_LOCATION_ISSUED, qMsg->qid, SUCCESS, loc);
_start = call LocalTime.read();
#endif
--- 206,210 ----
AgillaLocation loc;
loc.x = loc.y = 0;
! call ExpLoggerI.sendTraceQid(_currAgent->id.id, TOS_LOCAL_ADDRESS, QUERY_GET_LOCATION_ISSUED, qMsg->qid, qMsg->find_agent_id.id, loc);
_start = call LocalTime.read();
#endif
***************
*** 304,308 ****
#if ENABLE_EXP_LOGGING
! call ExpLoggerI.sendTraceQid(_currAgent->id.id, TOS_LOCAL_ADDRESS, QUERY_GET_LOCATION_RESULTS_RECEIVED, reply->qid, SUCCESS, reply->loc);
#endif
--- 304,309 ----
#if ENABLE_EXP_LOGGING
! call ExpLoggerI.sendTraceQid(_currAgent->id.id, TOS_LOCAL_ADDRESS,
! QUERY_GET_LOCATION_RESULTS_RECEIVED, reply->qid, SUCCESS, reply->loc);
#endif
More information about the Tinyos-contrib-commits
mailing list