类 DeviceManager
java.lang.Object
cn.tpkf.rpi.manager.DeviceManager
- 作者:
- Harlan
-
构造器概要
构造器构造器说明DeviceManager(com.pi4j.context.Context context) DeviceManager(com.pi4j.context.Context context, Long timeOutMillis) -
方法概要
修饰符和类型方法说明void添加设备<T> Texecute(ContextCommand<T> command) 执行ContextCommand命令获取平台信息boolean判断应用程序是否正在运行中打印横幅voidremoveDevice(String id) 移除设备booleanshutdown()关闭方法
-
构造器详细资料
-
DeviceManager
public DeviceManager() -
DeviceManager
public DeviceManager(com.pi4j.context.Context context) -
DeviceManager
-
-
方法详细资料
-
printBanner
打印横幅 -
execute
执行ContextCommand命令- 参数:
command- 要执行的ContextCommand命令- 返回:
- 执行结果,成功返回true,失败返回false
-
addDevice
添加设备- 参数:
device- 设备
-
removeDevice
移除设备- 参数:
id- 设备id
-
getDevice
-
isRunning
public boolean isRunning()判断应用程序是否正在运行中- 返回:
- 如果应用程序正在运行中则返回true,否则返回false
-
shutdown
public boolean shutdown()关闭方法- 返回:
- 关闭状态,如果成功返回true,否则返回false
-
getPlatformInfo
获取平台信息- 返回:
- 平台信息
-