20#include "PassiveTimer.h"
34 DelayTimer( timeout_t on_msec, timeout_t off_msec )
noexcept:
35 onDelay(on_msec), offDelay(off_msec) {}
39 inline void set( timeout_t on_msec, timeout_t off_msec )
noexcept
49 inline void reset()
noexcept
58 inline bool check(
bool st )
noexcept
130 inline bool get()
noexcept
132 return check(prevState);
135 inline timeout_t getOnDelay()
const noexcept
139 inline timeout_t getOffDelay()
const noexcept
144 inline timeout_t getCurrent()
const noexcept
149 inline bool isWaitingOn()
noexcept
151 return !get() && waiting_on;
154 inline bool isWaitingOff()
noexcept
156 return get() && waiting_off;
159 inline bool isWaiting()
noexcept
162 return (waiting_off || waiting_on);
167 bool prevState = {
false };
168 bool state = {
false };
169 timeout_t onDelay = { 0 };
170 timeout_t offDelay = { 0 };
171 bool waiting_on = {
false };
172 bool waiting_off = {
false };
Definition DelayTimer.h:30
Пассивный таймер
Definition PassiveTimer.h:94
virtual timeout_t setTiming(timeout_t msec) noexcept override
Definition PassiveTimer.cc:59
virtual bool checkTime() const noexcept override
Definition PassiveTimer.cc:46
virtual void reset() noexcept override
Definition PassiveTimer.cc:73
virtual timeout_t getCurrent() const noexcept override
Definition PassiveTimer.cc:79
Definition AccessConfig.h:30