public class YAltitude extends YSensor
| Modifier and Type | Class and Description |
|---|---|
static interface |
YAltitude.TimedReportCallback
TimedReportCallback for Altitude
|
static interface |
YAltitude.UpdateCallback
Deprecated UpdateCallback for Altitude
|
| Modifier and Type | Field and Description |
|---|---|
protected double |
_qnh |
protected String |
_technology |
protected YAltitude.TimedReportCallback |
_timedReportCallbackAltitude |
protected YAltitude.UpdateCallback |
_valueCallbackAltitude |
static double |
QNH_INVALID
invalid qnh value
|
static String |
TECHNOLOGY_INVALID
invalid technology value
|
_advMode, _cal, _calibrationParam, _currentRawValue, _currentValue, _highestValue, _iresol, _logFrequency, _lowestValue, _prevTR, _reportFrequency, _resolution, _sensorState, _timedReportCallbackSensor, _unit, _valueCallbackSensor, ADVMODE_IMMEDIATE, ADVMODE_INVALID, ADVMODE_PERIOD_AVG, ADVMODE_PERIOD_MAX, ADVMODE_PERIOD_MIN, CALIBRATIONPARAM_INVALID, CURRENTRAWVALUE_INVALID, CURRENTVALUE_INVALID, HIGHESTVALUE_INVALID, LOGFREQUENCY_INVALID, LOWESTVALUE_INVALID, REPORTFREQUENCY_INVALID, RESOLUTION_INVALID, SENSORSTATE_INVALID, UNIT_INVALID_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 |
YAltitude(String func) |
protected |
YAltitude(YAPIContext ctx,
String func) |
| Modifier and Type | Method and Description |
|---|---|
int |
_invokeTimedReportCallback(YMeasure value) |
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) |
static YAltitude |
FindAltitude(String func)
Retrieves an altimeter for a given identifier.
|
static YAltitude |
FindAltitudeInContext(YAPIContext yctx,
String func)
Retrieves an altimeter for a given identifier in a YAPI context.
|
static YAltitude |
FirstAltitude()
Starts the enumeration of altimeters currently accessible.
|
static YAltitude |
FirstAltitudeInContext(YAPIContext yctx)
Starts the enumeration of altimeters currently accessible.
|
double |
get_qnh()
Returns the barometric pressure adjusted to sea level used to compute
the altitude (QNH).
|
String |
get_technology()
Returns the technology used by the sesnor to compute
altitude.
|
double |
getQnh()
Returns the barometric pressure adjusted to sea level used to compute
the altitude (QNH).
|
String |
getTechnology()
Returns the technology used by the sesnor to compute
altitude.
|
YAltitude |
nextAltitude()
Continues the enumeration of altimeters started using yFirstAltitude().
|
int |
registerTimedReportCallback(YAltitude.TimedReportCallback callback)
Registers the callback function that is invoked on every periodic timed notification.
|
int |
registerValueCallback(YAltitude.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
int |
set_currentValue(double newval)
Changes the current estimated altitude.
|
int |
set_qnh(double newval)
Changes the barometric pressure adjusted to sea level used to compute
the altitude (QNH).
|
int |
setCurrentValue(double newval)
Changes the current estimated altitude.
|
int |
setQnh(double newval)
Changes the barometric pressure adjusted to sea level used to compute
the altitude (QNH).
|
_applyCalibration, _decodeAvg, _decodeTimedReport, _decodeVal, _encodeCalibrationPoints, _parseCalibStr, _parserHelper, calibrateFromPoints, FindSensor, FindSensorInContext, FirstSensor, FirstSensorInContext, get_advMode, get_calibrationParam, get_currentRawValue, get_currentValue, get_dataLogger, get_highestValue, get_logFrequency, get_lowestValue, get_recordedData, get_reportFrequency, get_resolution, get_sensorState, get_unit, getAdvMode, getCurrentRawValue, getCurrentValue, getHighestValue, getLogFrequency, getLowestValue, getReportFrequency, getResolution, getSensorState, getUnit, isSensorReady, loadCalibrationPoints, nextSensor, registerTimedReportCallback, registerValueCallback, set_advMode, set_calibrationParam, set_highestValue, set_logFrequency, set_lowestValue, set_reportFrequency, set_resolution, setAdvMode, setHighestValue, setLogFrequency, setLowestValue, setReportFrequency, setResolution, startDataLogger, stopDataLogger_AddToCache, _clearDataStreamCache, _decode_json_int, _decode_json_string, _download, _escapeAttr, _FindFromCache, _FindFromCacheInContext, _get_json_path_struct, _get_json_path, _is_valid_pass, _json_get_array, _json_get_key, _json_get_string, _parse, _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, userDatapublic static final double QNH_INVALID
public static final String TECHNOLOGY_INVALID
protected double _qnh
protected String _technology
protected YAltitude.UpdateCallback _valueCallbackAltitude
protected YAltitude.TimedReportCallback _timedReportCallbackAltitude
protected YAltitude(YAPIContext ctx, String func)
func - : functionidprotected YAltitude(String func)
func - : functionidprotected void _parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val)
throws Exception
_parseAttr in class YSensorExceptionpublic int set_currentValue(double newval)
throws YAPI_Exception
newval - : a floating point number corresponding to the current estimated altitudeYAPI_Exception - on errorpublic int setCurrentValue(double newval)
throws YAPI_Exception
newval - : a floating point number corresponding to the current estimated altitudeYAPI_Exception - on errorpublic int set_qnh(double newval)
throws YAPI_Exception
newval - : a floating point number corresponding to the barometric pressure adjusted to sea
level used to compute
the altitude (QNH)YAPI_Exception - on errorpublic int setQnh(double newval)
throws YAPI_Exception
newval - : a floating point number corresponding to the barometric pressure adjusted to sea
level used to compute
the altitude (QNH)YAPI_Exception - on errorpublic double get_qnh()
throws YAPI_Exception
YAPI_Exception - on errorpublic double getQnh()
throws YAPI_Exception
YAPI_Exception - on errorpublic String get_technology() throws YAPI_Exception
YAPI_Exception - on errorpublic String getTechnology() throws YAPI_Exception
YAPI_Exception - on errorpublic static YAltitude FindAltitude(String func)
func - : a string that uniquely characterizes the altimeter, for instance
YALTIMK2.altitude.public static YAltitude FindAltitudeInContext(YAPIContext yctx, String func)
yctx - : a YAPI contextfunc - : a string that uniquely characterizes the altimeter, for instance
YALTIMK2.altitude.public int registerValueCallback(YAltitude.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 YSensorpublic int registerTimedReportCallback(YAltitude.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 YSensorpublic YAltitude nextAltitude()
public static YAltitude FirstAltitude()
public static YAltitude FirstAltitudeInContext(YAPIContext yctx)
yctx - : a YAPI context.Copyright © 2026. All rights reserved.