[Tinyos-contrib-commits]
CVS: tinyos-1.x/contrib/wustl/tools/java/edu/wustl/mobilab/directory
TraceAnalyser.java, 1.15, 1.16
Chien-Liang Fok
chien-liang at users.sourceforge.net
Thu Apr 13 21:50:42 PDT 2006
Update of /cvsroot/tinyos/tinyos-1.x/contrib/wustl/tools/java/edu/wustl/mobilab/directory
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27936/edu/wustl/mobilab/directory
Modified Files:
TraceAnalyser.java
Log Message:
Index: TraceAnalyser.java
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/wustl/tools/java/edu/wustl/mobilab/directory/TraceAnalyser.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** TraceAnalyser.java 12 Apr 2006 20:57:34 -0000 1.15
--- TraceAnalyser.java 14 Apr 2006 04:50:39 -0000 1.16
***************
*** 155,158 ****
--- 155,165 ----
}
+ if (line.action.equals("QUERY_GET_AGENTS_ISSUED")) {
+ Integer qid = new Integer(line.qid);
+ if (!getAgentsResultsTable.containsKey(qid)) {
+ getAgentsResultsTable.put(qid, new GetAgentsResults(line.qid));
+ }
+ }
+
if (line.action.equals("QUERY_GET_AGENTS_RESULT_RECEIVED_DATA")) {
if (line.agentID == QUERIER_AGENT_ID) {
***************
*** 163,167 ****
// if one does not already exist.
if (!getAgentsResultsTable.containsKey(qid)) {
! getAgentsResultsTable.put(qid, new GetAgentsResults(currLine.qid));
}
--- 170,176 ----
// if one does not already exist.
if (!getAgentsResultsTable.containsKey(qid)) {
! //getAgentsResultsTable.put(qid, new GetAgentsResults(currLine.qid));
! System.err.println("ERROR: Received GET_AGENTS data without first receiving an ISSUED command.");
! System.exit(1);
}
***************
*** 190,193 ****
--- 199,203 ----
}
+ log("getAgentsResultsTable.size() = " + getAgentsResultsTable.size());
// Analyze the results of the GetAgents Query
for (Enumeration<GetAgentsResults> e = getAgentsResultsTable.elements(); e.hasMoreElements();) {
***************
*** 362,389 ****
int eIndex = line.indexOf(" ", sIndex+1);
agentID = Integer.valueOf(line.substring(sIndex+1, eIndex));
! log("agentID = " + agentID);
sIndex = eIndex;
eIndex = line.indexOf(" ", sIndex+1);
nodeID = Integer.valueOf(line.substring(sIndex+1, eIndex));
! log("nodeID = " + nodeID);
sIndex = eIndex;
eIndex = line.indexOf(" ", sIndex+1);
timeStamp = Long.valueOf(line.substring(sIndex+1, eIndex));
! log("timeStamp = " + timeStamp);
action = "QUERY_GET_AGENTS_RESULT_RECEIVED_DATA";
! log("action = " + action);
sIndex = eIndex;
eIndex = line.indexOf(" ", sIndex+1);
qid = Integer.valueOf(line.substring(sIndex+1, eIndex));
! log("qid = " + qid);
sIndex = eIndex;
eIndex = line.indexOf(" ", sIndex+1);
numAgents = Integer.valueOf(line.substring(sIndex+1, eIndex));
! log("numAgents = " + numAgents);
int count = numAgents;
--- 372,399 ----
int eIndex = line.indexOf(" ", sIndex+1);
agentID = Integer.valueOf(line.substring(sIndex+1, eIndex));
! // log("agentID = " + agentID);
sIndex = eIndex;
eIndex = line.indexOf(" ", sIndex+1);
nodeID = Integer.valueOf(line.substring(sIndex+1, eIndex));
! // log("nodeID = " + nodeID);
sIndex = eIndex;
eIndex = line.indexOf(" ", sIndex+1);
timeStamp = Long.valueOf(line.substring(sIndex+1, eIndex));
! // log("timeStamp = " + timeStamp);
action = "QUERY_GET_AGENTS_RESULT_RECEIVED_DATA";
! // log("action = " + action);
sIndex = eIndex;
eIndex = line.indexOf(" ", sIndex+1);
qid = Integer.valueOf(line.substring(sIndex+1, eIndex));
! // log("qid = " + qid);
sIndex = eIndex;
eIndex = line.indexOf(" ", sIndex+1);
numAgents = Integer.valueOf(line.substring(sIndex+1, eIndex));
! // log("numAgents = " + numAgents);
int count = numAgents;
***************
*** 391,395 ****
count = MAX_AGENT_NUM;
! log("count = " + count);
for (int i = 0; i < count; i++)
--- 401,405 ----
count = MAX_AGENT_NUM;
! // log("count = " + count);
for (int i = 0; i < count; i++)
More information about the Tinyos-contrib-commits
mailing list