public class Iso11073MotionSensorInstance extends ActivityHubDriver implements Iso11073MotionSensor, org.osgi.util.tracker.ServiceTrackerCustomizer, org.osgi.service.device.Constants
client, device
MY_DEVICE_CATEGORY
CLASS, MANUFACTURER, MATCH_CLASS, MATCH_MAKE, MATCH_MODEL, MATCH_SERIAL, MATCH_VERSION, MODEL, REVISION, SERIAL
Constructor and Description |
---|
Iso11073MotionSensorInstance(org.osgi.framework.BundleContext c,
ActivityHubDriverClient client,
org.osgi.service.log.LogService log) |
Modifier and Type | Method and Description |
---|---|
Object |
addingService(org.osgi.framework.ServiceReference reference) |
int |
getLastSensorEvent() |
void |
incomingSensorEvent(int event)
just forward event to client
|
void |
modifiedService(org.osgi.framework.ServiceReference reference,
Object service) |
void |
removedService(org.osgi.framework.ServiceReference reference,
Object service) |
attachDriver, detachDriver, getDevice, removeDriver, setDevice
public Iso11073MotionSensorInstance(org.osgi.framework.BundleContext c, ActivityHubDriverClient client, org.osgi.service.log.LogService log)
c
- OSGi BundleContextsr
- Service reference of ISO deviceclient
- Link to consumer of this driver (e.g. universAAL exporter bundle)public Object addingService(org.osgi.framework.ServiceReference reference)
addingService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
public void modifiedService(org.osgi.framework.ServiceReference reference, Object service)
modifiedService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
public void removedService(org.osgi.framework.ServiceReference reference, Object service)
removedService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
public void incomingSensorEvent(int event)
incomingSensorEvent
in interface ActivityHubBaseDeviceCategory
event
- Integer representation of a specific ActivityHubSensorEvent.
example MotionSensor: motion-detected = 0;
no-condition-detected = 3public int getLastSensorEvent()
getLastSensorEvent
in class ActivityHubDriver
Copyright © 2018 universAAL Consortium. All rights reserved.