Keeps track of the behaviours that are active on this crownstone.
Definition: cs_BehaviourStore.h:25
Helper class to manage decoupling of components.
Definition: cs_Component.h:35
Event listener.
Definition: cs_EventListener.h:17
Author: Crownstone Team Copyright: Crownstone (https://crownstone.rocks) Date: Sep 24,...
Definition: cs_Time.h:14
Definition: cs_TwilightHandler.h:17
BehaviourStore * _behaviourStore
cached reference to the behaviour store.
Definition: cs_TwilightHandler.h:75
std::optional< uint8_t > computeIntendedState(Time currentTime)
Given current time, query the behaviourstore and check if there any valid ones.
std::optional< uint8_t > _currentIntendedState
Definition: cs_TwilightHandler.h:65
bool _isActive
Is this handler active?
Definition: cs_TwilightHandler.h:70
cs_ret_code_t init() override
Initialize this class:
void handleEvent(event_t &evt) override
Computes the twilight state of this crownstone based on the stored behaviours, and then dispatches an...
bool update()
Acquires the current time and presence information.
std::optional< uint8_t > getValue()
Returns currentIntendedState.
Author: Crownstone Team Copyright: Crownstone (https://crownstone.rocks) Date: Oct 9,...
Definition: cs_Event.h:26
uint16_t cs_ret_code_t
Definition: cs_Typedefs.h:21