public SimpleRunner(Source s) throws IOException { super(s, s.readEngineType()); this.loopController = new LoopController(controllerFunc); }
@Override public Command doLoopControl(int nextTick) throws Exception { try { lock.lockInterruptibly(); } catch (InterruptedException e) { return Command.BREAK; } try { return super.doLoopControl(nextTick); } finally { lock.unlock(); } }
private PacketPosition newResetRelevantPacketPosition(int tick, ResetRelevantKind kind, int offset) { return kind == null ? null : PacketPosition.createPacketPosition(loopController.isSyncTickSeen() ? tick : -1, kind, offset); }
loopCtl = ctl.doLoopControl(pi.getTick()); switch (loopCtl) { case RESET_START: evFull.raise(message); if (evReset.isListenedTo()) { ctl.markResetRelevantPacket(pi.getTick(), pi.getResetRelevantKind(), offset); switch (loopCtl) { case RESET_ACCUMULATE: boolean resetRelevant = evReset != null && (isStringTables || isSyncTick); if (isSyncTick) { ctl.setSyncTickSeen(true); ev.raise(message); if (resetRelevant) { ctl.markResetRelevantPacket(pi.getTick(), pi.getResetRelevantKind(), offset); if (isStringTables) { switch (loopCtl) {
loopCtl = ctl.doLoopControl(pi.getTick()); switch (loopCtl) { case RESET_START: evFull.raise(message); if (evReset.isListenedTo()) { ctl.markResetRelevantPacket(pi.getTick(), pi.getResetRelevantKind(), offset); switch (loopCtl) { case RESET_ACCUMULATE: boolean resetRelevant = evReset != null && (isStringTables || isSyncTick); if (isSyncTick) { ctl.setSyncTickSeen(true); ev.raise(message); if (resetRelevant) { ctl.markResetRelevantPacket(pi.getTick(), pi.getResetRelevantKind(), offset); if (isStringTables) { switch (loopCtl) {
private PacketPosition newResetRelevantPacketPosition(int tick, ResetRelevantKind kind, int offset) { return kind == null ? null : PacketPosition.createPacketPosition(loopController.isSyncTickSeen() ? tick : -1, kind, offset); }
public SimpleRunner(Source s) throws IOException { super(s, s.readEngineType()); this.loopController = new LoopController(controllerFunc); }
@Override public Command doLoopControl(int nextTick) throws Exception { try { lock.lockInterruptibly(); } catch (InterruptedException e) { return Command.BREAK; } try { return super.doLoopControl(nextTick); } finally { lock.unlock(); } }
@Override public LoopController.Command doLoopControl(int nextTickWithData) throws Exception { if (!loopController.isSyncTickSeen()) { if (tick == -1) { wantedTick = 0;
@Override public LoopController.Command doLoopControl(int nextTickWithData) throws Exception { if (!loopController.isSyncTickSeen()) { if (tick == -1) { wantedTick = 0;
@Override public LoopController.Command doLoopControl(int upcomingTick) { if (!loopController.isSyncTickSeen()) { if (tick == -1) { startNewTick(0); } return LoopController.Command.FALLTHROUGH; } if (upcomingTick != tick) { if (upcomingTick != Integer.MAX_VALUE) { endTicksUntil(upcomingTick - 1); startNewTick(upcomingTick); } else { endTicksUntil(tick); } } return LoopController.Command.FALLTHROUGH; } };
@Override public LoopController.Command doLoopControl(int upcomingTick) { if (!loopController.isSyncTickSeen()) { if (tick == -1) { startNewTick(0); } return LoopController.Command.FALLTHROUGH; } if (upcomingTick != tick) { if (upcomingTick != Integer.MAX_VALUE) { endTicksUntil(upcomingTick - 1); startNewTick(upcomingTick); } else { endTicksUntil(tick); } } return LoopController.Command.FALLTHROUGH; } };