public class YPowerSupply extends YFunction
Modifier and Type | Class and Description |
---|---|
static interface |
YPowerSupply.TimedReportCallback
TimedReportCallback for PowerSupply
|
static interface |
YPowerSupply.UpdateCallback
Deprecated UpdateCallback for PowerSupply
|
Modifier and Type | Field and Description |
---|---|
protected String |
_command |
protected double |
_currentAtStartUp |
protected double |
_currentLimit |
protected double |
_inputVoltage |
protected double |
_ldoTemperature |
protected double |
_measuredCurrent |
protected double |
_measuredVoltage |
protected int |
_powerOutput |
protected YPowerSupply.UpdateCallback |
_valueCallbackPowerSupply |
protected double |
_vInt |
protected double |
_voltageAtStartUp |
protected int |
_voltageSense |
protected double |
_voltageSetPoint |
protected String |
_voltageTransition |
static String |
COMMAND_INVALID
invalid command value
|
static double |
CURRENTATSTARTUP_INVALID
invalid currentAtStartUp value
|
static double |
CURRENTLIMIT_INVALID
invalid currentLimit value
|
static double |
INPUTVOLTAGE_INVALID
invalid inputVoltage value
|
static double |
LDOTEMPERATURE_INVALID
invalid ldoTemperature value
|
static double |
MEASUREDCURRENT_INVALID
invalid measuredCurrent value
|
static double |
MEASUREDVOLTAGE_INVALID
invalid measuredVoltage value
|
static int |
POWEROUTPUT_INVALID |
static int |
POWEROUTPUT_OFF
invalid powerOutput value
|
static int |
POWEROUTPUT_ON |
static double |
VINT_INVALID
invalid vInt value
|
static double |
VOLTAGEATSTARTUP_INVALID
invalid voltageAtStartUp value
|
static int |
VOLTAGESENSE_EXT |
static int |
VOLTAGESENSE_INT
invalid voltageSense value
|
static int |
VOLTAGESENSE_INVALID |
static double |
VOLTAGESETPOINT_INVALID
invalid voltageSetPoint value
|
static String |
VOLTAGETRANSITION_INVALID
invalid voltageTransition value
|
_advertisedValue, _cacheExpiration, _className, _dataStreams, _func, _funId, _hwId, _lastErrorMsg, _lastErrorType, _logicalName, _serial, _userData, _valueCallbackFunction, _yapi, ADVERTISEDVALUE_INVALID, FUNCTIONDESCRIPTOR_INVALID, LOGICALNAME_INVALID
Modifier | Constructor and Description |
---|---|
protected |
YPowerSupply(String func) |
protected |
YPowerSupply(YAPIContext ctx,
String func) |
Modifier and Type | Method and Description |
---|---|
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) |
static YPowerSupply |
FindPowerSupply(String func)
Retrieves a regulated power supply for a given identifier.
|
static YPowerSupply |
FindPowerSupplyInContext(YAPIContext yctx,
String func)
Retrieves a regulated power supply for a given identifier in a YAPI context.
|
static YPowerSupply |
FirstPowerSupply()
Starts the enumeration of regulated power supplies currently accessible.
|
static YPowerSupply |
FirstPowerSupplyInContext(YAPIContext yctx)
Starts the enumeration of regulated power supplies currently accessible.
|
String |
get_command() |
double |
get_currentAtStartUp()
Returns the selected current limit at device startup, in mA.
|
double |
get_currentLimit()
Returns the current limit, in mA.
|
double |
get_inputVoltage()
Returns the measured input voltage, in V.
|
double |
get_ldoTemperature()
Returns the LDO temperature, in Celsius.
|
double |
get_measuredCurrent()
Returns the measured output current, in mA.
|
double |
get_measuredVoltage()
Returns the measured output voltage, in V.
|
int |
get_powerOutput()
Returns the power supply output switch state.
|
double |
get_vInt()
Returns the internal voltage, in V.
|
double |
get_voltageAtStartUp()
Returns the selected voltage set point at device startup, in V.
|
int |
get_voltageSense()
Returns the output voltage control point.
|
double |
get_voltageSetPoint()
Returns the voltage set point, in V.
|
String |
get_voltageTransition() |
double |
getCurrentAtStartUp()
Returns the selected current limit at device startup, in mA.
|
double |
getCurrentLimit()
Returns the current limit, in mA.
|
double |
getInputVoltage()
Returns the measured input voltage, in V.
|
double |
getLdoTemperature()
Returns the LDO temperature, in Celsius.
|
double |
getMeasuredCurrent()
Returns the measured output current, in mA.
|
double |
getMeasuredVoltage()
Returns the measured output voltage, in V.
|
int |
getPowerOutput()
Returns the power supply output switch state.
|
double |
getVInt()
Returns the internal voltage, in V.
|
double |
getVoltageAtStartUp()
Returns the selected voltage set point at device startup, in V.
|
int |
getVoltageSense()
Returns the output voltage control point.
|
double |
getVoltageSetPoint()
Returns the voltage set point, in V.
|
YPowerSupply |
nextPowerSupply()
Continues the enumeration of regulated power supplies started using yFirstPowerSupply().
|
int |
registerValueCallback(YPowerSupply.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
int |
set_command(String newval) |
int |
set_currentAtStartUp(double newval)
Changes the current limit at device start up.
|
int |
set_currentLimit(double newval)
Changes the current limit, in mA.
|
int |
set_powerOutput(int newval)
Changes the power supply output switch state.
|
int |
set_voltageAtStartUp(double newval)
Changes the voltage set point at device start up.
|
int |
set_voltageSense(int newval)
Changes the voltage control point.
|
int |
set_voltageSetPoint(double newval)
Changes the voltage set point, in V.
|
int |
set_voltageTransition(String newval) |
int |
setCurrentAtStartUp(double newval)
Changes the current limit at device start up.
|
int |
setCurrentLimit(double newval)
Changes the current limit, in mA.
|
int |
setPowerOutput(int newval)
Changes the power supply output switch state.
|
int |
setVoltageAtStartUp(double newval)
Changes the voltage set point at device start up.
|
int |
setVoltageSense(int newval)
Changes the voltage control point.
|
int |
setVoltageSetPoint(double newval)
Changes the voltage set point, in V.
|
int |
voltageMove(double V_target,
int ms_duration)
Performs a smooth transistion of output voltage.
|
_AddToCache, _clearDataStreamCache, _devRequest, _download, _escapeAttr, _FindFromCache, _FindFromCacheInContext, _get_json_path_struct, _get_json_path, _json_get_array, _json_get_key, _json_get_string, _parse, _parserHelper, _setAttr, _throw, _UpdateTimedReportCallbackList, _UpdateValueCallbackList, _upload, _upload, clearCache, describe, errMessage, errorMessage, errorType, errType, FindFunction, FindFunctionInContext, FirstFunction, FirstFunctionInContext, functionDescriptor, get_advertisedValue, get_errorMessage, get_errorType, get_friendlyName, get_functionDescriptor, get_functionId, get_hardwareId, get_logicalName, get_module, get_userData, getAdvertisedValue, getErrorMessage, getErrorType, getFriendlyName, getFunctionDescriptor, getFunctionId, getHardwareId, getLogicalName, getModule, getUserData, isOnline, load, loadAttribute, module, muteValueCallbacks, nextFunction, registerValueCallback, set_advertisedValue, set_logicalName, set_userData, setLogicalName, setUserData, toString, unmuteValueCallbacks, userData
public static final double VOLTAGESETPOINT_INVALID
public static final double CURRENTLIMIT_INVALID
public static final int POWEROUTPUT_OFF
public static final int POWEROUTPUT_ON
public static final int POWEROUTPUT_INVALID
public static final int VOLTAGESENSE_INT
public static final int VOLTAGESENSE_EXT
public static final int VOLTAGESENSE_INVALID
public static final double MEASUREDVOLTAGE_INVALID
public static final double MEASUREDCURRENT_INVALID
public static final double INPUTVOLTAGE_INVALID
public static final double VINT_INVALID
public static final double LDOTEMPERATURE_INVALID
public static final String VOLTAGETRANSITION_INVALID
public static final double VOLTAGEATSTARTUP_INVALID
public static final double CURRENTATSTARTUP_INVALID
public static final String COMMAND_INVALID
protected double _voltageSetPoint
protected double _currentLimit
protected int _powerOutput
protected int _voltageSense
protected double _measuredVoltage
protected double _measuredCurrent
protected double _inputVoltage
protected double _vInt
protected double _ldoTemperature
protected String _voltageTransition
protected double _voltageAtStartUp
protected double _currentAtStartUp
protected String _command
protected YPowerSupply.UpdateCallback _valueCallbackPowerSupply
protected YPowerSupply(YAPIContext ctx, String func)
func
- : functionidprotected YPowerSupply(String func)
func
- : functionidprotected void _parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) throws Exception
_parseAttr
in class YFunction
Exception
public int set_voltageSetPoint(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the voltage set point, in VYAPI_Exception
- on errorpublic int setVoltageSetPoint(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the voltage set point, in VYAPI_Exception
- on errorpublic double get_voltageSetPoint() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getVoltageSetPoint() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_currentLimit(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the current limit, in mAYAPI_Exception
- on errorpublic int setCurrentLimit(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the current limit, in mAYAPI_Exception
- on errorpublic double get_currentLimit() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getCurrentLimit() throws YAPI_Exception
YAPI_Exception
- on errorpublic int get_powerOutput() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getPowerOutput() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_powerOutput(int newval) throws YAPI_Exception
newval
- : either YPowerSupply.POWEROUTPUT_OFF or YPowerSupply.POWEROUTPUT_ON, according to
the power supply output switch stateYAPI_Exception
- on errorpublic int setPowerOutput(int newval) throws YAPI_Exception
newval
- : either Y_POWEROUTPUT_OFF or Y_POWEROUTPUT_ON, according to the power supply output switch stateYAPI_Exception
- on errorpublic int get_voltageSense() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getVoltageSense() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_voltageSense(int newval) throws YAPI_Exception
newval
- : either YPowerSupply.VOLTAGESENSE_INT or YPowerSupply.VOLTAGESENSE_EXT, according to
the voltage control pointYAPI_Exception
- on errorpublic int setVoltageSense(int newval) throws YAPI_Exception
newval
- : either Y_VOLTAGESENSE_INT or Y_VOLTAGESENSE_EXT, according to the voltage control pointYAPI_Exception
- on errorpublic double get_measuredVoltage() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getMeasuredVoltage() throws YAPI_Exception
YAPI_Exception
- on errorpublic double get_measuredCurrent() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getMeasuredCurrent() throws YAPI_Exception
YAPI_Exception
- on errorpublic double get_inputVoltage() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getInputVoltage() throws YAPI_Exception
YAPI_Exception
- on errorpublic double get_vInt() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getVInt() throws YAPI_Exception
YAPI_Exception
- on errorpublic double get_ldoTemperature() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getLdoTemperature() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_voltageTransition() throws YAPI_Exception
YAPI_Exception
public int set_voltageTransition(String newval) throws YAPI_Exception
YAPI_Exception
public int set_voltageAtStartUp(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the voltage set point at device start upYAPI_Exception
- on errorpublic int setVoltageAtStartUp(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the voltage set point at device start upYAPI_Exception
- on errorpublic double get_voltageAtStartUp() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getVoltageAtStartUp() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_currentAtStartUp(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the current limit at device start upYAPI_Exception
- on errorpublic int setCurrentAtStartUp(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the current limit at device start upYAPI_Exception
- on errorpublic double get_currentAtStartUp() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getCurrentAtStartUp() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_command() throws YAPI_Exception
YAPI_Exception
public int set_command(String newval) throws YAPI_Exception
YAPI_Exception
public static YPowerSupply FindPowerSupply(String func)
func
- : a string that uniquely characterizes the regulated power supplypublic static YPowerSupply FindPowerSupplyInContext(YAPIContext yctx, String func)
yctx
- : a YAPI contextfunc
- : a string that uniquely characterizes the regulated power supplypublic int registerValueCallback(YPowerSupply.UpdateCallback callback)
callback
- : the callback function to call, or a null pointer. The callback function should take two
arguments: the function object of which the value has changed, and the character string describing
the new advertised value.public int _invokeValueCallback(String value)
_invokeValueCallback
in class YFunction
public int voltageMove(double V_target, int ms_duration) throws YAPI_Exception
V_target
- : new output voltage value at the end of the transition
(floating-point number, representing the end voltage in V)ms_duration
- : total duration of the transition, in millisecondsYAPI_Exception
public YPowerSupply nextPowerSupply()
public static YPowerSupply FirstPowerSupply()
public static YPowerSupply FirstPowerSupplyInContext(YAPIContext yctx)
yctx
- : a YAPI context.Copyright © 2017. All rights reserved.