upm  1.1.0
Sensor/Actuator repository for libmraa (v1.5.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 
46  class TZEMT400 : public ozwInterface {
47  public:
48 
53  typedef enum : int {
54  INDEX_Temperature = 0,
55  INDEX_Mode = 1,
56  INDEX_Operating_State = 2,
57  INDEX_Heating_Point = 3,
58  INDEX_Cooling_Point = 4,
59  INDEX_Fan_Mode = 5,
60  INDEX_Fan_State = 6,
61  INDEX_FC_Units = 14 // F or C units
63 
71  TZEMT400(int nodeID);
72 
76  ~TZEMT400();
77 
86  float getTemperature(bool fahrenheit=false);
87 
94  std::string getMode();
95 
102  std::string getOperatingState();
103 
114  float getHeatingPointTemperature(bool fahrenheit=false);
115 
126  float getCoolingPointTemperature(bool fahrenheit=false);
127 
134  std::string getFanMode();
135 
136  /*
137  * Return a string representing the current Fan State. This
138  * is usually something like "Idle".
139  *
140  * @return a string representing the Fan State.
141  */
142  std::string getFanState();
143 
151  void update();
152 
153 
154  protected:
155  private:
156  };
157 }
UPM API for Trane TZEMT400 Z-Wave Thermostat.
Definition: tzemt400.hpp:46
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:53
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