/** {@inheritDoc} */ @Override public String getFormattedResult() { return getResult(); }
new ObdResetCommand().run(sock.getInputStream(), sock.getOutputStream());
public void startService() { Log.d(TAG, "Starting " + this.getClass().getName() + " service.."); // Let's configure the connection. Log.d(TAG, "Queing jobs for connection configuration.."); queueJob(new ObdCommandJob(new ObdResetCommand())); queueJob(new ObdCommandJob(new EchoOffCommand())); /* * Will send second-time based on tests. * * TODO this can be done w/o having to queue jobs by just issuing * command.run(), command.getResult() and validate the result. */ queueJob(new ObdCommandJob(new EchoOffCommand())); queueJob(new ObdCommandJob(new LineFeedOffCommand())); queueJob(new ObdCommandJob(new TimeoutCommand(62))); // For now set protocol to AUTO queueJob(new ObdCommandJob(new SelectProtocolCommand(ObdProtocols.AUTO))); // Job for returning dummy data queueJob(new ObdCommandJob(new AmbientAirTemperatureCommand())); queueCounter = 0L; Log.d(TAG, "Initialization jobs queued."); isRunning = true; }
queueJob(new ObdCommandJob(new ObdResetCommand()));