upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
tb7300.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 #include <map>
28 
29 #include "bacnetmstp.hpp"
30 #include "bacnetutil.hpp"
31 
32 namespace upm {
33 
92  class TB7300 : public BACNETUTIL {
93  public:
94 
95  // Supported Analog Value Objects. These are readable and writable.
96  typedef enum : uint32_t {
97  AV_Room_Temperature = 7,
98 
99  // GRP 20 Control Output
100  AV_PI_Heating_Demand = 21,
101  AV_PI_Cooling_Demand = 22,
102 
103  // GRP 38 Temperature Setpoints
104  AV_Occupied_Heat_Setpoint = 39,
105  AV_Occupied_Cool_Setpoint = 40,
106  AV_Standby_Heat_Setpoint = 41,
107  AV_Standby_Cool_Setpoint = 42,
108  AV_Unoccupied_Heat_Setpoint = 43,
109  AV_Unoccupied_Cool_Setpoint = 44,
110 
111  // GRP 55 General Options 2
112  AV_Password_Value = 56,
113  AV_Heating_Setpoint_Limit = 58,
114  AV_Cooling_Setpoint_Limit = 59,
115  AV_Deadband = 63,
116  AV_Standby_Time = 67,
117  AV_Unoccupied_Time = 68
118  } ANALOG_VALUES_T;
119 
120  // Supported Analog Input Objects. These are read only.
121  typedef enum : uint32_t {
122  AI_Supply_Temperature = 12
123  } ANALOG_INPUTS_T;
124 
125  // Supported Binary Value Objects. These are readable and writable.
126  typedef enum : uint32_t {
127  BV_Temp_Override = 8,
128  BV_Aux_Command = 14,
129 
130  // GRP 45 General Options 1
131  BV_Menu_Scroll = 49,
132  BV_Auto_Mode_Enable = 50,
133  BV_Temperature_Scale = 51,
134 
135  // GRP 55 General Option 2
136  BV_Setpoint_Type = 60,
137  BV_Setpoint_Function = 61,
138  BV_Reheat_Timebase = 64,
139  BV_Auto_Fan = 66,
140 
141  // GRP 74 Output Configuration Options
142  BV_Control_type = 75,
143  BV_Direct_Reverse_Acting = 78
144  } BINARY_VALUES_T;
145 
146  // Supported Binary Input Objects. These are read only.
147  typedef enum : uint32_t {
148  // GRP 24 Controller Status
149  BI_AUX_Status = 25,
150  BI_BI1_Status = 29,
151  BI_BI2_Status = 30,
152  BI_UI3_Status = 31,
153  BI_Local_Motion = 32,
154 
155  // GRP 34 Controller Alarms
156  BI_Window_Alarm = 35,
157  BI_Filter_Alarm = 36,
158  BI_Service_Alarm = 37
159  } BINARY_INPUTS_T;
160 
161  // Supported Multi-State Value Objects. These are readable and
162  // writable.
163  typedef enum : uint32_t {
164  MV_Sequence_of_Operation = 15,
165  MV_System_Mode = 16,
166  MV_Fan_Mode = 17,
167  MV_Occupancy_Command = 18,
168  MV_Keypad_Lockout = 19,
169 
170  // GRP 24 Controller Status
171  MV_Heating_Valve_Status = 26,
172  MV_Cooling_Valve_Status = 27,
173  MV_Fan_Status = 28,
174  MV_Effective_Occupancy = 33,
175 
176  // GRP 45 General Options 1
177  MV_BI1_Configuration = 46,
178  MV_BI2_Configuration = 47,
179  MV_UI1_Configuration = 48,
180  MV_Pipe_Number = 52,
181  MV_Out1_Config = 53,
182  MV_AUX_Configuration = 54,
183 
184  // GRP 55 General Option 2
185  MV_Fan_Mode_Sequence = 58,
186  MV_Temporary_Occupancy_Time = 62,
187  MV_Proportional_Band = 65,
188 
189  // GRP 74 Output Configuration Options
190  MV_Floating_Motor_Timing = 76,
191  MV_On_Off_Control_CPH = 77
192  } MULTISTATE_VALUES_T;
193 
204  TB7300(uint32_t targetDeviceObjectID);
205 
209  ~TB7300();
210 
218  void update();
219 
229  float getTemperature(bool fahrenheit=false);
230 
240  void setTemperatureScale(bool fahrenheit);
241 
247  bool getTemperatureScale();
248 
249  protected:
250  // always stored in C
251  float m_temperature;
252 
253  bool m_isTempInitialized;
254  bool m_isCelsius;
255 
256  private:
257  };
258 }
bool getTemperatureScale()
Definition: tb7300.cxx:100
Honeywell TB7300 Communicating Fan Coil Thermostat.
Definition: tb7300.hpp:92
float getTemperature(bool fahrenheit=false)
Definition: tb7300.cxx:84
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
TB7300(uint32_t targetDeviceObjectID)
Definition: tb7300.cxx:49
UPM Utility API for BACnet.
Definition: bacnetutil.hpp:50
~TB7300()
Definition: tb7300.cxx:64
void update()
Definition: tb7300.cxx:68
void setTemperatureScale(bool fahrenheit)
Definition: tb7300.cxx:92