4#include "include/types.hpp"
5#include "include/list.hpp"
6#include "include/timer.hpp"
7#include "include/helper.hpp"
102 void *userData{
nullptr };
107 virtual void updateReading(
bool act )
noexcept = 0;
108 virtual void evaluateState(
void )
noexcept = 0;
109 virtual bool isValidConfig(
void )
const noexcept = 0;
110 virtual void setInitalState(
void )
noexcept = 0;
111 inline void dispatchEvent(
event e )
noexcept
120 channel( uint8_t channelNumber ) : number( channelNumber ) {}
144 return ( cb != callback );
151 inline bool setChannel(
const uint8_t inputChannel )
noexcept
153 bool retValue =
false;
155 if ( inputChannel < 32U ) {
156 number = inputChannel;
176 userData = pUserData;
211 virtual uint8_t
getCount(
void )
const noexcept = 0;
231 channelStateFcn_t channelState{
nullptr };
232 bool negate{
false };
234 uint8_t pulsationCount{ 0 };
235 void updateReading(
bool act )
noexcept override;
236 void setInitalState(
void )
noexcept override;
237 bool isValidConfig(
void )
const noexcept override
241 void evaluateState(
void )
noexcept override
243 channelState( *
this );
290 return pulsationCount;
299 return ( &value != ptrValue );
318 bool unShare(
void )
noexcept override
336 channelStateFcn_t channelState{
nullptr };
346 void updateReading(
bool act )
noexcept override;
347 void setInitalState(
void )
noexcept override;
348 bool isValidConfig(
void )
const noexcept override
350 return ( high - low ) > hysteresis;
352 void evaluateState(
void )
noexcept override
354 channelState( *
this );
378 high( upperThreshold ),
379 low( lowerThreshold ),
419 return ( &value != ptrValue );
459 list digitalChannels;
466 void operator=(
watcher const& ) =
delete;
489 debounceTime( timeDebounce ), digitalReader( rDigital ), analogReader( rAnalog ) {}
504 (void)c.setCallback( cb );
517 (void)c.setCallback( cb );
519 (void)c.setReader( fcn );
532 (void)c.setCallback( cb );
534 (void)c.setReader( fcn );
551 inline bool operator()(
void )
A list object (Generic double-linked)
Definition list.hpp:119
A list-node object (Used internally)
Definition list.hpp:62
A non-blocking Timer object.
Definition timer.hpp:26
timeCount_t duration_t
The typedef that specified an time quantity, usually expressed in milliseconds.
Definition clock.hpp:18
timeCount_t clock_t
A unsigned integer to hold ticks count. Epochs counter.
Definition clock.hpp:15
OS/Kernel interfaces.
Definition bytebuffer.hpp:7