Package org.martin.sireader.common

Examples of org.martin.sireader.common.ResultData


  }
 
  public ResultData generateRunnerData() throws RunnerCreationException {
    random = new Random();
    Runner runner = generateRunner();
    ResultData card = generateCardData(runner);
    siHandler.newCardRead(card);
    return card;
  }
View Full Code Here


  public ResultData generateCardData(Runner runner) {
    return generateCardData(runner.getEcard(), runner.getCourse());
  }

  public ResultData generateCardData(String chipNumber, Course course) {
    ResultData card = new ResultData();
    card.setSiIdent(chipNumber);
    long startTime = stage().getZeroHour() + randomTime();
    card.setStartTime(startTime);
    card.setFinishTime(startTime + randomTime());
    card.setPunches(generateRandomPunchesFor(course, mutationX));
    card.evaluateTimes();
    return card;
  }
View Full Code Here

 
  public ResultData generateUnknownData() {
    random = new Random();
    withRegistryControls();
    ResultData cardData = generateCardData(runnerControl.newUniqueEcard(), randomCourse());
    siHandler.newCardRead(cardData);
    return cardData;
  }
View Full Code Here

    random = new Random();
    withRegistryControls();
    List<Runner> runnersFromCourse = registry().getRunnersFromCourse(randomCourse());
    if( ! runnersFromCourse.isEmpty() ){
      Runner runner = runnersFromCourse.get(random.nextInt(runnersFromCourse.size()));
      ResultData cardData = generateCardData(runner);
      siHandler.newCardRead(cardData);
      return cardData;
    }
    return null;
  }
View Full Code Here

  public void setPort(SerialPort port) {
    this.siPort = port;
  }

  private void configure() {
    portHandler = new SIPortHandler(new ResultData());
    portHandler.addListener(this);
    portHandler.setPortName(getPort().name());
    portHandler.setDebugDir(stage().getBaseDir());
    changeZeroTime();
  }
View Full Code Here

TOP

Related Classes of org.martin.sireader.common.ResultData

Copyright © 2018 www.massapicom. 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.