Classes | Macros | Typedefs | Enumerations | Functions
yocto_proximity.h File Reference
#include "yocto_api.h"
#include <cfloat>
#include <cmath>
#include <map>
Include dependency graph for yocto_proximity.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  YProximity
 

Macros

#define _Y_ISPRESENT_ENUM
 
#define _Y_PROXIMITYREPORTMODE_ENUM
 
#define Y_DETECTIONTHRESHOLD_INVALID   (YAPI_INVALID_UINT)
 
#define Y_LASTTIMEAPPROACHED_INVALID   (YAPI_INVALID_LONG)
 
#define Y_LASTTIMEREMOVED_INVALID   (YAPI_INVALID_LONG)
 
#define Y_PULSECOUNTER_INVALID   (YAPI_INVALID_LONG)
 
#define Y_PULSETIMER_INVALID   (YAPI_INVALID_LONG)
 
#define Y_SIGNALVALUE_INVALID   (YAPI_INVALID_DOUBLE)
 

Typedefs

typedef void(* YProximityTimedReportCallback) (YProximity *func, YMeasure measure)
 
typedef void(* YProximityValueCallback) (YProximity *func, const string &functionValue)
 

Enumerations

enum  Y_ISPRESENT_enum { Y_ISPRESENT_FALSE = 0, Y_ISPRESENT_TRUE = 1, Y_ISPRESENT_INVALID = -1 }
 
enum  Y_PROXIMITYREPORTMODE_enum { Y_PROXIMITYREPORTMODE_NUMERIC = 0, Y_PROXIMITYREPORTMODE_PRESENCE = 1, Y_PROXIMITYREPORTMODE_PULSECOUNT = 2, Y_PROXIMITYREPORTMODE_INVALID = -1 }
 

Functions

YProximityyFindProximity (const string &func)
 
YProximityyFirstProximity (void)
 

Macro Definition Documentation

#define _Y_ISPRESENT_ENUM

Definition at line 58 of file yocto_proximity.h.

#define _Y_PROXIMITYREPORTMODE_ENUM

Definition at line 66 of file yocto_proximity.h.

#define Y_DETECTIONTHRESHOLD_INVALID   (YAPI_INVALID_UINT)

Definition at line 75 of file yocto_proximity.h.

#define Y_LASTTIMEAPPROACHED_INVALID   (YAPI_INVALID_LONG)

Definition at line 76 of file yocto_proximity.h.

#define Y_LASTTIMEREMOVED_INVALID   (YAPI_INVALID_LONG)

Definition at line 77 of file yocto_proximity.h.

#define Y_PULSECOUNTER_INVALID   (YAPI_INVALID_LONG)

Definition at line 78 of file yocto_proximity.h.

#define Y_PULSETIMER_INVALID   (YAPI_INVALID_LONG)

Definition at line 79 of file yocto_proximity.h.

#define Y_SIGNALVALUE_INVALID   (YAPI_INVALID_DOUBLE)

Definition at line 74 of file yocto_proximity.h.

Typedef Documentation

typedef void(* YProximityTimedReportCallback) (YProximity *func, YMeasure measure)

Definition at line 56 of file yocto_proximity.h.

typedef void(* YProximityValueCallback) (YProximity *func, const string &functionValue)

Definition at line 54 of file yocto_proximity.h.

Enumeration Type Documentation

Enumerator
Y_ISPRESENT_FALSE 
Y_ISPRESENT_TRUE 
Y_ISPRESENT_INVALID 

Definition at line 59 of file yocto_proximity.h.

Enumerator
Y_PROXIMITYREPORTMODE_NUMERIC 
Y_PROXIMITYREPORTMODE_PRESENCE 
Y_PROXIMITYREPORTMODE_PULSECOUNT 
Y_PROXIMITYREPORTMODE_INVALID 

Definition at line 67 of file yocto_proximity.h.

Function Documentation

YProximity* yFindProximity ( const string &  func)
inline

Retrieves a proximity sensor 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 proximity sensor is online at the time it is invoked. The returned object is nevertheless valid. Use the method YProximity.isOnline() to test if the proximity sensor is indeed online at a given time. In case of ambiguity when looking for a proximity sensor 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 proximity sensor
Returns
a YProximity object allowing you to drive the proximity sensor.

Definition at line 421 of file yocto_proximity.h.

YProximity* yFirstProximity ( void  )
inline

Starts the enumeration of proximity sensors currently accessible. Use the method YProximity.nextProximity() to iterate on next proximity sensors.

Returns
a pointer to a YProximity object, corresponding to the first proximity sensor currently online, or a NULL pointer if there are none.

Definition at line 432 of file yocto_proximity.h.



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