source: trunk/Arduino/libraries/OT_Slave/OT_Slave.h @ 11

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

Redesign: OT_V2R2_Slave -> OT_Slave

File size: 1.1 KB
Line 
1#ifndef _OT_SLAVE_H
2#define _OT_SLAVE_H
3
4#include "Arduino.h"
5#include <opentherm.h>
6
7struct OT_Action {
8
9  OpenthermData request;
10  OpenthermData response;
11};
12
13typedef void (*OT_Action_CB)(const OT_Action&);
14
15class OT_Slave {
16
17protected:
18  static OT_Action     action;
19  OT_Action_CB  cbAction;
20  bool          chEnable;   // ch : Central Heating
21  bool          chActive;
22  float         chTemperature;
23  bool          dhwEnable;  // dhw  : Domain Hot Water
24  bool          dhwActive;
25  float         dhwTemperature;
26
27public:
28                OT_Slave ();
29
30  virtual void  begin (OT_Action_CB cbAction = 0);
31  virtual void  maintain ();
32 
33  virtual void  HandleRequest (OT_Action& action);
34  virtual void  ConfigReq (OT_Action& action);
35  virtual void  StatusReq (OT_Action& action);
36  virtual void  FaultReq (OT_Action& action);
37
38  virtual bool  CH_Enable (bool enable = true);
39  virtual bool  CH_Disable ();
40  virtual void  CH_Temperature (float);
41  virtual bool  DHW_Enable (bool enable = true);
42  virtual bool  DHW_Disable ();
43  virtual void  DHW_Temperature (float);
44
45private:
46  static void   ListenAfterResponse ();
47
48};
49
50#endif  // _OT_SLAVE_H
Note: See TracBrowser for help on using the repository browser.