public class DPTXlator4ByteFloat extends DPTXlator
The KNX data type width is 4 bytes.
This type is a four byte floating point format with a maximum usable range as specified in IEEE
754. The largest positive finite float literal is 3.40282347e+38f. The smallest positive finite
non-zero literal of type float is 1.40239846e-45f. The negative minimum finite float literal is
-3.40282347e+38f. DPTs adjust the usable range to reasonable limits for its values, the translator
will check and enforce those DPT specific limits in all methods working with java values (e.g.
setValue(float)
). Data methods for KNX data (e.g. DPTXlator.setData(byte[])
accept all
data within the maximum usable range. The DPTs 14.000 to 14.079 do not have any specific range
limits set.
In value methods expecting a string type, the value is a float type representation.
The default return value after creation is 0.0
.
Modifier and Type | Field and Description |
---|---|
static DPT |
DPT_ABSOLUTE_TEMPERATURE
DPT ID 14.069, Temperature, absolute; values from -3.40282347e+38f to
3.40282347e+38f K.
|
static DPT |
DPT_ACCELERATION
DPT ID 14.000, Acceleration; values from -3.40282347e+38f to 3.40282347e+38f
ms-2.
|
static DPT |
DPT_ACCELERATION_ANGULAR
DPT ID 14.001, Acceleration, angular; values from -3.40282347e+38f to
3.40282347e+38f rad s-2.
|
static DPT |
DPT_ACTIVATION_ENERGY
DPT ID 14.002, Activation Energy; values from -3.40282347e+38f to
3.40282347e+38f J/mol.
|
static DPT |
DPT_ACTIVITY
DPT ID 14.003, Activity (radioactive); values from -3.40282347e+38f to
3.40282347e+38f s-1.
|
static DPT |
DPT_AMPLITUDE
DPT ID 14.005, Amplitude; values from -3.40282347e+38f to 3.40282347e+38f (unit
as appropriate).
|
static DPT |
DPT_ANGLE_DEG
DPT ID 14.007, Angle, degree; values from -3.40282347e+38f to 3.40282347e+38f °.
|
static DPT |
DPT_ANGLE_RAD
DPT ID 14.006, Angle, radiant; values from -3.40282347e+38f to 3.40282347e+38f
rad.
|
static DPT |
DPT_ANGULAR_FREQUENCY
DPT ID 14.034, Frequency, angular; values from -3.40282347e+38f to
3.40282347e+38f rad/s.
|
static DPT |
DPT_ANGULAR_MOMENTUM
DPT ID 14.008, Angular momentum; values from -3.40282347e+38f to 3.40282347e+38f
Js.
|
static DPT |
DPT_ANGULAR_VELOCITY
DPT ID 14.009, Angular velocity; values from -3.40282347e+38f to 3.40282347e+38f
rad/s.
|
static DPT |
DPT_AREA
DPT ID 14.010, Area; values from -3.40282347e+38f to 3.40282347e+38f m2.
|
static DPT |
DPT_CAPACITANCE
DPT ID 14.011, Capacitance; values from -3.40282347e+38f to 3.40282347e+38f F.
|
static DPT |
DPT_CHARGE_DENSITY_SURFACE
DPT ID 14.012, Charge density (surface); values from -3.40282347e+38f to
3.40282347e+38f C m-2.
|
static DPT |
DPT_CHARGE_DENSITY_VOLUME
DPT ID 14.013, Charge density (volume); values from -3.40282347e+38f to
3.40282347e+38f C m-3.
|
static DPT |
DPT_COMMON_TEMPERATURE
DPT ID 14.068, Temperature, common (in Celsius Degree); values from -3.40282347e+38f to
3.40282347e+38f °C.
|
static DPT |
DPT_COMPRESSIBILITY
DPT ID 14.014, Compressibility; values from -3.40282347e+38f to 3.40282347e+38f
m2/N.
|
static DPT |
DPT_CONDUCTANCE
DPT ID 14.015, Conductance; values from -3.40282347e+38f to 3.40282347e+38f S =
Ω-1.
|
static DPT |
DPT_DENSITY
DPT ID 14.017, Density; values from -3.40282347e+38f to 3.40282347e+38f kg m-3.
|
static DPT |
DPT_ELECTRIC_CHARGE
DPT ID 14.018, Electric charge; values from -3.40282347e+38f to 3.40282347e+38f
C.
|
static DPT |
DPT_ELECTRIC_CURRENT
DPT ID 14.019, Electric current; values from -3.40282347e+38f to 3.40282347e+38f
A.
|
static DPT |
DPT_ELECTRIC_CURRENTDENSITY
DPT ID 14.020, Electric current density; values from -3.40282347e+38f to
3.40282347e+38f A m-2.
|
static DPT |
DPT_ELECTRIC_DIPOLEMOMENT
DPT ID 14.021, Electric dipole moment; values from -3.40282347e+38f to
3.40282347e+38f Cm.
|
static DPT |
DPT_ELECTRIC_DISPLACEMENT
DPT ID 14.022, Electric displacement; values from -3.40282347e+38f to
3.40282347e+38f C m-2.
|
static DPT |
DPT_ELECTRIC_FIELDSTRENGTH
DPT ID 14.023, Electric field strength; values from -3.40282347e+38f to
3.40282347e+38f V/m.
|
static DPT |
DPT_ELECTRIC_FLUX
DPT ID 14.024, Electric flux; values from -3.40282347e+38f to 3.40282347e+38f
Vm.
|
static DPT |
DPT_ELECTRIC_FLUX_DENSITY
DPT ID 14.025, Electric flux density; values from -3.40282347e+38f to
3.40282347e+38f C m-2.
|
static DPT |
DPT_ELECTRIC_POLARIZATION
DPT ID 14.026, Electric polarization; values from -3.40282347e+38f to
3.40282347e+38f C m-2.
|
static DPT |
DPT_ELECTRIC_POTENTIAL
DPT ID 14.027, Electric potential; values from -3.40282347e+38f to
3.40282347e+38f V.
|
static DPT |
DPT_ELECTRIC_POTENTIAL_DIFFERENCE
DPT ID 14.028, Electric potential difference; values from -3.40282347e+38f to
3.40282347e+38f V.
|
static DPT |
DPT_ELECTRICAL_CONDUCTIVITY
DPT ID 14.016, Electrical conductivity; values from -3.40282347e+38f to
3.40282347e+38f Ω-1m-1.
|
static DPT |
DPT_ELECTROMAGNETIC_MOMENT
DPT ID 14.029, Electromagnetic moment; values from -3.40282347e+38f to
3.40282347e+38f A m2.
|
static DPT |
DPT_ELECTROMOTIVE_FORCE
DPT ID 14.030, Electromotive force; values from -3.40282347e+38f to
3.40282347e+38f V.
|
static DPT |
DPT_ENERGY
DPT ID 14.031, Energy; values from -3.40282347e+38f to 3.40282347e+38f J.
|
static DPT |
DPT_FORCE
DPT ID 14.032, Force; values from -3.40282347e+38f to 3.40282347e+38f N.
|
static DPT |
DPT_FREQUENCY
DPT ID 14.033, Frequency; values from -3.40282347e+38f to 3.40282347e+38f Hz =
1/s.
|
static DPT |
DPT_HEAT_CAPACITY
DPT ID 14.035, Heat capacity; values from -3.40282347e+38f to 3.40282347e+38f
J/K.
|
static DPT |
DPT_HEAT_FLOWRATE
DPT ID 14.036, Heat flow rate; values from -3.40282347e+38f to 3.40282347e+38f
W.
|
static DPT |
DPT_HEAT_QUANTITY
DPT ID 14.037, Quantity of heat; values from -3.40282347e+38f to 3.40282347e+38f
J.
|
static DPT |
DPT_IMPEDANCE
DPT ID 14.038, Impedance; values from -3.40282347e+38f to 3.40282347e+38f Ω.
|
static DPT |
DPT_LENGTH
DPT ID 14.039, Length; values from -3.40282347e+38f to 3.40282347e+38f m.
|
static DPT |
DPT_LIGHT_QUANTITY
DPT ID 14.040, Quantity of light; values from -3.40282347e+38f to
3.40282347e+38f J or lm s.
|
static DPT |
DPT_LUMINANCE
DPT ID 14.041, Luminance; values from -3.40282347e+38f to 3.40282347e+38f cd
m-2.
|
static DPT |
DPT_LUMINOUS_FLUX
DPT ID 14.042, Luminous flux; values from -3.40282347e+38f to 3.40282347e+38f
lm.
|
static DPT |
DPT_LUMINOUS_INTENSITY
DPT ID 14.043, Luminous intensity; values from -3.40282347e+38f to
3.40282347e+38f cd.
|
static DPT |
DPT_MAGNETIC_FIELDSTRENGTH
DPT ID 14.044, Magnetic field strength; values from -3.40282347e+38f to
3.40282347e+38f A/m.
|
static DPT |
DPT_MAGNETIC_FLUX
DPT ID 14.045, Magnetic flux; values from -3.40282347e+38f to 3.40282347e+38f
Wb.
|
static DPT |
DPT_MAGNETIC_FLUX_DENSITY
DPT ID 14.046, Magnetic flux density; values from -3.40282347e+38f to
3.40282347e+38f T.
|
static DPT |
DPT_MAGNETIC_MOMENT
DPT ID 14.047, Magnetic moment; values from -3.40282347e+38f to 3.40282347e+38f
A m2.
|
static DPT |
DPT_MAGNETIC_POLARIZATION
DPT ID 14.048, Magnetic polarization; values from -3.40282347e+38f to
3.40282347e+38f T.
|
static DPT |
DPT_MAGNETIZATION
DPT ID 14.049, Magnetization; values from -3.40282347e+38f to 3.40282347e+38f
A/m.
|
static DPT |
DPT_MAGNETOMOTIVE_FORCE
DPT ID 14.050, Magneto motive force; values from -3.40282347e+38f to
3.40282347e+38f A.
|
static DPT |
DPT_MASS
DPT ID 14.051, Mass; values from -3.40282347e+38f to 3.40282347e+38f kg.
|
static DPT |
DPT_MASS_FLUX
DPT ID 14.052, Mass flux; values from -3.40282347e+38f to 3.40282347e+38f kg/s.
|
static DPT |
DPT_MOL
DPT ID 14.004, Mol, amount of substance; values from -3.40282347e+38f to
3.40282347e+38f mol.
|
static DPT |
DPT_MOMENTUM
DPT ID 14.053, Momentum; values from -3.40282347e+38f to 3.40282347e+38f N/s.
|
static DPT |
DPT_PHASE_ANGLE_DEG
DPT ID 14.055, Phase angle, degree; values from -3.40282347e+38f to
3.40282347e+38f °.
|
static DPT |
DPT_PHASE_ANGLE_RAD
DPT ID 14.054, Phase angle, radiant; values from -3.40282347e+38f to
3.40282347e+38f rad.
|
static DPT |
DPT_POWER
DPT ID 14.056, Power; values from -3.40282347e+38f to 3.40282347e+38f W.
|
static DPT |
DPT_POWER_FACTOR
DPT ID 14.057, Power factor; values from -3.40282347e+38f to 3.40282347e+38f.
|
static DPT |
DPT_PRESSURE
DPT ID 14.058, Pressure; values from -3.40282347e+38f to 3.40282347e+38f Pa = N
m-2.
|
static DPT |
DPT_REACTANCE
DPT ID 14.059, Reactance; values from -3.40282347e+38f to 3.40282347e+38f Ω.
|
static DPT |
DPT_RESISTANCE
DPT ID 14.060, Resistance; values from -3.40282347e+38f to 3.40282347e+38f Ω.
|
static DPT |
DPT_RESISTIVITY
DPT ID 14.061, Resistivity; values from -3.40282347e+38f to 3.40282347e+38f Ωm.
|
static DPT |
DPT_SELF_INDUCTANCE
DPT ID 14.062, Self inductance; values from -3.40282347e+38f to 3.40282347e+38f
H.
|
static DPT |
DPT_SOLID_ANGLE
DPT ID 14.063, Solid angle; values from -3.40282347e+38f to 3.40282347e+38f sr.
|
static DPT |
DPT_SOUND_INTENSITY
DPT ID 14.064, Sound intensity; values from -3.40282347e+38f to 3.40282347e+38f
W m-2.
|
static DPT |
DPT_SPEED
DPT ID 14.065, Speed; values from -3.40282347e+38f to 3.40282347e+38f m/s.
|
static DPT |
DPT_STRESS
DPT ID 14.066, Stress; values from -3.40282347e+38f to 3.40282347e+38f Pa = N
m-2.
|
static DPT |
DPT_SURFACE_TENSION
DPT ID 14.067, Surface tension; values from -3.40282347e+38f to 3.40282347e+38f
N/m.
|
static DPT |
DPT_TEMPERATURE_DIFFERENCE
DPT ID 14.070, Temperature difference; values from -3.40282347e+38f to
3.40282347e+38f K.
|
static DPT |
DPT_THERMAL_CAPACITY
DPT ID 14.071, Thermal capacity; values from -3.40282347e+38f to 3.40282347e+38f
J/K.
|
static DPT |
DPT_THERMAL_CONDUCTIVITY
DPT ID 14.072, Thermal conductivity; values from -3.40282347e+38f to
3.40282347e+38f W/(m K).
|
static DPT |
DPT_THERMOELECTRIC_POWER
DPT ID 14.073, Thermoelectric power; values from -3.40282347e+38f to
3.40282347e+38f V/K.
|
static DPT |
DPT_TIME
DPT ID 14.074, Time; values from -3.40282347e+38f to 3.40282347e+38f s.
|
static DPT |
DPT_TORQUE
DPT ID 14.075, Torque; values from -3.40282347e+38f to 3.40282347e+38f Nm.
|
static DPT |
DPT_VOLUME
DPT ID 14.076, Volume; values from -3.40282347e+38f to 3.40282347e+38f m3.
|
static DPT |
DPT_VOLUME_FLUX
DPT ID 14.077, Volume flux; values from -3.40282347e+38f to 3.40282347e+38f
m3/s.
|
static DPT |
DPT_WEIGHT
DPT ID 14.078, Weight; values from -3.40282347e+38f to 3.40282347e+38f N.
|
static DPT |
DPT_WORK
DPT ID 14.079, Work; values from -3.40282347e+38f to 3.40282347e+38f J.
|
appendUnit, data, dpt, LOG_SERVICE, logger, typeSize
Constructor and Description |
---|
DPTXlator4ByteFloat(DPT dpt)
Creates a translator for the given datapoint type.
|
DPTXlator4ByteFloat(String dptId)
Creates a translator for
dptID . |
Modifier and Type | Method and Description |
---|---|
String[] |
getAllValues()
Returns all translation items as strings currently contained in this translator.
|
double |
getNumericValue()
Returns the first translation item formatted as double.
|
Map |
getSubTypes()
Returns all available, implemented subtypes for the translator.
|
protected static Map |
getSubTypesStatic() |
float |
getValueFloat()
Returns the first translation item formatted as float.
|
void |
setValue(float value)
Sets the translation value from a float.
|
protected void |
toDPT(String value,
short[] dst,
int index)
Translates a string value representation into KNX data type according the current
DPT and stores the result into
dst . |
public static final DPT DPT_ACCELERATION
public static final DPT DPT_ACCELERATION_ANGULAR
public static final DPT DPT_ACTIVATION_ENERGY
public static final DPT DPT_ACTIVITY
public static final DPT DPT_MOL
public static final DPT DPT_AMPLITUDE
public static final DPT DPT_ANGLE_RAD
public static final DPT DPT_ANGLE_DEG
public static final DPT DPT_ANGULAR_MOMENTUM
public static final DPT DPT_ANGULAR_VELOCITY
public static final DPT DPT_AREA
public static final DPT DPT_CAPACITANCE
public static final DPT DPT_CHARGE_DENSITY_SURFACE
public static final DPT DPT_CHARGE_DENSITY_VOLUME
public static final DPT DPT_COMPRESSIBILITY
public static final DPT DPT_CONDUCTANCE
public static final DPT DPT_ELECTRICAL_CONDUCTIVITY
public static final DPT DPT_DENSITY
public static final DPT DPT_ELECTRIC_CHARGE
public static final DPT DPT_ELECTRIC_CURRENT
public static final DPT DPT_ELECTRIC_CURRENTDENSITY
public static final DPT DPT_ELECTRIC_DIPOLEMOMENT
public static final DPT DPT_ELECTRIC_DISPLACEMENT
public static final DPT DPT_ELECTRIC_FIELDSTRENGTH
public static final DPT DPT_ELECTRIC_FLUX
public static final DPT DPT_ELECTRIC_FLUX_DENSITY
public static final DPT DPT_ELECTRIC_POLARIZATION
public static final DPT DPT_ELECTRIC_POTENTIAL
public static final DPT DPT_ELECTRIC_POTENTIAL_DIFFERENCE
public static final DPT DPT_ELECTROMAGNETIC_MOMENT
public static final DPT DPT_ELECTROMOTIVE_FORCE
public static final DPT DPT_ENERGY
public static final DPT DPT_FORCE
public static final DPT DPT_FREQUENCY
public static final DPT DPT_ANGULAR_FREQUENCY
public static final DPT DPT_HEAT_CAPACITY
public static final DPT DPT_HEAT_FLOWRATE
public static final DPT DPT_HEAT_QUANTITY
public static final DPT DPT_IMPEDANCE
public static final DPT DPT_LENGTH
public static final DPT DPT_LIGHT_QUANTITY
public static final DPT DPT_LUMINANCE
public static final DPT DPT_LUMINOUS_FLUX
public static final DPT DPT_LUMINOUS_INTENSITY
public static final DPT DPT_MAGNETIC_FIELDSTRENGTH
public static final DPT DPT_MAGNETIC_FLUX
public static final DPT DPT_MAGNETIC_FLUX_DENSITY
public static final DPT DPT_MAGNETIC_MOMENT
public static final DPT DPT_MAGNETIC_POLARIZATION
public static final DPT DPT_MAGNETIZATION
public static final DPT DPT_MAGNETOMOTIVE_FORCE
public static final DPT DPT_MASS
public static final DPT DPT_MASS_FLUX
public static final DPT DPT_MOMENTUM
public static final DPT DPT_PHASE_ANGLE_RAD
public static final DPT DPT_PHASE_ANGLE_DEG
public static final DPT DPT_POWER
public static final DPT DPT_POWER_FACTOR
public static final DPT DPT_PRESSURE
public static final DPT DPT_REACTANCE
public static final DPT DPT_RESISTANCE
public static final DPT DPT_RESISTIVITY
public static final DPT DPT_SELF_INDUCTANCE
public static final DPT DPT_SOLID_ANGLE
public static final DPT DPT_SOUND_INTENSITY
public static final DPT DPT_SPEED
public static final DPT DPT_STRESS
public static final DPT DPT_SURFACE_TENSION
public static final DPT DPT_COMMON_TEMPERATURE
public static final DPT DPT_ABSOLUTE_TEMPERATURE
public static final DPT DPT_TEMPERATURE_DIFFERENCE
public static final DPT DPT_THERMAL_CAPACITY
public static final DPT DPT_THERMAL_CONDUCTIVITY
public static final DPT DPT_THERMOELECTRIC_POWER
public static final DPT DPT_TIME
public static final DPT DPT_TORQUE
public static final DPT DPT_VOLUME
public static final DPT DPT_VOLUME_FLUX
public static final DPT DPT_WEIGHT
public static final DPT DPT_WORK
public DPTXlator4ByteFloat(DPT dpt) throws KNXFormatException
dpt
- the requested datapoint typeKNXFormatException
- on not supported or not available DPTpublic DPTXlator4ByteFloat(String dptId) throws KNXFormatException
dptID
.
dptId
- available implemented datapoint type IDKNXFormatException
- on wrong formatted or not expected (available) DPTpublic void setValue(float value) throws KNXFormatException
If succeeded, any other items in the translator are discarded.
value
- the float valueKNXFormatException
- if value
doesn't fit into KNX data typepublic final float getValueFloat()
public final double getNumericValue()
getNumericValue
in class DPTXlator
DPTXlator.getNumericValue()
,
getValueFloat()
public String[] getAllValues()
DPTXlator
The items are ordered the same way handed to the translator in the first place (FIFO, increasing byte index).
getAllValues
in class DPTXlator
DPTXlator.getValue()
public Map getSubTypes()
DPTXlator
A subtype, identified through a sub number, specifies the available dimension,
consisting of range and unit attributes. Together with the main type information
this uniquely defines a datapoint type.
The datapoint type information is contained in a DPT
object.
New or modified DPT information can be made available to the translator by adding
entries to the map, likewise map entries might be removed. In other words, the map
returned is the same used by the translators of one main type for DPT lookup.
Changes to the map influence all translators of the same main type.
Changes of the DPT currently used by the translator take effect on the next new
translator created using that DPT.
The map itself is not synchronized.
getSubTypes
in class DPTXlator
Map
, key is the subtype ID of type string, value of
type DPT
protected static Map getSubTypesStatic()
DPTXlator.getSubTypesStatic()
protected void toDPT(String value, short[] dst, int index) throws KNXFormatException
DPTXlator
dst
. The index parameter specifies
the item index of the value. The translated KNX data is stored at the corresponding
array offset in dst
. Calculation of offset:
offset = index * KNX data type size
.toDPT
in class DPTXlator
value
- value to translatedst
- destination array for resulting KNX dataindex
- item index in destination arrayKNXFormatException
- if value
can't be translated due to wrong
formatted content, or if value
doesn't fit into KNX data
typeCopyright © 2015. All rights reserved.