upm  0.8.0
Sensor/Actuator repository for libmraa (v1.1.1)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 
44  class TZEMT400 : public ozwInterface {
45  public:
46 
51  typedef enum : int {
52  INDEX_Temperature = 0,
53  INDEX_Mode = 1,
54  INDEX_Operating_State = 2,
55  INDEX_Heating_Point = 3,
56  INDEX_Cooling_Point = 4,
57  INDEX_Fan_Mode = 5,
58  INDEX_Fan_State = 6,
59  INDEX_FC_Units = 14 // F or C units
61 
69  TZEMT400(int nodeID);
70 
74  ~TZEMT400();
75 
84  float getTemperature(bool fahrenheit=false);
85 
92  std::string getMode();
93 
100  std::string getOperatingState();
101 
112  float getHeatingPointTemperature(bool fahrenheit=false);
113 
124  float getCoolingPointTemperature(bool fahrenheit=false);
125 
132  std::string getFanMode();
133 
134  /*
135  * Return a string representing the current Fan State. This
136  * is usually something like "Idle".
137  *
138  * @return a string representing the Fan State.
139  */
140  std::string getFanState();
141 
149  void update();
150 
151 
152  protected:
153  private:
154  };
155 }
UPM API for Trane TZEMT400 Z-Wave Thermostat.
Definition: tzemt400.hpp:44
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:51
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