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

Go to the source code of this file.

Classes

class  YWakeUpMonitor
 

Macros

#define _Y_WAKEUPREASON_ENUM
 
#define _Y_WAKEUPSTATE_ENUM
 
#define Y_NEXTWAKEUP_INVALID   (YAPI_INVALID_LONG)
 
#define Y_POWERDURATION_INVALID   (YAPI_INVALID_INT)
 
#define Y_RTCTIME_INVALID   (YAPI_INVALID_LONG)
 
#define Y_SLEEPCOUNTDOWN_INVALID   (YAPI_INVALID_INT)
 

Typedefs

typedef void(* YWakeUpMonitorValueCallback) (YWakeUpMonitor *func, const string &functionValue)
 

Enumerations

enum  Y_WAKEUPREASON_enum {
  Y_WAKEUPREASON_USBPOWER = 0, Y_WAKEUPREASON_EXTPOWER = 1, Y_WAKEUPREASON_ENDOFSLEEP = 2, Y_WAKEUPREASON_EXTSIG1 = 3,
  Y_WAKEUPREASON_SCHEDULE1 = 4, Y_WAKEUPREASON_SCHEDULE2 = 5, Y_WAKEUPREASON_INVALID = -1
}
 
enum  Y_WAKEUPSTATE_enum { Y_WAKEUPSTATE_SLEEPING = 0, Y_WAKEUPSTATE_AWAKE = 1, Y_WAKEUPSTATE_INVALID = -1 }
 

Functions

YWakeUpMonitoryFindWakeUpMonitor (const string &func)
 
YWakeUpMonitoryFirstWakeUpMonitor (void)
 

Macro Definition Documentation

#define _Y_WAKEUPREASON_ENUM

Definition at line 56 of file yocto_wakeupmonitor.h.

#define _Y_WAKEUPSTATE_ENUM

Definition at line 68 of file yocto_wakeupmonitor.h.

#define Y_NEXTWAKEUP_INVALID   (YAPI_INVALID_LONG)

Definition at line 77 of file yocto_wakeupmonitor.h.

#define Y_POWERDURATION_INVALID   (YAPI_INVALID_INT)

Definition at line 75 of file yocto_wakeupmonitor.h.

#define Y_RTCTIME_INVALID   (YAPI_INVALID_LONG)

Definition at line 78 of file yocto_wakeupmonitor.h.

#define Y_SLEEPCOUNTDOWN_INVALID   (YAPI_INVALID_INT)

Definition at line 76 of file yocto_wakeupmonitor.h.

Typedef Documentation

typedef void(* YWakeUpMonitorValueCallback) (YWakeUpMonitor *func, const string &functionValue)

Definition at line 54 of file yocto_wakeupmonitor.h.

Enumeration Type Documentation

Enumerator
Y_WAKEUPREASON_USBPOWER 
Y_WAKEUPREASON_EXTPOWER 
Y_WAKEUPREASON_ENDOFSLEEP 
Y_WAKEUPREASON_EXTSIG1 
Y_WAKEUPREASON_SCHEDULE1 
Y_WAKEUPREASON_SCHEDULE2 
Y_WAKEUPREASON_INVALID 

Definition at line 57 of file yocto_wakeupmonitor.h.

Enumerator
Y_WAKEUPSTATE_SLEEPING 
Y_WAKEUPSTATE_AWAKE 
Y_WAKEUPSTATE_INVALID 

Definition at line 69 of file yocto_wakeupmonitor.h.

Function Documentation

YWakeUpMonitor* yFindWakeUpMonitor ( const string &  func)
inline

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

Definition at line 405 of file yocto_wakeupmonitor.h.

YWakeUpMonitor* yFirstWakeUpMonitor ( void  )
inline

Starts the enumeration of monitors currently accessible. Use the method YWakeUpMonitor.nextWakeUpMonitor() to iterate on next monitors.

Returns
a pointer to a YWakeUpMonitor object, corresponding to the first monitor currently online, or a NULL pointer if there are none.

Definition at line 416 of file yocto_wakeupmonitor.h.



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