Arduino Universal Inputs
A collection of libraries for managing/processing input devices on Arduino.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Protected Attributes | List of all members
IValueTransform Class Referenceabstract

Interface for a value transformation. More...

#include <IValueTransform.h>

Inheritance diagram for IValueTransform:
Inheritance graph
[legend]

Public Member Functions

 IValueTransform (inputanalog_t fromLow, inputanalog_t fromHigh)
 Create a new value transformation. More...
 
virtual inputanalog_t transform (inputanalog_t raw) const =0
 Perform the value transformation. More...
 

Protected Attributes

inputanalog_t m_fromLow
 Lowest input value.
 
inputanalog_t m_fromHigh
 Highest input value.
 

Detailed Description

Interface for a value transformation.

Constructor & Destructor Documentation

IValueTransform::IValueTransform ( inputanalog_t  fromLow,
inputanalog_t  fromHigh 
)
inline

Create a new value transformation.

Parameters
fromLowLowest mapped inout value
fromHighHighest mapped input value

Member Function Documentation

virtual inputanalog_t IValueTransform::transform ( inputanalog_t  raw) const
pure virtual

Perform the value transformation.

Parameters
rawValue to transform
Returns
Transformed value

Implemented in LinearTransform.


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