org.universAAL.lddi.lib.activityhub.devicemodel
Class UsageSensor

Package class diagram package UsageSensor
java.lang.Object
  extended by org.universAAL.lddi.lib.activityhub.devicemodel.ActivityHubSensor
      extended by org.universAAL.lddi.lib.activityhub.devicemodel.UsageSensor
All Implemented Interfaces:
org.osgi.service.device.Device, ActivityHubBaseDeviceCategory, Iso11073UsageSensor

public class UsageSensor
extends ActivityHubSensor
implements Iso11073UsageSensor

Representation of a usage sensor according to ISO 11073 - Part 10471 (Indepentend living activity hub). Specific sensor events (from standard specification): - usage started // bed/chair in - usage ended // bed/chair out - expected use start violation (optional) // expected usage not started - expected use stop violation (optional) // usage continued beyond expected usage end - absence violation (optional) // absent for too long a period during expected usage - no condition detected (optional) Initially NO_CONDITION_DETECTED is set. Later, current sensor value can be set to USAGE_STARTED and USAGE_ENDED Events EXPECTED_USE_START_VIOLATION, EXPECTED_USE_STOP_VIOLATION and ABSENCE_VIOLATION are not implemented yet!

Author:
Thomas Fuxreiter

Field Summary
 
Fields inherited from class org.universAAL.lddi.lib.activityhub.devicemodel.ActivityHubSensor
driver
 
Fields inherited from interface org.universAAL.lddi.lib.activityhub.devicecategory.Iso11073UsageSensor
MY_DEVICE_CATEGORY
 
Fields inherited from interface org.universAAL.lddi.lib.activityhub.devicecategory.ActivityHubBaseDeviceCategory
CLASS, MANUFACTURER, MATCH_CLASS, MATCH_MAKE, MATCH_MODEL, MATCH_SERIAL, MATCH_VERSION, MODEL, REVISION, SERIAL
 
Fields inherited from interface org.osgi.service.device.Device
MATCH_NONE
 
Constructor Summary
UsageSensor(ActivityHubDeviceCategoryUtil.ActivityHubDeviceCategory deviceCategory, ActivityHubLocationUtil.ActivityHubLocation deviceLocation, String deviceId, org.osgi.service.log.LogService logger)
           
 
Method Summary
 int getSensorEventValue()
           
 void incomingSensorEvent(int event)
          The specific drivers have to implement this method to receive messages from devices
 void setSensorEventOff()
          set sensor event to off (e.g. switch-off) if input comes from an 1-bit sensor
 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 org.universAAL.lddi.lib.activityhub.devicemodel.ActivityHubSensor
addDriver, getDeviceCategory, getDeviceId, getDeviceLocation, noDriverFound, removeDriver, sendEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsageSensor

public UsageSensor(ActivityHubDeviceCategoryUtil.ActivityHubDeviceCategory deviceCategory,
                   ActivityHubLocationUtil.ActivityHubLocation deviceLocation,
                   String deviceId,
                   org.osgi.service.log.LogService logger)
Parameters:
deviceCategory -
deviceLocation -
deviceId -
logger -
Method Detail

getSensorEventValue

public int getSensorEventValue()
Specified by:
getSensorEventValue in class ActivityHubSensor
Returns:
the sensorEvent

setSensorEventOff

public void setSensorEventOff()
Description copied from class: ActivityHubSensor
set sensor event to off (e.g. switch-off) if input comes from an 1-bit sensor

Specified by:
setSensorEventOff in class ActivityHubSensor

setSensorEventOn

public void setSensorEventOn()
Description copied from class: ActivityHubSensor
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?

Specified by:
setSensorEventOn in class ActivityHubSensor

incomingSensorEvent

public void incomingSensorEvent(int event)
Description copied from interface: ActivityHubBaseDeviceCategory
The specific drivers have to implement this method to receive messages from devices

Specified by:
incomingSensorEvent in interface ActivityHubBaseDeviceCategory
Parameters:
event - Integer representation of a specific ActivityHubSensorEvent. example MotionSensor: motion-detected = 0; no-condition-detected = 3


Copyright © 2014 universAAL Consortium. All Rights Reserved.