org.universAAL.lddi.knx.driver
Class KnxDpt9Instance
java.lang.Object
org.universAAL.lddi.knx.interfaces.KnxDriver
org.universAAL.lddi.knx.driver.KnxDpt9Instance
- All Implemented Interfaces:
- org.osgi.service.device.Constants, org.osgi.util.tracker.ServiceTrackerCustomizer, IKnxDpt9, IKnxReceiveMessage
public class KnxDpt9Instance
- extends KnxDriver
- implements IKnxDpt9, IKnxReceiveMessage, org.osgi.util.tracker.ServiceTrackerCustomizer, org.osgi.service.device.Constants
Working instance of the IKnxDpt9 driver. Registers a service/device in OSGi registry.
Tracks on the KNX groupDevice service passed in the attach method in KnxDpt9Driver class.
This instance is passed to the consuming client (e.g. uAAL exporter bundle).
When the KNX groupDevice service disappears, this driver is removed from the consuming
client and from the groupDevice.
This driver handles knx float values (2 byte) i.e. for temperature (knx datapoint type 9).
- Author:
- Thomas Fuxreiter (foex@gmx.at)
Fields inherited from interface org.universAAL.lddi.knx.groupdevicecategory.IKnxDpt9 |
CLASS, DEFAULT_INVALID_VALUE, DEFAULT_MAX_VALUE, DEFAULT_MIN_VALUE, MANUFACTURER, MATCH_CLASS, MATCH_MAKE, MATCH_MODEL, MATCH_SERIAL, MATCH_VERSION, MODEL, MY_DEVICE_CATEGORY, RESOLUTION_9_001, REVISION, SERIAL |
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 |
KnxDpt9Instance
public KnxDpt9Instance(KnxDpt9Driver parent_)
- Parameters:
c
- OSGi BundleContextsr
- Service reference of KNX groupDeviceclient
- Link to consumer of this driver (e.g. uAAL exporter bundle)
addingService
public Object addingService(org.osgi.framework.ServiceReference reference)
- track on my groupDevice
- Specified by:
addingService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
- Parameters:
IKnxDpt9
- groupDevice service
- Returns:
- The service object to be tracked for the ServiceReference object or null if the ServiceReference object should not be tracked.
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
newMessageFromKnxBus
public void newMessageFromKnxBus(byte[] event)
- Calculate readable measurement value from given byte array according to KNX DPT 9.
Call client.
- Specified by:
newMessageFromKnxBus
in interface IKnxReceiveMessage
- Parameters:
event
- the status/event byte of the knx telegram- See Also:
IKnxReceiveMessage.newMessageFromKnxBus(byte[])
sendMessageToKnxBus
public void sendMessageToKnxBus(float value)
- Parameters:
value
-
Copyright © 2014 universAAL Consortium. All Rights Reserved.