EnOcean Link  1.14.0.0
Middleware to Connect EnOcean easily to other Projects
eoEEP_D20503.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 #ifndef EO_EEP_D20503_H
29 #define EO_EEP_D20503_H
30 
33 #include "eoD2EEProfile.h"
145 typedef enum
146 {
147  D20503_POS = 0,
148  D20503_POSCH0 = 1,
149  D20503_ANGLE = 2,
150  D20503_ANGLECH0 = 3,
151  D20503_REPO = 4,
152  D20503_LOCKMODE = 5,
153  D20503_CHAN = 6,
154  D20503_CMD = 7,
155  D20503_SASH = 8,
156  D20503_TRANS = 9,
157  D20503_LOCK1 = 10,
158  D20503_LOCK2 = 11,
159  D20503_INT_DETECT = 12,
160  D20503_SOL_PROTECT = 13,
161  D20503_TEMP_IN = 14,
162  D20503_TEMP_OUT = 15,
163  D20503_OPEN_MODE = 16,
164  D20503_SASHCH0 = 17,
165  D20503_ERROR = 18,
166 } D20503_CHANNELS;
167 
171 typedef enum
172 {
173  D20503_POS_NOCHANGE = 127,
174 } D20503_POS_ENUM;
175 typedef enum
176 {
177  D20503_ANGLE_NOCHANGE = 127,
178 } D20503_ANGLE_ENUM;
179 typedef enum
180 {
181  D20503_REPO_DIRECT_TO_POSANG = 0,
182  D20503_REPO_GO_UP_THEN_TO_POSANG = 1,
183  D20503_REPO_GO_DOWN_THEN_TO_POSANG = 2,
184 } D20503_REPO_ENUM;
185 typedef enum
186 {
187  D20503_LOCKMODE_NOCHANGE = 0,
188  D20503_LOCKMODE_BLOCK = 1,
189  D20503_LOCKMODE_ALARM = 2,
190  D20503_LOCKMODE_UNBLOCK = 7,
191 } D20503_LOCKMODE_ENUM;
192 
193 typedef enum
194 {
195  D20503_LOCK_SENSOR_WINDOW_OPEN = 0,
196  D20503_LOCK_SENSOR_WINDOW_CLOSED = 1,
197  D20503_LOCK_SENSOR_NOT_AVAILABLE = 2,
198 } D20503_LOCK_SENSOR_ENUM;
199 
200 typedef enum
201 {
202  D20503_INT_DETECT_NOT_TRIGGERED = 0,
203  D20503_INT_DETECT_TRIGGERED = 1,
204  D20503_INT_DETECT_NOT_AVAILABLE = 2,
205 } D20503_INT_DETECT_ENUM;
206 typedef enum
207 {
208  D20503_SOL_PROTECT_WITHOUT_ORIENTATION_AVAILABLE = 0,
209  D20503_SOL_PROTECT_WITH_ORIENTATION_AVAILABLE = 1,
210  D20503_SOL_PROTECT_WITH_ELECTROCHROMIC_GLASS_AVAILABE = 2,
211 } D20503_SOL_PROTECT_ENUM;
212 typedef enum
213 {
214  D20503_OPEN_MODE_AUTOMODE = 0,
215  D20503_OPEN_MODE_MANUAL_OVERRIDE = 1,
216 } D20503_OPEN_MODE_ENUM;
217 typedef enum
218 {
219  D20503_SASH_NOT_AVAILABLE = 127,
220 } D20503_SASH_ENUM;
221 typedef enum
222 {
223  D20503_ERROR_NONE = 0,
224  D20503_ERROR_CURRENT_KILL = 1,
225  D20503_ERROR_IGU_NOT_TINTING = 2,
226  D20503_ERROR_IGU_WARNING = 3,
227  D20503_ERROR_PARAMETER = 4,
228  D20503_ERROR_SYSTEM = 5,
229  D20503_ERROR_OPENING_MOTORIZED = 6,
230  D20503_ERROR_CLOSING_MOTORIZED = 7,
231 } D20503_ERROR_ENUM;
232 
234 typedef enum
235 {
237  D20503_CMD_GOTO = 0x01,
239  D20503_CMD_STOP = 0x02,
241  D20503_CMD_QUERY = 0x03,
243  D20503_CMD_REPLY = 0x04,
245  D20503_CMD_OPEN_MOTORIZED_WINDOW = 0x06,
247  D20503_CMD_QUERY_DATA = 0x07,
249  D20503_CMD_REPLY_DATA = 0x08,
250 } D20503_CMD_ENUM;
252 {
253 private:
254  uint8_t cmd;
255 public:
256  eoReturn SetType(uint8_t type);
257 
258  eoEEP_D20503(uint16_t size=14);
259  virtual ~eoEEP_D20503();
260  virtual eoReturn Parse(const eoMessage &msg);
261 
262  virtual eoReturn SetValue(CHANNEL_TYPE type, uint32_t value, uint8_t index);
268  virtual eoReturn SetLength(uint8_t type);
269  virtual eoReturn SetCommand(uint8_t cmd);
270 };
273 #endif // !eoEEP_D20503
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
eoReturn SetType(uint8_t type)
eoReturn
contains all the return values from different functions
Definition: eoApiDef.h:40
The class to handle eoEEP_D20503.
Definition: eoEEP_D20503.h:251
virtual eoReturn SetLength(uint8_t type)
EnOcean Equipment Profiles.
Definition: eoD2EEProfile.h:96
CHANNEL_TYPE
Definition: eoChannelEnums.h:169
virtual eoReturn SetCommand(uint8_t cmd)
virtual eoReturn Parse(const eoMessage &msg)
Parses a msg using learned in Profile from Device.