[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/wustl/apps/Agilla/components ExpLoggerC.nc, 1.2, 1.3 ExpLoggerM.nc, 1.4, 1.5

Chien-Liang Fok chien-liang at users.sourceforge.net
Mon Apr 10 23:18:21 PDT 2006


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

Modified Files:
	ExpLoggerC.nc ExpLoggerM.nc 
Log Message:


Index: ExpLoggerC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/wustl/apps/Agilla/components/ExpLoggerC.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ExpLoggerC.nc	7 Apr 2006 01:14:35 -0000	1.2
--- ExpLoggerC.nc	11 Apr 2006 06:18:18 -0000	1.3
***************
*** 20,24 ****
    ExpLoggerM.SendLatency -> NetworkInterfaceProxy.SendMsg[AM_AGILLAEXPLATENCYMSG];
    ExpLoggerM.SendTrace -> NetworkInterfaceProxy.SendMsg[AM_AGILLATRACEMSG];
!   ExpLoggerM.ReceiveQuery -> NetworkInterfaceProxy.ReceiveMsg[AM_AGILLAEXPQUERYRESULTSMSG];
    ExpLoggerM.MessageBufferI -> MessageBufferM;
    ExpLoggerM.Time -> SimpleTime;
--- 20,25 ----
    ExpLoggerM.SendLatency -> NetworkInterfaceProxy.SendMsg[AM_AGILLAEXPLATENCYMSG];
    ExpLoggerM.SendTrace -> NetworkInterfaceProxy.SendMsg[AM_AGILLATRACEMSG];
!   ExpLoggerM.SendGetAgentsResultsTrace -> NetworkInterfaceProxy.SendMsg[AM_AGILLATRACEGETAGENTSMSG];
!   ExpLoggerM.ReceiveQuery -> NetworkInterfaceProxy.ReceiveMsg[AM_AGILLAEXPQUERYRESULTSMSG];  
    ExpLoggerM.MessageBufferI -> MessageBufferM;
    ExpLoggerM.Time -> SimpleTime;

Index: ExpLoggerM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/wustl/apps/Agilla/components/ExpLoggerM.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ExpLoggerM.nc	10 Apr 2006 06:16:35 -0000	1.4
--- ExpLoggerM.nc	11 Apr 2006 06:18:18 -0000	1.5
***************
*** 9,12 ****
--- 9,13 ----
      interface SendMsg as SendLatency;
      interface SendMsg as SendTrace;
+     interface SendMsg as SendGetAgentsResultsTrace;
      interface ReceiveMsg as ReceiveQuery;
      interface MessageBufferI;
***************
*** 90,93 ****
--- 91,117 ----
      return SUCCESS;
    }  
+   
+   command result_t ExpLoggerI.sendGetAgentsResultsTrace(AgillaQueryReplyAllAgentsMsg* replyMsg)
+   {
+     TOS_MsgPtr msg = call MessageBufferI.getMsg();
+     uint16_t i;
+     if (msg != NULL)
+     {
+       struct AgillaTraceGetAgentsMsg *traceMsg = (struct AgillaTraceGetAgentsMsg *)msg->data;
+       traceMsg->timestamp = call Time.get();
+       traceMsg->agentID = replyMsg->agent_id.id;
+       traceMsg->nodeID = TOS_LOCAL_ADDRESS;
+       traceMsg->qid = replyMsg->qid;
+       traceMsg->num_agents = replyMsg->num_agents;
+       for (i = 0; i < MAX_AGENT_NUM; i++) {
+         traceMsg->agent_id[i] = replyMsg->agent_info[i].agent_id;
+         traceMsg->loc[i] = replyMsg->agent_info[i].loc;
+       }
+       if (!call SendGetAgentsResultsTrace.send(TOS_UART_ADDR, sizeof(AgillaTraceGetAgentsMsg), msg))
+         call MessageBufferI.freeMsg(msg);
+     }
+     return SUCCESS;
+   }    
+   
  
    command result_t ExpLoggerI.sendSetCluster(uint16_t newClusterHead)
***************
*** 152,154 ****
--- 176,184 ----
      return SUCCESS;
    }
+ 
+   event result_t SendGetAgentsResultsTrace.sendDone(TOS_MsgPtr m, result_t success)
+   {
+     call MessageBufferI.freeMsg(m);
+     return SUCCESS;
+   }    
  }



More information about the Tinyos-contrib-commits mailing list