upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
tzemt400.hpp
1 /*
2  * Author: Jon Trulson <jtrulson@ics.com>
3  * Copyright (c) 2016 Intel Corporation.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining
6  * a copy of this software and associated documentation files (the
7  * "Software"), to deal in the Software without restriction, including
8  * without limitation the rights to use, copy, modify, merge, publish,
9  * distribute, sublicense, and/or sell copies of the Software, and to
10  * permit persons to whom the Software is furnished to do so, subject to
11  * the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be
14  * included in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 #pragma once
25 
26 #include <string>
27 
28 #include "ozwinterface.hpp"
29 
30 namespace upm {
31 
48  class TZEMT400 : public ozwInterface {
49  public:
50 
55  typedef enum : int {
56  INDEX_Temperature = 0,
57  INDEX_Mode = 1,
58  INDEX_Operating_State = 2,
59  INDEX_Heating_Point = 3,
60  INDEX_Cooling_Point = 4,
61  INDEX_Fan_Mode = 5,
62  INDEX_Fan_State = 6,
63  INDEX_FC_Units = 14 // F or C units
65 
73  TZEMT400(int nodeID);
74 
78  ~TZEMT400();
79 
88  float getTemperature(bool fahrenheit=false);
89 
96  std::string getMode();
97 
104  std::string getOperatingState();
105 
116  float getHeatingPointTemperature(bool fahrenheit=false);
117 
128  float getCoolingPointTemperature(bool fahrenheit=false);
129 
136  std::string getFanMode();
137 
138  /*
139  * Return a string representing the current Fan State. This
140  * is usually something like "Idle".
141  *
142  * @return a string representing the Fan State.
143  */
144  std::string getFanState();
145 
153  void update();
154 
155 
156  protected:
157  private:
158  };
159 }
UPM API for Trane TZEMT400 Z-Wave Thermostat.
Definition: tzemt400.hpp:48
void update()
Definition: tzemt400.cxx:138
std::string getOperatingState()
Definition: tzemt400.cxx:81
float getHeatingPointTemperature(bool fahrenheit=false)
Definition: tzemt400.cxx:86
INDEX_VALUES_T
Definition: tzemt400.hpp:55
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
float getTemperature(bool fahrenheit=false)
Definition: tzemt400.cxx:55
UPM Interface API for OpenZWave (OZW)
Definition: ozwinterface.hpp:49
TZEMT400(int nodeID)
Definition: tzemt400.cxx:46
std::string getMode()
Definition: tzemt400.cxx:76
~TZEMT400()
Definition: tzemt400.cxx:51
float getCoolingPointTemperature(bool fahrenheit=false)
Definition: tzemt400.cxx:107
std::string getFanMode()
Definition: tzemt400.cxx:128