@kuriousdesign/machine-sdk
Version:
Shared data types and helpers for machine-related repositories
50 lines (49 loc) • 1.87 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeviceCmds = void 0;
exports.deviceCmdToString = deviceCmdToString;
var DeviceCmds;
(function (DeviceCmds) {
DeviceCmds[DeviceCmds["NONE"] = 0] = "NONE";
DeviceCmds[DeviceCmds["RESET"] = 1] = "RESET";
DeviceCmds[DeviceCmds["STOP"] = 2] = "STOP";
DeviceCmds[DeviceCmds["CLEAR"] = 3] = "CLEAR";
DeviceCmds[DeviceCmds["KILL"] = 4] = "KILL";
DeviceCmds[DeviceCmds["PAUSE"] = 5] = "PAUSE";
DeviceCmds[DeviceCmds["UNPAUSE"] = 6] = "UNPAUSE";
DeviceCmds[DeviceCmds["START"] = 7] = "START";
DeviceCmds[DeviceCmds["TAKE_CONTROL"] = 8] = "TAKE_CONTROL";
DeviceCmds[DeviceCmds["RELEASE_CONTROL"] = 9] = "RELEASE_CONTROL";
DeviceCmds[DeviceCmds["START_RECORDING_LOGS"] = 10] = "START_RECORDING_LOGS";
DeviceCmds[DeviceCmds["STOP_RECORDING_LOGS"] = 11] = "STOP_RECORDING_LOGS";
})(DeviceCmds || (exports.DeviceCmds = DeviceCmds = {}));
function deviceCmdToString(cmd) {
switch (cmd) {
case DeviceCmds.NONE:
return "None";
case DeviceCmds.RESET:
return "Reset";
case DeviceCmds.STOP:
return "Stop";
case DeviceCmds.CLEAR:
return "Clear";
case DeviceCmds.KILL:
return "Kill";
case DeviceCmds.PAUSE:
return "Pause";
case DeviceCmds.UNPAUSE:
return "Unpause";
case DeviceCmds.START:
return "Start";
case DeviceCmds.TAKE_CONTROL:
return "Take Control";
case DeviceCmds.RELEASE_CONTROL:
return "Release Control";
case DeviceCmds.START_RECORDING_LOGS:
return "Start Recording Logs";
case DeviceCmds.STOP_RECORDING_LOGS:
return "Stop Recording Logs";
default:
return "Unknown Command";
}
}