public class BrickletTemperatureIR extends Device
Modifier and Type | Class and Description |
---|---|
class |
BrickletTemperatureIR.AmbientTemperatureCallbackThreshold |
static interface |
BrickletTemperatureIR.AmbientTemperatureListener
This listener is triggered periodically with the period that is set by
setAmbientTemperatureCallbackPeriod(long) . |
static interface |
BrickletTemperatureIR.AmbientTemperatureReachedListener
This listener is triggered when the threshold as set by
setAmbientTemperatureCallbackThreshold(char, short, short) is reached. |
class |
BrickletTemperatureIR.ObjectTemperatureCallbackThreshold |
static interface |
BrickletTemperatureIR.ObjectTemperatureListener
This listener is triggered periodically with the period that is set by
setObjectTemperatureCallbackPeriod(long) . |
static interface |
BrickletTemperatureIR.ObjectTemperatureReachedListener
This listener is triggered when the threshold as set by
setObjectTemperatureCallbackThreshold(char, short, short) is reached. |
Device.Identity
Constructor and Description |
---|
BrickletTemperatureIR(java.lang.String uid,
IPConnection ipcon)
Creates an object with the unique device ID \c uid.
|
getAPIVersion, getResponseExpected, setResponseExpected, setResponseExpectedAll
public static final int DEVICE_IDENTIFIER
public static final java.lang.String DEVICE_DISPLAY_NAME
public static final byte FUNCTION_GET_AMBIENT_TEMPERATURE
public static final byte FUNCTION_GET_OBJECT_TEMPERATURE
public static final byte FUNCTION_SET_EMISSIVITY
public static final byte FUNCTION_GET_EMISSIVITY
public static final byte FUNCTION_SET_AMBIENT_TEMPERATURE_CALLBACK_PERIOD
public static final byte FUNCTION_GET_AMBIENT_TEMPERATURE_CALLBACK_PERIOD
public static final byte FUNCTION_SET_OBJECT_TEMPERATURE_CALLBACK_PERIOD
public static final byte FUNCTION_GET_OBJECT_TEMPERATURE_CALLBACK_PERIOD
public static final byte FUNCTION_SET_AMBIENT_TEMPERATURE_CALLBACK_THRESHOLD
public static final byte FUNCTION_GET_AMBIENT_TEMPERATURE_CALLBACK_THRESHOLD
public static final byte FUNCTION_SET_OBJECT_TEMPERATURE_CALLBACK_THRESHOLD
public static final byte FUNCTION_GET_OBJECT_TEMPERATURE_CALLBACK_THRESHOLD
public static final byte FUNCTION_SET_DEBOUNCE_PERIOD
public static final byte FUNCTION_GET_DEBOUNCE_PERIOD
public static final byte FUNCTION_GET_IDENTITY
public static final char THRESHOLD_OPTION_OFF
public static final char THRESHOLD_OPTION_OUTSIDE
public static final char THRESHOLD_OPTION_INSIDE
public static final char THRESHOLD_OPTION_SMALLER
public static final char THRESHOLD_OPTION_GREATER
public BrickletTemperatureIR(java.lang.String uid, IPConnection ipcon)
public short getAmbientTemperature() throws TinkerforgeException
BrickletTemperatureIR.AmbientTemperatureListener
listener and set the period with
setAmbientTemperatureCallbackPeriod(long)
.TinkerforgeException
public short getObjectTemperature() throws TinkerforgeException
setEmissivity(int)
.
If you want to get the object temperature periodically, it is recommended
to use the BrickletTemperatureIR.ObjectTemperatureListener
listener and set the period with
setObjectTemperatureCallbackPeriod(long)
.TinkerforgeException
public void setEmissivity(int emissivity) throws TinkerforgeException
getObjectTemperature()
.
The emissivity is usually given as a value between 0.0 and 1.0. A list of
emissivities of different materials can be found
`here <https://www.infrared-thermography.com/material.htm>`__.
The parameter of setEmissivity(int)
has to be given with a factor of
65535 (16-bit). For example: An emissivity of 0.1 can be set with the
value 6553, an emissivity of 0.5 with the value 32767 and so on.
\note
If you need a precise measurement for the object temperature, it is
absolutely crucial that you also provide a precise emissivity.
The emissivity is stored in non-volatile memory and will still be used after a restart or power cycle of the Bricklet.TinkerforgeException
public int getEmissivity() throws TinkerforgeException
setEmissivity(int)
.TinkerforgeException
public void setAmbientTemperatureCallbackPeriod(long period) throws TinkerforgeException
BrickletTemperatureIR.AmbientTemperatureListener
listener is
triggered periodically. A value of 0 turns the listener off.
The BrickletTemperatureIR.AmbientTemperatureListener
listener is only triggered if the temperature has
changed since the last triggering.TinkerforgeException
public long getAmbientTemperatureCallbackPeriod() throws TinkerforgeException
setAmbientTemperatureCallbackPeriod(long)
.TinkerforgeException
public void setObjectTemperatureCallbackPeriod(long period) throws TinkerforgeException
BrickletTemperatureIR.ObjectTemperatureListener
listener is
triggered periodically. A value of 0 turns the listener off.
The BrickletTemperatureIR.ObjectTemperatureListener
listener is only triggered if the temperature
has changed since the last triggering.TinkerforgeException
public long getObjectTemperatureCallbackPeriod() throws TinkerforgeException
setObjectTemperatureCallbackPeriod(long)
.TinkerforgeException
public void setAmbientTemperatureCallbackThreshold(char option, short min, short max) throws TinkerforgeException
BrickletTemperatureIR.AmbientTemperatureReachedListener
listener.
The following options are possible:
\verbatim
"Option", "Description"
"'x'", "Listener is turned off"
"'o'", "Listener is triggered when the ambient temperature is *outside* the min and max values"
"'i'", "Listener is triggered when the ambient temperature is *inside* the min and max values"
"'<'", "Listener is triggered when the ambient temperature is smaller than the min value (max is ignored)"
"'>'", "Listener is triggered when the ambient temperature is greater than the min value (max is ignored)"
\endverbatimTinkerforgeException
public BrickletTemperatureIR.AmbientTemperatureCallbackThreshold getAmbientTemperatureCallbackThreshold() throws TinkerforgeException
setAmbientTemperatureCallbackThreshold(char, short, short)
.TinkerforgeException
public void setObjectTemperatureCallbackThreshold(char option, short min, short max) throws TinkerforgeException
BrickletTemperatureIR.ObjectTemperatureReachedListener
listener.
The following options are possible:
\verbatim
"Option", "Description"
"'x'", "Listener is turned off"
"'o'", "Listener is triggered when the object temperature is *outside* the min and max values"
"'i'", "Listener is triggered when the object temperature is *inside* the min and max values"
"'<'", "Listener is triggered when the object temperature is smaller than the min value (max is ignored)"
"'>'", "Listener is triggered when the object temperature is greater than the min value (max is ignored)"
\endverbatimTinkerforgeException
public BrickletTemperatureIR.ObjectTemperatureCallbackThreshold getObjectTemperatureCallbackThreshold() throws TinkerforgeException
setObjectTemperatureCallbackThreshold(char, short, short)
.TinkerforgeException
public void setDebouncePeriod(long debounce) throws TinkerforgeException
BrickletTemperatureIR.AmbientTemperatureReachedListener
,
* BrickletTemperatureIR.ObjectTemperatureReachedListener
are triggered, if the thresholds
* setAmbientTemperatureCallbackThreshold(char, short, short)
,
* setObjectTemperatureCallbackThreshold(char, short, short)
keep being reached.TinkerforgeException
public long getDebouncePeriod() throws TinkerforgeException
setDebouncePeriod(long)
.TinkerforgeException
public Device.Identity getIdentity() throws TinkerforgeException
getIdentity
in class Device
TinkerforgeException
public void addAmbientTemperatureListener(BrickletTemperatureIR.AmbientTemperatureListener listener)
public void removeAmbientTemperatureListener(BrickletTemperatureIR.AmbientTemperatureListener listener)
public void addObjectTemperatureListener(BrickletTemperatureIR.ObjectTemperatureListener listener)
public void removeObjectTemperatureListener(BrickletTemperatureIR.ObjectTemperatureListener listener)
public void addAmbientTemperatureReachedListener(BrickletTemperatureIR.AmbientTemperatureReachedListener listener)
public void removeAmbientTemperatureReachedListener(BrickletTemperatureIR.AmbientTemperatureReachedListener listener)
public void addObjectTemperatureReachedListener(BrickletTemperatureIR.ObjectTemperatureReachedListener listener)
public void removeObjectTemperatureReachedListener(BrickletTemperatureIR.ObjectTemperatureReachedListener listener)
Copyright © 2021 Tinkerforge GmbH. All rights reserved.