|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.universAAL.lddi.lib.activityhub.devicemodel.ActivityHubSensor
public abstract class ActivityHubSensor
Activity hub sensor base class Now all ActivityHub sensors are implemented as on/off sensors having setSensorEventOn and setSensorEventOff methods. TODO: check if it's possible/better to use any value setSensorEvent(int sensorEvent); for KNX datapoint type 1.*** (which are used mainly during development) on/off is sufficient Generic sensor properties flags for activity hub sensors are not implement yet! (Because they are not supported by KNX sensors) auto-presence-received(16) (For sensors that have "heartbeat" operational status: indicates that the "heartbeat" has been seen and is ok. This flag shall be reset if Auto-Presence-Failed is set.) auto-presence-failed(17) (For sensors that have "heartbeat" operational status: indicates that the "heartbeat" has not been seen as expected. This flag shall be reset if Auto-Presence-Received is set.) low-battery(18) (Indicates the sensor is in the low battery condition. This determination is unique to the sensor.) fault(19) (Indicates that the sensor is in a fault condition and needs attention. This determination is unique to the sensor.) end-of-life(20) (Indicates that the sensor has reached end of life and needs replacement. This indication is unique to the sensor.)
Field Summary | |
---|---|
protected ActivityHubBaseDeviceCategory |
driver
reference to my driver instance; can be just one! |
protected Object |
lastSensorEvent
all inherited classes must use the same member name, even though they have different types |
Fields inherited from interface org.osgi.service.device.Device |
---|
MATCH_NONE |
Constructor Summary | |
---|---|
ActivityHubSensor(ActivityHubDeviceCategoryUtil.ActivityHubDeviceCategory deviceCategory,
ActivityHubLocationUtil.ActivityHubLocation deviceLocation,
String deviceId,
org.osgi.service.log.LogService logger)
Constructor |
Method Summary | |
---|---|
void |
addDriver(ActivityHubBaseDeviceCategory driverInstance)
store a driver reference for this device |
ActivityHubDeviceCategoryUtil.ActivityHubDeviceCategory |
getDeviceCategory()
|
String |
getDeviceId()
|
ActivityHubLocationUtil.ActivityHubLocation |
getDeviceLocation()
|
abstract int |
getSensorEventValue()
|
void |
noDriverFound()
|
void |
removeDriver()
remove the driver reference of this device |
protected void |
sendEvent(int event)
send sensor event to driver (upper layer) |
abstract void |
setSensorEventOff()
set sensor event to off (e.g. switch-off) if input comes from an 1-bit sensor |
abstract void |
setSensorEventOn()
set sensor event to on (e.g. switch-on) if input comes from an 1-bit sensor called by refinement driver is on/off feasible for all ActivityHubSensors? |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Object lastSensorEvent
protected ActivityHubBaseDeviceCategory driver
Constructor Detail |
---|
public ActivityHubSensor(ActivityHubDeviceCategoryUtil.ActivityHubDeviceCategory deviceCategory, ActivityHubLocationUtil.ActivityHubLocation deviceLocation, String deviceId, org.osgi.service.log.LogService logger)
deviceCategory
- deviceLocation
- deviceId
- logger
- Method Detail |
---|
public void addDriver(ActivityHubBaseDeviceCategory driverInstance)
public void removeDriver()
public abstract void setSensorEventOn()
public abstract void setSensorEventOff()
protected void sendEvent(int event)
public abstract int getSensorEventValue()
public ActivityHubDeviceCategoryUtil.ActivityHubDeviceCategory getDeviceCategory()
public ActivityHubLocationUtil.ActivityHubLocation getDeviceLocation()
public String getDeviceId()
public void noDriverFound()
noDriverFound
in interface org.osgi.service.device.Device
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |