org.universAAL.lddi.knx.driver
Class KnxDpt5Instance
java.lang.Object
org.universAAL.lddi.knx.interfaces.KnxDriver
org.universAAL.lddi.knx.driver.KnxDpt5Instance
- All Implemented Interfaces:
- org.osgi.service.device.Constants, org.osgi.util.tracker.ServiceTrackerCustomizer, IKnxDpt5, IKnxReceiveMessage
public class KnxDpt5Instance
- extends KnxDriver
- implements IKnxDpt5, IKnxReceiveMessage, org.osgi.util.tracker.ServiceTrackerCustomizer, org.osgi.service.device.Constants
Working instance of the IKnxDpt5 driver. Registers a service/device in OSGi
registry. Tracks on the KNX groupDevice service passed in the attach method in
KnxDpt5Driver 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 detached from the groupDevice.
This driver handles knx 4-bit unsigned int events (knx datapoint 5), which is
dimming step and blind step.
- Author:
- Thomas Fuxreiter (foex@gmx.at)
Fields inherited from interface org.universAAL.lddi.knx.groupdevicecategory.IKnxDpt5 |
CLASS, DEFAULT_MAX_VALUE, DEFAULT_MIN_VALUE, MANUFACTURER, MATCH_CLASS, MATCH_MAKE, MATCH_MODEL, MATCH_SERIAL, MATCH_VERSION, MODEL, MY_DEVICE_CATEGORY, RESOLUTION_5_001, RESOLUTION_5_003, RESOLUTION_5_004, RESOLUTION_5_010, 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 |
KnxDpt5Instance
public KnxDpt5Instance(KnxDpt5Driver parent_)
- Parameters:
c
- OSGi BundleContextsr
- Service reference of KNX groupDeviceclient
- Link to consumer of this driver (e.g. uAAL exporter bundle)
KnxDpt5Instance
public KnxDpt5Instance()
- Empty constructor for Unit Tests.
addingService
public Object addingService(org.osgi.framework.ServiceReference reference)
- track on my groupDevice
- Specified by:
addingService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
- Parameters:
IKnxDpt5
- 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)
- Description copied from interface:
IKnxReceiveMessage
- Receive low level messages from the knx bus
- Specified by:
newMessageFromKnxBus
in interface IKnxReceiveMessage
- Parameters:
event
- the status/event byte of the knx telegram
sendMessageToKnxBus
public void sendMessageToKnxBus(float value)
- Transfer float value to KNX data byte array (payload).
Call driver.
Copyright © 2014 universAAL Consortium. All Rights Reserved.