Class Channel
java.lang.Object
com.flir.thermalsdk.meterlink.model.Channel
Defines Meterlink Channel data. This contains whole bundle with Meterlink measurement data.
-
Field Summary
FieldsModifier and TypeFieldDescriptionAuxillary information (SensorAuxInfo::INVALID if unknown).@Nullable Integer
Index of value for a multi sensor-reading packet. Only available for protocolVersion>=2, otherwise it's nullboolean
True if value is active, otherwise false.boolean
True if value is difference, otherwise false.boolean
True if value is valid, otherwise false.Measure information (SensorMeasureInfo::INVALID if unknown).int
Number of significant numbers in value.Value quantity (SensorQuantity::INVALID if unknown).Raw quantity string (if returned by meter).Deprecated.double
Deprecated.This is advised to usegetValue()
instead.Time when the message was parsed.@Nullable Integer
-9=nano, -6=u, -3=milli, +3=kilo, etc. Only available for protocolVersion>=2 -
Method Summary
Modifier and TypeMethodDescriptionboolean
Creates a formatted string from a Channel's value.getFormatted
(TemperatureUnit unit) Creates a formatted string from a Channel's value.getFormatted
(Locale locale) Creates a formatted string from a Channel's value.getFormatted
(Locale locale, TemperatureUnit unit) Creates a formatted string from a Channel's value.getUnit()
Gets proper unit for the given channel value.getUnit
(TemperatureUnit unit) Gets proper unit for the given channel value.double
getValue()
Gets channel value.double
getValue
(TemperatureUnit unit) Gets channel value.int
hashCode()
toString()
-
Field Details
-
quantity
Value quantity (SensorQuantity::INVALID if unknown). -
auxInfo
Auxillary information (SensorAuxInfo::INVALID if unknown). -
measure
Measure information (SensorMeasureInfo::INVALID if unknown). -
rawValue
Deprecated.This is advised to usegetValue()
instead.Channel reading value. Note that it represents raw value. This is advised to usegetValue()
along withgetUnit()
methods or simply usegetFormatted()
to get value and unit in a predictable way.- See Also:
-
timestamp
Time when the message was parsed. -
precision
public int precisionNumber of significant numbers in value. -
isDifference
public boolean isDifferenceTrue if value is difference, otherwise false. -
isValueValid
public boolean isValueValidTrue if value is valid, otherwise false. -
isActive
public boolean isActiveTrue if value is active, otherwise false. -
rawQuantity
Raw quantity string (if returned by meter). Only valid if quantity == SensorAuxInfo::INVALID. -
rawUnit
Deprecated.This is advised to usegetUnit()
instead.Raw unit string (if returned by meter). Only valid if quantity == SensorQuantity::INVALID. Note that it represents raw unit. This is advised to usegetValue()
along withgetUnit()
methods or simply usegetFormatted()
to get value and unit in a predictable way.- See Also:
-
index
Index of value for a multi sensor-reading packet. Only available for protocolVersion>=2, otherwise it's null -
unitPrefix
-9=nano, -6=u, -3=milli, +3=kilo, etc. Only available for protocolVersion>=2
-
-
Method Details
-
getValue
public double getValue()Gets channel value. Note it is tightly connected to thegetUnit()
method. So if you will use this method make sure you get proper unit usinggetUnit()
. This method uses default temperature unit conversion to Kelvin.- Returns:
- Returns channel value.
- See Also:
-
getValue
Gets channel value. Note it is tightly connected to thegetUnit()
method. So if you will use this method make sure you get proper unit usinggetUnit()
.- Parameters:
unit
- temperature unit to be used to value conversion- Returns:
- Returns channel value.
- See Also:
-
getUnit
Gets proper unit for the given channel value. Note it is tightly connected to thegetValue()
method. So if you will use this method make sure you get proper value usinggetValue()
. This method uses default temperature unit conversion to Kelvin.- Returns:
- Returns proper unit for the given channel value (when using
getValue()
). - See Also:
-
getUnit
Gets proper unit for the given channel value. Note it is tightly connected to thegetValue()
method. So if you will use this method make sure you get proper value usinggetValue()
.- Parameters:
unit
- temperature unit to be used to unit conversion- Returns:
- Returns proper unit for the given channel value (when using
getValue()
). - See Also:
-
getFormatted
Creates a formatted string from a Channel's value. Output is in a form of 'value unit', example: '10.5 mV', '24 K', etc. - respecting Locale settings. This method uses default Locale set on a device. To customize Locale, usegetFormatted(Locale)
. This method uses default temperature unit as Kelvin. To customize temperature unit, usegetFormatted(TemperatureUnit)
.For custom formatting use
getValue()
andgetUnit()
and then format data on your own.- Returns:
- a formatted string from a Channel's value using the Default Locale
- See Also:
-
getFormatted
Creates a formatted string from a Channel's value. Output is in a form of 'value unit', example: '10.5 mV', '24 K', etc. - respecting Locale settings. This method uses default temperature unit as Kelvin. To customize temperature unit, usegetFormatted(TemperatureUnit)
.For custom formatting use
getValue()
andgetUnit()
and then format data on your own.- Parameters:
locale
- locale to control output units, separator, etc.- Returns:
- a formatted string from a Channel's value using the provided Locale
- See Also:
-
getFormatted
Creates a formatted string from a Channel's value. Output is in a form of 'value unit', example: '10.5 mV', '24 K', etc. - respecting Locale settings. This method uses default Locale set on a device. To customize Locale, usegetFormatted(Locale)
.For custom formatting use
getValue()
andgetUnit()
and then format data on your own.- Parameters:
unit
- temperature unit to be used to value and unit conversions- Returns:
- a formatted string from a Channel's value using the Default Locale and temperature unit
- See Also:
-
getFormatted
Creates a formatted string from a Channel's value. Output is in a form of 'value unit', example: '10.5 mV', '24 C', etc. - respecting Locale settings and temperature unit. For custom formatting usegetValue()
andgetUnit()
and then format data on your own.- Parameters:
locale
- locale to control output units, separator, etc.unit
- temperature unit to be used to value and unit conversions- Returns:
- a formatted string from a Channel's value using the provided Locale and temperature unit
- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-
getUnit()
instead.