Package it.polito.appeal.traci

Examples of it.polito.appeal.traci.TraCIException


  }
 
  public StringList(Storage storage, boolean verifyType) throws TraCIException {
    if (verifyType) {
      if (storage.readByte() != Constants.TYPE_STRINGLIST)
        throw new TraCIException("string list expected");
    }
   
    int len = storage.readInt();
    list = new ArrayList<String>(len);
    for (int i=0; i<len; i++) {
View Full Code Here


 
  public Polygon(Storage packet, boolean verifyType) throws TraCIException {
    super();
    if (verifyType) {
      if (packet.readUnsignedByte() != Constants.TYPE_POLYGON)
        throw new TraCIException("polygon expected");
    }
   
    shape = new Path2D.Double();
   
    int count = packet.readUnsignedByte();
View Full Code Here

  private final Rectangle2D.Double rect;
 
  public BoundingBox(Storage storage, boolean verifyType) throws TraCIException {
    if (verifyType) {
      if (storage.readByte() != Constants.TYPE_BOUNDINGBOX)
        throw new TraCIException("bounding box expected");
    }

    double llX = storage.readDouble();
    double llY = storage.readDouble();
    double urX = storage.readDouble();
View Full Code Here

    ResponseMessage respMsg = new ResponseMessage(inStream);

    List<Command> commands = reqMsg.commands();
    List<ResponseContainer> responses = respMsg.responses();
    if (commands.size() > responses.size())
      throw new TraCIException("not enough responses received");
   
    for (int i=0; i<commands.size(); i++) {
      Command cmd = commands.get(i);
      ResponseContainer responsePair = responses.get(i);
      StatusResponse statusResp = responsePair.getStatus();
      verify("command and status IDs match", cmd.id(), statusResp.id());
      if (statusResp.result() != Constants.RTYPE_OK)
        throw new TraCIException("SUMO error for command "
            + statusResp.id() + ": " + statusResp.description());
    }
   
    return respMsg;
  }
View Full Code Here

  }
 
  public StringList(Storage storage, boolean verifyType) throws TraCIException {
    if (verifyType) {
      if (storage.readByte() != Constants.TYPE_STRINGLIST)
        throw new TraCIException("string list expected");
    }
   
    int len = storage.readInt();
    list = new ArrayList<String>(len);
    for (int i=0; i<len; i++) {
View Full Code Here

   * @throws TraCIException
   */
  public StringList(Storage storage, boolean verifyType) throws TraCIException {
    if (verifyType) {
      if (storage.readByte() != Constants.TYPE_STRINGLIST)
        throw new TraCIException("string list expected");
    }
   
    int len = storage.readInt();
    list = new ArrayList<String>(len);
    for (int i=0; i<len; i++) {
View Full Code Here

   */
  public Polygon(Storage packet, boolean verifyType) throws TraCIException {
    super();
    if (verifyType) {
      if (packet.readUnsignedByte() != Constants.TYPE_POLYGON)
        throw new TraCIException("polygon expected");
    }
   
    shape = new Path2D.Double();
   
    int count = packet.readUnsignedByte();
View Full Code Here

   * @throws TraCIException
   */
  public BoundingBox(Storage storage, boolean verifyType) throws TraCIException {
    if (verifyType) {
      if (storage.readByte() != Constants.TYPE_BOUNDINGBOX)
        throw new TraCIException("bounding box expected");
    }

    double llX = storage.readDouble();
    double llY = storage.readDouble();
    double urX = storage.readDouble();
View Full Code Here

TOP

Related Classes of it.polito.appeal.traci.TraCIException

Copyright © 2018 www.massapicom. 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.