mirror of
https://github.com/anklimov/lighthub
synced 2025-12-09 13:19:50 +03:00
driver status, setup, stop
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user