org.universAAL.lddi.exporter.activityhub.driver
Class Iso11073ContactClosureSensorInstance
java.lang.Object
org.universAAL.lddi.lib.activityhub.driver.interfaces.ActivityHubDriver
org.universAAL.lddi.exporter.activityhub.driver.Iso11073ContactClosureSensorInstance
- All Implemented Interfaces:
- org.osgi.service.device.Constants, org.osgi.util.tracker.ServiceTrackerCustomizer, ActivityHubBaseDeviceCategory, Iso11073ContactClosureSensor
public class Iso11073ContactClosureSensorInstance
- extends ActivityHubDriver
- implements Iso11073ContactClosureSensor, org.osgi.util.tracker.ServiceTrackerCustomizer, org.osgi.service.device.Constants
Working instance of the ActivityHub ContactClosure driver.
Tracks on the ContactClosureSensor device service passed in the attach method
in Iso11073ContactClosureSensorDriver class.
This instance is passed to the consuming client (e.g. uAAL exporter bundle).
When the ContactClosureSensor device service disappears, this driver is removed
from the consuming client and from the device.
- Author:
- Thomas Fuxreiter (foex@gmx.at)
Fields inherited from interface org.osgi.service.device.Constants |
DEVICE_CATEGORY, DEVICE_DESCRIPTION, DEVICE_SERIAL, DRIVER_ID |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Iso11073ContactClosureSensorInstance
public Iso11073ContactClosureSensorInstance(org.osgi.framework.BundleContext c,
ActivityHubDriverClient client,
org.osgi.service.log.LogService log)
- Parameters:
c
- OSGi BundleContextsr
- Service reference of ISO deviceclient
- Link to consumer of this driver (e.g. uAAL exporter bundle)
getLastSensorEvent
public int getLastSensorEvent()
- Specified by:
getLastSensorEvent
in class ActivityHubDriver
- Returns:
- last incoming sensor event
addingService
public Object addingService(org.osgi.framework.ServiceReference reference)
- Specified by:
addingService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
- Parameters:
ActivityHubSensor
- service
modifiedService
public void modifiedService(org.osgi.framework.ServiceReference reference,
Object service)
- Specified by:
modifiedService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
removedService
public void removedService(org.osgi.framework.ServiceReference reference,
Object service)
- Specified by:
removedService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
incomingSensorEvent
public void incomingSensorEvent(int event)
- forward event to client
- 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.