package roboter_demo; import de.spacecontrol.sc.dllwrapper.ScDllWrapper; import de.spacecontrol.sc.dllwrapper.ScEx; import de.spacecontrol.sc.dllwrapper.ScStdData; public class ReadingThread extends Thread { private RoboterApp mApp; private int mDevIdx; private boolean mIsReading; public void setDevIdx(int paramInt) { this.mDevIdx = paramInt; } public void stopReadingThread() { this.mIsReading = false; } public ReadingThread(RoboterApp paramRoboterApp) { this.mApp = paramRoboterApp; this.mDevIdx = paramRoboterApp.getDevIdx(); } public void run() { boolean bool = true; int i = 0; ScStdData scStdData = new ScStdData(); this.mIsReading = true; while (this.mIsReading) { try { ScDllWrapper.scFetchStdData(this.mDevIdx, scStdData); if (scStdData.mEvent > -1) { this.mApp.handleEvent(this.mDevIdx, scStdData.mEvent); continue; } this.mApp.repaintDemo(scStdData); } catch (ScEx scEx) { if (bool) { this.mApp.repaintDemo(scStdData); if (i++ > 3) { i = 0; bool = false; } } } } System.out.println("*** Reading thread stopped."); } public void stopp() { this.mIsReading = false; } } /* Location: /opt/SpaceControl/Roboter_Demo.jar!/roboter_demo/ReadingThread.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.2.1 */