Class AbstractSimpleSensor
- java.lang.Object
-
- io.patriot_framework.generator.device.AbstractDevice
-
- io.patriot_framework.generator.device.passive.sensors.AbstractSensor
-
- io.patriot_framework.generator.device.passive.sensors.AbstractSimpleSensor
-
- All Implemented Interfaces:
Device
,Sensor
,SimpleSensor
,Unit
- Direct Known Subclasses:
Default
,Hygrometer
,Thermometer
public abstract class AbstractSimpleSensor extends AbstractSensor implements SimpleSensor
Abstract class for Sensor - device with single DataFeed.
-
-
Constructor Summary
Constructors Constructor Description AbstractSimpleSensor()
AbstractSimpleSensor(String label, DataFeed dataFeed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDataFeed(DataFeed dataFeed)
Adds DataFeed to CompositionDataFeed
getDataFeed()
Returns single instance of DataFeed for SimpleSensorvoid
removeDataFeed()
Removesvoid
setDataFeed(DataFeed dataFeed)
Sets DataFeed for SimpleSensor-
Methods inherited from class io.patriot_framework.generator.device.passive.sensors.AbstractSensor
getDataFeeds, removeDataFeed, requestData
-
Methods inherited from class io.patriot_framework.generator.device.AbstractDevice
getCoapController, getDataObservable, getLabel, getNetworkAdapter, getUUID, setCoapController, setDataObservable, setLabel, setNetworkAdapter, setUUID, startCoapController, stopCoapController
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.patriot_framework.generator.device.Device
getCoapController, getDataObservable, getNetworkAdapter, requestData, setCoapController, setDataObservable, setNetworkAdapter, startCoapController, stopCoapController
-
Methods inherited from interface io.patriot_framework.generator.device.passive.sensors.Sensor
getDataFeeds, removeDataFeed
-
-
-
-
Method Detail
-
setDataFeed
public void setDataFeed(DataFeed dataFeed)
Description copied from interface:SimpleSensor
Sets DataFeed for SimpleSensor- Specified by:
setDataFeed
in interfaceSimpleSensor
- Parameters:
dataFeed
- instance of DataFeed
-
getDataFeed
public DataFeed getDataFeed()
Description copied from interface:SimpleSensor
Returns single instance of DataFeed for SimpleSensor- Specified by:
getDataFeed
in interfaceSimpleSensor
- Returns:
- instance of DataFeed
-
removeDataFeed
public void removeDataFeed()
Description copied from interface:SimpleSensor
Removes- Specified by:
removeDataFeed
in interfaceSimpleSensor
-
addDataFeed
public void addDataFeed(DataFeed dataFeed)
Description copied from interface:Sensor
Adds DataFeed to Composition- Specified by:
addDataFeed
in interfaceSensor
- Overrides:
addDataFeed
in classAbstractSensor
- Parameters:
dataFeed
- instance of DataFeed
-
-