Package it.polito.appeal.traci.protocol

Examples of it.polito.appeal.traci.protocol.ResponseMessage.responses()


   */
  protected ResponseContainer doQuerySingle(Command request) throws IOException {
    RequestMessage msg = new RequestMessage();
    msg.append(request);
    ResponseMessage resp = doQuery(msg);
    return resp.responses().iterator().next();
  }

  /**
   * Like {@link #queryAndVerify(RequestMessage)}, but good for one-command/
   * one-response queries.
View Full Code Here


   */
  protected ResponseContainer queryAndVerifySingle(Command request) throws IOException {
    RequestMessage msg = new RequestMessage();
    msg.append(request);
    ResponseMessage resp = queryAndVerify(msg);
    return resp.responses().iterator().next();
  }
 
  protected static String verifyGetVarResponse(Command resp, int commandID, int variable, String objectID) throws UnexpectedData {
    verify("response code", commandID, resp.id());
    verify("variable ID", variable, (int)resp.content().readUnsignedByte());
View Full Code Here

      }
    }
   
    reqMsg.writeTo(dos);
    ResponseMessage respMsg = new ResponseMessage(dis);
    Iterator<ResponseContainer> responseIterator = respMsg.responses().iterator();
    for (Query q : queries) {
      q.pickResponses(responseIterator);     
    }
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.