Skip to content

KNX DPT1 Refinementdriver ISO11073

Alejandro Medrano Gil edited this page May 20, 2015 · 2 revisions

<< Back to LDDI KNX-Integration page

As the name says this driver refines the a KNX device service from KNX datapoint type 1.*** to an appropriate ISO 11073-10471 (ActivityHub) device and registers this in the OSGI registry. The mapping information is defined in the iso11073.library. (Example: KNX device of datapoint type 1.001 maps to Switch Sensor from ISO 11073-10471 model).

An implementation bundle of OSGi DAS must be active at runtime which accomplishes the matchmaking between OSGi devices and drivers. (e.g. Apache Felix DeviceAccess).

Diagram

KnxDpt1RefinementDriver class: This class registers itself as OSGi driver in the OSGi registry with device category KNX_DPT_1. Furthermore, it implements the org.osgi.service.device.Driver interface, which specifies two methods, match and attach. The OSGi DAS bundle calls this methods during the matchmaking process and, if the matchmaking succeeds, it passes the OSGi device service reference (representing one KNX device) to the KnxDpt1RefinementDriver instance in the attach method.

Subsequently, a suitable ActivityHub device is looked up and created in the KnxMappingFactory, which is within the lddi.iso11073.library bundle.The new ActivityHub device is passed to a newly created KnxDpt1Instance. This means that for every upcoming KNX device a new driver instance is created which is responsible for the device (communication) for the whole lifetime. This procedure facilitates multiple driver instances for every KNX datapoint type.

KnxDpt1Instance class: There is exactly one instance of this class for every ActivityHub device which holds a reference to the underlying refined KNX device. The instance registeres the ActivityHub device in the OSGi registry as device service with a certain category (e.g. MDC_AI_TYPE_SENSOR_SWITCH).