public class YInputChain extends YFunction
Modifier and Type | Class and Description |
---|---|
static interface |
YInputChain.TimedReportCallback
TimedReportCallback for InputChain
|
static interface |
YInputChain.UpdateCallback
Deprecated UpdateCallback for InputChain
|
static interface |
YInputChain.YEventCallback
Specialized event Callback for InputChain
|
Modifier and Type | Field and Description |
---|---|
protected String |
_bitChain1 |
protected String |
_bitChain2 |
protected String |
_bitChain3 |
protected String |
_bitChain4 |
protected String |
_bitChain5 |
protected String |
_bitChain6 |
protected String |
_bitChain7 |
protected int |
_chainDiags |
protected int |
_detectedNodes |
protected YInputChain.YEventCallback |
_eventCallback |
protected ArrayList<String> |
_eventChains |
protected int |
_eventPos |
protected int |
_eventStamp |
protected int |
_expectedNodes |
protected int |
_loopbackTest |
protected int |
_prevPos |
protected int |
_refreshRate |
protected YInputChain.UpdateCallback |
_valueCallbackInputChain |
protected int |
_watchdogPeriod |
static String |
BITCHAIN1_INVALID
invalid bitChain1 value
|
static String |
BITCHAIN2_INVALID
invalid bitChain2 value
|
static String |
BITCHAIN3_INVALID
invalid bitChain3 value
|
static String |
BITCHAIN4_INVALID
invalid bitChain4 value
|
static String |
BITCHAIN5_INVALID
invalid bitChain5 value
|
static String |
BITCHAIN6_INVALID
invalid bitChain6 value
|
static String |
BITCHAIN7_INVALID
invalid bitChain7 value
|
static int |
CHAINDIAGS_INVALID
invalid chainDiags value
|
static int |
DETECTEDNODES_INVALID
invalid detectedNodes value
|
static int |
EXPECTEDNODES_INVALID
invalid expectedNodes value
|
static int |
LOOPBACKTEST_INVALID |
static int |
LOOPBACKTEST_OFF
invalid loopbackTest value
|
static int |
LOOPBACKTEST_ON |
static int |
REFRESHRATE_INVALID
invalid refreshRate value
|
static int |
WATCHDOGPERIOD_INVALID
invalid watchdogPeriod 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 |
YInputChain(String func) |
protected |
YInputChain(YAPIContext ctx,
String func) |
Modifier and Type | Method and Description |
---|---|
int |
_internalEventHandler(String cbpos) |
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) |
String |
_strXor(String a,
String b) |
static YInputChain |
FindInputChain(String func)
Retrieves a digital input chain for a given identifier.
|
static YInputChain |
FindInputChainInContext(YAPIContext yctx,
String func)
Retrieves a digital input chain for a given identifier in a YAPI context.
|
static YInputChain |
FirstInputChain()
Starts the enumeration of digital input chains currently accessible.
|
static YInputChain |
FirstInputChainInContext(YAPIContext yctx)
Starts the enumeration of digital input chains currently accessible.
|
String |
get_bitChain1()
Returns the state of input 1 for all nodes of the input chain,
as a hexadecimal string.
|
String |
get_bitChain2()
Returns the state of input 2 for all nodes of the input chain,
as a hexadecimal string.
|
String |
get_bitChain3()
Returns the state of input 3 for all nodes of the input chain,
as a hexadecimal string.
|
String |
get_bitChain4()
Returns the state of input 4 for all nodes of the input chain,
as a hexadecimal string.
|
String |
get_bitChain5()
Returns the state of input 5 for all nodes of the input chain,
as a hexadecimal string.
|
String |
get_bitChain6()
Returns the state of input 6 for all nodes of the input chain,
as a hexadecimal string.
|
String |
get_bitChain7()
Returns the state of input 7 for all nodes of the input chain,
as a hexadecimal string.
|
int |
get_chainDiags()
Returns the controller state diagnostics.
|
int |
get_detectedNodes()
Returns the number of nodes detected in the chain.
|
int |
get_expectedNodes()
Returns the number of nodes expected in the chain.
|
String |
get_lastEvents()
Returns a string with last events observed on the digital input chain.
|
int |
get_loopbackTest()
Returns the activation state of the exhaustive chain connectivity test.
|
int |
get_refreshRate()
Returns the desired refresh rate, measured in Hz.
|
int |
get_watchdogPeriod()
Returns the wait time in seconds before triggering an inactivity
timeout error.
|
String |
getBitChain1()
Returns the state of input 1 for all nodes of the input chain,
as a hexadecimal string.
|
String |
getBitChain2()
Returns the state of input 2 for all nodes of the input chain,
as a hexadecimal string.
|
String |
getBitChain3()
Returns the state of input 3 for all nodes of the input chain,
as a hexadecimal string.
|
String |
getBitChain4()
Returns the state of input 4 for all nodes of the input chain,
as a hexadecimal string.
|
String |
getBitChain5()
Returns the state of input 5 for all nodes of the input chain,
as a hexadecimal string.
|
String |
getBitChain6()
Returns the state of input 6 for all nodes of the input chain,
as a hexadecimal string.
|
String |
getBitChain7()
Returns the state of input 7 for all nodes of the input chain,
as a hexadecimal string.
|
int |
getChainDiags()
Returns the controller state diagnostics.
|
int |
getDetectedNodes()
Returns the number of nodes detected in the chain.
|
int |
getExpectedNodes()
Returns the number of nodes expected in the chain.
|
int |
getLoopbackTest()
Returns the activation state of the exhaustive chain connectivity test.
|
int |
getRefreshRate()
Returns the desired refresh rate, measured in Hz.
|
int |
getWatchdogPeriod()
Returns the wait time in seconds before triggering an inactivity
timeout error.
|
ArrayList<Integer> |
hex2array(String hexstr) |
YInputChain |
nextInputChain()
Continues the enumeration of digital input chains started using yFirstInputChain().
|
int |
registerEventCallback(YInputChain.YEventCallback callback)
Registers a callback function to be called each time that an event is detected on the
input chain.The callback is invoked only during the execution of
ySleep or yHandleEvents.
|
int |
registerValueCallback(YInputChain.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
int |
resetWatchdog()
Resets the application watchdog countdown.
|
int |
set_expectedNodes(int newval)
Changes the number of nodes expected in the chain.
|
int |
set_loopbackTest(int newval)
Changes the activation state of the exhaustive chain connectivity test.
|
int |
set_refreshRate(int newval)
Changes the desired refresh rate, measured in Hz.
|
int |
set_watchdogPeriod(int newval)
Changes the wait time in seconds before triggering an inactivity
timeout error.
|
int |
setExpectedNodes(int newval)
Changes the number of nodes expected in the chain.
|
int |
setLoopbackTest(int newval)
Changes the activation state of the exhaustive chain connectivity test.
|
int |
setRefreshRate(int newval)
Changes the desired refresh rate, measured in Hz.
|
int |
setWatchdogPeriod(int newval)
Changes the wait time in seconds before triggering an inactivity
timeout error.
|
_AddToCache, _clearDataStreamCache, _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, _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, userData
public static final int EXPECTEDNODES_INVALID
public static final int DETECTEDNODES_INVALID
public static final int LOOPBACKTEST_OFF
public static final int LOOPBACKTEST_ON
public static final int LOOPBACKTEST_INVALID
public static final int REFRESHRATE_INVALID
public static final String BITCHAIN1_INVALID
public static final String BITCHAIN2_INVALID
public static final String BITCHAIN3_INVALID
public static final String BITCHAIN4_INVALID
public static final String BITCHAIN5_INVALID
public static final String BITCHAIN6_INVALID
public static final String BITCHAIN7_INVALID
public static final int WATCHDOGPERIOD_INVALID
public static final int CHAINDIAGS_INVALID
protected int _expectedNodes
protected int _detectedNodes
protected int _loopbackTest
protected int _refreshRate
protected String _bitChain1
protected String _bitChain2
protected String _bitChain3
protected String _bitChain4
protected String _bitChain5
protected String _bitChain6
protected String _bitChain7
protected int _watchdogPeriod
protected int _chainDiags
protected YInputChain.UpdateCallback _valueCallbackInputChain
protected YInputChain.YEventCallback _eventCallback
protected int _prevPos
protected int _eventPos
protected int _eventStamp
protected YInputChain(YAPIContext ctx, String func)
func
- : functionidprotected YInputChain(String func)
func
- : functionidprotected void _parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) throws Exception
_parseAttr
in class YFunction
Exception
public int get_expectedNodes() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getExpectedNodes() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_expectedNodes(int newval) throws YAPI_Exception
newval
- : an integer corresponding to the number of nodes expected in the chainYAPI_Exception
- on errorpublic int setExpectedNodes(int newval) throws YAPI_Exception
newval
- : an integer corresponding to the number of nodes expected in the chainYAPI_Exception
- on errorpublic int get_detectedNodes() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getDetectedNodes() throws YAPI_Exception
YAPI_Exception
- on errorpublic int get_loopbackTest() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getLoopbackTest() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_loopbackTest(int newval) throws YAPI_Exception
newval
- : either YInputChain.LOOPBACKTEST_OFF or YInputChain.LOOPBACKTEST_ON, according to
the activation state of the exhaustive chain connectivity testYAPI_Exception
- on errorpublic int setLoopbackTest(int newval) throws YAPI_Exception
newval
- : either YInputChain.LOOPBACKTEST_OFF or YInputChain.LOOPBACKTEST_ON, according to
the activation state of the exhaustive chain connectivity testYAPI_Exception
- on errorpublic int get_refreshRate() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getRefreshRate() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_refreshRate(int newval) throws YAPI_Exception
newval
- : an integer corresponding to the desired refresh rate, measured in HzYAPI_Exception
- on errorpublic int setRefreshRate(int newval) throws YAPI_Exception
newval
- : an integer corresponding to the desired refresh rate, measured in HzYAPI_Exception
- on errorpublic String get_bitChain1() throws YAPI_Exception
YAPI_Exception
- on errorpublic String getBitChain1() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_bitChain2() throws YAPI_Exception
YAPI_Exception
- on errorpublic String getBitChain2() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_bitChain3() throws YAPI_Exception
YAPI_Exception
- on errorpublic String getBitChain3() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_bitChain4() throws YAPI_Exception
YAPI_Exception
- on errorpublic String getBitChain4() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_bitChain5() throws YAPI_Exception
YAPI_Exception
- on errorpublic String getBitChain5() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_bitChain6() throws YAPI_Exception
YAPI_Exception
- on errorpublic String getBitChain6() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_bitChain7() throws YAPI_Exception
YAPI_Exception
- on errorpublic String getBitChain7() throws YAPI_Exception
YAPI_Exception
- on errorpublic int get_watchdogPeriod() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getWatchdogPeriod() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_watchdogPeriod(int newval) throws YAPI_Exception
newval
- : an integer corresponding to the wait time in seconds before triggering an inactivity
timeout errorYAPI_Exception
- on errorpublic int setWatchdogPeriod(int newval) throws YAPI_Exception
newval
- : an integer corresponding to the wait time in seconds before triggering an inactivity
timeout errorYAPI_Exception
- on errorpublic int get_chainDiags() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getChainDiags() throws YAPI_Exception
YAPI_Exception
- on errorpublic static YInputChain FindInputChain(String func)
func
- : a string that uniquely characterizes the digital input chain, for instance
MyDevice.inputChain.public static YInputChain FindInputChainInContext(YAPIContext yctx, String func)
yctx
- : a YAPI contextfunc
- : a string that uniquely characterizes the digital input chain, for instance
MyDevice.inputChain.public int registerValueCallback(YInputChain.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 resetWatchdog() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_lastEvents() throws YAPI_Exception
YAPI_Exception
- on errorpublic int registerEventCallback(YInputChain.YEventCallback callback) throws YAPI_Exception
callback
- : the callback function to call, or a null pointer.
The callback function should take four arguments:
the YInputChain object that emitted the event, the
UTC timestamp of the event, a character string describing
the type of event and a character string with the event data.YAPI_Exception
- on errorpublic int _internalEventHandler(String cbpos) throws YAPI_Exception
YAPI_Exception
public YInputChain nextInputChain()
public static YInputChain FirstInputChain()
public static YInputChain FirstInputChainInContext(YAPIContext yctx)
yctx
- : a YAPI context.Copyright © 2023. All rights reserved.