hueplusplus
1.0.0
|
Time interval repeated daily to weekly. More...
#include <hueplusplus/TimePattern.h>
Public Member Functions | |
TimeInterval (clock::duration start, clock::duration end, Weekdays days=Weekdays::all()) | |
Create time interval. More... | |
clock::duration | getStartTime () const |
Get start time of the interval. More... | |
clock::duration | getEndTime () const |
Get end time of the interval. More... | |
Weekdays | getWeekdays () const |
Get active days. More... | |
std::string | toString () const |
Get formatted string as expected by Hue API. More... | |
Time interval repeated daily to weekly.
Can be used to represent an interval of time on one or multiple days per week. The maximum interval length is 23 hours.
hueplusplus::time::TimeInterval::TimeInterval | ( | clock::duration | start, |
clock::duration | end, | ||
Weekdays | days = Weekdays::all() |
||
) |
Create time interval.
start | Start time, duration from the start of the day |
end | End time, duration from the start of the day |
days | Active days, optional. Defaults to daily repetition. |
system_clock::duration hueplusplus::time::TimeInterval::getEndTime | ( | ) | const |
Get end time of the interval.
system_clock::duration hueplusplus::time::TimeInterval::getStartTime | ( | ) | const |
Get start time of the interval.
Weekdays hueplusplus::time::TimeInterval::getWeekdays | ( | ) | const |
Get active days.
std::string hueplusplus::time::TimeInterval::toString | ( | ) | const |
Get formatted string as expected by Hue API.
hh:mm:ss
/Thh:mm:ss
, with start time first and end time second. bbb
/Thh:mm:ss
/Thh:mm:ss