Package it.polito.appeal.traci.protocol

Examples of it.polito.appeal.traci.protocol.Command.content()


    ResponseContainer respc = responseIterator.next();
    StatusResponse statusResp = respc.getStatus();
    Utils.checkStatusResponse(statusResp, commandID);
    Command resp = respc.getResponse();
    Utils.checkByte(resp.content(), varID);
    Utils.checkObjectID(resp.content(), objectID);
   
    V value = readValue(resp);
    setDone(value);
  }
 
View Full Code Here


    if (roadmapPos == null && cartesianPos == null)
      throw new IllegalStateException("position must be set first");
   
    List<Command> reqs = super.getRequests();
    Command req = reqs.iterator().next();
    req.content().writeByte(Constants.TYPE_COMPOUND);
    req.content().writeInt(2);
   
   

    if (cartesianPos != null) { // conversion 2D-to-2D
View Full Code Here

      throw new IllegalStateException("position must be set first");
   
    List<Command> reqs = super.getRequests();
    Command req = reqs.iterator().next();
    req.content().writeByte(Constants.TYPE_COMPOUND);
    req.content().writeInt(2);
   
   

    if (cartesianPos != null) { // conversion 2D-to-2D
      int srcType;
View Full Code Here

        y = cartesianPos.getY();
      }
           
      int destType = destLonLat ? Constants.POSITION_LAT_LON : Constants.POSITION_2D;
     
      req.content().writeUnsignedByte(srcType);
      req.content().writeDouble(x);     
      req.content().writeDouble(y);
      req.content().writeUnsignedByte(Constants.TYPE_UBYTE);
      req.content().writeUnsignedByte(destType);   
      setPositionType(destType);
View Full Code Here

      }
           
      int destType = destLonLat ? Constants.POSITION_LAT_LON : Constants.POSITION_2D;
     
      req.content().writeUnsignedByte(srcType);
      req.content().writeDouble(x);     
      req.content().writeDouble(y);
      req.content().writeUnsignedByte(Constants.TYPE_UBYTE);
      req.content().writeUnsignedByte(destType);   
      setPositionType(destType);
    }
View Full Code Here

           
      int destType = destLonLat ? Constants.POSITION_LAT_LON : Constants.POSITION_2D;
     
      req.content().writeUnsignedByte(srcType);
      req.content().writeDouble(x);     
      req.content().writeDouble(y);
      req.content().writeUnsignedByte(Constants.TYPE_UBYTE);
      req.content().writeUnsignedByte(destType);   
      setPositionType(destType);
    }
    else {
View Full Code Here

      int destType = destLonLat ? Constants.POSITION_LAT_LON : Constants.POSITION_2D;
     
      req.content().writeUnsignedByte(srcType);
      req.content().writeDouble(x);     
      req.content().writeDouble(y);
      req.content().writeUnsignedByte(Constants.TYPE_UBYTE);
      req.content().writeUnsignedByte(destType);   
      setPositionType(destType);
    }
    else {
      req.content().writeUnsignedByte(Constants.POSITION_ROADMAP);
View Full Code Here

     
      req.content().writeUnsignedByte(srcType);
      req.content().writeDouble(x);     
      req.content().writeDouble(y);
      req.content().writeUnsignedByte(Constants.TYPE_UBYTE);
      req.content().writeUnsignedByte(destType);   
      setPositionType(destType);
    }
    else {
      req.content().writeUnsignedByte(Constants.POSITION_ROADMAP);
      req.content().writeStringUTF8(roadmapPos.edgeID);
View Full Code Here

      req.content().writeUnsignedByte(Constants.TYPE_UBYTE);
      req.content().writeUnsignedByte(destType);   
      setPositionType(destType);
    }
    else {
      req.content().writeUnsignedByte(Constants.POSITION_ROADMAP);
      req.content().writeStringUTF8(roadmapPos.edgeID);
      req.content().writeDouble(roadmapPos.pos);
      req.content().writeUnsignedByte(roadmapPos.laneID);
      req.content().writeUnsignedByte(Constants.TYPE_UBYTE);
      req.content().writeUnsignedByte(Constants.POSITION_LAT_LON);
View Full Code Here

      req.content().writeUnsignedByte(destType);   
      setPositionType(destType);
    }
    else {
      req.content().writeUnsignedByte(Constants.POSITION_ROADMAP);
      req.content().writeStringUTF8(roadmapPos.edgeID);
      req.content().writeDouble(roadmapPos.pos);
      req.content().writeUnsignedByte(roadmapPos.laneID);
      req.content().writeUnsignedByte(Constants.TYPE_UBYTE);
      req.content().writeUnsignedByte(Constants.POSITION_LAT_LON);
      setPositionType(Constants.POSITION_LAT_LON);
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.