public class YOsControl extends YFunction
Modifier and Type | Class and Description |
---|---|
static interface |
YOsControl.TimedReportCallback
TimedReportCallback for OsControl
|
static interface |
YOsControl.UpdateCallback
Deprecated UpdateCallback for OsControl
|
Modifier and Type | Field and Description |
---|---|
protected int |
_shutdownCountdown |
protected YOsControl.UpdateCallback |
_valueCallbackOsControl |
static int |
SHUTDOWNCOUNTDOWN_INVALID
invalid shutdownCountdown 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 |
YOsControl(String func) |
protected |
YOsControl(YAPIContext ctx,
String func) |
Modifier and Type | Method and Description |
---|---|
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) |
static YOsControl |
FindOsControl(String func)
Retrieves OS control for a given identifier.
|
static YOsControl |
FindOsControlInContext(YAPIContext yctx,
String func)
Retrieves OS control for a given identifier in a YAPI context.
|
static YOsControl |
FirstOsControl()
Starts the enumeration of OS control currently accessible.
|
static YOsControl |
FirstOsControlInContext(YAPIContext yctx)
Starts the enumeration of OS control currently accessible.
|
int |
get_shutdownCountdown()
Returns the remaining number of seconds before the OS shutdown, or zero when no
shutdown has been scheduled.
|
int |
getShutdownCountdown()
Returns the remaining number of seconds before the OS shutdown, or zero when no
shutdown has been scheduled.
|
YOsControl |
nextOsControl()
Continues the enumeration of OS control started using yFirstOsControl().
|
int |
registerValueCallback(YOsControl.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
int |
set_shutdownCountdown(int newval) |
int |
shutdown(int secBeforeShutDown)
Schedules an OS shutdown after a given number of seconds.
|
_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_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, userData
public static final int SHUTDOWNCOUNTDOWN_INVALID
protected int _shutdownCountdown
protected YOsControl.UpdateCallback _valueCallbackOsControl
protected YOsControl(YAPIContext ctx, String func)
func
- : functionidprotected YOsControl(String func)
func
- : functionidprotected void _parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) throws Exception
_parseAttr
in class YFunction
Exception
public int get_shutdownCountdown() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getShutdownCountdown() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_shutdownCountdown(int newval) throws YAPI_Exception
YAPI_Exception
public static YOsControl FindOsControl(String func)
func
- : a string that uniquely characterizes the OS controlpublic static YOsControl FindOsControlInContext(YAPIContext yctx, String func)
yctx
- : a YAPI contextfunc
- : a string that uniquely characterizes the OS controlpublic int registerValueCallback(YOsControl.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 shutdown(int secBeforeShutDown) throws YAPI_Exception
secBeforeShutDown
- : number of seconds before shutdownYAPI_Exception
- on errorpublic YOsControl nextOsControl()
public static YOsControl FirstOsControl()
public static YOsControl FirstOsControlInContext(YAPIContext yctx)
yctx
- : a YAPI context.Copyright © 2019. All rights reserved.