public class DigitalSwitchActuator<T extends DigitalSwitchActuatorConfig> extends GpioActuatorBase<T> implements ISwitcher
コンストラクタと説明 |
---|
DigitalSwitchActuator(java.lang.String id,
T config)
コンストラクタです。
|
修飾子とタイプ | メソッドと説明 |
---|---|
protected boolean |
getState(double val)
GPIOピンとしてのH/L状態を取得します。
|
Pin |
getSwitchInputPin()
スイッチ制御入力用ピンを取得します。
|
Pin |
getSwitchOutputPin()
スイッチ制御出力用ピンを取得します。
|
boolean |
isOff()
OFF状態であるかを返します。
|
boolean |
isOn()
ON状態であるかを返します。
|
void |
off()
OFF状態に設定します。
|
void |
on()
ON状態に設定します。
|
protected void |
onInit()
GPIOピンを初期化し、rcM/rcA受信動作アクションを登録します。
|
protected void |
onStart()
初期処理を行います。
|
protected void |
onStop()
最終位置をDBに保存します。
|
void |
setValue(java.lang.Number value)
アクチュエータの状態が変更されると内部DBに記録されます。
|
getInterlockPin, isInterlock
changeMode, getAction, getActionMode, getActiveRcAService, getActiveRcMService, getOprServices, getRcAServices, getRcMServices, init, isRepresentative, notifyException, setAction, setActionMode, start, stop
addListener, getConfig, getDevice, getId, getListeners, getValue, notifyStarted, notifyStopped, notifyUpdated, removeListener, setDevice
public DigitalSwitchActuator(java.lang.String id, T config)
id
- コンポーネントIDconfig
- 設定値public boolean isOn()
ISwitcher
public boolean isOff()
ISwitcher
public Pin getSwitchOutputPin()
public Pin getSwitchInputPin()
protected boolean getState(double val)
val
- 値protected void onInit() throws java.lang.Exception
onInit
クラス内 GpioActuatorBase<T extends DigitalSwitchActuatorConfig>
java.lang.Exception
- 処理に失敗するとスローされます。protected void onStart() throws java.lang.Exception
GpioActuatorBase
onStart
クラス内 GpioActuatorBase<T extends DigitalSwitchActuatorConfig>
java.lang.Exception
- 処理に失敗するとスローされます。public void setValue(java.lang.Number value)
PiActuatorBase
setValue
インタフェース内 IComponent<T extends DigitalSwitchActuatorConfig>
setValue
クラス内 PiActuatorBase<T extends DigitalSwitchActuatorConfig>
value
- 数値protected void onStop() throws java.lang.Exception
onStop
クラス内 GpioActuatorBase<T extends DigitalSwitchActuatorConfig>
java.lang.Exception
- 処理に失敗するとスローされます。