QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
QGC::EdgeTriggeredCounter< CountT > Class Template Reference

#include <EdgeTriggeredCounter.h>

Public Member Functions

 EdgeTriggeredCounter (CountT threshold)
 
bool record ()
 Returns true on the rising-edge crossing into >= threshold.
 
void reset ()
 
CountT count () const
 
bool armed () const
 

Detailed Description

template<typename CountT = uint8_t>
class QGC::EdgeTriggeredCounter< CountT >

Edge-triggered consecutive-event counter. record() returns true exactly once when the count crosses threshold on the rising edge; subsequent record() calls return false until reset().

Definition at line 10 of file EdgeTriggeredCounter.h.

Constructor & Destructor Documentation

◆ EdgeTriggeredCounter()

template<typename CountT = uint8_t>
QGC::EdgeTriggeredCounter< CountT >::EdgeTriggeredCounter ( CountT  threshold)
inlineexplicit

Definition at line 13 of file EdgeTriggeredCounter.h.

Member Function Documentation

◆ armed()

template<typename CountT = uint8_t>
bool QGC::EdgeTriggeredCounter< CountT >::armed ( ) const
inline

Definition at line 33 of file EdgeTriggeredCounter.h.

◆ count()

template<typename CountT = uint8_t>
CountT QGC::EdgeTriggeredCounter< CountT >::count ( ) const
inline

Definition at line 32 of file EdgeTriggeredCounter.h.

Referenced by SigningController::processFrame().

◆ record()

template<typename CountT = uint8_t>
bool QGC::EdgeTriggeredCounter< CountT >::record ( )
inline

Returns true on the rising-edge crossing into >= threshold.

Definition at line 16 of file EdgeTriggeredCounter.h.

Referenced by SigningController::processFrame().

◆ reset()

template<typename CountT = uint8_t>
void QGC::EdgeTriggeredCounter< CountT >::reset ( )
inline

The documentation for this class was generated from the following file: