public class YSegmentedDisplay extends YFunction
Modifier and Type | Class and Description |
---|---|
static interface |
YSegmentedDisplay.TimedReportCallback
TimedReportCallback for SegmentedDisplay
|
static interface |
YSegmentedDisplay.UpdateCallback
Deprecated UpdateCallback for SegmentedDisplay
|
Modifier and Type | Field and Description |
---|---|
protected String |
_displayedText |
protected int |
_displayMode |
protected YSegmentedDisplay.UpdateCallback |
_valueCallbackSegmentedDisplay |
static String |
DISPLAYEDTEXT_INVALID
invalid displayedText value
|
static int |
DISPLAYMODE_AUTO1 |
static int |
DISPLAYMODE_AUTO60 |
static int |
DISPLAYMODE_DISCONNECTED
invalid displayMode value
|
static int |
DISPLAYMODE_INVALID |
static int |
DISPLAYMODE_MANUAL |
_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 |
YSegmentedDisplay(String func) |
protected |
YSegmentedDisplay(YAPIContext ctx,
String func) |
Modifier and Type | Method and Description |
---|---|
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) |
static YSegmentedDisplay |
FindSegmentedDisplay(String func)
Retrieves a segmented display for a given identifier.
|
static YSegmentedDisplay |
FindSegmentedDisplayInContext(YAPIContext yctx,
String func)
Retrieves a segmented display for a given identifier in a YAPI context.
|
static YSegmentedDisplay |
FirstSegmentedDisplay()
Starts the enumeration of segmented displays currently accessible.
|
static YSegmentedDisplay |
FirstSegmentedDisplayInContext(YAPIContext yctx)
Starts the enumeration of segmented displays currently accessible.
|
String |
get_displayedText()
Returns the text currently displayed on the screen.
|
int |
get_displayMode() |
String |
getDisplayedText()
Returns the text currently displayed on the screen.
|
YSegmentedDisplay |
nextSegmentedDisplay()
Continues the enumeration of segmented displays started using yFirstSegmentedDisplay().
|
int |
registerValueCallback(YSegmentedDisplay.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
int |
set_displayedText(String newval)
Changes the text currently displayed on the screen.
|
int |
set_displayMode(int newval) |
int |
setDisplayedText(String newval)
Changes the text currently displayed on the screen.
|
_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 String DISPLAYEDTEXT_INVALID
public static final int DISPLAYMODE_DISCONNECTED
public static final int DISPLAYMODE_MANUAL
public static final int DISPLAYMODE_AUTO1
public static final int DISPLAYMODE_AUTO60
public static final int DISPLAYMODE_INVALID
protected String _displayedText
protected int _displayMode
protected YSegmentedDisplay.UpdateCallback _valueCallbackSegmentedDisplay
protected YSegmentedDisplay(YAPIContext ctx, String func)
func
- : functionidprotected YSegmentedDisplay(String func)
func
- : functionidprotected void _parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) throws Exception
_parseAttr
in class YFunction
Exception
public String get_displayedText() throws YAPI_Exception
YAPI_Exception
- on errorpublic String getDisplayedText() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_displayedText(String newval) throws YAPI_Exception
newval
- : a string corresponding to the text currently displayed on the screenYAPI_Exception
- on errorpublic int setDisplayedText(String newval) throws YAPI_Exception
newval
- : a string corresponding to the text currently displayed on the screenYAPI_Exception
- on errorpublic int get_displayMode() throws YAPI_Exception
YAPI_Exception
public int set_displayMode(int newval) throws YAPI_Exception
YAPI_Exception
public static YSegmentedDisplay FindSegmentedDisplay(String func)
func
- : a string that uniquely characterizes the segmented displayspublic static YSegmentedDisplay FindSegmentedDisplayInContext(YAPIContext yctx, String func)
yctx
- : a YAPI contextfunc
- : a string that uniquely characterizes the segmented displayspublic int registerValueCallback(YSegmentedDisplay.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 YSegmentedDisplay nextSegmentedDisplay()
public static YSegmentedDisplay FirstSegmentedDisplay()
public static YSegmentedDisplay FirstSegmentedDisplayInContext(YAPIContext yctx)
yctx
- : a YAPI context.Copyright © 2018. All rights reserved.