libkovan  1
The kovan standard library
Sensor< T > Class Template Referenceabstract

The base class for all sensors of any type. More...

#include <sensor.hpp>

Public Member Functions

virtual ~Sensor ()
 
virtual T value () const =0
 

Detailed Description

template<typename T>
class Sensor< T >

The base class for all sensors of any type.

Template Parameters
TThe return type of this sensor. For example, a sensor returning true or false should be of type bool.

Constructor & Destructor Documentation

template<typename T>
virtual Sensor< T >::~Sensor ( )
inlinevirtual

Member Function Documentation

template<typename T>
virtual T Sensor< T >::value ( ) const
pure virtual

Get the current value for this sensor

Returns
The sensor's current value

Implemented in IdButton, BackEMF, Analog8, SensorLogic::Not, SensorLogic::Xor, SensorLogic::Or, SensorLogic::And, Digital, Analog, AccelZ, AccelY, and AccelX.

Referenced by AbstractButton::isPressed().


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