Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
YRefFrame Class Reference

#include <yocto_refframe.h>

Inheritance diagram for YRefFrame:
Inheritance graph
[legend]

Public Member Functions

virtual int _calibSort (int start, int stopidx)
 
virtual int _invokeValueCallback (string value)
 
double bearing (void)
 
string calibrationParam (void)
 
virtual int cancel3DCalibration (void)
 
Y_FUSIONMODE_enum fusionMode (void)
 
virtual string get_3DCalibrationHint (void)
 
virtual string get_3DCalibrationLogMsg (void)
 
virtual int get_3DCalibrationProgress (void)
 
virtual int get_3DCalibrationStage (void)
 
virtual int get_3DCalibrationStageProgress (void)
 
double get_bearing (void)
 
string get_calibrationParam (void)
 
virtual int get_calibrationState (void)
 
Y_FUSIONMODE_enum get_fusionMode (void)
 
virtual int get_measureQuality (void)
 
virtual Y_MOUNTORIENTATION get_mountOrientation (void)
 
int get_mountPos (void)
 
virtual Y_MOUNTPOSITION get_mountPosition (void)
 
virtual int more3DCalibration (void)
 
virtual int more3DCalibrationV1 (void)
 
virtual int more3DCalibrationV2 (void)
 
int mountPos (void)
 
YRefFramenext (void)
 
YRefFramenextRefFrame (void)
 
virtual int registerValueCallback (YRefFrameValueCallback callback)
 
virtual int save3DCalibration (void)
 
virtual int save3DCalibrationV1 (void)
 
virtual int save3DCalibrationV2 (void)
 
int set_bearing (double newval)
 
int set_calibrationParam (const string &newval)
 
int set_fusionMode (Y_FUSIONMODE_enum newval)
 
int set_mountPos (int newval)
 
virtual int set_mountPosition (Y_MOUNTPOSITION position, Y_MOUNTORIENTATION orientation)
 
int setBearing (double newval)
 
int setCalibrationParam (const string &newval)
 
int setFusionMode (Y_FUSIONMODE_enum newval)
 
int setMountPos (int newval)
 
virtual int start3DCalibration (void)
 
 ~YRefFrame ()
 
- Public Member Functions inherited from YFunction
void _clearDataStreamCache ()
 
string _decode_json_string (const string &json)
 
string _download (const string &url)
 
YDataStream_findDataStream (YDataSet &dataset, const string &def)
 
string _get_json_path (const string &json, const string &path)
 
vector< string > _json_get_array (const string &json)
 
string _json_get_key (const string &json, const string &data)
 
string _json_get_string (const string &json)
 
int _parseEx (yJsonStateMachine &j)
 
virtual int _parserHelper (void)
 
string _parseString (yJsonStateMachine &j)
 
string _request (const string &request)
 
string _requestEx (int tcpchan, const string &request, yapiRequestProgressCallback callback, void *context)
 
void _throw (YRETCODE errType, string errMsg)
 
YRETCODE _upload (const string &path, const string &content)
 
YRETCODE _uploadWithProgress (const string &path, const string &content, yapiRequestProgressCallback callback, void *context)
 
string advertisedValue (void)
 
void clearCache ()
 
string describe (void)
 
string errMessage (void)
 
string errorMessage (void)
 
YRETCODE errorType (void)
 
YRETCODE errType (void)
 
YFUN_DESCR functionDescriptor (void)
 
string get_advertisedValue (void)
 
string get_errorMessage (void)
 
YRETCODE get_errorType (void)
 
virtual string get_friendlyName (void)
 
YFUN_DESCR get_functionDescriptor (void)
 
string get_functionId (void)
 
string get_hardwareId (void)
 
string get_hubSerial ()
 
string get_logicalName (void)
 
YModuleget_module (void)
 
void * get_userData (void)
 
bool isOnline (void)
 
YRETCODE load (int msValidity)
 
virtual string loadAttribute (string attrName)
 
string logicalName (void)
 
YModulemodule (void)
 
virtual int muteValueCallbacks (void)
 
YFunctionnext (void)
 
YFunctionnextFunction (void)
 
virtual int registerValueCallback (YFunctionValueCallback callback)
 
int set_advertisedValue (const string &newval)
 
int set_logicalName (const string &newval)
 
void set_userData (void *data)
 
int setAdvertisedValue (const string &newval)
 
int setLogicalName (const string &newval)
 
void setUserData (void *data)
 
virtual int unmuteValueCallbacks (void)
 
void * userData (void)
 
virtual ~YFunction ()
 

Static Public Member Functions

static YRefFrameFind (string func)
 
static YRefFrameFindRefFrame (string func)
 
static YRefFrameFirst (void)
 
static YRefFrameFirstRefFrame (void)
 
- Static Public Member Functions inherited from YFunction
static void _ClearCache (void)
 
static YFunctionFind (string func)
 
static YFunctionFindFunction (string func)
 
static YFunctionFirst (void)
 
static YFunctionFirstFunction (void)
 

Static Public Attributes

static const double BEARING_INVALID = YAPI_INVALID_DOUBLE
 
static const string CALIBRATIONPARAM_INVALID = YAPI_INVALID_STRING
 
static const Y_FUSIONMODE_enum FUSIONMODE_COMPASS = Y_FUSIONMODE_COMPASS
 
static const Y_FUSIONMODE_enum FUSIONMODE_IMU = Y_FUSIONMODE_IMU
 
static const Y_FUSIONMODE_enum FUSIONMODE_INVALID = Y_FUSIONMODE_INVALID
 
static const Y_FUSIONMODE_enum FUSIONMODE_M4G = Y_FUSIONMODE_M4G
 
static const Y_FUSIONMODE_enum FUSIONMODE_NDOF = Y_FUSIONMODE_NDOF
 
static const Y_FUSIONMODE_enum FUSIONMODE_NDOF_FMC_OFF = Y_FUSIONMODE_NDOF_FMC_OFF
 
static const Y_MOUNTORIENTATION MOUNTORIENTATION_INVALID = Y_MOUNTORIENTATION_INVALID
 
static const Y_MOUNTORIENTATION MOUNTORIENTATION_NINE = Y_MOUNTORIENTATION_NINE
 
static const Y_MOUNTORIENTATION MOUNTORIENTATION_SIX = Y_MOUNTORIENTATION_SIX
 
static const Y_MOUNTORIENTATION MOUNTORIENTATION_THREE = Y_MOUNTORIENTATION_THREE
 
static const Y_MOUNTORIENTATION MOUNTORIENTATION_TWELVE = Y_MOUNTORIENTATION_TWELVE
 
static const int MOUNTPOS_INVALID = YAPI_INVALID_UINT
 
static const Y_MOUNTPOSITION MOUNTPOSITION_BOTTOM = Y_MOUNTPOSITION_BOTTOM
 
static const Y_MOUNTPOSITION MOUNTPOSITION_FRONT = Y_MOUNTPOSITION_FRONT
 
static const Y_MOUNTPOSITION MOUNTPOSITION_INVALID = Y_MOUNTPOSITION_INVALID
 
static const Y_MOUNTPOSITION MOUNTPOSITION_LEFT = Y_MOUNTPOSITION_LEFT
 
static const Y_MOUNTPOSITION MOUNTPOSITION_REAR = Y_MOUNTPOSITION_REAR
 
static const Y_MOUNTPOSITION MOUNTPOSITION_RIGHT = Y_MOUNTPOSITION_RIGHT
 
static const Y_MOUNTPOSITION MOUNTPOSITION_TOP = Y_MOUNTPOSITION_TOP
 
- Static Public Attributes inherited from YFunction
static const string ADVERTISEDVALUE_INVALID = YAPI_INVALID_STRING
 
static const string FRIENDLYNAME_INVALID = YAPI_INVALID_STRING
 
static const YFUN_DESCR FUNCTIONDESCRIPTOR_INVALID = Y_FUNCTIONDESCRIPTOR_INVALID
 
static const string FUNCTIONID_INVALID = YAPI_INVALID_STRING
 
static const string HARDWAREID_INVALID = YAPI_INVALID_STRING
 
static const string LOGICALNAME_INVALID = YAPI_INVALID_STRING
 

Protected Member Functions

virtual int _parseAttr (YJSONObject *json_val)
 
 YRefFrame (const string &func)
 
- Protected Member Functions inherited from YFunction
YRETCODE _buildSetRequest (const string &changeattr, const string *changeval, string &request, string &errmsg)
 
string _escapeAttr (const string &changeval)
 
YRETCODE _getDescriptor (YFUN_DESCR &fundescr, string &errMsg)
 
YRETCODE _getDevice (YDevice *&dev, string &errMsg)
 
YRETCODE _load_unsafe (int msValidity)
 
YRETCODE _nextFunction (string &hwId)
 
int _parse (YJSONObject *j)
 
YRETCODE _setAttr (string attrname, string newvalue)
 
 YFunction (const string &func)
 

Protected Attributes

double _bearing
 
double _calibAccXOfs
 
double _calibAccXScale
 
double _calibAccYOfs
 
double _calibAccYScale
 
double _calibAccZOfs
 
double _calibAccZScale
 
int _calibCount
 
vector< double > _calibDataAcc
 
vector< double > _calibDataAccX
 
vector< double > _calibDataAccY
 
vector< double > _calibDataAccZ
 
int _calibInternalPos
 
string _calibLogMsg
 
vector< int > _calibOrient
 
int _calibPrevTick
 
int _calibProgress
 
string _calibrationParam
 
string _calibSavedParams
 
int _calibStage
 
string _calibStageHint
 
int _calibStageProgress
 
bool _calibV2
 
Y_FUSIONMODE_enum _fusionMode
 
int _mountPos
 
YRefFrameValueCallback _valueCallbackRefFrame
 
- Protected Attributes inherited from YFunction
string _advertisedValue
 
u64 _cacheExpiration
 
string _className
 
std::map< string, YDataStream * > _dataStreams
 
string _func
 
YFUN_DESCR _fundescr
 
string _funId
 
string _hwId
 
string _lastErrorMsg
 
YRETCODE _lastErrorType
 
string _logicalName
 
string _serial
 
yCRITICAL_SECTION _this_cs
 
void * _userData
 
YFunctionValueCallback _valueCallbackFunction
 

Friends

YRefFrameyFindRefFrame (const string &func)
 
YRefFrameyFirstRefFrame (void)
 

Additional Inherited Members

- Static Protected Member Functions inherited from YFunction
static void _AddToCache (const string &classname, const string &func, YFunction *obj)
 
static YFunction_FindFromCache (const string &classname, const string &func)
 
static void _UpdateTimedReportCallbackList (YFunction *func, bool add)
 
static void _UpdateValueCallbackList (YFunction *func, bool add)
 
- Static Protected Attributes inherited from YFunction
static std::map< string, YFunction * > _cache
 

Detailed Description

YRefFrame Class: Reference frame configuration

This class is used to setup the base orientation of the Yocto-3D, so that the orientation functions, relative to the earth surface plane, use the proper reference frame. The class also implements a tridimensional sensor calibration process, which can compensate for local variations of standard gravity and improve the precision of the tilt sensors.

Definition at line 105 of file yocto_refframe.h.

Constructor & Destructor Documentation

YRefFrame::YRefFrame ( const string &  func)
protected

Definition at line 51 of file yocto_refframe.cpp.

YRefFrame::~YRefFrame ( )

Definition at line 76 of file yocto_refframe.cpp.

Member Function Documentation

int YRefFrame::_calibSort ( int  start,
int  stopidx 
)
virtual

Definition at line 516 of file yocto_refframe.cpp.

int YRefFrame::_invokeValueCallback ( string  value)
virtual

Reimplemented from YFunction.

Definition at line 365 of file yocto_refframe.cpp.

int YRefFrame::_parseAttr ( YJSONObject json_val)
protectedvirtual

Reimplemented from YFunction.

Definition at line 86 of file yocto_refframe.cpp.

double YRefFrame::bearing ( void  )
inline

Definition at line 222 of file yocto_refframe.h.

string YRefFrame::calibrationParam ( void  )
inline

Definition at line 227 of file yocto_refframe.h.

int YRefFrame::cancel3DCalibration ( void  )
virtual

Aborts the sensors tridimensional calibration process et restores normal settings.

On failure, throws an exception or returns a negative error code.

Definition at line 1026 of file yocto_refframe.cpp.

static YRefFrame* YRefFrame::Find ( string  func)
inlinestatic

Definition at line 475 of file yocto_refframe.h.

YRefFrame * YRefFrame::FindRefFrame ( string  func)
static

Retrieves a reference frame for a given identifier. The identifier can be specified using several formats:

  • FunctionLogicalName
  • ModuleSerialNumber.FunctionIdentifier
  • ModuleSerialNumber.FunctionLogicalName
  • ModuleLogicalName.FunctionIdentifier
  • ModuleLogicalName.FunctionLogicalName

This function does not require that the reference frame is online at the time it is invoked. The returned object is nevertheless valid. Use the method YRefFrame.isOnline() to test if the reference frame is indeed online at a given time. In case of ambiguity when looking for a reference frame by logical name, no error is notified: the first instance found is returned. The search is performed first by hardware name, then by logical name.

If a call to this object's is_online() method returns FALSE although you are certain that the matching device is plugged, make sure that you did call registerHub() at application initialization time.

Parameters
func: a string that uniquely characterizes the reference frame
Returns
a YRefFrame object allowing you to drive the reference frame.

Definition at line 314 of file yocto_refframe.cpp.

static YRefFrame* YRefFrame::First ( void  )
inlinestatic

Definition at line 499 of file yocto_refframe.h.

YRefFrame * YRefFrame::FirstRefFrame ( void  )
static

Starts the enumeration of reference frames currently accessible. Use the method YRefFrame.nextRefFrame() to iterate on next reference frames.

Returns
a pointer to a YRefFrame object, corresponding to the first reference frame currently online, or a NULL pointer if there are none.

Definition at line 1046 of file yocto_refframe.cpp.

Y_FUSIONMODE_enum YRefFrame::fusionMode ( void  )
inline

Definition at line 236 of file yocto_refframe.h.

string YRefFrame::get_3DCalibrationHint ( void  )
virtual

Returns instructions to proceed to the tridimensional calibration initiated with method start3DCalibration.

Returns
a character string.

Definition at line 883 of file yocto_refframe.cpp.

string YRefFrame::get_3DCalibrationLogMsg ( void  )
virtual

Returns the latest log message from the calibration process. When no new message is available, returns an empty string.

Returns
a character string.

Definition at line 927 of file yocto_refframe.cpp.

int YRefFrame::get_3DCalibrationProgress ( void  )
virtual

Returns the global process indicator for the tridimensional calibration initiated with method start3DCalibration.

Returns
an integer between 0 (not started) and 100 (stage completed).

Definition at line 894 of file yocto_refframe.cpp.

int YRefFrame::get_3DCalibrationStage ( void  )
virtual

Returns index of the current stage of the calibration initiated with method start3DCalibration.

Returns
an integer, growing each time a calibration stage is completed.

Definition at line 905 of file yocto_refframe.cpp.

int YRefFrame::get_3DCalibrationStageProgress ( void  )
virtual

Returns the process indicator for the current stage of the calibration initiated with method start3DCalibration.

Returns
an integer between 0 (not started) and 100 (stage completed).

Definition at line 916 of file yocto_refframe.cpp.

double YRefFrame::get_bearing ( void  )

Returns the reference bearing used by the compass. The relative bearing indicated by the compass is the difference between the measured magnetic heading and the reference bearing indicated here.

Returns
a floating point number corresponding to the reference bearing used by the compass

On failure, throws an exception or returns Y_BEARING_INVALID.

Definition at line 189 of file yocto_refframe.cpp.

string YRefFrame::get_calibrationParam ( void  )

Definition at line 211 of file yocto_refframe.cpp.

int YRefFrame::get_calibrationState ( void  )
virtual

Returns the 3D sensor calibration state (Yocto-3D-V2 only). This function returns an integer representing the calibration state of the 3 inertial sensors of the BNO055 chip, found in the Yocto-3D-V2. Hundredths show the calibration state of the accelerometer, tenths show the calibration state of the magnetometer while units show the calibration state of the gyroscope. For each sensor, the value 0 means no calibration and the value 3 means full calibration.

Returns
an integer representing the calibration state of Yocto-3D-V2: 333 when fully calibrated, 0 when not calibrated at all.

On failure, throws an exception or returns a negative error code. For the Yocto-3D (V1), this function always return -3 (unsupported function).

Definition at line 469 of file yocto_refframe.cpp.

Y_FUSIONMODE_enum YRefFrame::get_fusionMode ( void  )

Definition at line 249 of file yocto_refframe.cpp.

int YRefFrame::get_measureQuality ( void  )
virtual

Returns estimated quality of the orientation (Yocto-3D-V2 only). This function returns an integer between 0 and 3 representing the degree of confidence of the position estimate. When the value is 3, the estimation is reliable. Below 3, one should expect sudden corrections, in particular for heading (compass function). The most frequent causes for values below 3 are magnetic interferences, and accelerations or rotations beyond the sensor range.

Returns
an integer between 0 and 3 (3 when the measure is reliable)

On failure, throws an exception or returns a negative error code. For the Yocto-3D (V1), this function always return -3 (unsupported function).

Definition at line 499 of file yocto_refframe.cpp.

Y_MOUNTORIENTATION YRefFrame::get_mountOrientation ( void  )
virtual

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.

Returns
a value among the enumeration Y_MOUNTORIENTATION (Y_MOUNTORIENTATION_TWELVE, Y_MOUNTORIENTATION_THREE, Y_MOUNTORIENTATION_SIX, Y_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.

On failure, throws an exception or returns Y_MOUNTORIENTATION_INVALID.

Definition at line 413 of file yocto_refframe.cpp.

int YRefFrame::get_mountPos ( void  )

Definition at line 104 of file yocto_refframe.cpp.

Y_MOUNTPOSITION YRefFrame::get_mountPosition ( void  )
virtual

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.

Returns
a value among the Y_MOUNTPOSITION enumeration (Y_MOUNTPOSITION_BOTTOM, Y_MOUNTPOSITION_TOP, Y_MOUNTPOSITION_FRONT, Y_MOUNTPOSITION_RIGHT, Y_MOUNTPOSITION_REAR, Y_MOUNTPOSITION_LEFT), corresponding to the installation in a box, on one of the six faces.

On failure, throws an exception or returns Y_MOUNTPOSITION_INVALID.

Definition at line 388 of file yocto_refframe.cpp.

int YRefFrame::more3DCalibration ( void  )
virtual

Continues the sensors tridimensional calibration process previously initiated using method start3DCalibration. This method should be called approximately 5 times per second, while positioning the device according to the instructions provided by method get_3DCalibrationHint. Note that the instructions change during the calibration process.

On failure, throws an exception or returns a negative error code.

Definition at line 609 of file yocto_refframe.cpp.

int YRefFrame::more3DCalibrationV1 ( void  )
virtual

Definition at line 617 of file yocto_refframe.cpp.

int YRefFrame::more3DCalibrationV2 ( void  )
virtual

Definition at line 818 of file yocto_refframe.cpp.

int YRefFrame::mountPos ( void  )
inline

Definition at line 178 of file yocto_refframe.h.

YRefFrame* YRefFrame::next ( void  )
inline

Definition at line 486 of file yocto_refframe.h.

YRefFrame * YRefFrame::nextRefFrame ( void  )

Continues the enumeration of reference frames started using yFirstRefFrame().

Returns
a pointer to a YRefFrame object, corresponding to a reference frame currently online, or a NULL pointer if there are no more reference frames to enumerate.

Definition at line 1036 of file yocto_refframe.cpp.

int YRefFrame::registerValueCallback ( YRefFrameValueCallback  callback)
virtual

Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a NULL pointer as argument.

Parameters
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.

Definition at line 346 of file yocto_refframe.cpp.

int YRefFrame::save3DCalibration ( void  )
virtual

Applies the sensors tridimensional calibration parameters that have just been computed. Remember to call the saveToFlash() method of the module if the changes must be kept when the device is restarted.

On failure, throws an exception or returns a negative error code.

Definition at line 942 of file yocto_refframe.cpp.

int YRefFrame::save3DCalibrationV1 ( void  )
virtual

Definition at line 950 of file yocto_refframe.cpp.

int YRefFrame::save3DCalibrationV2 ( void  )
virtual

Definition at line 1016 of file yocto_refframe.cpp.

int YRefFrame::set_bearing ( double  newval)

Changes the reference bearing used by the compass. The relative bearing indicated by the compass is the difference between the measured magnetic heading and the reference bearing indicated here.

For instance, if you setup as reference bearing the value of the earth magnetic declination, the compass will provide the orientation relative to the geographic North.

Similarly, when the sensor is not mounted along the standard directions because it has an additional yaw angle, you can set this angle in the reference bearing so that the compass provides the expected natural direction.

Remember to call the saveToFlash() method of the module if the modification must be kept.

Parameters
newval: a floating point number corresponding to the reference bearing used by the compass
Returns
YAPI_SUCCESS if the call succeeds.

On failure, throws an exception or returns a negative error code.

Definition at line 164 of file yocto_refframe.cpp.

int YRefFrame::set_calibrationParam ( const string &  newval)

Definition at line 233 of file yocto_refframe.cpp.

int YRefFrame::set_fusionMode ( Y_FUSIONMODE_enum  newval)

Definition at line 271 of file yocto_refframe.cpp.

int YRefFrame::set_mountPos ( int  newval)

Definition at line 126 of file yocto_refframe.cpp.

int YRefFrame::set_mountPosition ( Y_MOUNTPOSITION  position,
Y_MOUNTORIENTATION  orientation 
)
virtual

Changes the compass and tilt sensor frame of reference. The magnetic compass and the tilt sensors (pitch and roll) naturally work in the plane parallel to the earth surface. In case the device is not installed upright and horizontally, you must select its reference orientation (parallel to the earth surface) so that the measures are made relative to this position.

Parameters
position: a value among the Y_MOUNTPOSITION enumeration (Y_MOUNTPOSITION_BOTTOM, Y_MOUNTPOSITION_TOP, Y_MOUNTPOSITION_FRONT, Y_MOUNTPOSITION_RIGHT, Y_MOUNTPOSITION_REAR, Y_MOUNTPOSITION_LEFT), corresponding to the installation in a box, on one of the six faces.
orientation: a value among the enumeration Y_MOUNTORIENTATION (Y_MOUNTORIENTATION_TWELVE, Y_MOUNTORIENTATION_THREE, Y_MOUNTORIENTATION_SIX, Y_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.

On failure, throws an exception or returns a negative error code.

Definition at line 448 of file yocto_refframe.cpp.

int YRefFrame::setBearing ( double  newval)
inline

Definition at line 208 of file yocto_refframe.h.

int YRefFrame::setCalibrationParam ( const string &  newval)
inline

Definition at line 231 of file yocto_refframe.h.

int YRefFrame::setFusionMode ( Y_FUSIONMODE_enum  newval)
inline

Definition at line 240 of file yocto_refframe.h.

int YRefFrame::setMountPos ( int  newval)
inline

Definition at line 182 of file yocto_refframe.h.

int YRefFrame::start3DCalibration ( void  )
virtual

Initiates the sensors tridimensional calibration process. This calibration is used at low level for inertial position estimation and to enhance the precision of the tilt sensors.

After calling this method, the device should be moved according to the instructions provided by method get_3DCalibrationHint, and more3DCalibration should be invoked about 5 times per second. The calibration procedure is completed when the method get_3DCalibrationProgress returns 100. At this point, the computed calibration parameters can be applied using method save3DCalibration. The calibration process can be canceled at any time using method cancel3DCalibration.

On failure, throws an exception or returns a negative error code.

Definition at line 573 of file yocto_refframe.cpp.

Friends And Related Function Documentation

YRefFrame* yFindRefFrame ( const string &  func)
friend

Retrieves a reference frame for a given identifier. The identifier can be specified using several formats:

  • FunctionLogicalName
  • ModuleSerialNumber.FunctionIdentifier
  • ModuleSerialNumber.FunctionLogicalName
  • ModuleLogicalName.FunctionIdentifier
  • ModuleLogicalName.FunctionLogicalName

This function does not require that the reference frame is online at the time it is invoked. The returned object is nevertheless valid. Use the method YRefFrame.isOnline() to test if the reference frame is indeed online at a given time. In case of ambiguity when looking for a reference frame by logical name, no error is notified: the first instance found is returned. The search is performed first by hardware name, then by logical name.

If a call to this object's is_online() method returns FALSE although you are certain that the matching device is plugged, make sure that you did call registerHub() at application initialization time.

Parameters
func: a string that uniquely characterizes the reference frame
Returns
a YRefFrame object allowing you to drive the reference frame.

Definition at line 536 of file yocto_refframe.h.

YRefFrame* yFirstRefFrame ( void  )
friend

Starts the enumeration of reference frames currently accessible. Use the method YRefFrame.nextRefFrame() to iterate on next reference frames.

Returns
a pointer to a YRefFrame object, corresponding to the first reference frame currently online, or a NULL pointer if there are none.

Definition at line 547 of file yocto_refframe.h.

Member Data Documentation

double YRefFrame::_bearing
protected

Definition at line 114 of file yocto_refframe.h.

double YRefFrame::_calibAccXOfs
protected

Definition at line 133 of file yocto_refframe.h.

double YRefFrame::_calibAccXScale
protected

Definition at line 136 of file yocto_refframe.h.

double YRefFrame::_calibAccYOfs
protected

Definition at line 134 of file yocto_refframe.h.

double YRefFrame::_calibAccYScale
protected

Definition at line 137 of file yocto_refframe.h.

double YRefFrame::_calibAccZOfs
protected

Definition at line 135 of file yocto_refframe.h.

double YRefFrame::_calibAccZScale
protected

Definition at line 138 of file yocto_refframe.h.

int YRefFrame::_calibCount
protected

Definition at line 125 of file yocto_refframe.h.

vector<double> YRefFrame::_calibDataAcc
protected

Definition at line 132 of file yocto_refframe.h.

vector<double> YRefFrame::_calibDataAccX
protected

Definition at line 129 of file yocto_refframe.h.

vector<double> YRefFrame::_calibDataAccY
protected

Definition at line 130 of file yocto_refframe.h.

vector<double> YRefFrame::_calibDataAccZ
protected

Definition at line 131 of file yocto_refframe.h.

int YRefFrame::_calibInternalPos
protected

Definition at line 126 of file yocto_refframe.h.

string YRefFrame::_calibLogMsg
protected

Definition at line 123 of file yocto_refframe.h.

vector<int> YRefFrame::_calibOrient
protected

Definition at line 128 of file yocto_refframe.h.

int YRefFrame::_calibPrevTick
protected

Definition at line 127 of file yocto_refframe.h.

int YRefFrame::_calibProgress
protected

Definition at line 122 of file yocto_refframe.h.

string YRefFrame::_calibrationParam
protected

Definition at line 115 of file yocto_refframe.h.

string YRefFrame::_calibSavedParams
protected

Definition at line 124 of file yocto_refframe.h.

int YRefFrame::_calibStage
protected

Definition at line 119 of file yocto_refframe.h.

string YRefFrame::_calibStageHint
protected

Definition at line 120 of file yocto_refframe.h.

int YRefFrame::_calibStageProgress
protected

Definition at line 121 of file yocto_refframe.h.

bool YRefFrame::_calibV2
protected

Definition at line 118 of file yocto_refframe.h.

Y_FUSIONMODE_enum YRefFrame::_fusionMode
protected

Definition at line 116 of file yocto_refframe.h.

int YRefFrame::_mountPos
protected

Definition at line 113 of file yocto_refframe.h.

YRefFrameValueCallback YRefFrame::_valueCallbackRefFrame
protected

Definition at line 117 of file yocto_refframe.h.

const double YRefFrame::BEARING_INVALID = YAPI_INVALID_DOUBLE
static

Definition at line 155 of file yocto_refframe.h.

const string YRefFrame::CALIBRATIONPARAM_INVALID = YAPI_INVALID_STRING
static

Definition at line 156 of file yocto_refframe.h.

const Y_FUSIONMODE_enum YRefFrame::FUSIONMODE_COMPASS = Y_FUSIONMODE_COMPASS
static

Definition at line 160 of file yocto_refframe.h.

const Y_FUSIONMODE_enum YRefFrame::FUSIONMODE_IMU = Y_FUSIONMODE_IMU
static

Definition at line 161 of file yocto_refframe.h.

const Y_FUSIONMODE_enum YRefFrame::FUSIONMODE_INVALID = Y_FUSIONMODE_INVALID
static

Definition at line 162 of file yocto_refframe.h.

const Y_FUSIONMODE_enum YRefFrame::FUSIONMODE_M4G = Y_FUSIONMODE_M4G
static

Definition at line 159 of file yocto_refframe.h.

const Y_FUSIONMODE_enum YRefFrame::FUSIONMODE_NDOF = Y_FUSIONMODE_NDOF
static

Definition at line 157 of file yocto_refframe.h.

const Y_FUSIONMODE_enum YRefFrame::FUSIONMODE_NDOF_FMC_OFF = Y_FUSIONMODE_NDOF_FMC_OFF
static

Definition at line 158 of file yocto_refframe.h.

const Y_MOUNTORIENTATION YRefFrame::MOUNTORIENTATION_INVALID = Y_MOUNTORIENTATION_INVALID
static

Definition at line 174 of file yocto_refframe.h.

const Y_MOUNTORIENTATION YRefFrame::MOUNTORIENTATION_NINE = Y_MOUNTORIENTATION_NINE
static

Definition at line 173 of file yocto_refframe.h.

const Y_MOUNTORIENTATION YRefFrame::MOUNTORIENTATION_SIX = Y_MOUNTORIENTATION_SIX
static

Definition at line 172 of file yocto_refframe.h.

const Y_MOUNTORIENTATION YRefFrame::MOUNTORIENTATION_THREE = Y_MOUNTORIENTATION_THREE
static

Definition at line 171 of file yocto_refframe.h.

const Y_MOUNTORIENTATION YRefFrame::MOUNTORIENTATION_TWELVE = Y_MOUNTORIENTATION_TWELVE
static

Definition at line 170 of file yocto_refframe.h.

const int YRefFrame::MOUNTPOS_INVALID = YAPI_INVALID_UINT
static

Definition at line 154 of file yocto_refframe.h.

const Y_MOUNTPOSITION YRefFrame::MOUNTPOSITION_BOTTOM = Y_MOUNTPOSITION_BOTTOM
static

Definition at line 163 of file yocto_refframe.h.

const Y_MOUNTPOSITION YRefFrame::MOUNTPOSITION_FRONT = Y_MOUNTPOSITION_FRONT
static

Definition at line 165 of file yocto_refframe.h.

const Y_MOUNTPOSITION YRefFrame::MOUNTPOSITION_INVALID = Y_MOUNTPOSITION_INVALID
static

Definition at line 169 of file yocto_refframe.h.

const Y_MOUNTPOSITION YRefFrame::MOUNTPOSITION_LEFT = Y_MOUNTPOSITION_LEFT
static

Definition at line 168 of file yocto_refframe.h.

const Y_MOUNTPOSITION YRefFrame::MOUNTPOSITION_REAR = Y_MOUNTPOSITION_REAR
static

Definition at line 166 of file yocto_refframe.h.

const Y_MOUNTPOSITION YRefFrame::MOUNTPOSITION_RIGHT = Y_MOUNTPOSITION_RIGHT
static

Definition at line 167 of file yocto_refframe.h.

const Y_MOUNTPOSITION YRefFrame::MOUNTPOSITION_TOP = Y_MOUNTPOSITION_TOP
static

Definition at line 164 of file yocto_refframe.h.


The documentation for this class was generated from the following files:


yoctopuce_altimeter
Author(s): Anja Sheppard
autogenerated on Mon Jun 10 2019 15:49:14