| LightHub v4.0.0 Smarthome controller firmware

abstractch.h
Go to the documentation of this file.
1 #pragma once
2 #include "Arduino.h"
3
4 #define CST_UNKNOWN 0
5 #define CST_INITIALIZED 1
6 #define CST_FAILED 2
7
8 class abstractCh {
9 public:
10 abstractCh(){};
11 virtual ~abstractCh(){};
12 virtual int Poll(short cause) = 0;
13 virtual int Setup() =0; //Should initialize hardware and reserve resources
14 virtual int Anounce () {return 0;};
15 virtual int Stop() {return 0;}; //Should free resources
16 virtual int Status() {return CST_UNKNOWN;}
17
18
19 protected:
20 virtual int publishTopic(const char* topic, long value, const char* subtopic = NULL);
21 virtual int publishTopic(const char* topic, float value, const char* subtopic = NULL );
22 virtual int publishTopic(const char* topic, const char * value, const char* subtopic = NULL);
23 //friend Input;
24 };
abstractCh::Anounce
virtual int Anounce()
Definition: abstractch.h:14
abstractCh::Stop
virtual int Stop()
Definition: abstractch.h:15
CST_UNKNOWN
#define CST_UNKNOWN
Definition: abstractch.h:4
abstractCh
Definition: abstractch.h:8
abstractCh::abstractCh
abstractCh()
Definition: abstractch.h:10
abstractCh::Setup
virtual int Setup()=0
abstractCh::~abstractCh
virtual ~abstractCh()
Definition: abstractch.h:11
abstractCh::publishTopic
virtual int publishTopic(const char *topic, long value, const char *subtopic=NULL)
Definition: abstractch.cpp:12
abstractCh::Poll
virtual int Poll(short cause)=0
abstractCh::Status
virtual int Status()
Definition: abstractch.h:16