Public Member Functions | Private Member Functions | Private Attributes

# ShThermostat Class Reference

Implements a simple thermostat. More...

`#include <shthermostat.h>`

Inheritance diagram for ShThermostat:
[legend]
Collaboration diagram for ShThermostat:
[legend]

List of all members.

## Public Member Functions
| ShThermostat ()
| Constructor of ShThermostat.
virtual | ~ShThermostat ()
virtual bool | init (QString param)
| Initialization of the plug-in.
virtual void | updatePins (const QList< ShPin > &pins)
virtual void | processMessage (ShMessagePtr message)
| Processes incoming messages (input changes).
## Private Member Functions
void | updateOutput ()
| Updates the output of thermostat plug-in.
## Private Attributes
double | mDesiredTemp
double | mMeasuredTemp
double | mHysteresis
int | mOutput

## Detailed Description

Implements a simple thermostat.

Definition at line 32 of file shthermostat.h.

## Constructor & Destructor Documentation

ShThermostat::ShThermostat | ( |  | ) |

Constructor of ShThermostat.

Definition at line 25 of file shthermostat.cpp.

References mDesiredTemp, mHysteresis, mMeasuredTemp, and mOutput.

virtual ShThermostat::~ShThermostat | ( |  | ) | `[inline, virtual]`

Definition at line 39 of file shthermostat.h.

## Member Function Documentation

bool ShThermostat::init | ( | QString | param | ) | `[virtual]`

Initialization of the plug-in.

Parameters:

  | param | Defines a thermostat hysteresis

Returns:
  true if the plug-in has been initialized successfully

Implements ShObject.

Definition at line 39 of file shthermostat.cpp.

void ShThermostat::processMessage | ( | ShMessagePtr | message | ) | `[virtual]`

Processes incoming messages (input changes).

Parameters:

  | message | Shared pointer to the message

Definition at line 68 of file shthermostat.cpp.

References ShObjectHelper::ackMessage(), ShObjectHelper::errorMessage(), mDesiredTemp, mMeasuredTemp, and updateOutput().

Here is the call graph for this function:

void ShThermostat::updateOutput | ( |  | ) | `[private]`

Updates the output of thermostat plug-in.

Definition at line 49 of file shthermostat.cpp.

References mDesiredTemp, mHysteresis, mMeasuredTemp, mOutput, and ShObjectHelper::outputUpdated().

Referenced by processMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void ShThermostat::updatePins | ( | const QList< ShPin > & | pins | ) | `[inline, virtual]`

Implements ShObject.

Definition at line 41 of file shthermostat.h.

## Member Data Documentation

double ShThermostat::mDesiredTemp`[private]`

Definition at line 47 of file shthermostat.h.

Referenced by processMessage(), ShThermostat(), and updateOutput().

double ShThermostat::mHysteresis`[private]`

Definition at line 49 of file shthermostat.h.

Referenced by ShThermostat(), and updateOutput().

double ShThermostat::mMeasuredTemp`[private]`

Definition at line 48 of file shthermostat.h.

Referenced by processMessage(), ShThermostat(), and updateOutput().

int ShThermostat::mOutput`[private]`

Definition at line 50 of file shthermostat.h.

Referenced by ShThermostat(), and updateOutput().

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

- shthermostat/shthermostat.h
- shthermostat/shthermostat.cpp

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends