public class YRefFrame extends YFunction
Modifier and Type | Class and Description |
---|---|
static class |
YRefFrame.MOUNTORIENTATION |
static class |
YRefFrame.MOUNTPOSITION |
static interface |
YRefFrame.TimedReportCallback
TimedReportCallback for RefFrame
|
static interface |
YRefFrame.UpdateCallback
Deprecated UpdateCallback for RefFrame
|
Modifier and Type | Field and Description |
---|---|
protected double |
_bearing |
protected double |
_calibAccXOfs |
protected double |
_calibAccXScale |
protected double |
_calibAccYOfs |
protected double |
_calibAccYScale |
protected double |
_calibAccZOfs |
protected double |
_calibAccZScale |
protected int |
_calibCount |
protected ArrayList<Double> |
_calibDataAcc |
protected ArrayList<Double> |
_calibDataAccX |
protected ArrayList<Double> |
_calibDataAccY |
protected ArrayList<Double> |
_calibDataAccZ |
protected int |
_calibInternalPos |
protected String |
_calibLogMsg |
protected ArrayList<Integer> |
_calibOrient |
protected int |
_calibPrevTick |
protected int |
_calibProgress |
protected String |
_calibrationParam |
protected String |
_calibSavedParams |
protected int |
_calibStage |
protected String |
_calibStageHint |
protected int |
_calibStageProgress |
protected boolean |
_calibV2 |
protected int |
_mountPos |
protected YRefFrame.UpdateCallback |
_valueCallbackRefFrame |
static double |
BEARING_INVALID
invalid bearing value
|
static String |
CALIBRATIONPARAM_INVALID
invalid calibrationParam value
|
static int |
MOUNTPOS_INVALID
invalid mountPos 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 |
YRefFrame(String func) |
protected |
YRefFrame(YAPIContext ctx,
String func) |
Modifier and Type | Method and Description |
---|---|
int |
_calibSort(int start,
int stopidx) |
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(org.json.JSONObject json_val) |
int |
cancel3DCalibration()
Aborts the sensors tridimensional calibration process et restores normal settings.
|
static YRefFrame |
FindRefFrame(String func)
Retrieves a reference frame for a given identifier.
|
static YRefFrame |
FindRefFrameInContext(YAPIContext yctx,
String func)
Retrieves a reference frame for a given identifier in a YAPI context.
|
static YRefFrame |
FirstRefFrame()
Starts the enumeration of reference frames currently accessible.
|
static YRefFrame |
FirstRefFrameInContext(YAPIContext yctx)
Starts the enumeration of reference frames currently accessible.
|
String |
get_3DCalibrationHint()
Returns instructions to proceed to the tridimensional calibration initiated with
method start3DCalibration.
|
String |
get_3DCalibrationLogMsg()
Returns the latest log message from the calibration process.
|
int |
get_3DCalibrationProgress()
Returns the global process indicator for the tridimensional calibration
initiated with method start3DCalibration.
|
int |
get_3DCalibrationStage()
Returns index of the current stage of the calibration
initiated with method start3DCalibration.
|
int |
get_3DCalibrationStageProgress()
Returns the process indicator for the current stage of the calibration
initiated with method start3DCalibration.
|
double |
get_bearing()
Returns the reference bearing used by the compass.
|
String |
get_calibrationParam() |
int |
get_calibrationState()
Returns the 3D sensor calibration state (Yocto-3D-V2 only).
|
int |
get_measureQuality()
Returns estimated quality of the orientation (Yocto-3D-V2 only).
|
YRefFrame.MOUNTORIENTATION |
get_mountOrientation()
Returns the installation orientation of the device, as configured
in order to define the reference frame for the compass and the
pitch/roll tilt sensors.
|
int |
get_mountPos() |
YRefFrame.MOUNTPOSITION |
get_mountPosition()
Returns the installation position of the device, as configured
in order to define the reference frame for the compass and the
pitch/roll tilt sensors.
|
double |
getBearing()
Returns the reference bearing used by the compass.
|
String |
getCalibrationParam() |
int |
getMountPos() |
int |
more3DCalibration()
Continues the sensors tridimensional calibration process previously
initiated using method start3DCalibration.
|
int |
more3DCalibrationV1() |
int |
more3DCalibrationV2() |
YRefFrame |
nextRefFrame()
Continues the enumeration of reference frames started using yFirstRefFrame().
|
int |
registerValueCallback(YRefFrame.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
int |
save3DCalibration()
Applies the sensors tridimensional calibration parameters that have just been computed.
|
int |
save3DCalibrationV1() |
int |
save3DCalibrationV2() |
int |
set_bearing(double newval)
Changes the reference bearing used by the compass.
|
int |
set_calibrationParam(String newval) |
int |
set_mountPos(int newval) |
int |
set_mountPosition(YRefFrame.MOUNTPOSITION position,
YRefFrame.MOUNTORIENTATION orientation)
Changes the compass and tilt sensor frame of reference.
|
int |
setBearing(double newval)
Changes the reference bearing used by the compass.
|
int |
setCalibrationParam(String newval) |
int |
setMountPos(int newval) |
int |
start3DCalibration()
Initiates the sensors tridimensional calibration process.
|
_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, setAdvertisedValue, setLogicalName, setUserData, toString, unmuteValueCallbacks, userData
public static final int MOUNTPOS_INVALID
public static final double BEARING_INVALID
public static final String CALIBRATIONPARAM_INVALID
protected int _mountPos
protected double _bearing
protected String _calibrationParam
protected YRefFrame.UpdateCallback _valueCallbackRefFrame
protected boolean _calibV2
protected int _calibStage
protected String _calibStageHint
protected int _calibStageProgress
protected int _calibProgress
protected String _calibLogMsg
protected String _calibSavedParams
protected int _calibCount
protected int _calibInternalPos
protected int _calibPrevTick
protected double _calibAccXOfs
protected double _calibAccYOfs
protected double _calibAccZOfs
protected double _calibAccXScale
protected double _calibAccYScale
protected double _calibAccZScale
protected YRefFrame(YAPIContext ctx, String func)
func
- : functionidprotected YRefFrame(String func)
func
- : functionidprotected void _parseAttr(org.json.JSONObject json_val) throws org.json.JSONException
_parseAttr
in class YFunction
org.json.JSONException
public int get_mountPos() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getMountPos() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_mountPos(int newval) throws YAPI_Exception
YAPI_Exception
public int setMountPos(int newval) throws YAPI_Exception
YAPI_Exception
public int set_bearing(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the reference bearing used by the compassYAPI_Exception
- on errorpublic int setBearing(double newval) throws YAPI_Exception
newval
- : a floating point number corresponding to the reference bearing used by the compassYAPI_Exception
- on errorpublic double get_bearing() throws YAPI_Exception
YAPI_Exception
- on errorpublic double getBearing() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_calibrationParam() throws YAPI_Exception
YAPI_Exception
- on errorpublic String getCalibrationParam() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_calibrationParam(String newval) throws YAPI_Exception
YAPI_Exception
public int setCalibrationParam(String newval) throws YAPI_Exception
YAPI_Exception
public static YRefFrame FindRefFrame(String func)
func
- : a string that uniquely characterizes the reference framepublic static YRefFrame FindRefFrameInContext(YAPIContext yctx, String func)
yctx
- : a YAPI contextfunc
- : a string that uniquely characterizes the reference framepublic int registerValueCallback(YRefFrame.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 YRefFrame.MOUNTPOSITION get_mountPosition() throws YAPI_Exception
YAPI_Exception
- on errorpublic YRefFrame.MOUNTORIENTATION get_mountOrientation() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_mountPosition(YRefFrame.MOUNTPOSITION position, YRefFrame.MOUNTORIENTATION orientation) throws YAPI_Exception
position
- : a value among the YRefFrame.MOUNTPOSITION enumeration
(YRefFrame.MOUNTPOSITION.BOTTOM, YRefFrame.MOUNTPOSITION.TOP,
YRefFrame.MOUNTPOSITION.FRONT, YRefFrame.MOUNTPOSITION.RIGHT,
YRefFrame.MOUNTPOSITION.REAR, YRefFrame.MOUNTPOSITION.LEFT),
corresponding to the installation in a box, on one of the six faces.orientation
- : a value among the enumeration YRefFrame.MOUNTORIENTATION
(YRefFrame.MOUNTORIENTATION.TWELVE, YRefFrame.MOUNTORIENTATION.THREE,
YRefFrame.MOUNTORIENTATION.SIX, YRefFrame.MOUNTORIENTATION.NINE)
corresponding to the orientation of the "X" arrow on the device,
as on a clock dial seen from an observer in the center of the box.
On the bottom face, the 12H orientation points to the front, while
on the top face, the 12H orientation points to the rear.
Remember to call the saveToFlash()
method of the module if the modification must be kept.YAPI_Exception
- on errorpublic int get_calibrationState() throws YAPI_Exception
YAPI_Exception
- on error
For the Yocto-3D (V1), this function always return -3 (unsupported function).public int get_measureQuality() throws YAPI_Exception
YAPI_Exception
- on error
For the Yocto-3D (V1), this function always return -3 (unsupported function).public int _calibSort(int start, int stopidx)
public int start3DCalibration() throws YAPI_Exception
YAPI_Exception
- on errorpublic int more3DCalibration() throws YAPI_Exception
YAPI_Exception
- on errorpublic int more3DCalibrationV1() throws YAPI_Exception
YAPI_Exception
public int more3DCalibrationV2() throws YAPI_Exception
YAPI_Exception
public String get_3DCalibrationHint()
public int get_3DCalibrationProgress()
public int get_3DCalibrationStage()
public int get_3DCalibrationStageProgress()
public String get_3DCalibrationLogMsg()
public int save3DCalibration() throws YAPI_Exception
YAPI_Exception
- on errorpublic int save3DCalibrationV1() throws YAPI_Exception
YAPI_Exception
public int save3DCalibrationV2() throws YAPI_Exception
YAPI_Exception
public int cancel3DCalibration() throws YAPI_Exception
YAPI_Exception
- on errorpublic YRefFrame nextRefFrame()
public static YRefFrame FirstRefFrame()
public static YRefFrame FirstRefFrameInContext(YAPIContext yctx)
yctx
- : a YAPI context.Copyright © 2017. All rights reserved.