-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDccExCommandManager.cpp
More file actions
52 lines (42 loc) · 1.36 KB
/
Copy pathDccExCommandManager.cpp
File metadata and controls
52 lines (42 loc) · 1.36 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
47
48
49
50
51
52
#include "DccExCommandManager.h"
void DccExCommandManager::connect(const String& connectionUrl) {
// Add DccEx connection code here using the connectionUrl
}
void DccExCommandManager::disconnect() {
// Add DccEx disconnection code here
}
void DccExCommandManager::sendCommand(const String& command) {
// Add DccEx command handling code here
}
void DccExCommandManager::sendSpeedCommand(int speed) {
// Add DccEx speed handling code here
}
void DccExCommandManager::sendBrakeCommand(int brake) {
// Add DccEx brake handling code here
}
void DccExCommandManager::sendFrontLightsCommand(LightStatus status) {
// Add DccEx front lights handling code here
}
void DccExCommandManager::sendBackLightsCommand(LightStatus status) {
// Add DccEx back lights handling code here
}
void DccExCommandManager::sendBellCommand(bool active) {
// Add DccEx bell handling code here
}
void DccExCommandManager::sendHornCommand(bool active) {
// Add DccEx horn handling code here
}
String DccExCommandManager::lightStatusToString(LightStatus status) {
switch (status) {
case LightStatus::OFF:
return "OFF";
case LightStatus::DIMM:
return "DIMM";
case LightStatus::BRIGHT:
return "BRIGHT";
case LightStatus::DITCHES:
return "DITCHES";
default:
return "UNKNOWN";
}
}