com.yoctopuce.YoctoAPI
public class YTilt extends YSensor
Modifier and Type | Class and Description |
---|---|
static interface |
YTilt.TimedReportCallback
TimedReportCallback for Tilt
|
static interface |
YTilt.UpdateCallback
Deprecated UpdateCallback for Tilt
|
Modifier and Type | Field and Description |
---|---|
protected int |
_axis |
protected YTilt.TimedReportCallback |
_timedReportCallbackTilt |
protected YTilt.UpdateCallback |
_valueCallbackTilt |
static int |
AXIS_INVALID |
static int |
AXIS_X
invalid axis value
|
static int |
AXIS_Y |
static int |
AXIS_Z |
_calhdl, _calibrationParam, _calpar, _calraw, _calref, _caltyp, _currentRawValue, _currentValue, _decexp, _highestValue, _iresol, _isScal, _logFrequency, _lowestValue, _offset, _prevTimedReport, _reportFrequency, _resolution, _scale, _timedReportCallbackSensor, _unit, _valueCallbackSensor, CALIBRATIONPARAM_INVALID, CURRENTRAWVALUE_INVALID, CURRENTVALUE_INVALID, HIGHESTVALUE_INVALID, LOGFREQUENCY_INVALID, LOWESTVALUE_INVALID, REPORTFREQUENCY_INVALID, RESOLUTION_INVALID, UNIT_INVALID
_advertisedValue, _cacheExpiration, _className, _dataStreams, _func, _funId, _hwId, _lastErrorMsg, _lastErrorType, _logicalName, _serial, _userData, _valueCallbackFunction, ADVERTISEDVALUE_INVALID, FUNCTIONDESCRIPTOR_INVALID, LOGICALNAME_INVALID
Modifier and Type | Method and Description |
---|---|
int |
_invokeTimedReportCallback(YMeasure value) |
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(org.json.JSONObject json_val) |
static YTilt |
FindTilt(String func)
Retrieves a tilt sensor for a given identifier.
|
static YTilt |
FirstTilt()
Starts the enumeration of tilt sensors currently accessible.
|
int |
get_axis() |
int |
getAxis() |
YTilt |
nextTilt()
Continues the enumeration of tilt sensors started using yFirstTilt().
|
int |
registerTimedReportCallback(YTilt.TimedReportCallback callback)
Registers the callback function that is invoked on every periodic timed notification.
|
int |
registerValueCallback(YTilt.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
_applyCalibration, _decodeAvg, _decodeTimedReport, _decodeVal, _encodeCalibrationPoints, _parserHelper, calibrateFromPoints, FindSensor, FirstSensor, get_calibrationParam, get_currentRawValue, get_currentValue, get_highestValue, get_logFrequency, get_lowestValue, get_recordedData, get_reportFrequency, get_resolution, get_unit, getCalibrationParam, getCurrentRawValue, getCurrentValue, getHighestValue, getLogFrequency, getLowestValue, getReportFrequency, getResolution, getUnit, loadCalibrationPoints, nextSensor, registerTimedReportCallback, registerValueCallback, set_calibrationParam, set_highestValue, set_logFrequency, set_lowestValue, set_reportFrequency, set_resolution, setCalibrationParam, setHighestValue, setLogFrequency, setLowestValue, setReportFrequency, setResolution
_AddToCache, _devRequest, _download, _FindFromCache, _json_get_array, _json_get_key, _json_get_string, _parse, _setAttr, _throw, _UpdateTimedReportCallbackList, _UpdateValueCallbackList, _upload, _upload, describe, errMessage, errorMessage, errorType, errType, FindFunction, FirstFunction, 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, module, nextFunction, registerValueCallback, set_logicalName, set_userData, setLogicalName, setUserData, toString, userData
public static final int AXIS_X
public static final int AXIS_Y
public static final int AXIS_Z
public static final int AXIS_INVALID
protected int _axis
protected YTilt.UpdateCallback _valueCallbackTilt
protected YTilt.TimedReportCallback _timedReportCallbackTilt
protected YTilt(String func)
func
- : functionidprotected void _parseAttr(org.json.JSONObject json_val) throws org.json.JSONException
_parseAttr
in class YSensor
org.json.JSONException
public int get_axis() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getAxis() throws YAPI_Exception
YAPI_Exception
- on errorpublic static YTilt FindTilt(String func)
func
- : a string that uniquely characterizes the tilt sensorpublic int registerValueCallback(YTilt.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 YSensor
public int registerTimedReportCallback(YTilt.TimedReportCallback 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 an YMeasure object describing
the new advertised value.public int _invokeTimedReportCallback(YMeasure value)
_invokeTimedReportCallback
in class YSensor
public YTilt nextTilt()
public static YTilt FirstTilt()
Copyright © 2014. All rights reserved.