Package it.polito.appeal.traci.protocol

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


    assertEquals(Constants.CMD_GETVERSION, pair.getStatus().id());
   
    Command resp = pair.getResponse();
    assertEquals(Constants.CMD_GETVERSION, resp.id());
    assertEquals(API_VERSION, resp.content().readInt());
    log.info(resp.content().readStringASCII());
  }
 
  @Test
  public void testCloseHighLevel() throws IOException {
    RequestMessage reqm = new RequestMessage();
View Full Code Here


  }

  @Test
  public void testContent() {
    Command cmd = new Command(sampleStorage());
    assertEquals(AN_INTEGER, cmd.content().readInt());
  }

  @Test
  public void testWriteRawTo() {
    Command cmd = new Command(sampleStorage());
View Full Code Here

    if (time == -1)
      throw new IllegalStateException("time must be set first");
   
    List<Command> reqs = super.getRequests();
    Command req = reqs.iterator().next();
    req.content().writeByte(Constants.TYPE_INTEGER);
    req.content().writeInt(time);
    return reqs;
  }
 
}
View Full Code Here

      throw new IllegalStateException("time must be set first");
   
    List<Command> reqs = super.getRequests();
    Command req = reqs.iterator().next();
    req.content().writeByte(Constants.TYPE_INTEGER);
    req.content().writeInt(time);
    return reqs;
  }
 
}
View Full Code Here

      output = ssl;
   
    }else if(sc.output_type == Constants.TYPE_BOUNDINGBOX){
     
      double min_x = resp.content().readDouble();
      double min_y = resp.content().readDouble();
      double max_x = resp.content().readDouble();
      double max_y = resp.content().readDouble();
     
      output = new SumoBoundingBox(min_x, min_y, max_x, max_y);
     
View Full Code Here

   
    }else if(sc.output_type == Constants.TYPE_BOUNDINGBOX){
     
      double min_x = resp.content().readDouble();
      double min_y = resp.content().readDouble();
      double max_x = resp.content().readDouble();
      double max_y = resp.content().readDouble();
     
      output = new SumoBoundingBox(min_x, min_y, max_x, max_y);
     
    }else if(sc.output_type == Constants.TYPE_COMPOUND){
View Full Code Here

    }else if(sc.output_type == Constants.TYPE_BOUNDINGBOX){
     
      double min_x = resp.content().readDouble();
      double min_y = resp.content().readDouble();
      double max_x = resp.content().readDouble();
      double max_y = resp.content().readDouble();
     
      output = new SumoBoundingBox(min_x, min_y, max_x, max_y);
     
    }else if(sc.output_type == Constants.TYPE_COMPOUND){
     
View Full Code Here

      if(sc.input2 == Constants.TL_CONTROLLED_LINKS){
       
        SumoLinkList sll = new SumoLinkList();
       
        //read length
        resp.content().readUnsignedByte();
        resp.content().readInt();
       
        int laenge = resp.content().readInt();
        obj = new StringList[laenge];
       
View Full Code Here

       
        SumoLinkList sll = new SumoLinkList();
       
        //read length
        resp.content().readUnsignedByte();
        resp.content().readInt();
       
        int laenge = resp.content().readInt();
        obj = new StringList[laenge];
       
        for(int i=0; i<laenge; i++){
View Full Code Here

       
        //read length
        resp.content().readUnsignedByte();
        resp.content().readInt();
       
        int laenge = resp.content().readInt();
        obj = new StringList[laenge];
       
        for(int i=0; i<laenge; i++){
       
          resp.content().readUnsignedByte();
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.