forked from flash62au/DccExController
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathThrottle.h
29 lines (26 loc) · 783 Bytes
/
Throttle.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
#include <Arduino.h>
#include <DCCEXProtocol.h>
class Throttle {
public:
Throttle(DCCEXProtocol* dccexProtocol);
void addLoco(Loco* loco, Facing facing);
void removeLoco(Loco* loco);
void removeLoco(int address);
void removeAllLocos();
Consist* getConsist();
int getLocoCount();
Loco* getByAddress(int address);
ConsistLoco* getConLocoByAddress(int address);
ConsistLoco* getFirst();
ConsistLoco* getLocoAtPosition(int index);
void setSpeed(int speed);
Direction getDirection();
void setDirection(Direction direction);
Facing getLocoFacing(int address);
void setLocoFacing(int address, Facing facing);
void setFunction(Loco* loco, int function, boolean state);
void process();
private:
DCCEXProtocol* _dccexProtocol;
Consist* _consist;
};