41 #ifndef YOCTO_WAKEUPMONITOR_H 42 #define YOCTO_WAKEUPMONITOR_H 55 #ifndef _Y_WAKEUPREASON_ENUM 56 #define _Y_WAKEUPREASON_ENUM 67 #ifndef _Y_WAKEUPSTATE_ENUM 68 #define _Y_WAKEUPSTATE_ENUM 75 #define Y_POWERDURATION_INVALID (YAPI_INVALID_INT) 76 #define Y_SLEEPCOUNTDOWN_INVALID (YAPI_INVALID_INT) 77 #define Y_NEXTWAKEUP_INVALID (YAPI_INVALID_LONG) 78 #define Y_RTCTIME_INVALID (YAPI_INVALID_LONG) 90 #pragma option push -w-8022 141 int get_powerDuration(
void);
144 {
return this->get_powerDuration(); }
156 int set_powerDuration(
int newval);
158 {
return this->set_powerDuration(newval); }
167 int get_sleepCountdown(
void);
170 {
return this->get_sleepCountdown(); }
181 int set_sleepCountdown(
int newval);
183 {
return this->set_sleepCountdown(newval); }
192 s64 get_nextWakeUp(
void);
195 {
return this->get_nextWakeUp(); }
206 int set_nextWakeUp(s64 newval);
208 {
return this->set_nextWakeUp(newval); }
222 {
return this->get_wakeUpReason(); }
234 {
return this->get_wakeUpState(); }
238 {
return this->set_wakeUpState(newval); }
240 s64 get_rtcTime(
void);
243 {
return this->get_rtcTime(); }
293 virtual int wakeUp(
void);
305 virtual int sleep(
int secBeforeSleep);
319 virtual int sleepFor(
int secUntilWakeUp,
int secBeforeSleep);
333 virtual int sleepUntil(
int wakeUpTime,
int secBeforeSleep);
341 virtual int resetSleepCountDown(
void);
356 {
return this->nextWakeUpMonitor();}
Y_WAKEUPSTATE_enum _wakeUpState
static YWakeUpMonitor * FindWakeUpMonitor(string func)
int setPowerDuration(int newval)
Y_WAKEUPSTATE_enum wakeUpState(void)
static YWakeUpMonitor * Find(string func)
#define YAPI_INVALID_LONG
int setNextWakeUp(s64 newval)
virtual int _parseAttr(YJSONObject *json_val)
int setWakeUpState(Y_WAKEUPSTATE_enum newval)
YWakeUpMonitor * next(void)
Y_WAKEUPREASON_enum _wakeUpReason
YWakeUpMonitorValueCallback _valueCallbackWakeUpMonitor
virtual int registerValueCallback(YFunctionValueCallback callback)
int setSleepCountdown(int newval)
static YWakeUpMonitor * FirstWakeUpMonitor(void)
#define YOCTO_CLASS_EXPORT
YWakeUpMonitor * yFirstWakeUpMonitor(void)
Y_WAKEUPREASON_enum wakeUpReason(void)
YWakeUpMonitor * yFindWakeUpMonitor(const string &func)
void(* YWakeUpMonitorValueCallback)(YWakeUpMonitor *func, const string &functionValue)
static YWakeUpMonitor * First(void)
virtual int _invokeValueCallback(string value)