public class YInputCapture extends YFunction
Modifier and Type | Class and Description |
---|---|
static interface |
YInputCapture.TimedReportCallback
TimedReportCallback for InputCapture
|
static interface |
YInputCapture.UpdateCallback
Deprecated UpdateCallback for InputCapture
|
_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 |
YInputCapture(String func) |
protected |
YInputCapture(YAPIContext ctx,
String func) |
Modifier and Type | Method and Description |
---|---|
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) |
static YInputCapture |
FindInputCapture(String func)
Retrieves an instant snapshot trigger for a given identifier.
|
static YInputCapture |
FindInputCaptureInContext(YAPIContext yctx,
String func)
Retrieves an instant snapshot trigger for a given identifier in a YAPI context.
|
static YInputCapture |
FirstInputCapture()
comment from .yc definition
|
static YInputCapture |
FirstInputCaptureInContext(YAPIContext yctx)
comment from .yc definition
|
int |
get_captureType()
Returns the type of automatic conditional capture.
|
int |
get_captureTypeAtStartup()
Returns the type of automatic conditional capture
applied at device power on.
|
int |
get_condAlign()
Returns the relative position of the trigger event within the capture window.
|
double |
get_condValue()
Returns current threshold value for automatic conditional capture.
|
double |
get_condValueAtStartup()
Returns the threshold value for automatic conditional
capture applied at device power on.
|
YInputCaptureData |
get_immediateCapture(int msDuration)
Returns a new immediate capture of the device inputs.
|
YInputCaptureData |
get_lastCapture()
Returns all details about the last automatic input capture.
|
long |
get_lastCaptureTime()
Returns the number of elapsed milliseconds between the module power on
and the last capture (time of trigger), or zero if no capture has been done.
|
int |
get_nSamples()
Returns the number of samples that will be captured.
|
int |
get_samplingRate()
Returns the sampling frequency, in Hz.
|
int |
getCaptureType()
Returns the type of automatic conditional capture.
|
int |
getCaptureTypeAtStartup()
Returns the type of automatic conditional capture
applied at device power on.
|
int |
getCondAlign()
Returns the relative position of the trigger event within the capture window.
|
double |
getCondValue()
Returns current threshold value for automatic conditional capture.
|
double |
getCondValueAtStartup()
Returns the threshold value for automatic conditional
capture applied at device power on.
|
long |
getLastCaptureTime()
Returns the number of elapsed milliseconds between the module power on
and the last capture (time of trigger), or zero if no capture has been done.
|
int |
getNSamples()
Returns the number of samples that will be captured.
|
int |
getSamplingRate()
Returns the sampling frequency, in Hz.
|
YInputCapture |
nextInputCapture()
comment from .yc definition
|
int |
registerValueCallback(YInputCapture.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
int |
set_captureType(int newval)
Changes the type of automatic conditional capture.
|
int |
set_captureTypeAtStartup(int newval)
Changes the type of automatic conditional capture
applied at device power on.
|
int |
set_condAlign(int newval)
Changes the relative position of the trigger event within the capture window.
|
int |
set_condValue(double newval)
Changes current threshold value for automatic conditional capture.
|
int |
set_condValueAtStartup(double newval)
Changes current threshold value for automatic conditional
capture applied at device power on.
|
int |
set_nSamples(int newval)
Changes the type of automatic conditional capture.
|
int |
setCaptureType(int newval)
Changes the type of automatic conditional capture.
|
int |
setCaptureTypeAtStartup(int newval)
Changes the type of automatic conditional capture
applied at device power on.
|
int |
setCondAlign(int newval)
Changes the relative position of the trigger event within the capture window.
|
int |
setCondValue(double newval)
Changes current threshold value for automatic conditional capture.
|
int |
setCondValueAtStartup(double newval)
Changes current threshold value for automatic conditional
capture applied at device power on.
|
int |
setNSamples(int newval)
Changes the type of automatic conditional capture.
|
_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 long LASTCAPTURETIME_INVALID
public static final int NSAMPLES_INVALID
public static final int SAMPLINGRATE_INVALID
public static final int CAPTURETYPE_NONE
public static final int CAPTURETYPE_TIMED
public static final int CAPTURETYPE_V_MAX
public static final int CAPTURETYPE_V_MIN
public static final int CAPTURETYPE_I_MAX
public static final int CAPTURETYPE_I_MIN
public static final int CAPTURETYPE_P_MAX
public static final int CAPTURETYPE_P_MIN
public static final int CAPTURETYPE_V_AVG_MAX
public static final int CAPTURETYPE_V_AVG_MIN
public static final int CAPTURETYPE_V_RMS_MAX
public static final int CAPTURETYPE_V_RMS_MIN
public static final int CAPTURETYPE_I_AVG_MAX
public static final int CAPTURETYPE_I_AVG_MIN
public static final int CAPTURETYPE_I_RMS_MAX
public static final int CAPTURETYPE_I_RMS_MIN
public static final int CAPTURETYPE_P_AVG_MAX
public static final int CAPTURETYPE_P_AVG_MIN
public static final int CAPTURETYPE_PF_MIN
public static final int CAPTURETYPE_DPF_MIN
public static final int CAPTURETYPE_INVALID
public static final double CONDVALUE_INVALID
public static final int CONDALIGN_INVALID
public static final int CAPTURETYPEATSTARTUP_NONE
public static final int CAPTURETYPEATSTARTUP_TIMED
public static final int CAPTURETYPEATSTARTUP_V_MAX
public static final int CAPTURETYPEATSTARTUP_V_MIN
public static final int CAPTURETYPEATSTARTUP_I_MAX
public static final int CAPTURETYPEATSTARTUP_I_MIN
public static final int CAPTURETYPEATSTARTUP_P_MAX
public static final int CAPTURETYPEATSTARTUP_P_MIN
public static final int CAPTURETYPEATSTARTUP_V_AVG_MAX
public static final int CAPTURETYPEATSTARTUP_V_AVG_MIN
public static final int CAPTURETYPEATSTARTUP_V_RMS_MAX
public static final int CAPTURETYPEATSTARTUP_V_RMS_MIN
public static final int CAPTURETYPEATSTARTUP_I_AVG_MAX
public static final int CAPTURETYPEATSTARTUP_I_AVG_MIN
public static final int CAPTURETYPEATSTARTUP_I_RMS_MAX
public static final int CAPTURETYPEATSTARTUP_I_RMS_MIN
public static final int CAPTURETYPEATSTARTUP_P_AVG_MAX
public static final int CAPTURETYPEATSTARTUP_P_AVG_MIN
public static final int CAPTURETYPEATSTARTUP_PF_MIN
public static final int CAPTURETYPEATSTARTUP_DPF_MIN
public static final int CAPTURETYPEATSTARTUP_INVALID
public static final double CONDVALUEATSTARTUP_INVALID
protected long _lastCaptureTime
protected int _nSamples
protected int _samplingRate
protected int _captureType
protected double _condValue
protected int _condAlign
protected int _captureTypeAtStartup
protected double _condValueAtStartup
protected YInputCapture.UpdateCallback _valueCallbackInputCapture
protected YInputCapture(YAPIContext ctx, String func)
func
- : functionidprotected YInputCapture(String func)
func
- : functionidprotected void _parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) throws Exception
_parseAttr
in class YFunction
Exception
public long get_lastCaptureTime() throws YAPI_Exception
YAPI_Exception
- on errorpublic long getLastCaptureTime() throws YAPI_Exception
YAPI_Exception
- on errorpublic int get_nSamples() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getNSamples() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_nSamples(int newval) throws YAPI_Exception
newval
- : an integer corresponding to the type of automatic conditional captureYAPI_Exception
- on errorpublic int setNSamples(int newval) throws YAPI_Exception
newval
- : an integer corresponding to the type of automatic conditional captureYAPI_Exception
- on errorpublic int get_samplingRate() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getSamplingRate() throws YAPI_Exception
YAPI_Exception
- on errorpublic int get_captureType() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getCaptureType() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_captureType(int newval) throws YAPI_Exception
newval
- : a value among YInputCapture.CAPTURETYPE_NONE, YInputCapture.CAPTURETYPE_TIMED,
YInputCapture.CAPTURETYPE_V_MAX, YInputCapture.CAPTURETYPE_V_MIN, YInputCapture.CAPTURETYPE_I_MAX,
YInputCapture.CAPTURETYPE_I_MIN, YInputCapture.CAPTURETYPE_P_MAX, YInputCapture.CAPTURETYPE_P_MIN,
YInputCapture.CAPTURETYPE_V_AVG_MAX, YInputCapture.CAPTURETYPE_V_AVG_MIN,
YInputCapture.CAPTURETYPE_V_RMS_MAX, YInputCapture.CAPTURETYPE_V_RMS_MIN,
YInputCapture.CAPTURETYPE_I_AVG_MAX, YInputCapture.CAPTURETYPE_I_AVG_MIN,
YInputCapture.CAPTURETYPE_I_RMS_MAX, YInputCapture.CAPTURETYPE_I_RMS_MIN,
YInputCapture.CAPTURETYPE_P_AVG_MAX, YInputCapture.CAPTURETYPE_P_AVG_MIN,
YInputCapture.CAPTURETYPE_PF_MIN and YInputCapture.CAPTURETYPE_DPF_MIN corresponding to the type of
automatic conditional captureYAPI_Exception
- on errorpublic int setCaptureType(int newval) throws YAPI_Exception
newval
- : a value among YInputCapture.CAPTURETYPE_NONE, YInputCapture.CAPTURETYPE_TIMED,
YInputCapture.CAPTURETYPE_V_MAX, YInputCapture.CAPTURETYPE_V_MIN, YInputCapture.CAPTURETYPE_I_MAX,
YInputCapture.CAPTURETYPE_I_MIN, YInputCapture.CAPTURETYPE_P_MAX, YInputCapture.CAPTURETYPE_P_MIN,
YInputCapture.CAPTURETYPE_V_AVG_MAX, YInputCapture.CAPTURETYPE_V_AVG_MIN,
YInputCapture.CAPTURETYPE_V_RMS_MAX, YInputCapture.CAPTURETYPE_V_RMS_MIN,
YInputCapture.CAPTURETYPE_I_AVG_MAX, YInputCapture.CAPTURETYPE_I_AVG_MIN,
YInputCapture.CAPTURETYPE_I_RMS_MAX, YInputCapture.CAPTURETYPE_I_RMS_MIN,
YInputCapture.CAPTURETYPE_P_AVG_MAX, YInputCapture.CAPTURETYPE_P_AVG_MIN,
YInputCapture.CAPTURETYPE_PF_MIN and YInputCapture.CAPTURETYPE_DPF_MIN corresponding to the type of
automatic conditional captureYAPI_Exception
- on errorpublic int set_condValue(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to current threshold value for automatic
conditional captureYAPI_Exception
- on errorpublic int setCondValue(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to current threshold value for automatic
conditional captureYAPI_Exception
- on errorpublic double get_condValue() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getCondValue() throws YAPI_Exception
YAPI_Exception
- on errorpublic int get_condAlign() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getCondAlign() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_condAlign(int newval) throws YAPI_Exception
newval
- : an integer corresponding to the relative position of the trigger event within the capture windowYAPI_Exception
- on errorpublic int setCondAlign(int newval) throws YAPI_Exception
newval
- : an integer corresponding to the relative position of the trigger event within the capture windowYAPI_Exception
- on errorpublic int get_captureTypeAtStartup() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getCaptureTypeAtStartup() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_captureTypeAtStartup(int newval) throws YAPI_Exception
newval
- : a value among YInputCapture.CAPTURETYPEATSTARTUP_NONE,
YInputCapture.CAPTURETYPEATSTARTUP_TIMED, YInputCapture.CAPTURETYPEATSTARTUP_V_MAX,
YInputCapture.CAPTURETYPEATSTARTUP_V_MIN, YInputCapture.CAPTURETYPEATSTARTUP_I_MAX,
YInputCapture.CAPTURETYPEATSTARTUP_I_MIN, YInputCapture.CAPTURETYPEATSTARTUP_P_MAX,
YInputCapture.CAPTURETYPEATSTARTUP_P_MIN, YInputCapture.CAPTURETYPEATSTARTUP_V_AVG_MAX,
YInputCapture.CAPTURETYPEATSTARTUP_V_AVG_MIN, YInputCapture.CAPTURETYPEATSTARTUP_V_RMS_MAX,
YInputCapture.CAPTURETYPEATSTARTUP_V_RMS_MIN, YInputCapture.CAPTURETYPEATSTARTUP_I_AVG_MAX,
YInputCapture.CAPTURETYPEATSTARTUP_I_AVG_MIN, YInputCapture.CAPTURETYPEATSTARTUP_I_RMS_MAX,
YInputCapture.CAPTURETYPEATSTARTUP_I_RMS_MIN, YInputCapture.CAPTURETYPEATSTARTUP_P_AVG_MAX,
YInputCapture.CAPTURETYPEATSTARTUP_P_AVG_MIN, YInputCapture.CAPTURETYPEATSTARTUP_PF_MIN and
YInputCapture.CAPTURETYPEATSTARTUP_DPF_MIN corresponding to the type of automatic conditional capture
applied at device power onYAPI_Exception
- on errorpublic int setCaptureTypeAtStartup(int newval) throws YAPI_Exception
newval
- : a value among YInputCapture.CAPTURETYPEATSTARTUP_NONE,
YInputCapture.CAPTURETYPEATSTARTUP_TIMED, YInputCapture.CAPTURETYPEATSTARTUP_V_MAX,
YInputCapture.CAPTURETYPEATSTARTUP_V_MIN, YInputCapture.CAPTURETYPEATSTARTUP_I_MAX,
YInputCapture.CAPTURETYPEATSTARTUP_I_MIN, YInputCapture.CAPTURETYPEATSTARTUP_P_MAX,
YInputCapture.CAPTURETYPEATSTARTUP_P_MIN, YInputCapture.CAPTURETYPEATSTARTUP_V_AVG_MAX,
YInputCapture.CAPTURETYPEATSTARTUP_V_AVG_MIN, YInputCapture.CAPTURETYPEATSTARTUP_V_RMS_MAX,
YInputCapture.CAPTURETYPEATSTARTUP_V_RMS_MIN, YInputCapture.CAPTURETYPEATSTARTUP_I_AVG_MAX,
YInputCapture.CAPTURETYPEATSTARTUP_I_AVG_MIN, YInputCapture.CAPTURETYPEATSTARTUP_I_RMS_MAX,
YInputCapture.CAPTURETYPEATSTARTUP_I_RMS_MIN, YInputCapture.CAPTURETYPEATSTARTUP_P_AVG_MAX,
YInputCapture.CAPTURETYPEATSTARTUP_P_AVG_MIN, YInputCapture.CAPTURETYPEATSTARTUP_PF_MIN and
YInputCapture.CAPTURETYPEATSTARTUP_DPF_MIN corresponding to the type of automatic conditional capture
applied at device power onYAPI_Exception
- on errorpublic int set_condValueAtStartup(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to current threshold value for automatic conditional
capture applied at device power onYAPI_Exception
- on errorpublic int setCondValueAtStartup(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to current threshold value for automatic conditional
capture applied at device power onYAPI_Exception
- on errorpublic double get_condValueAtStartup() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getCondValueAtStartup() throws YAPI_Exception
YAPI_Exception
- on errorpublic static YInputCapture FindInputCapture(String func)
func
- : a string that uniquely characterizes the instant snapshot trigger, for instance
MyDevice.inputCapture.public static YInputCapture FindInputCaptureInContext(YAPIContext yctx, String func)
yctx
- : a YAPI contextfunc
- : a string that uniquely characterizes the instant snapshot trigger, for instance
MyDevice.inputCapture.public int registerValueCallback(YInputCapture.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 YInputCaptureData get_lastCapture() throws YAPI_Exception
YAPI_Exception
- on errorpublic YInputCaptureData get_immediateCapture(int msDuration) throws YAPI_Exception
msDuration
- : duration of the capture window,
in milliseconds (eg. between 20 and 1000).YAPI_Exception
- on errorpublic YInputCapture nextInputCapture()
public static YInputCapture FirstInputCapture()
public static YInputCapture FirstInputCaptureInContext(YAPIContext yctx)
Copyright © 2023. All rights reserved.