Module com.pi4j
Package com.pi4j.io.gpio.analog
Class AnalogBase<ANALOG_TYPE extends Analog<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE>,CONFIG_TYPE extends AnalogConfig<CONFIG_TYPE>,PROVIDER_TYPE extends AnalogProvider>
- java.lang.Object
-
- com.pi4j.common.IdentityBase
-
- com.pi4j.io.IOBase<IO_TYPE,CONFIG_TYPE,PROVIDER_TYPE>
-
- com.pi4j.io.gpio.GpioBase<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE>
-
- com.pi4j.io.gpio.analog.AnalogBase<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE>
-
- All Implemented Interfaces:
Describable
,Identity
,Lifecycle
,Extension
,Bindable<ANALOG_TYPE,AnalogBinding>
,Analog<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE>
,com.pi4j.io.gpio.Gpio<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE>
,IO<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE>
- Direct Known Subclasses:
AnalogInputBase
,AnalogOutputBase
public abstract class AnalogBase<ANALOG_TYPE extends Analog<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE>,CONFIG_TYPE extends AnalogConfig<CONFIG_TYPE>,PROVIDER_TYPE extends AnalogProvider> extends com.pi4j.io.gpio.GpioBase<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE> implements Analog<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE>, Bindable<ANALOG_TYPE,AnalogBinding>
Abstract AnalogBase class.
- Version:
- $Id: $Id
- Author:
- Robert Savage (http://www.savagehomeautomation.com)
-
-
Field Summary
Fields Modifier and Type Field Description protected BindingManager<ANALOG_TYPE,AnalogBinding,AnalogValueChangeEvent>
bindings
protected EventManager<ANALOG_TYPE,AnalogValueChangeListener,AnalogValueChangeEvent>
valueChangeEventManager
-
Fields inherited from class com.pi4j.common.IdentityBase
description, id, logger, metadata, name
-
-
Constructor Summary
Constructors Constructor Description AnalogBase(PROVIDER_TYPE provider, CONFIG_TYPE config)
Constructor for AnalogBase.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ANALOG_TYPE
addListener(AnalogValueChangeListener... listener)
addListener.ANALOG_TYPE
bind(AnalogBinding... binding)
bind.protected void
dispatch(AnalogValueChangeEvent event)
Dispatch AnalogInputEvent on analog input changesANALOG_TYPE
removeListener(AnalogValueChangeListener... listener)
removeListener.ANALOG_TYPE
shutdown(Context context)
shutdown.ANALOG_TYPE
unbind(AnalogBinding... binding)
unbind.-
Methods inherited from class com.pi4j.io.IOBase
config, describe, description, initialize, name, provider
-
Methods inherited from class com.pi4j.common.IdentityBase
description, id, metadata, name
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.pi4j.common.Identity
description, getDescription, getId, getMetadata, getName, id, metadata, name
-
Methods inherited from interface com.pi4j.common.Lifecycle
initialize
-
-
-
-
Field Detail
-
valueChangeEventManager
protected final EventManager<ANALOG_TYPE extends Analog<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE>,AnalogValueChangeListener,AnalogValueChangeEvent> valueChangeEventManager
-
bindings
protected BindingManager<ANALOG_TYPE extends Analog<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE>,AnalogBinding,AnalogValueChangeEvent> bindings
-
-
Constructor Detail
-
AnalogBase
public AnalogBase(PROVIDER_TYPE provider, CONFIG_TYPE config)
Constructor for AnalogBase.
- Parameters:
provider
- a PROVIDER_TYPE object.config
- a CONFIG_TYPE object.
-
-
Method Detail
-
addListener
public ANALOG_TYPE addListener(AnalogValueChangeListener... listener)
addListener.
- Specified by:
addListener
in interfaceAnalog<ANALOG_TYPE extends Analog<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE>,CONFIG_TYPE extends AnalogConfig<CONFIG_TYPE>,PROVIDER_TYPE extends AnalogProvider>
- Parameters:
listener
- aAnalogValueChangeListener
object.- Returns:
- a ANALOG_TYPE object.
-
removeListener
public ANALOG_TYPE removeListener(AnalogValueChangeListener... listener)
removeListener.
- Specified by:
removeListener
in interfaceAnalog<ANALOG_TYPE extends Analog<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE>,CONFIG_TYPE extends AnalogConfig<CONFIG_TYPE>,PROVIDER_TYPE extends AnalogProvider>
- Parameters:
listener
- aAnalogValueChangeListener
object.- Returns:
- a ANALOG_TYPE object.
-
bind
public ANALOG_TYPE bind(AnalogBinding... binding)
bind.
- Specified by:
bind
in interfaceBindable<ANALOG_TYPE extends Analog<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE>,CONFIG_TYPE extends AnalogConfig<CONFIG_TYPE>>
- Parameters:
binding
- aBindable
object.- Returns:
- a DIGITAL_TYPE object.
-
unbind
public ANALOG_TYPE unbind(AnalogBinding... binding)
unbind.
- Specified by:
unbind
in interfaceBindable<ANALOG_TYPE extends Analog<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE>,CONFIG_TYPE extends AnalogConfig<CONFIG_TYPE>>
- Parameters:
binding
- aBindable
object.- Returns:
- a DIGITAL_TYPE object.
-
dispatch
protected void dispatch(AnalogValueChangeEvent event)
Dispatch AnalogInputEvent on analog input changes- Parameters:
event
- AnalogInputEvent
-
shutdown
public ANALOG_TYPE shutdown(Context context)
shutdown.
- Specified by:
shutdown
in interfaceLifecycle<ANALOG_TYPE extends Analog<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE>>
- Overrides:
shutdown
in classIOBase<ANALOG_TYPE extends Analog<ANALOG_TYPE,CONFIG_TYPE,PROVIDER_TYPE>,CONFIG_TYPE extends AnalogConfig<CONFIG_TYPE>,PROVIDER_TYPE extends AnalogProvider>
- Parameters:
context
- aContext
object.- Returns:
- a T object.
-
-