public class YVoltageOutput extends YFunction
Modifier and Type | Class and Description |
---|---|
static interface |
YVoltageOutput.TimedReportCallback
TimedReportCallback for VoltageOutput
|
static interface |
YVoltageOutput.UpdateCallback
Deprecated UpdateCallback for VoltageOutput
|
Modifier and Type | Field and Description |
---|---|
protected double |
_currentVoltage |
protected YVoltageOutput.UpdateCallback |
_valueCallbackVoltageOutput |
protected double |
_voltageAtStartUp |
protected String |
_voltageTransition |
static double |
CURRENTVOLTAGE_INVALID
invalid currentVoltage value
|
static double |
VOLTAGEATSTARTUP_INVALID
invalid voltageAtStartUp 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 |
YVoltageOutput(String func) |
protected |
YVoltageOutput(YAPIContext ctx,
String func) |
Modifier and Type | Method and Description |
---|---|
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) |
static YVoltageOutput |
FindVoltageOutput(String func)
Retrieves a voltage output for a given identifier.
|
static YVoltageOutput |
FindVoltageOutputInContext(YAPIContext yctx,
String func)
Retrieves a voltage output for a given identifier in a YAPI context.
|
static YVoltageOutput |
FirstVoltageOutput()
Starts the enumeration of voltage outputs currently accessible.
|
static YVoltageOutput |
FirstVoltageOutputInContext(YAPIContext yctx)
Starts the enumeration of voltage outputs currently accessible.
|
double |
get_currentVoltage()
Returns the loop current set point in mA.
|
double |
get_voltageAtStartUp()
Returns the selected voltage output at device startup, in V.
|
String |
get_voltageTransition() |
double |
getCurrentVoltage()
Returns the loop current set point in mA.
|
double |
getVoltageAtStartUp()
Returns the selected voltage output at device startup, in V.
|
YVoltageOutput |
nextVoltageOutput()
Continues the enumeration of voltage outputs started using yFirstVoltageOutput().
|
int |
registerValueCallback(YVoltageOutput.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
int |
set_currentVoltage(double newval)
Changes the output voltage.
|
int |
set_voltageAtStartUp(double newval)
Changes the output voltage at device start up.
|
int |
set_voltageTransition(String newval) |
int |
setCurrentVoltage(double newval)
Changes the output voltage.
|
int |
setVoltageAtStartUp(double newval)
Changes the output voltage at device start up.
|
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 CURRENTVOLTAGE_INVALID
public static final String VOLTAGETRANSITION_INVALID
public static final double VOLTAGEATSTARTUP_INVALID
protected double _currentVoltage
protected String _voltageTransition
protected double _voltageAtStartUp
protected YVoltageOutput.UpdateCallback _valueCallbackVoltageOutput
protected YVoltageOutput(YAPIContext ctx, String func)
func
- : functionidprotected YVoltageOutput(String func)
func
- : functionidprotected void _parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) throws Exception
_parseAttr
in class YFunction
Exception
public int set_currentVoltage(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the output voltageYAPI_Exception
- on errorpublic int setCurrentVoltage(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the output voltageYAPI_Exception
- on errorpublic double get_currentVoltage() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getCurrentVoltage() 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 output voltage at device start upYAPI_Exception
- on errorpublic int setVoltageAtStartUp(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the output voltage 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 static YVoltageOutput FindVoltageOutput(String func)
func
- : a string that uniquely characterizes the voltage outputpublic static YVoltageOutput FindVoltageOutputInContext(YAPIContext yctx, String func)
yctx
- : a YAPI contextfunc
- : a string that uniquely characterizes the voltage outputpublic int registerValueCallback(YVoltageOutput.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 YVoltageOutput nextVoltageOutput()
public static YVoltageOutput FirstVoltageOutput()
public static YVoltageOutput FirstVoltageOutputInContext(YAPIContext yctx)
yctx
- : a YAPI context.Copyright © 2017. All rights reserved.