Plaquette
 
Loading...
Searching...
No Matches
pq::Chainable Class Reference
Inheritance diagram for pq::Chainable:

Public Member Functions

virtual float get ()
 Returns value (typically between 0 and 1, may vary depending on class).
 
 operator float ()
 Object can be used directly to access its value.
 
virtual float mapTo (float toLow, float toHigh)
 Maps value to new range.
 
virtual float put (float value)
 Pushes value into the unit.
 
 operator bool ()
 Operator that allows usage in conditional expressions.
 

Static Public Member Functions

static bool analogToDigital (float f)
 Converts analog (float) value to digital (bool) value.
 
static float digitalToAnalog (bool b)
 Converts digital (bool) value to analog (float) value.
 

Member Function Documentation

◆ get()

virtual float pq::Chainable::get ( )
inlinevirtual

Returns value (typically between 0 and 1, may vary depending on class).

Reimplemented in pq::AbstractWave, pq::Chronometer, pq::DigitalUnit, pq::AnalogSource, pq::AnalogIn, pq::Ramp, pq::Smoother, pq::PivotField, and pq::TimeSliceField< COUNT >.

◆ mapTo()

virtual float pq::Chainable::mapTo ( float  toLow,
float  toHigh 
)
inlinevirtual

Maps value to new range.

This function guarantees that the value is within [toLow, toHigh]. If the unit's values are unbounded, returns get() constrained to [toLow, toHigh].

Reimplemented in pq::Normalizer, pq::DigitalUnit, pq::AnalogSource, pq::AnalogIn, pq::Ramp, pq::StreamIn, and pq::StreamOut.

◆ put()

virtual float pq::Chainable::put ( float  value)
inlinevirtual

Pushes value into the unit.

Parameters
valuethe value sent to the unit
Returns
the new value of the unit

Reimplemented in pq::Chronometer, pq::MinMaxScaler, pq::Normalizer, pq::PeakDetector, pq::DigitalUnit, pq::AnalogOut, pq::AbstractServoOut, pq::Ramp, pq::Smoother, pq::StreamOut, pq::PivotField, and pq::TimeSliceField< COUNT >.


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