-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMasterStation.h
49 lines (38 loc) · 999 Bytes
/
MasterStation.h
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
47
48
49
/*
* MasterStation.h
*
* Created on: Jan 30, 2013
* Author: Matheus (X-warrior) Bratfisch ([email protected])
*/
#ifndef MASTERSTATION_H_
#define MASTERSTATION_H_
#include "GenericStation.h"
#include "config.h"
template <class MESSAGE_TYPE>
class MasterStation: public GenericStation<MESSAGE_TYPE> {
private:
void startup();
protected:
uint8_t canTalkTo[10][5];
uint8_t levels[10];
uint8_t talkingTo[10][4];
uint8_t lastParent;
long lastAskConfig;
public:
MasterStation();
virtual ~MasterStation();
MasterStation(uint8_t ce, uint8_t csn);
void receivedWhoListen(MESSAGE_TYPE p);
void receivedIListen(MESSAGE_TYPE p);
void receivedAskConfig(MESSAGE_TYPE p);
void receivedSetConfig(MESSAGE_TYPE p);
uint8_t getParent(MESSAGE_TYPE p);
uint8_t freePipes(uint8_t id);
uint8_t getLevel(uint8_t id);
void testMessage();
bool write(MESSAGE_TYPE p);
uint8_t nextId;
int update(MESSAGE_TYPE p[5]);
};
#include "MasterStation-impl.h"
#endif /* MASTERSTATION_H_ */