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
57 inline bool check(
bool st )
noexcept
129 inline bool get()
noexcept
131 return check(prevState);
134 inline timeout_t getOnDelay()
const noexcept
138 inline timeout_t getOffDelay()
const noexcept
143 inline timeout_t getCurrent()
const noexcept
148 inline bool isWaitingOn()
noexcept
150 return !get() && waiting_on;
153 inline bool isWaitingOff()
noexcept
155 return get() && waiting_off;
158 inline bool isWaiting()
noexcept
161 return (waiting_off || waiting_on);
166 bool prevState = {
false };
167 bool state = {
false };
168 timeout_t onDelay = { 0 };
169 timeout_t offDelay = { 0 };
170 bool waiting_on = {
false };
171 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 Calibration.h:27