org.universAAL.lddi.knx.groupdevicemodel
Class KnxDpt5GroupDevice

Package class diagram package KnxDpt5GroupDevice
java.lang.Object
  extended by org.universAAL.lddi.knx.groupdevicemodel.KnxGroupDevice
      extended by org.universAAL.lddi.knx.groupdevicemodel.KnxDpt5GroupDevice
All Implemented Interfaces:
org.osgi.service.device.Device, IKnxDpt5, IKnxReceiveMessage, IKnxSendMessage

public class KnxDpt5GroupDevice
extends KnxGroupDevice
implements IKnxDpt5

Concrete implementation of KNX group devices for KNX data type 5.***.

Author:
Thomas Fuxreiter (foex@gmx.at)

Field Summary
 
Fields inherited from class org.universAAL.lddi.knx.groupdevicemodel.KnxGroupDevice
driver, groupDeviceCategory, logger, network
 
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.Device
MATCH_NONE
 
Constructor Summary
KnxDpt5GroupDevice()
          empty constructor for factory
 
Method Summary
static float calculatePercentage(byte[] payload, int datapointTypeSubNumber)
          calculate percentage according to datapoint sub-type. 8-bit extra data byte; e.g. 80:b3; 80:33
static byte[] createPayloadFromFloatValue(float value, int datapointTypeSubNumber)
          calculate byte from float value according to datapoint sub-type. 8-bit extra data byte; e.g. 00:b3; 00:33
 
Methods inherited from class org.universAAL.lddi.knx.groupdevicemodel.KnxGroupDevice
addDriver, getDatapointType, getDatapointTypeMainNumber, getDatapointTypeSubNumber, getGroupAddress, getGroupDeviceCategory, getGroupDeviceId, newMessageFromKnxBus, noDriverFound, removeDriver, sendMessageToKnxBus, setParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KnxDpt5GroupDevice

public KnxDpt5GroupDevice()
empty constructor for factory

Method Detail

calculatePercentage

public static float calculatePercentage(byte[] payload,
                                        int datapointTypeSubNumber)
calculate percentage according to datapoint sub-type. 8-bit extra data byte; e.g. 80:b3; 80:33

Returns:
-1 if there is no detailed specification of the given datapointTypeSubNumber in the KNX standard.

createPayloadFromFloatValue

public static byte[] createPayloadFromFloatValue(float value,
                                                 int datapointTypeSubNumber)
calculate byte from float value according to datapoint sub-type. 8-bit extra data byte; e.g. 00:b3; 00:33

Returns:
null if there is no detailed specification of the given datapointTypeSubNumber in the KNX standard, or the given datapointTypeSubNumber is not defined in the KNX standard.


Copyright © 2014 universAAL Consortium. All Rights Reserved.