类 AbstractDIDevice
java.lang.Object
cn.tpkf.rpi.devices.AbstractDevice
cn.tpkf.rpi.devices.gpio.AbstractGpioDevice
cn.tpkf.rpi.devices.gpio.digital.AbstractDigitalDevice
cn.tpkf.rpi.devices.gpio.digital.in.AbstractDIDevice
- 所有已实现的接口:
Device
- 直接已知子类:
Button
数字信号输入设备
- 作者:
- Harlan
-
字段概要
字段修饰符和类型字段说明protected final longThe debounce time in microseconds.protected final com.pi4j.io.gpio.digital.DigitalInputThe DigitalInput instance.protected final RunnableThe task to be executed when the input signal goes from high to low.protected final RunnableThe task to be executed when the input signal goes from low to high.protected final com.pi4j.io.gpio.digital.PullResistanceThe pull resistance.从类继承的字段 cn.tpkf.rpi.devices.gpio.AbstractGpioDevice
address从类继承的字段 cn.tpkf.rpi.devices.AbstractDevice
deviceManager, id, lock, name -
构造器概要
构造器限定符构造器说明protectedAbstractDIDevice(DeviceManager deviceManager, String id, String name, IBCMEnums address, boolean inverted, long debounceMicSec, Runnable onUpTask, Runnable onDownTask) Initializes an instance of the AbstractDIDevice class. -
方法概要
从类继承的方法 cn.tpkf.rpi.devices.gpio.AbstractGpioDevice
getDescription从类继承的方法 cn.tpkf.rpi.devices.AbstractDevice
shutdown
-
字段详细资料
-
digitalInput
protected final com.pi4j.io.gpio.digital.DigitalInput digitalInputThe DigitalInput instance. -
pull
protected final com.pi4j.io.gpio.digital.PullResistance pullThe pull resistance. -
debounceMicSec
protected final long debounceMicSecThe debounce time in microseconds. -
onUpTask
The task to be executed when the input signal goes from low to high. -
onDownTask
The task to be executed when the input signal goes from high to low.
-
-
构造器详细资料
-
AbstractDIDevice
protected AbstractDIDevice(DeviceManager deviceManager, String id, String name, IBCMEnums address, boolean inverted, long debounceMicSec, Runnable onUpTask, Runnable onDownTask) Initializes an instance of the AbstractDIDevice class.- 参数:
deviceManager- The DeviceManager instance.id- The ID of the device.name- The name of the device.address- The IBCMEnums address of the device.inverted- Indicates whether the input signal is inverted.debounceMicSec- The debounce time in microseconds.onUpTask- The task to be executed when the input signal goes from low to high.onDownTask- The task to be executed when the input signal goes from high to low.
-
-
方法详细资料
-
getState
protected com.pi4j.io.gpio.digital.DigitalState getState()从类复制的说明:AbstractDigitalDevice获取当前状态- 指定者:
getState在类中AbstractDigitalDevice- 返回:
- 状态
-
isHigh
protected boolean isHigh()从类复制的说明:AbstractDigitalDevice是否为高电平- 指定者:
isHigh在类中AbstractDigitalDevice- 返回:
- 是否为高电平
-
isLow
protected boolean isLow()从类复制的说明:AbstractDigitalDevice是否为低电平- 指定者:
isLow在类中AbstractDigitalDevice- 返回:
- 是否为低电平
-