driver status, setup, stop

This commit is contained in:
2019-07-19 13:52:52 +03:00
parent a24e56e941
commit fb64394571
6 changed files with 60 additions and 8 deletions

View File

@@ -1,13 +1,19 @@
#pragma once
#include "Arduino.h"
#define CST_UNKNOWN 0
#define CST_INITIALIZED 1
class abstractCh {
public:
abstractCh(){};
virtual ~abstractCh(){};
virtual int Poll() = 0;
virtual int Setup() =0;
virtual int Setup() =0; //Should initialize hardware and reserve resources
virtual int Anounce () {};
virtual int Stop() {}; //Should free resources
virtual int Status() {return CST_UNKNOWN;}
protected:
virtual int publishTopic(char* topic, long value, char* subtopic = NULL);