@kuriousdesign/machine-sdk 1.0.24 → 1.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DeviceCmds = void 0;
|
|
4
|
+
exports.deviceCmdToString = deviceCmdToString;
|
|
4
5
|
var DeviceCmds;
|
|
5
6
|
(function (DeviceCmds) {
|
|
6
7
|
DeviceCmds[DeviceCmds["NONE"] = 0] = "NONE";
|
|
@@ -16,3 +17,33 @@ var DeviceCmds;
|
|
|
16
17
|
DeviceCmds[DeviceCmds["START_RECORDING_LOGS"] = 10] = "START_RECORDING_LOGS";
|
|
17
18
|
DeviceCmds[DeviceCmds["STOP_RECORDING_LOGS"] = 11] = "STOP_RECORDING_LOGS";
|
|
18
19
|
})(DeviceCmds || (exports.DeviceCmds = DeviceCmds = {}));
|
|
20
|
+
function deviceCmdToString(cmd) {
|
|
21
|
+
switch (cmd) {
|
|
22
|
+
case DeviceCmds.NONE:
|
|
23
|
+
return "None";
|
|
24
|
+
case DeviceCmds.RESET:
|
|
25
|
+
return "Reset";
|
|
26
|
+
case DeviceCmds.STOP:
|
|
27
|
+
return "Stop";
|
|
28
|
+
case DeviceCmds.CLEAR:
|
|
29
|
+
return "Clear";
|
|
30
|
+
case DeviceCmds.KILL:
|
|
31
|
+
return "Kill";
|
|
32
|
+
case DeviceCmds.PAUSE:
|
|
33
|
+
return "Pause";
|
|
34
|
+
case DeviceCmds.UNPAUSE:
|
|
35
|
+
return "Unpause";
|
|
36
|
+
case DeviceCmds.START:
|
|
37
|
+
return "Start";
|
|
38
|
+
case DeviceCmds.TAKE_CONTROL:
|
|
39
|
+
return "Take Control";
|
|
40
|
+
case DeviceCmds.RELEASE_CONTROL:
|
|
41
|
+
return "Release Control";
|
|
42
|
+
case DeviceCmds.START_RECORDING_LOGS:
|
|
43
|
+
return "Start Recording Logs";
|
|
44
|
+
case DeviceCmds.STOP_RECORDING_LOGS:
|
|
45
|
+
return "Stop Recording Logs";
|
|
46
|
+
default:
|
|
47
|
+
return "Unknown Command";
|
|
48
|
+
}
|
|
49
|
+
}
|
package/package.json
CHANGED
|
@@ -11,4 +11,35 @@ export enum DeviceCmds {
|
|
|
11
11
|
RELEASE_CONTROL = 9, // used to release control over device
|
|
12
12
|
START_RECORDING_LOGS = 10, // writes to Machine.RecordedLogs
|
|
13
13
|
STOP_RECORDING_LOGS = 11
|
|
14
|
-
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function deviceCmdToString(cmd: DeviceCmds): string {
|
|
17
|
+
switch (cmd) {
|
|
18
|
+
case DeviceCmds.NONE:
|
|
19
|
+
return "None";
|
|
20
|
+
case DeviceCmds.RESET:
|
|
21
|
+
return "Reset";
|
|
22
|
+
case DeviceCmds.STOP:
|
|
23
|
+
return "Stop";
|
|
24
|
+
case DeviceCmds.CLEAR:
|
|
25
|
+
return "Clear";
|
|
26
|
+
case DeviceCmds.KILL:
|
|
27
|
+
return "Kill";
|
|
28
|
+
case DeviceCmds.PAUSE:
|
|
29
|
+
return "Pause";
|
|
30
|
+
case DeviceCmds.UNPAUSE:
|
|
31
|
+
return "Unpause";
|
|
32
|
+
case DeviceCmds.START:
|
|
33
|
+
return "Start";
|
|
34
|
+
case DeviceCmds.TAKE_CONTROL:
|
|
35
|
+
return "Take Control";
|
|
36
|
+
case DeviceCmds.RELEASE_CONTROL:
|
|
37
|
+
return "Release Control";
|
|
38
|
+
case DeviceCmds.START_RECORDING_LOGS:
|
|
39
|
+
return "Start Recording Logs";
|
|
40
|
+
case DeviceCmds.STOP_RECORDING_LOGS:
|
|
41
|
+
return "Stop Recording Logs";
|
|
42
|
+
default:
|
|
43
|
+
return "Unknown Command";
|
|
44
|
+
}
|
|
45
|
+
}
|