source: trunk/Arduino/libraries/ot_slave_2/ot_slave_2.h @ 8

Last change on this file since 8 was 8, checked in by markus, 7 years ago

Prototype for network based monitoring

File size: 1.1 KB
Line 
1#ifndef _OT_SLAVE_2_H
2#define _OT_SLAVE_2_H
3
4#include "Arduino.h"
5#include <opentherm.h>
6
7typedef void (*OT_Data_CB)(const OpenthermData&);
8
9class OT_V2R2_Slave {
10
11protected:
12  static OpenthermData  message;
13  OT_Data_CB            cbPostReq;
14  bool                  chEnable;
15  bool                  chActive;
16  float                 chTemperature;
17  bool                  dhwEnable;
18  bool                  dhwActive;
19  float                 dhwTemperature;
20 
21
22public:
23  OT_V2R2_Slave (OT_Data_CB cbPostReq = 0);
24
25  virtual void  Setup ();
26  virtual void  Loop ();
27 
28  virtual void  HandleRequest (OpenthermData& message);
29  virtual void  ConfigReq (OpenthermData& message);
30  virtual void  StatusReq (OpenthermData& message);
31  virtual void  FaultReq (OpenthermData& message);
32
33  virtual bool  CH_Enable (bool enable = true);
34  virtual bool  CH_Disable ();
35  virtual void  CH_Temperature (float);
36  virtual bool  DHW_Enable (bool enable = true);
37  virtual bool  DHW_Disable ();
38  virtual void  DHW_Temperature (float);
39
40private:
41  static void ListenAfterResponse ();
42
43};
44
45#endif  // _OT_SLAVE_2_H
Note: See TracBrowser for help on using the repository browser.