6#ifndef COMPONENT_TIME_HANDLING
7#define COMPONENT_TIME_HANDLING
21 return dayOfTheWeek >= 0 and dayOfTheWeek < 7 and hour >= 0 && hour < 24 && minutes >= 0 &&
minutes < 60 &&
25 int32_t as_seconds()
const;
uint32_t get_platform_time_from_target_time(const RealTime &time)
Given a real time, return the expected platform time in seconds at wich it will be reached.
Definition: time_handling.cpp:92
RealTime get_real_time()
Return a real time value, only valid if it was set first.
Definition: time_handling.cpp:90
RealTime convert_to_real_time(const uint32_t time_s)
Convert a platform time in seconds to a real time value.
Definition: time_handling.cpp:85
bool set_real_time(const RealTime &realTime)
Set the real time in the lamp, only valid until the next shutdown.
Definition: time_handling.cpp:75
Program scope.
Definition: control_fixed_modes.hpp:12
Store a real time reference.
Definition: time_handling.h:18
uint8_t minutes
minutes, in the [0; 59]
Definition: time_handling.h:30
uint8_t dayOfTheWeek
[0; 6] the index of the day of the week. Monday is 0, sunday is 6
Definition: time_handling.h:28
uint8_t hour
hour of the day, in the [0; 23]
Definition: time_handling.h:29
uint8_t seconds
seconds, in the [0; 59]
Definition: time_handling.h:31