-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRunnable.h
More file actions
47 lines (31 loc) · 1.08 KB
/
Runnable.h
File metadata and controls
47 lines (31 loc) · 1.08 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* Runnable.h
* Aggancia automaticamente in coda le classi "Runnable" durante la creazione
*/
#ifndef Runnable_h
#define Runnable_h
#include <Arduino.h>
class Runnable {
private:
static Runnable *headRunnable;
Runnable *nextRunnable;
public:
Runnable(); // Aggancia automaticamente in coda le classi "Runnable" durante la creazione
virtual void setup() = 0;
virtual void loop() = 0;
static void setupAll();
static void loopAll();
static void printAll();
//Nomi:
private:
char _simStr[2] = {0,0}; //Char usabile come Str
const char* _name; //const contenuto
public:
void setSimbol( const char aSimbol ) { _simStr[0] = aSimbol; }
void setSimStr( const char* aSimStr ) { _simStr[0] = aSimStr[0]; }
void setName ( const char* aName ) { _name = aName; }
char getSimbol() { return( _simStr[0] ); }
char* getSimStr() { return( _simStr ); }
const char* getName() { return( _name ); }
};
#endif