public class YPowerOutput extends YFunction
| Modifier and Type | Class and Description |
|---|---|
static interface |
YPowerOutput.TimedReportCallback
TimedReportCallback for PowerOutput
|
static interface |
YPowerOutput.UpdateCallback
Deprecated UpdateCallback for PowerOutput
|
| Modifier and Type | Field and Description |
|---|---|
protected YPowerOutput.UpdateCallback |
_valueCallbackPowerOutput |
protected int |
_voltage |
static int |
VOLTAGE_INVALID |
static int |
VOLTAGE_OFF
invalid voltage value
|
static int |
VOLTAGE_OUT1V8 |
static int |
VOLTAGE_OUT3V3 |
static int |
VOLTAGE_OUT4V7 |
static int |
VOLTAGE_OUT5V |
_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 |
YPowerOutput(String func) |
protected |
YPowerOutput(YAPIContext ctx,
String func) |
| Modifier and Type | Method and Description |
|---|---|
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) |
static YPowerOutput |
FindPowerOutput(String func)
Retrieves a power output for a given identifier.
|
static YPowerOutput |
FindPowerOutputInContext(YAPIContext yctx,
String func)
Retrieves a power output for a given identifier in a YAPI context.
|
static YPowerOutput |
FirstPowerOutput()
Starts the enumeration of power output currently accessible.
|
static YPowerOutput |
FirstPowerOutputInContext(YAPIContext yctx)
Starts the enumeration of power output currently accessible.
|
int |
get_voltage()
Returns the voltage on the power output featured by the module.
|
int |
getVoltage()
Returns the voltage on the power output featured by the module.
|
YPowerOutput |
nextPowerOutput()
Continues the enumeration of power output started using yFirstPowerOutput().
|
int |
registerValueCallback(YPowerOutput.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
int |
set_voltage(int newval)
Changes the voltage on the power output provided by the
module.
|
int |
setVoltage(int newval)
Changes the voltage on the power output provided by the
module.
|
_AddToCache, _clearDataStreamCache, _decode_json_int, _decode_json_string, _download, _escapeAttr, _FindFromCache, _FindFromCacheInContext, _get_json_path_struct, _get_json_path, _is_valid_pass, _json_get_array, _json_get_key, _json_get_string, _parse, _parserHelper, _setAttr, _throw, _UpdateTimedReportCallbackList, _UpdateValueCallbackList, _upload, _upload, _uploadEx, 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_serialNumber, get_userData, getAdvertisedValue, getErrorMessage, getErrorType, getFriendlyName, getFunctionDescriptor, getFunctionId, getHardwareId, getLogicalName, getModule, getUserData, isOnline, isReadOnly, load, loadAttribute, module, muteValueCallbacks, nextFunction, registerValueCallback, set_advertisedValue, set_logicalName, set_userData, setLogicalName, setUserData, toString, unmuteValueCallbacks, userDatapublic static final int VOLTAGE_OFF
public static final int VOLTAGE_OUT3V3
public static final int VOLTAGE_OUT5V
public static final int VOLTAGE_OUT4V7
public static final int VOLTAGE_OUT1V8
public static final int VOLTAGE_INVALID
protected int _voltage
protected YPowerOutput.UpdateCallback _valueCallbackPowerOutput
protected YPowerOutput(YAPIContext ctx, String func)
func - : functionidprotected YPowerOutput(String func)
func - : functionidprotected void _parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val)
throws Exception
_parseAttr in class YFunctionExceptionpublic int get_voltage()
throws YAPI_Exception
YAPI_Exception - on errorpublic int getVoltage()
throws YAPI_Exception
YAPI_Exception - on errorpublic int set_voltage(int newval)
throws YAPI_Exception
newval - : a value among YPowerOutput.VOLTAGE_OFF, YPowerOutput.VOLTAGE_OUT3V3,
YPowerOutput.VOLTAGE_OUT5V, YPowerOutput.VOLTAGE_OUT4V7 and YPowerOutput.VOLTAGE_OUT1V8
corresponding to the voltage on the power output provided by the
moduleYAPI_Exception - on errorpublic int setVoltage(int newval)
throws YAPI_Exception
newval - : a value among YPowerOutput.VOLTAGE_OFF, YPowerOutput.VOLTAGE_OUT3V3,
YPowerOutput.VOLTAGE_OUT5V, YPowerOutput.VOLTAGE_OUT4V7 and YPowerOutput.VOLTAGE_OUT1V8
corresponding to the voltage on the power output provided by the
moduleYAPI_Exception - on errorpublic static YPowerOutput FindPowerOutput(String func)
func - : a string that uniquely characterizes the power output, for instance
YI2CMK01.powerOutput.public static YPowerOutput FindPowerOutputInContext(YAPIContext yctx, String func)
yctx - : a YAPI contextfunc - : a string that uniquely characterizes the power output, for instance
YI2CMK01.powerOutput.public int registerValueCallback(YPowerOutput.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 YFunctionpublic YPowerOutput nextPowerOutput()
public static YPowerOutput FirstPowerOutput()
public static YPowerOutput FirstPowerOutputInContext(YAPIContext yctx)
yctx - : a YAPI context.Copyright © 2026. All rights reserved.