Package de.hpi.eworld.visualizer.simulation.traci.common

Examples of de.hpi.eworld.visualizer.simulation.traci.common.TraciInputStream.readInt()


   
    TraciInputStream payload = command.getPayload();
   
    int flag = payload.readByte();
    int domain = payload.readByte();
    int domainID = payload.readInt();
    int variable = payload.readByte();
    int valueDataType = payload.readByte();
    Object value = payload.readTraciObject(valueDataType);
   
    return new ScenarioCommandCodec(
View Full Code Here


      int status = payload.readUnsignedByte();
      if (status == 0x00) {
        // value could be retrieved without an error
        int type = payload.readUnsignedByte();
        if (type == TraciConstants.DATATYPE_INT)
          values.put(id, payload.readInt());
        else if (type == TraciConstants.DATATYPE_STRING_LIST) {
          List<String> ids = new ArrayList<String>();
          int length = payload.readInt();
          for (int j = 0; j < length; j++) {
            ids.add(new String(payload.readTraciString()));
View Full Code Here

        int type = payload.readUnsignedByte();
        if (type == TraciConstants.DATATYPE_INT)
          values.put(id, payload.readInt());
        else if (type == TraciConstants.DATATYPE_STRING_LIST) {
          List<String> ids = new ArrayList<String>();
          int length = payload.readInt();
          for (int j = 0; j < length; j++) {
            ids.add(new String(payload.readTraciString()));
          }
          values.put(id, ids);
        }
View Full Code Here

    double switchTime = payload.readDouble();
    byte[] precedingEdge = payload.readTraciString();
    float positionOnPrecedingEdge = payload.readFloat();
    byte[] succeedingEdge = payload.readTraciString();
    int newPhase = payload.readInt();
    double yellowTime = payload.readDouble();
   
    return new ResponseTrafficLightSwitchCommandReader(
        switchTime,  precedingEdge, positionOnPrecedingEdge,
        succeedingEdge, newPhase, yellowTime);
View Full Code Here

 
  public static ResponseMoveNodeCommandReader fromCommand(Command command) throws IOException {
   
    TraciInputStream payload = command.getPayload();
   
    int nodeID = payload.readInt();
    double targetTime = payload.readDouble();
    float []position = (float[])payload.readTraciTypeAndObject();
   
    return new ResponseMoveNodeCommandReader(nodeID, targetTime, position);
  }
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.