#include <yocto_wakeupschedule.h>
Public Member Functions | |
virtual int | _invokeValueCallback (string value) |
int | get_hours (void) |
virtual s64 | get_minutes (void) |
int | get_minutesA (void) |
int | get_minutesB (void) |
int | get_monthDays (void) |
int | get_months (void) |
s64 | get_nextOccurence (void) |
int | get_weekDays (void) |
int | hours (void) |
int | minutesA (void) |
int | minutesB (void) |
int | monthDays (void) |
int | months (void) |
YWakeUpSchedule * | next (void) |
s64 | nextOccurence (void) |
YWakeUpSchedule * | nextWakeUpSchedule (void) |
virtual int | registerValueCallback (YWakeUpScheduleValueCallback callback) |
int | set_hours (int newval) |
virtual int | set_minutes (s64 bitmap) |
int | set_minutesA (int newval) |
int | set_minutesB (int newval) |
int | set_monthDays (int newval) |
int | set_months (int newval) |
int | set_weekDays (int newval) |
int | setHours (int newval) |
int | setMinutesA (int newval) |
int | setMinutesB (int newval) |
int | setMonthDays (int newval) |
int | setMonths (int newval) |
int | setWeekDays (int newval) |
int | weekDays (void) |
~YWakeUpSchedule () | |
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) |
YModule * | get_module (void) |
void * | get_userData (void) |
bool | isOnline (void) |
YRETCODE | load (int msValidity) |
virtual string | loadAttribute (string attrName) |
string | logicalName (void) |
YModule * | module (void) |
virtual int | muteValueCallbacks (void) |
YFunction * | next (void) |
YFunction * | nextFunction (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 YWakeUpSchedule * | Find (string func) |
static YWakeUpSchedule * | FindWakeUpSchedule (string func) |
static YWakeUpSchedule * | First (void) |
static YWakeUpSchedule * | FirstWakeUpSchedule (void) |
Static Public Member Functions inherited from YFunction | |
static void | _ClearCache (void) |
static YFunction * | Find (string func) |
static YFunction * | FindFunction (string func) |
static YFunction * | First (void) |
static YFunction * | FirstFunction (void) |
Static Public Attributes | |
static const int | HOURS_INVALID = YAPI_INVALID_UINT |
static const int | MINUTESA_INVALID = YAPI_INVALID_UINT |
static const int | MINUTESB_INVALID = YAPI_INVALID_UINT |
static const int | MONTHDAYS_INVALID = YAPI_INVALID_UINT |
static const int | MONTHS_INVALID = YAPI_INVALID_UINT |
static const s64 | NEXTOCCURENCE_INVALID = YAPI_INVALID_LONG |
static const int | WEEKDAYS_INVALID = YAPI_INVALID_UINT |
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) |
YWakeUpSchedule (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 | |
int | _hours |
int | _minutesA |
int | _minutesB |
int | _monthDays |
int | _months |
s64 | _nextOccurence |
YWakeUpScheduleValueCallback | _valueCallbackWakeUpSchedule |
int | _weekDays |
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 | |
YWakeUpSchedule * | yFindWakeUpSchedule (const string &func) |
YWakeUpSchedule * | yFirstWakeUpSchedule (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 |
YWakeUpSchedule Class: WakeUpSchedule function interface
The WakeUpSchedule function implements a wake up condition. The wake up time is specified as a set of months and/or days and/or hours and/or minutes when the wake up should happen.
Definition at line 72 of file yocto_wakeupschedule.h.
|
protected |
Definition at line 51 of file yocto_wakeupschedule.cpp.
YWakeUpSchedule::~YWakeUpSchedule | ( | ) |
Definition at line 66 of file yocto_wakeupschedule.cpp.
|
virtual |
Reimplemented from YFunction.
Definition at line 532 of file yocto_wakeupschedule.cpp.
|
protectedvirtual |
Reimplemented from YFunction.
Definition at line 74 of file yocto_wakeupschedule.cpp.
|
inlinestatic |
Definition at line 335 of file yocto_wakeupschedule.h.
|
static |
Retrieves a wake up schedule for a given identifier. The identifier can be specified using several formats:
This function does not require that the wake up schedule is online at the time it is invoked. The returned object is nevertheless valid. Use the method YWakeUpSchedule.isOnline() to test if the wake up schedule is indeed online at a given time. In case of ambiguity when looking for a wake up schedule 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.
func | : a string that uniquely characterizes the wake up schedule |
Definition at line 481 of file yocto_wakeupschedule.cpp.
|
inlinestatic |
Definition at line 359 of file yocto_wakeupschedule.h.
|
static |
Starts the enumeration of wake up schedules currently accessible. Use the method YWakeUpSchedule.nextWakeUpSchedule() to iterate on next wake up schedules.
Definition at line 581 of file yocto_wakeupschedule.cpp.
int YWakeUpSchedule::get_hours | ( | void | ) |
Returns the hours scheduled for wake up.
On failure, throws an exception or returns Y_HOURS_INVALID.
Definition at line 216 of file yocto_wakeupschedule.cpp.
|
virtual |
Returns all the minutes of each hour that are scheduled for wake up.
Definition at line 545 of file yocto_wakeupschedule.cpp.
int YWakeUpSchedule::get_minutesA | ( | void | ) |
Returns the minutes in the 00-29 interval of each hour scheduled for wake up.
On failure, throws an exception or returns Y_MINUTESA_INVALID.
Definition at line 108 of file yocto_wakeupschedule.cpp.
int YWakeUpSchedule::get_minutesB | ( | void | ) |
Returns the minutes in the 30-59 intervalof each hour scheduled for wake up.
On failure, throws an exception or returns Y_MINUTESB_INVALID.
Definition at line 162 of file yocto_wakeupschedule.cpp.
int YWakeUpSchedule::get_monthDays | ( | void | ) |
Returns the days of the month scheduled for wake up.
On failure, throws an exception or returns Y_MONTHDAYS_INVALID.
Definition at line 324 of file yocto_wakeupschedule.cpp.
int YWakeUpSchedule::get_months | ( | void | ) |
Returns the months scheduled for wake up.
On failure, throws an exception or returns Y_MONTHS_INVALID.
Definition at line 378 of file yocto_wakeupschedule.cpp.
s64 YWakeUpSchedule::get_nextOccurence | ( | void | ) |
Returns the date/time (seconds) of the next wake up occurence.
On failure, throws an exception or returns Y_NEXTOCCURENCE_INVALID.
Definition at line 432 of file yocto_wakeupschedule.cpp.
int YWakeUpSchedule::get_weekDays | ( | void | ) |
Returns the days of the week scheduled for wake up.
On failure, throws an exception or returns Y_WEEKDAYS_INVALID.
Definition at line 270 of file yocto_wakeupschedule.cpp.
|
inline |
Definition at line 170 of file yocto_wakeupschedule.h.
|
inline |
Definition at line 120 of file yocto_wakeupschedule.h.
|
inline |
Definition at line 145 of file yocto_wakeupschedule.h.
|
inline |
Definition at line 220 of file yocto_wakeupschedule.h.
|
inline |
Definition at line 245 of file yocto_wakeupschedule.h.
|
inline |
Definition at line 346 of file yocto_wakeupschedule.h.
|
inline |
Definition at line 270 of file yocto_wakeupschedule.h.
YWakeUpSchedule * YWakeUpSchedule::nextWakeUpSchedule | ( | void | ) |
Continues the enumeration of wake up schedules started using yFirstWakeUpSchedule().
Definition at line 571 of file yocto_wakeupschedule.cpp.
|
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.
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 513 of file yocto_wakeupschedule.cpp.
int YWakeUpSchedule::set_hours | ( | int | newval | ) |
Changes the hours when a wake up must take place.
newval | : an integer corresponding to the hours when a wake up must take place |
On failure, throws an exception or returns a negative error code.
Definition at line 247 of file yocto_wakeupschedule.cpp.
|
virtual |
Changes all the minutes where a wake up must take place.
bitmap | : Minutes 00-59 of each hour scheduled for wake up. |
On failure, throws an exception or returns a negative error code.
Definition at line 564 of file yocto_wakeupschedule.cpp.
int YWakeUpSchedule::set_minutesA | ( | int | newval | ) |
Changes the minutes in the 00-29 interval when a wake up must take place.
newval | : an integer corresponding to the minutes in the 00-29 interval when a wake up must take place |
On failure, throws an exception or returns a negative error code.
Definition at line 139 of file yocto_wakeupschedule.cpp.
int YWakeUpSchedule::set_minutesB | ( | int | newval | ) |
Changes the minutes in the 30-59 interval when a wake up must take place.
newval | : an integer corresponding to the minutes in the 30-59 interval when a wake up must take place |
On failure, throws an exception or returns a negative error code.
Definition at line 193 of file yocto_wakeupschedule.cpp.
int YWakeUpSchedule::set_monthDays | ( | int | newval | ) |
Changes the days of the month when a wake up must take place.
newval | : an integer corresponding to the days of the month when a wake up must take place |
On failure, throws an exception or returns a negative error code.
Definition at line 355 of file yocto_wakeupschedule.cpp.
int YWakeUpSchedule::set_months | ( | int | newval | ) |
Changes the months when a wake up must take place.
newval | : an integer corresponding to the months when a wake up must take place |
On failure, throws an exception or returns a negative error code.
Definition at line 409 of file yocto_wakeupschedule.cpp.
int YWakeUpSchedule::set_weekDays | ( | int | newval | ) |
Changes the days of the week when a wake up must take place.
newval | : an integer corresponding to the days of the week when a wake up must take place |
On failure, throws an exception or returns a negative error code.
Definition at line 301 of file yocto_wakeupschedule.cpp.
|
inline |
Definition at line 183 of file yocto_wakeupschedule.h.
|
inline |
Definition at line 133 of file yocto_wakeupschedule.h.
|
inline |
Definition at line 158 of file yocto_wakeupschedule.h.
|
inline |
Definition at line 233 of file yocto_wakeupschedule.h.
|
inline |
Definition at line 258 of file yocto_wakeupschedule.h.
|
inline |
Definition at line 208 of file yocto_wakeupschedule.h.
|
inline |
Definition at line 195 of file yocto_wakeupschedule.h.
|
friend |
Retrieves a wake up schedule for a given identifier. The identifier can be specified using several formats:
This function does not require that the wake up schedule is online at the time it is invoked. The returned object is nevertheless valid. Use the method YWakeUpSchedule.isOnline() to test if the wake up schedule is indeed online at a given time. In case of ambiguity when looking for a wake up schedule 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.
func | : a string that uniquely characterizes the wake up schedule |
Definition at line 396 of file yocto_wakeupschedule.h.
|
friend |
Starts the enumeration of wake up schedules currently accessible. Use the method YWakeUpSchedule.nextWakeUpSchedule() to iterate on next wake up schedules.
Definition at line 407 of file yocto_wakeupschedule.h.
|
protected |
Definition at line 82 of file yocto_wakeupschedule.h.
|
protected |
Definition at line 80 of file yocto_wakeupschedule.h.
|
protected |
Definition at line 81 of file yocto_wakeupschedule.h.
|
protected |
Definition at line 84 of file yocto_wakeupschedule.h.
|
protected |
Definition at line 85 of file yocto_wakeupschedule.h.
|
protected |
Definition at line 86 of file yocto_wakeupschedule.h.
|
protected |
Definition at line 87 of file yocto_wakeupschedule.h.
|
protected |
Definition at line 83 of file yocto_wakeupschedule.h.
|
static |
Definition at line 105 of file yocto_wakeupschedule.h.
|
static |
Definition at line 103 of file yocto_wakeupschedule.h.
|
static |
Definition at line 104 of file yocto_wakeupschedule.h.
|
static |
Definition at line 107 of file yocto_wakeupschedule.h.
|
static |
Definition at line 108 of file yocto_wakeupschedule.h.
|
static |
Definition at line 109 of file yocto_wakeupschedule.h.
|
static |
Definition at line 106 of file yocto_wakeupschedule.h.