Examples of queryReadState()


Examples of it.polito.appeal.traci.TrafficLight.queryReadState()

  }
 
  @Test
  public void testStateUpdate() throws IOException {
    TrafficLight tl = repo.getByID("0");
    final ReadObjectVarQuery<TLState> query = tl.queryReadState();
   
    // looks like SUMO shifts all TL timings ahead one second
    conn.nextSimStep();
   
    for (int p = 0; p < PHASES.length; p++) {
View Full Code Here

Examples of it.polito.appeal.traci.TrafficLight.queryReadState()

    TrafficLight tl = repo.getByID("0");
    ChangeLightsStateQuery q = tl.queryChangeLightsState();
    q.setValue(TEST_TL_STATE);
    q.run();
   
    assertEquals(TEST_TL_STATE, tl.queryReadState().get());
  }
 
  @Test
  public void testTrafficLightsPosition() throws IOException {
    TrafficLight tl = repo.getByID("0");
View Full Code Here

Examples of it.polito.appeal.traci.TrafficLight.queryReadState()

 
  @Test
  public void testStateAtFirstStep() throws IOException {
    TrafficLight tl = repo.getByID("0");
    TLState tlState = tl.queryReadState().get();
    final LightState[] states = tlState.lightStates;
    assertEquals(16, states.length);
    assertArrayEquals(PHASES[0], states);
  }
 
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.