@kuriousdesign/machine-sdk 1.0.23 → 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.
- package/dist/custom-types/BaseDevice/DeviceCmds.d.ts +15 -0
- package/dist/custom-types/BaseDevice/DeviceCmds.js +49 -0
- package/dist/custom-types/BaseDevice/index.d.ts +1 -0
- package/dist/custom-types/BaseDevice/index.js +1 -0
- package/package.json +1 -1
- package/src/custom-types/BaseDevice/DeviceCmds.ts +45 -0
- package/src/custom-types/BaseDevice/index.ts +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum DeviceCmds {
|
|
2
|
+
NONE = 0,
|
|
3
|
+
RESET = 1,// initializes device to idle
|
|
4
|
+
STOP = 2,// takes device from running to idle
|
|
5
|
+
CLEAR = 3,// clears faults
|
|
6
|
+
KILL = 4,// takes device to aborting then killed, holds at killed until cmd is set FALSE
|
|
7
|
+
PAUSE = 5,// pauses the current task
|
|
8
|
+
UNPAUSE = 6,// Unpauses the current task
|
|
9
|
+
START = 7,// go from idle to running
|
|
10
|
+
TAKE_CONTROL = 8,// used to request control over device
|
|
11
|
+
RELEASE_CONTROL = 9,// used to release control over device
|
|
12
|
+
START_RECORDING_LOGS = 10,// writes to Machine.RecordedLogs
|
|
13
|
+
STOP_RECORDING_LOGS = 11
|
|
14
|
+
}
|
|
15
|
+
export declare function deviceCmdToString(cmd: DeviceCmds): string;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeviceCmds = void 0;
|
|
4
|
+
exports.deviceCmdToString = deviceCmdToString;
|
|
5
|
+
var DeviceCmds;
|
|
6
|
+
(function (DeviceCmds) {
|
|
7
|
+
DeviceCmds[DeviceCmds["NONE"] = 0] = "NONE";
|
|
8
|
+
DeviceCmds[DeviceCmds["RESET"] = 1] = "RESET";
|
|
9
|
+
DeviceCmds[DeviceCmds["STOP"] = 2] = "STOP";
|
|
10
|
+
DeviceCmds[DeviceCmds["CLEAR"] = 3] = "CLEAR";
|
|
11
|
+
DeviceCmds[DeviceCmds["KILL"] = 4] = "KILL";
|
|
12
|
+
DeviceCmds[DeviceCmds["PAUSE"] = 5] = "PAUSE";
|
|
13
|
+
DeviceCmds[DeviceCmds["UNPAUSE"] = 6] = "UNPAUSE";
|
|
14
|
+
DeviceCmds[DeviceCmds["START"] = 7] = "START";
|
|
15
|
+
DeviceCmds[DeviceCmds["TAKE_CONTROL"] = 8] = "TAKE_CONTROL";
|
|
16
|
+
DeviceCmds[DeviceCmds["RELEASE_CONTROL"] = 9] = "RELEASE_CONTROL";
|
|
17
|
+
DeviceCmds[DeviceCmds["START_RECORDING_LOGS"] = 10] = "START_RECORDING_LOGS";
|
|
18
|
+
DeviceCmds[DeviceCmds["STOP_RECORDING_LOGS"] = 11] = "STOP_RECORDING_LOGS";
|
|
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
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export enum DeviceCmds {
|
|
2
|
+
NONE = 0,
|
|
3
|
+
RESET = 1, // initializes device to idle
|
|
4
|
+
STOP = 2, // takes device from running to idle
|
|
5
|
+
CLEAR = 3, // clears faults
|
|
6
|
+
KILL = 4, // takes device to aborting then killed, holds at killed until cmd is set FALSE
|
|
7
|
+
PAUSE = 5, // pauses the current task
|
|
8
|
+
UNPAUSE = 6, // Unpauses the current task
|
|
9
|
+
START = 7, // go from idle to running
|
|
10
|
+
TAKE_CONTROL = 8, // used to request control over device
|
|
11
|
+
RELEASE_CONTROL = 9, // used to release control over device
|
|
12
|
+
START_RECORDING_LOGS = 10, // writes to Machine.RecordedLogs
|
|
13
|
+
STOP_RECORDING_LOGS = 11
|
|
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
|
+
}
|