当前位置: 首页>>代码示例>>Java>>正文


Java ObdResetCommand类代码示例

本文整理汇总了Java中com.github.pires.obd.commands.protocol.ObdResetCommand的典型用法代码示例。如果您正苦于以下问题:Java ObdResetCommand类的具体用法?Java ObdResetCommand怎么用?Java ObdResetCommand使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ObdResetCommand类属于com.github.pires.obd.commands.protocol包,在下文中一共展示了ObdResetCommand类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: startService

import com.github.pires.obd.commands.protocol.ObdResetCommand; //导入依赖的package包/类
public void startService(final String remoteDevice) {
    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;
}
 
开发者ID:JetBridge-io,项目名称:react-native-obd2,代码行数:30,代码来源:MockObdGatewayService.java

示例2: resetObd

import com.github.pires.obd.commands.protocol.ObdResetCommand; //导入依赖的package包/类
public void resetObd() {
    queueJob(new ObdResetCommand());
}
 
开发者ID:kocur,项目名称:Obd2-Tracker,代码行数:4,代码来源:ObdBluetoothService.java


注:本文中的com.github.pires.obd.commands.protocol.ObdResetCommand类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。