Examples of TraCIException


Examples of de.hpi.eworld.visualizer.simulation.traci.common.TraciException

    payload.readUnsignedByte();
    int status = payload.readUnsignedByte();
    if (status == 0xff){
      payload.readUnsignedByte(); // type: String
      String message = new String(payload.readTraciString());
      throw new TraciException(message);
    }
    float[] position = (float[]) payload.readTraciTypeAndObject();
   
    return new ResponseVehicleValueCommandReader(objectId, position);
  }
View Full Code Here

Examples of de.hpi.eworld.visualizer.simulation.traci.common.TraciException

          values.put(id, ids);
        }
      } else if (status == 0xff){
        payload.readUnsignedByte(); // type: String
        String message = new String(payload.readTraciString());
        throw new TraciException(message);
      }
       
    }
   
    return new ResponseSimulationValueCommandReader(objectId, values);
View Full Code Here

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

Examples of it.polito.appeal.traci.TraCIException

 
  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

Examples of it.polito.appeal.traci.TraCIException

  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

Examples of it.polito.appeal.traci.TraCIException

    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

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

Examples of it.polito.appeal.traci.TraCIException

   * @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

Examples of it.polito.appeal.traci.TraCIException

   */
  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

Examples of it.polito.appeal.traci.TraCIException

   * @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
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.