类 DeviceManager

java.lang.Object
cn.tpkf.rpi.manager.DeviceManager

public class DeviceManager extends Object
作者:
Harlan
  • 构造器详细资料

    • DeviceManager

      public DeviceManager()
    • DeviceManager

      public DeviceManager(com.pi4j.context.Context context)
    • DeviceManager

      public DeviceManager(com.pi4j.context.Context context, Long timeOutMillis)
  • 方法详细资料

    • printBanner

      public String printBanner()
      打印横幅
    • execute

      public <T> T execute(ContextCommand<T> command)
      执行ContextCommand命令
      参数:
      command - 要执行的ContextCommand命令
      返回:
      执行结果,成功返回true,失败返回false
    • addDevice

      public void addDevice(Device device)
      添加设备
      参数:
      device - 设备
    • removeDevice

      public void removeDevice(String id)
      移除设备
      参数:
      id - 设备id
    • getDevice

      public Device getDevice(String id)
    • isRunning

      public boolean isRunning()
      判断应用程序是否正在运行中
      返回:
      如果应用程序正在运行中则返回true,否则返回false
    • shutdown

      public boolean shutdown()
      关闭方法
      返回:
      关闭状态,如果成功返回true,否则返回false
    • getPlatformInfo

      public PlatformInfo getPlatformInfo()
      获取平台信息
      返回:
      平台信息