org.universAAL.lddi.knx.refinementdriver.dpt1.activityhub
Class KnxDpt1Instance
java.lang.Object
org.universAAL.lddi.knx.interfaces.KnxDriver
org.universAAL.lddi.knx.refinementdriver.dpt1.activityhub.KnxDpt1Instance
- All Implemented Interfaces:
- org.osgi.service.device.Constants, org.osgi.util.tracker.ServiceTrackerCustomizer, IKnxDpt1
public class KnxDpt1Instance
- extends KnxDriver
- implements IKnxDpt1, org.osgi.util.tracker.ServiceTrackerCustomizer, org.osgi.service.device.Constants
Working instance of the IKnxDpt1 driver. Registers a service/device in OSGi registry.
Tracks on the KNX groupDevice service passed in the attach method in KnxDpt1RefinementDriver class.
When the KNX groupDevice disappears, this service/device is unregistered.
This driver handles 1-bit events (knx datapoint 1), which is on/off.
It maps to the appropriate sensor-event of the created ISO11073 sensor.
Initially it was planned to map certain parameters of KNX sensors to ISO sensors (e.g. location)
where this mapping info is stored in a config file. Although, in universAAL this kind of configuration
should be done by other components (e.g. AAL Space Configurator). Therefore all knx-iso-mapping code
is commented below.
Possibility for automatic location mapping from ETS config:
In ETS Building Parts can be assigned free name and description (String). As a convention the
location name according to ISO 11073 (e.g. MDC_AI_LOCATION_BEDROOM) can be assigned in name or
description field in ETS. But this may conflict with ETS planning/config from electrical engineers!
- Author:
- Thomas Fuxreiter (foex@gmx.at)
Fields inherited from interface org.universAAL.lddi.knx.groupdevicecategory.IKnxDpt1 |
CLASS, DEFAULT_VALUE_OFF, DEFAULT_VALUE_ON, MANUFACTURER, MATCH_CLASS, MATCH_MAKE, MATCH_MODEL, MATCH_SERIAL, MATCH_VERSION, MODEL, MY_DEVICE_CATEGORY, 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 |
KnxDpt1Instance
public KnxDpt1Instance(org.osgi.framework.BundleContext c,
org.osgi.service.log.LogService log,
ActivityHubDeviceCategoryUtil.ActivityHubDeviceCategory ahDevCat)
addingService
public Object addingService(org.osgi.framework.ServiceReference reference)
- track on my groupDevice
- Specified by:
addingService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
- Parameters:
KnxDpt1GroupDevice
-
newMessageFromKnxBus
public void newMessageFromKnxBus(byte[] event)
- See Also:
got new message from knx bus
pass to ISO device
removedService
public void removedService(org.osgi.framework.ServiceReference reference,
Object service)
- Specified by:
removedService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
- Parameters:
reference
- KNX groupDevice service
modifiedService
public void modifiedService(org.osgi.framework.ServiceReference reference,
Object service)
- Specified by:
modifiedService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
Copyright © 2014 universAAL Consortium. All Rights Reserved.