public class BrickletVoltageCurrent extends Device
Device.Identity
Constructor and Description |
---|
BrickletVoltageCurrent(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 String DEVICE_DISPLAY_NAME
public static final byte FUNCTION_GET_CURRENT
public static final byte FUNCTION_GET_VOLTAGE
public static final byte FUNCTION_GET_POWER
public static final byte FUNCTION_SET_CONFIGURATION
public static final byte FUNCTION_GET_CONFIGURATION
public static final byte FUNCTION_SET_CALIBRATION
public static final byte FUNCTION_GET_CALIBRATION
public static final byte FUNCTION_SET_CURRENT_CALLBACK_PERIOD
public static final byte FUNCTION_GET_CURRENT_CALLBACK_PERIOD
public static final byte FUNCTION_SET_VOLTAGE_CALLBACK_PERIOD
public static final byte FUNCTION_GET_VOLTAGE_CALLBACK_PERIOD
public static final byte FUNCTION_SET_POWER_CALLBACK_PERIOD
public static final byte FUNCTION_GET_POWER_CALLBACK_PERIOD
public static final byte FUNCTION_SET_CURRENT_CALLBACK_THRESHOLD
public static final byte FUNCTION_GET_CURRENT_CALLBACK_THRESHOLD
public static final byte FUNCTION_SET_VOLTAGE_CALLBACK_THRESHOLD
public static final byte FUNCTION_GET_VOLTAGE_CALLBACK_THRESHOLD
public static final byte FUNCTION_SET_POWER_CALLBACK_THRESHOLD
public static final byte FUNCTION_GET_POWER_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 short AVERAGING_1
public static final short AVERAGING_4
public static final short AVERAGING_16
public static final short AVERAGING_64
public static final short AVERAGING_128
public static final short AVERAGING_256
public static final short AVERAGING_512
public static final short AVERAGING_1024
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 static final short CONVERSION_TIME_140US
public static final short CONVERSION_TIME_204US
public static final short CONVERSION_TIME_332US
public static final short CONVERSION_TIME_588US
public static final short CONVERSION_TIME_1_1MS
public static final short CONVERSION_TIME_2_116MS
public static final short CONVERSION_TIME_4_156MS
public static final short CONVERSION_TIME_8_244MS
public BrickletVoltageCurrent(String uid, IPConnection ipcon)
public int getCurrent() throws TinkerforgeException
BrickletVoltageCurrent.CurrentListener
listener and set the period with
setCurrentCallbackPeriod(long)
.TinkerforgeException
public int getVoltage() throws TinkerforgeException
BrickletVoltageCurrent.VoltageListener
listener and set the period with
setVoltageCallbackPeriod(long)
.TinkerforgeException
public int getPower() throws TinkerforgeException
BrickletVoltageCurrent.PowerListener
listener and set the period with
setPowerCallbackPeriod(long)
.TinkerforgeException
public void setConfiguration(short averaging, short voltageConversionTime, short currentConversionTime) throws TinkerforgeException
TinkerforgeException
public BrickletVoltageCurrent.Configuration getConfiguration() throws TinkerforgeException
setConfiguration(short, short, short)
.TinkerforgeException
public void setCalibration(int gainMultiplier, int gainDivisor) throws TinkerforgeException
TinkerforgeException
public BrickletVoltageCurrent.Calibration getCalibration() throws TinkerforgeException
setCalibration(int, int)
.TinkerforgeException
public void setCurrentCallbackPeriod(long period) throws TinkerforgeException
BrickletVoltageCurrent.CurrentListener
listener is triggered
periodically. A value of 0 turns the listener off.
The BrickletVoltageCurrent.CurrentListener
listener is only triggered if the current has changed since
the last triggering.TinkerforgeException
public long getCurrentCallbackPeriod() throws TinkerforgeException
setCurrentCallbackPeriod(long)
.TinkerforgeException
public void setVoltageCallbackPeriod(long period) throws TinkerforgeException
BrickletVoltageCurrent.VoltageListener
listener is triggered
periodically. A value of 0 turns the listener off.
The BrickletVoltageCurrent.VoltageListener
listener is only triggered if the voltage has changed since
the last triggering.TinkerforgeException
public long getVoltageCallbackPeriod() throws TinkerforgeException
setVoltageCallbackPeriod(long)
.TinkerforgeException
public void setPowerCallbackPeriod(long period) throws TinkerforgeException
BrickletVoltageCurrent.PowerListener
listener is triggered
periodically. A value of 0 turns the listener off.
The BrickletVoltageCurrent.PowerListener
listener is only triggered if the power has changed since the
last triggering.TinkerforgeException
public long getPowerCallbackPeriod() throws TinkerforgeException
getPowerCallbackPeriod()
.TinkerforgeException
public void setCurrentCallbackThreshold(char option, int min, int max) throws TinkerforgeException
BrickletVoltageCurrent.CurrentReachedListener
listener.
The following options are possible:
\verbatim
"Option", "Description"
"'x'", "Listener is turned off"
"'o'", "Listener is triggered when the current is *outside* the min and max values"
"'i'", "Listener is triggered when the current is *inside* the min and max values"
"'<'", "Listener is triggered when the current is smaller than the min value (max is ignored)"
"'>'", "Listener is triggered when the current is greater than the min value (max is ignored)"
\endverbatimTinkerforgeException
public BrickletVoltageCurrent.CurrentCallbackThreshold getCurrentCallbackThreshold() throws TinkerforgeException
setCurrentCallbackThreshold(char, int, int)
.TinkerforgeException
public void setVoltageCallbackThreshold(char option, int min, int max) throws TinkerforgeException
BrickletVoltageCurrent.VoltageReachedListener
listener.
The following options are possible:
\verbatim
"Option", "Description"
"'x'", "Listener is turned off"
"'o'", "Listener is triggered when the voltage is *outside* the min and max values"
"'i'", "Listener is triggered when the voltage is *inside* the min and max values"
"'<'", "Listener is triggered when the voltage is smaller than the min value (max is ignored)"
"'>'", "Listener is triggered when the voltage is greater than the min value (max is ignored)"
\endverbatimTinkerforgeException
public BrickletVoltageCurrent.VoltageCallbackThreshold getVoltageCallbackThreshold() throws TinkerforgeException
setVoltageCallbackThreshold(char, int, int)
.TinkerforgeException
public void setPowerCallbackThreshold(char option, int min, int max) throws TinkerforgeException
BrickletVoltageCurrent.PowerReachedListener
listener.
The following options are possible:
\verbatim
"Option", "Description"
"'x'", "Listener is turned off"
"'o'", "Listener is triggered when the power is *outside* the min and max values"
"'i'", "Listener is triggered when the power is *inside* the min and max values"
"'<'", "Listener is triggered when the power is smaller than the min value (max is ignored)"
"'>'", "Listener is triggered when the power is greater than the min value (max is ignored)"
\endverbatimTinkerforgeException
public BrickletVoltageCurrent.PowerCallbackThreshold getPowerCallbackThreshold() throws TinkerforgeException
setPowerCallbackThreshold(char, int, int)
.TinkerforgeException
public void setDebouncePeriod(long debounce) throws TinkerforgeException
BrickletVoltageCurrent.CurrentReachedListener
,
* BrickletVoltageCurrent.VoltageReachedListener
,
* BrickletVoltageCurrent.PowerReachedListener
are triggered, if the thresholds
* setCurrentCallbackThreshold(char, int, int)
,
* setVoltageCallbackThreshold(char, int, int)
,
* setPowerCallbackThreshold(char, int, int)
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 addCurrentListener(BrickletVoltageCurrent.CurrentListener listener)
public void removeCurrentListener(BrickletVoltageCurrent.CurrentListener listener)
public void addVoltageListener(BrickletVoltageCurrent.VoltageListener listener)
public void removeVoltageListener(BrickletVoltageCurrent.VoltageListener listener)
public void addPowerListener(BrickletVoltageCurrent.PowerListener listener)
public void removePowerListener(BrickletVoltageCurrent.PowerListener listener)
public void addCurrentReachedListener(BrickletVoltageCurrent.CurrentReachedListener listener)
public void removeCurrentReachedListener(BrickletVoltageCurrent.CurrentReachedListener listener)
public void addVoltageReachedListener(BrickletVoltageCurrent.VoltageReachedListener listener)
public void removeVoltageReachedListener(BrickletVoltageCurrent.VoltageReachedListener listener)
public void addPowerReachedListener(BrickletVoltageCurrent.PowerReachedListener listener)
public void removePowerReachedListener(BrickletVoltageCurrent.PowerReachedListener listener)
Copyright © 2021 Tinkerforge GmbH. All rights reserved.