EnOcean Link  1.14.0.0
Middleware to Connect EnOcean easily to other Projects
eoEEP_D211xx.h
1 /******************************************************************************
2  DISCLAIMER
3 
4  THIS SOFTWARE PRODUCT ("SOFTWARE") IS PROPRIETARY TO ENOCEAN GMBH, OBERHACHING,
5  GERMANY (THE "OWNER") AND IS PROTECTED BY COPYRIGHT AND INTERNATIONAL TREATIES OR
6  PROTECTED AS TRADE SECRET OR AS OTHER INTELLECTUAL PROPERTY RIGHT. ALL RIGHTS, TITLE AND
7  INTEREST IN AND TO THE SOFTWARE, INCLUDING ANY COPYRIGHT, TRADE SECRET OR ANY OTHER
8  INTELLECTUAL PROPERTY EMBODIED IN THE SOFTWARE, AND ANY RIGHTS TO REPRODUCE,
9  DISTRIBUTE, MODIFY, DISPLAY OR OTHERWISE USE THE SOFTWARE SHALL EXCLUSIVELY VEST IN THE
10  OWNER. ANY UNAUTHORIZED REPRODUCTION, DISTRIBUTION, MODIFICATION, DISPLAY OR OTHER
11  USE OF THE SOFTWARE WITHOUT THE EXPLICIT PERMISSION OF OWNER IS PROHIBITED AND WILL
12  CONSTITUTE AN INFRINGEMENT OF THE OWNER'S RIGHT AND MAY BE SUBJECT TO CIVIL OR
13  CRIMINAL SANCTION.
14 
15  THIS SOFTWARE IS PROVIDED BY THE OWNER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
16  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
17  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN PARTICULAR, THE OWNER DOES NOT WARRANT
18  THAT THE SOFTWARE SHALL BE ERROR FREE AND WORKS WITHOUT INTERRUPTION.
19 
20  IN NO EVENT SHALL THE OWNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  ******************************************************************************/
27 
28 #if !defined(eoEEP_D211_H__INCLUDED_)
29 #define eoEEP_D211_H__INCLUDED_
30 
33 #include "eoD2EEProfile.h"
87 typedef enum
89 {
91  SETPOINT_TYPE = 0x00,
93  DISPLAY_HEATING_SYMBOL = 0x01,
95  DISPLAY_COOLING_SYMBOL = 0x02,
97  DISPLAY_WINDOW_OPEN_SYMBOL = 0x03,
99  TEMP_CORRECTION = 0x04,
101  TEMP_BASEPOINT = 0x05,
103  VALID_TEMP_CORRECTION = 0x06,
105  TEL_TYPE = 0x07,
107  TEMP_NORMAL = 0x08
108 } D211_INDEX_ENUM;
109 
111 typedef enum
112 {
114  MSG_TYPE_A = 0x00,
116  MSG_TYPE_B = 0x01,
118  MSG_TYP_C = 0x02
119 } D211_MESSAGE_ID_ENUM;
120 
122 typedef enum
123 {
125  SETPOINT_TEMP_CORRECTION = 0x00,
127  SETPOINT_TEMP_SETPOINT = 0x01
128 } D211_SETPOINT_TYPE_ENUM;
129 
131 typedef enum
132 {
134  TEMP_CORRECTION_1 = 0x01,
136  TEMP_CORRECTION_2 = 0x02,
138  TEMP_CORRECTION_3 = 0x03,
140  TEMP_CORRECTION_4 = 0x04,
142  TEMP_CORRECTION_5 = 0x05,
144  TEMP_CORRECTION_6 = 0x06,
146  TEMP_CORRECTION_7 = 0x07,
148  TEMP_CORRECTION_8 = 0x08,
150  TEMP_CORRECTION_9 = 0x09,
152  TEMP_CORRECTION_10 = 0x0A
153 } D211_TEMP_CORRECTION_ENUM;
154 
156 typedef enum
157 {
159  TEL_HEARBEAT = 0x00,
161  TEL_TEMP_RELHUM_CHANGE = 0x01,
163  TEL_USER_CHANGE = 0x02
164 } D211_TEL_TYPE_ENUM;
165 
167 {
168 private:
169  uint8_t cmd;
170 
171 public:
172  eoReturn SetType(uint8_t type);
173  eoReturn Parse(const eoMessage &msg);
178  eoEEP_D211xx(uint16_t size = 10);
179  virtual ~eoEEP_D211xx();
180 
181 
182  virtual eoReturn GetValue(CHANNEL_TYPE type, uint32_t &value, uint8_t index);
183  virtual eoReturn SetValue(CHANNEL_TYPE type, uint32_t value, uint8_t index);
184 
185  virtual eoReturn SetValue(CHANNEL_TYPE type, float value, uint8_t index);
186  virtual eoReturn GetValue(CHANNEL_TYPE type, float &value, uint8_t index);
187 
193  virtual eoReturn SetLength (uint8_t command);
194  virtual eoReturn SetCommand(uint8_t cmd);
195 };
198 #endif // !defined(EA_259BDE62_FE41_490e_8B3E_427A72922C4A__INCLUDED_)
uint8_t type
Type.
Definition: eoProfile.h:69
eoMessage msg
helper function to convert bits
Definition: eoProfile.h:302
Message Class for communication.
Definition: eoMessage.h:47
virtual eoReturn SetCommand(uint8_t cmd)
The class to handle EEP D211 profiles.
Definition: eoEEP_D211xx.h:166
eoReturn Parse(const eoMessage &msg)
Parses a msg using learned in Profile from Device.
virtual eoReturn SetLength(uint8_t command)
eoReturn
contains all the return values from different functions
Definition: eoApiDef.h:40
EnOcean Equipment Profiles.
Definition: eoD2EEProfile.h:96
eoReturn SetType(uint8_t type)
CHANNEL_TYPE
Definition: eoChannelEnums.h:169
eoEEP_D211xx(uint16_t size=10)