@Override public void connected() { synchronized(disconnectLock) { scs.setInPoint(); disconnectButton.setText(DISCONNECT_DISCONNECT); disconnectButton.setEnabled(true); } }
private void setInputPointInSCS(SimulationConstructionSet scs, int inputPointIndex) { scs.setIndex(inputPointIndex); scs.setInPoint(); }
private void addOneToInPointIndexWithoutCrop(SimulationConstructionSet scs) { int currentInPoint = scs.getInPoint(); scs.setIndex(currentInPoint + 1); scs.setInPoint(); }
private static void deleteFirstDataPointAndCropData(SimulationConstructionSet scs) { scs.gotoInPointNow(); scs.tick(1); scs.setInPoint(); scs.cropBuffer(); }
public void cropFirstPoint() { scs.cropBuffer(); scs.gotoInPointNow(); scs.stepForwardNow(1); scs.setInPoint(); scs.cropBuffer(); }
private static void deleteFirstDataPointAndCropData(SimulationConstructionSet scs) { scs.gotoInPointNow(); scs.tick(1); scs.setInPoint(); scs.cropBuffer(); scs.gotoOutPointNow(); }
private static void deleteFirstDataPointAndCropData(SimulationConstructionSet scs) { scs.gotoInPointNow(); scs.tick(1); scs.setInPoint(); scs.cropBuffer(); scs.gotoOutPointNow(); }
public void cropFirstPoint() { scs.cropBuffer(); scs.gotoInPointNow(); scs.stepForwardNow(1); scs.setInPoint(); scs.cropBuffer(); }
public void cropInitialSimPoints(int numberOfDataPointsToCrop) { scs.cropBuffer(); scs.gotoInPointNow(); scs.stepForwardNow(numberOfDataPointsToCrop); scs.setInPoint(); scs.cropBuffer(); }
private void seek(int newValue) { synchronized (seekLock) { if (!isSeeking && !scs.isSimulating()) { if(newValue > 0) { newValue -= 1; } robot.seek(newValue); //Do -1 so that we'll get to sliderValue after doing the seek. try { scs.simulateOneRecordStepNow(); scs.setInPoint(); } catch (UnreasonableAccelerationException e) { e.printStackTrace(); } if (multiPlayer != null) multiPlayer.indexChanged(0, 0); } } }
private void seek(int newValue) { synchronized (seekLock) { if (!isSeeking && !scs.isSimulating()) { if(newValue > 0) { newValue -= 1; } robot.seek(newValue); //Do -1 so that we'll get to sliderValue after doing the seek. try { scs.simulateOneRecordStepNow(); scs.setInPoint(); } catch (UnreasonableAccelerationException e) { e.printStackTrace(); } if (multiPlayer != null) multiPlayer.indexChanged(0, 0); } } }
for (SimulationConstructionSet scs : scss) scs.setInPoint();
private void seek(int newValue) { synchronized (seekLock) { if (!isSeeking && !scs.isSimulating()) { if(newValue > 0) { newValue -= 1; } robot.seek(newValue); //Do -1 so that we'll get to sliderValue after doing the seek. try { scs.simulateOneRecordStepNow(); scs.setInPoint(); } catch (UnreasonableAccelerationException e) { e.printStackTrace(); } if (multiPlayer != null) multiPlayer.notifyOfIndexChange(0); } } }
@Override public void doFinalAction(SimulationConstructionSet scs0, SimulationConstructionSet scs1) { SimulationConstructionSet[] scss = {scs0, scs1}; for (SimulationConstructionSet scs : scss) { scs.setInPoint(); scs.simulate(nTicksCompare); } for (SimulationConstructionSet scs : scss) { waitForSimulationToFinish(scs); } File stateFile = new File("stateFile"); scs0.writeState(stateFile); scs0.gotoInPointNow(); scs0.simulate(1); scs0.writeState(stateFile); stateFile.delete(); for (SimulationConstructionSet scs : scss) { scs.simulate(nTicksFinal); } for (SimulationConstructionSet scs : scss) { waitForSimulationToFinish(scs); } }
private void cropSCSBuffer(SimulationConstructionSet scs, SimulationTestingParameters simulationTestingParameters) { if (scs != null) { scs.gotoInPointNow(); scs.tick(2); ThreadTools.sleep(100L); scs.setInPoint(); ThreadTools.sleep(100L); scs.cropBuffer(); if (simulationTestingParameters.getKeepSCSUp()) { ThreadTools.sleepForever(); } } }
simulationConstructionSet.setInPoint(); break;
simulationConstructionSet.setInPoint(); break;
simulationConstructionSet.setInPoint(); break;
scs.setInPoint(); scs.cropBuffer(); scs.play();