-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoopHandler.hpp
More file actions
33 lines (26 loc) · 772 Bytes
/
Copy pathLoopHandler.hpp
File metadata and controls
33 lines (26 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef LOOPHANDLER_HPP
#define LOOPHANDLER_HPP
#include "systemincludes.h"
class GroupBundle;
class LoopHandler {
public:
// constructor
LoopHandler(GroupBundle *bundle, bool debugOutput) : m_bundle(bundle), m_debugOutput(debugOutput), m_errorState(false) {}
// public method to start loop handling
void loop();
// retrieve error state
bool isError() { return m_errorState; }
protected:
// internal loop method for subclasses
virtual void loopInternal() = 0;
// set error state, log message and highlight error LED
void error(String message);
protected:
// group bundle pointer
GroupBundle *m_bundle;
// debug output desired?
bool m_debugOutput;
// the error state
bool m_errorState;
};
#endif