Solo Controller Documentation 1.0
Documentation for the Solo Controller
 
Loading...
Searching...
No Matches
Sensor Class Referenceabstract

#include <Sensor.h>

Inheritance diagram for Sensor:
ChillerTempSensor KettleTempSensor KettleVolSensor

Public Types

using sensorVal_t = float
 Type definition used by Sensor class.
 

Public Member Functions

virtual void begin (void)=0
 Initializes the sensors used by this object. Not needed if only using simulated sensor values.
 
virtual void read (void)=0
 Reads the sensor and updates the value stored within this object.
 
void simulate (void)
 Simulates a new sensor value, storing the results in this object.
 
const sensorVal_t value (void) const
 Returns the sensor value.
 

Protected Member Functions

 Sensor (sensorVal_t initialValue, sensorVal_t maxVal, sensorVal_t minVal, sensorVal_t simDelta)
 Protected constructor for Sensor.
 
 ~Sensor (void)=default
 Destroy the Sensor object.
 

Protected Attributes

sensorVal_t _value
 Most recent sensor reading.
 

Member Typedef Documentation

◆ sensorVal_t

using Sensor::sensorVal_t = float

Type definition used by Sensor class.

Constructor & Destructor Documentation

◆ Sensor()

Sensor::Sensor ( sensorVal_t initialValue,
sensorVal_t maxVal,
sensorVal_t minVal,
sensorVal_t simDelta )
inlineprotected

Protected constructor for Sensor.

Parameters
[in]initialValueInitial simulation value
[in]maxValMax simulated value
[in]minValMin simulated value
[in]simDeltaChange in value for each simulation step

◆ ~Sensor()

Sensor::~Sensor ( void )
protecteddefault

Destroy the Sensor object.

Member Function Documentation

◆ begin()

virtual void Sensor::begin ( void )
pure virtual

Initializes the sensors used by this object. Not needed if only using simulated sensor values.

Parameters
None.

Implemented in ChillerTempSensor, KettleTempSensor, and KettleVolSensor.

◆ read()

virtual void Sensor::read ( void )
pure virtual

Reads the sensor and updates the value stored within this object.

Parameters
None.

Implemented in ChillerTempSensor, KettleTempSensor, and KettleVolSensor.

◆ simulate()

void Sensor::simulate ( void )

Simulates a new sensor value, storing the results in this object.

◆ value()

const sensorVal_t Sensor::value ( void ) const
inline

Returns the sensor value.

Parameters
None.

Member Data Documentation

◆ _value

sensorVal_t Sensor::_value
protected

Most recent sensor reading.


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