MIRA
Public Types | Public Member Functions | List of all members
SchmittTriggerHysteresis< T > Class Template Reference

Class realizing a Schmitt trigger. More...

#include <math/SchmittTriggerHysteresis.h>

Public Types

enum  State { UNKNOWN, LOW, HIGH }
 State of the trigger. More...
 

Public Member Functions

 SchmittTriggerHysteresis ()
 
 SchmittTriggerHysteresis (State state)
 
 SchmittTriggerHysteresis (const T &lower, const T &upper)
 
 SchmittTriggerHysteresis (State state, const T &lower, const T &upper)
 
template<typename Reflector >
void reflect (Reflector &r)
 
bool update (const T &value)
 Feed the next value into the trigger. More...
 
State getState () const
 Returns the state of the trigger. More...
 

Detailed Description

template<typename T>
class mira::SchmittTriggerHysteresis< T >

Class realizing a Schmitt trigger.

This is a dual threshold trigger. It is called trigger because the output retains its value until the input changes sufficiently to trigger a change. When the input is higher than a certain chosen threshold, the output is high. When the input is below a different (lower) chosen threshold, the output is low. When the input is between the two, the output retains its value.

Member Enumeration Documentation

◆ State

enum State

State of the trigger.

Enumerator
UNKNOWN 
LOW 
HIGH 

Constructor & Destructor Documentation

◆ SchmittTriggerHysteresis() [1/4]

◆ SchmittTriggerHysteresis() [2/4]

SchmittTriggerHysteresis ( State  state)
inline

◆ SchmittTriggerHysteresis() [3/4]

SchmittTriggerHysteresis ( const T &  lower,
const T &  upper 
)
inline

◆ SchmittTriggerHysteresis() [4/4]

SchmittTriggerHysteresis ( State  state,
const T &  lower,
const T &  upper 
)
inline

Member Function Documentation

◆ reflect()

void reflect ( Reflector &  r)
inline

◆ update()

bool update ( const T &  value)
inline

Feed the next value into the trigger.

Returns true if the state has changed.

◆ getState()

State getState ( ) const
inline

Returns the state of the trigger.


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