[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/wustl/apps/Agilla/opcodes OPgetlocationM.nc, 1.7, 1.8

Chien-Liang Fok chien-liang at users.sourceforge.net
Sat Apr 8 14:27:39 PDT 2006


Update of /cvsroot/tinyos/tinyos-1.x/contrib/wustl/apps/Agilla/opcodes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3691/opcodes

Modified Files:
	OPgetlocationM.nc 
Log Message:
Added some trace messages

Index: OPgetlocationM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/wustl/apps/Agilla/opcodes/OPgetlocationM.nc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** OPgetlocationM.nc	7 Apr 2006 01:14:53 -0000	1.7
--- OPgetlocationM.nc	8 Apr 2006 21:27:35 -0000	1.8
***************
*** 206,210 ****
            AgillaLocation loc;
            loc.x = loc.y = 0;
!           call ExpLoggerI.sendTrace(_currAgent->id.id, TOS_LOCAL_ADDRESS, QUERY_ISSUED, 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, SUCCESS, loc);
            _start = call LocalTime.read();
          #endif
***************
*** 304,308 ****
  
          #if ENABLE_EXP_LOGGING
!           call ExpLoggerI.sendTrace(_currAgent->id.id, TOS_LOCAL_ADDRESS, QUERY_RESULTS_RECEIVED, SUCCESS, reply->loc);
          #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
  
***************
*** 329,332 ****
--- 329,337 ----
          if (!call SendResults.send(oneHopDest, sizeof(AgillaQueryReplyAgentLocMsg), msg)){
            call MessageBufferI.freeMsg(msg);
+         } else 
+         {
+           #if ENABLE_EXP_LOGGING
+             call ExpLoggerI.sendTraceQid(reply->agent_id.id, TOS_LOCAL_ADDRESS, QUERY_GET_LOCATION_RESULTS_FORWARDED, reply->qid, SUCCESS, reply->loc);
+           #endif        
          }
        }
***************
*** 341,349 ****
        AgillaLocation loc;
        call LocationMgrI.getLocation(TOS_LOCAL_ADDRESS, &loc);
!       call ExpLoggerI.sendTrace(_currAgent->id.id, TOS_LOCAL_ADDRESS, QUERY_RESULTS_RECEIVED, FAIL, loc);
      #endif
  
!     #if DEBUG_OP_GETLOCATION
! 
        dbg(DBG_USR1, "OPgetlocationM: ERROR: Timed out while waiting for results.\n");
      #endif
--- 346,353 ----
        AgillaLocation loc;
        call LocationMgrI.getLocation(TOS_LOCAL_ADDRESS, &loc);
!       call ExpLoggerI.sendTraceQid(_currAgent->id.id, TOS_LOCAL_ADDRESS, QUERY_GET_LOCATION_RESULTS_RECEIVED, ((TOS_LOCAL_ADDRESS & 0xff) << 8) | (_qid-1), FAIL, loc);
      #endif
  
!     #if DEBUG_OP_GETLOCATION
        dbg(DBG_USR1, "OPgetlocationM: ERROR: Timed out while waiting for results.\n");
      #endif
***************
*** 364,367 ****
--- 368,380 ----
        if (!sendQueryMsg(msg))
          call MessageBufferI.freeMsg(msg);
+       else 
+       {
+         #if ENABLE_EXP_LOGGING
+           struct AgillaQueryAgentLocMsg *qMsg = (struct AgillaQueryAgentLocMsg *)msg->data;
+           AgillaLocation loc;
+           call LocationMgrI.getLocation(qMsg->dest, &loc);
+           call ExpLoggerI.sendTraceQid(qMsg->agent_id.id, TOS_LOCAL_ADDRESS, QUERY_GET_LOCATION_FORWARDED, qMsg->qid, SUCCESS, loc);
+         #endif
+       }
      }
      return m;



More information about the Tinyos-contrib-commits mailing list