@duet3d/objectmodel 3.4.0

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.
Files changed (119) hide show
  1. package/LICENSE +504 -0
  2. package/README.md +7 -0
  3. package/lib/ModelCollection.d.ts +25 -0
  4. package/lib/ModelCollection.js +79 -0
  5. package/lib/ModelDictionary.d.ts +28 -0
  6. package/lib/ModelDictionary.js +68 -0
  7. package/lib/ModelObject.d.ts +35 -0
  8. package/lib/ModelObject.js +155 -0
  9. package/lib/boards/index.d.ts +49 -0
  10. package/lib/boards/index.js +78 -0
  11. package/lib/directories/index.d.ts +11 -0
  12. package/lib/directories/index.js +17 -0
  13. package/lib/fans/index.d.ts +17 -0
  14. package/lib/fans/index.js +28 -0
  15. package/lib/heat/Heater.d.ts +24 -0
  16. package/lib/heat/Heater.js +32 -0
  17. package/lib/heat/HeaterModel.d.ts +20 -0
  18. package/lib/heat/HeaterModel.js +31 -0
  19. package/lib/heat/HeaterMonitor.d.ts +17 -0
  20. package/lib/heat/HeaterMonitor.js +26 -0
  21. package/lib/heat/index.d.ts +10 -0
  22. package/lib/heat/index.js +16 -0
  23. package/lib/httpEndpoints/index.d.ts +18 -0
  24. package/lib/httpEndpoints/index.js +26 -0
  25. package/lib/index.d.ts +44 -0
  26. package/lib/index.js +59 -0
  27. package/lib/inputs/CodeChannel.d.ts +15 -0
  28. package/lib/inputs/CodeChannel.js +19 -0
  29. package/lib/inputs/Compatibility.d.ts +9 -0
  30. package/lib/inputs/Compatibility.js +13 -0
  31. package/lib/inputs/InputChannel.d.ts +27 -0
  32. package/lib/inputs/InputChannel.js +36 -0
  33. package/lib/job/Build.d.ts +14 -0
  34. package/lib/job/Build.js +25 -0
  35. package/lib/job/GCodeFileInfo.d.ts +16 -0
  36. package/lib/job/GCodeFileInfo.js +22 -0
  37. package/lib/job/ThumbnailInfo.d.ts +14 -0
  38. package/lib/job/ThumbnailInfo.js +22 -0
  39. package/lib/job/index.d.ts +36 -0
  40. package/lib/job/index.js +52 -0
  41. package/lib/limits/index.d.ts +28 -0
  42. package/lib/limits/index.js +34 -0
  43. package/lib/messages/index.d.ts +12 -0
  44. package/lib/messages/index.js +26 -0
  45. package/lib/move/Axis.d.ts +51 -0
  46. package/lib/move/Axis.js +59 -0
  47. package/lib/move/DriverId.d.ts +7 -0
  48. package/lib/move/DriverId.js +29 -0
  49. package/lib/move/Extruder.d.ts +26 -0
  50. package/lib/move/Extruder.js +37 -0
  51. package/lib/move/InputShaping.d.ts +18 -0
  52. package/lib/move/InputShaping.js +26 -0
  53. package/lib/move/Microstepping.d.ts +5 -0
  54. package/lib/move/Microstepping.js +11 -0
  55. package/lib/move/MoveCalibration.d.ts +10 -0
  56. package/lib/move/MoveCalibration.js +21 -0
  57. package/lib/move/MoveCompensation.d.ts +29 -0
  58. package/lib/move/MoveCompensation.js +46 -0
  59. package/lib/move/index.d.ts +46 -0
  60. package/lib/move/index.js +69 -0
  61. package/lib/move/kinematics/CoreKinematics.d.ts +8 -0
  62. package/lib/move/kinematics/CoreKinematics.js +29 -0
  63. package/lib/move/kinematics/DeltaKinematics.d.ts +19 -0
  64. package/lib/move/kinematics/DeltaKinematics.js +39 -0
  65. package/lib/move/kinematics/HangprinterKinematics.d.ts +8 -0
  66. package/lib/move/kinematics/HangprinterKinematics.js +25 -0
  67. package/lib/move/kinematics/KinematicsBase.d.ts +36 -0
  68. package/lib/move/kinematics/KinematicsBase.js +55 -0
  69. package/lib/move/kinematics/PolarKinematics.d.ts +6 -0
  70. package/lib/move/kinematics/PolarKinematics.js +19 -0
  71. package/lib/move/kinematics/ScaraKinematics.d.ts +5 -0
  72. package/lib/move/kinematics/ScaraKinematics.js +16 -0
  73. package/lib/move/kinematics/index.d.ts +7 -0
  74. package/lib/move/kinematics/index.js +48 -0
  75. package/lib/network/NetworkInterface.d.ts +27 -0
  76. package/lib/network/NetworkInterface.js +36 -0
  77. package/lib/network/index.d.ts +12 -0
  78. package/lib/network/index.js +19 -0
  79. package/lib/plugins/PluginManifest.d.ts +59 -0
  80. package/lib/plugins/PluginManifest.js +112 -0
  81. package/lib/plugins/index.d.ts +7 -0
  82. package/lib/plugins/index.js +13 -0
  83. package/lib/scanner/index.d.ts +13 -0
  84. package/lib/scanner/index.js +21 -0
  85. package/lib/sensors/AnalogSensor.d.ts +23 -0
  86. package/lib/sensors/AnalogSensor.js +31 -0
  87. package/lib/sensors/Endstop.d.ts +13 -0
  88. package/lib/sensors/Endstop.js +21 -0
  89. package/lib/sensors/FilamentMonitors/FilamentMonitorBase.d.ts +23 -0
  90. package/lib/sensors/FilamentMonitors/FilamentMonitorBase.js +31 -0
  91. package/lib/sensors/FilamentMonitors/LaserFilamentMonitor.d.ts +21 -0
  92. package/lib/sensors/FilamentMonitors/LaserFilamentMonitor.js +45 -0
  93. package/lib/sensors/FilamentMonitors/PulsedFilamentMonitor.d.ts +20 -0
  94. package/lib/sensors/FilamentMonitors/PulsedFilamentMonitor.js +44 -0
  95. package/lib/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.d.ts +21 -0
  96. package/lib/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.js +45 -0
  97. package/lib/sensors/FilamentMonitors/index.d.ts +6 -0
  98. package/lib/sensors/FilamentMonitors/index.js +32 -0
  99. package/lib/sensors/Probe.d.ts +32 -0
  100. package/lib/sensors/Probe.js +40 -0
  101. package/lib/sensors/index.d.ts +16 -0
  102. package/lib/sensors/index.js +27 -0
  103. package/lib/spindles/index.d.ts +16 -0
  104. package/lib/spindles/index.js +24 -0
  105. package/lib/state/MachineStatus.d.ts +16 -0
  106. package/lib/state/MachineStatus.js +20 -0
  107. package/lib/state/MessageBox.d.ts +15 -0
  108. package/lib/state/MessageBox.js +23 -0
  109. package/lib/state/RestorePoint.d.ts +11 -0
  110. package/lib/state/RestorePoint.js +17 -0
  111. package/lib/state/index.d.ts +52 -0
  112. package/lib/state/index.js +70 -0
  113. package/lib/tools/index.d.ts +25 -0
  114. package/lib/tools/index.js +33 -0
  115. package/lib/userSessions/index.d.ts +17 -0
  116. package/lib/userSessions/index.js +26 -0
  117. package/lib/volumes/index.d.ts +10 -0
  118. package/lib/volumes/index.js +16 -0
  119. package/package.json +29 -0
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HttpEndpointType = void 0;
4
+ const ModelObject_1 = require("../ModelObject");
5
+ var HttpEndpointType;
6
+ (function (HttpEndpointType) {
7
+ HttpEndpointType["GET"] = "GET";
8
+ HttpEndpointType["POST"] = "POST";
9
+ HttpEndpointType["PUT"] = "PUT";
10
+ HttpEndpointType["PATCH"] = "PATCH";
11
+ HttpEndpointType["TRACE"] = "TRACE";
12
+ HttpEndpointType["DELETE"] = "DELETE";
13
+ HttpEndpointType["OPTIONS"] = "OPTIONS";
14
+ HttpEndpointType["WebSocket"] = "WebSocket";
15
+ })(HttpEndpointType = exports.HttpEndpointType || (exports.HttpEndpointType = {}));
16
+ class HttpEndpoint extends ModelObject_1.default {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.endpointType = HttpEndpointType.GET;
20
+ this.namespace = "";
21
+ this.path = "";
22
+ this.isUploadRequest = false;
23
+ this.unixSocket = "";
24
+ }
25
+ }
26
+ exports.default = HttpEndpoint;
package/lib/index.d.ts ADDED
@@ -0,0 +1,44 @@
1
+ import ModelObject from "./ModelObject";
2
+ import Board from "./boards";
3
+ import State from "./state";
4
+ import ModelCollection from "./ModelCollection";
5
+ import Directories from "./directories";
6
+ import Fan from "./fans";
7
+ import Heat from "./heat";
8
+ import HttpEndpoint from "./httpEndpoints";
9
+ import InputChannel from "./inputs/InputChannel";
10
+ import Job from "./job";
11
+ import Limits from "./limits";
12
+ import Message from "./messages";
13
+ import Move from "./move";
14
+ import Plugin from "./plugins";
15
+ import Scanner from "./scanner";
16
+ import Sensors from "./sensors";
17
+ import Spindle from "./spindles";
18
+ import UserSession from "./userSessions";
19
+ import Volume from "./volumes";
20
+ import { ModelDictionary } from "./ModelDictionary";
21
+ export declare function setArrayItem(array: Array<any>, index: number, value: any): void;
22
+ /**
23
+ * Refer to the DSF/RRF documentation for descriptions of the object model fields
24
+ */
25
+ export default class ObjectModel extends ModelObject {
26
+ readonly boards: ModelCollection<Board>;
27
+ readonly directories: Directories;
28
+ readonly fans: ModelCollection<Fan>;
29
+ readonly global: ModelDictionary<any>;
30
+ readonly heat: Heat;
31
+ readonly httpEndpoints: ModelCollection<HttpEndpoint>;
32
+ readonly inputs: ModelCollection<InputChannel>;
33
+ readonly job: Job;
34
+ readonly limits: Limits;
35
+ readonly messages: ModelCollection<Message>;
36
+ readonly move: Move;
37
+ readonly plugins: ModelDictionary<Plugin>;
38
+ readonly scanner: Scanner;
39
+ readonly sensors: Sensors;
40
+ readonly spindles: ModelCollection<Spindle>;
41
+ readonly state: State;
42
+ readonly userSessions: ModelCollection<UserSession>;
43
+ readonly volumes: ModelCollection<Volume>;
44
+ }
package/lib/index.js ADDED
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setArrayItem = void 0;
4
+ const ModelObject_1 = require("./ModelObject");
5
+ const boards_1 = require("./boards");
6
+ const state_1 = require("./state");
7
+ const ModelCollection_1 = require("./ModelCollection");
8
+ const directories_1 = require("./directories");
9
+ const fans_1 = require("./fans");
10
+ const heat_1 = require("./heat");
11
+ const httpEndpoints_1 = require("./httpEndpoints");
12
+ const InputChannel_1 = require("./inputs/InputChannel");
13
+ const job_1 = require("./job");
14
+ const limits_1 = require("./limits");
15
+ const messages_1 = require("./messages");
16
+ const move_1 = require("./move");
17
+ const plugins_1 = require("./plugins");
18
+ const scanner_1 = require("./scanner");
19
+ const sensors_1 = require("./sensors");
20
+ const spindles_1 = require("./spindles");
21
+ const userSessions_1 = require("./userSessions");
22
+ const volumes_1 = require("./volumes");
23
+ const ModelDictionary_1 = require("./ModelDictionary");
24
+ // Unfortunately we need to define a way to update arrays to remain compatible with Vue 2 (due to IE11).
25
+ // This will become obsolete as soon as DWC is upgraded to Vue 3, but that isn't going to happen anytime soon.
26
+ // Until then a Vue 2 user would have to call something like this on initialization to work around this limitation:
27
+ // globalThis._duetModelSetArray = (array, index, value) => Vue.set(array, index, value);
28
+ globalThis._duetModelSetArray = (array, index, value) => array[index] = value;
29
+ function setArrayItem(array, index, value) {
30
+ globalThis._duetModelSetArray(array, index, value);
31
+ }
32
+ exports.setArrayItem = setArrayItem;
33
+ /**
34
+ * Refer to the DSF/RRF documentation for descriptions of the object model fields
35
+ */
36
+ class ObjectModel extends ModelObject_1.default {
37
+ constructor() {
38
+ super(...arguments);
39
+ this.boards = new ModelCollection_1.default(boards_1.default);
40
+ this.directories = new directories_1.default();
41
+ this.fans = new ModelCollection_1.default(fans_1.default);
42
+ this.global = new ModelDictionary_1.ModelDictionary(false);
43
+ this.heat = new heat_1.default();
44
+ this.httpEndpoints = new ModelCollection_1.default(httpEndpoints_1.default);
45
+ this.inputs = new ModelCollection_1.default(InputChannel_1.default);
46
+ this.job = new job_1.default();
47
+ this.limits = new limits_1.default();
48
+ this.messages = new ModelCollection_1.default(messages_1.default); // must be manually cleared after updates
49
+ this.move = new move_1.default();
50
+ this.plugins = new ModelDictionary_1.ModelDictionary(true, plugins_1.default);
51
+ this.scanner = new scanner_1.default();
52
+ this.sensors = new sensors_1.default();
53
+ this.spindles = new ModelCollection_1.default(spindles_1.default);
54
+ this.state = new state_1.default();
55
+ this.userSessions = new ModelCollection_1.default(userSessions_1.default);
56
+ this.volumes = new ModelCollection_1.default(volumes_1.default);
57
+ }
58
+ }
59
+ exports.default = ObjectModel;
@@ -0,0 +1,15 @@
1
+ export declare enum CodeChannel {
2
+ http = 0,
3
+ telnet = 1,
4
+ file = 2,
5
+ usb = 3,
6
+ aux = 4,
7
+ trigger = 5,
8
+ queue = 6,
9
+ lcd = 7,
10
+ sbc = 8,
11
+ daemon = 9,
12
+ aux2 = 10,
13
+ autopause = 11,
14
+ unknown = 12
15
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CodeChannel = void 0;
4
+ var CodeChannel;
5
+ (function (CodeChannel) {
6
+ CodeChannel[CodeChannel["http"] = 0] = "http";
7
+ CodeChannel[CodeChannel["telnet"] = 1] = "telnet";
8
+ CodeChannel[CodeChannel["file"] = 2] = "file";
9
+ CodeChannel[CodeChannel["usb"] = 3] = "usb";
10
+ CodeChannel[CodeChannel["aux"] = 4] = "aux";
11
+ CodeChannel[CodeChannel["trigger"] = 5] = "trigger";
12
+ CodeChannel[CodeChannel["queue"] = 6] = "queue";
13
+ CodeChannel[CodeChannel["lcd"] = 7] = "lcd";
14
+ CodeChannel[CodeChannel["sbc"] = 8] = "sbc";
15
+ CodeChannel[CodeChannel["daemon"] = 9] = "daemon";
16
+ CodeChannel[CodeChannel["aux2"] = 10] = "aux2";
17
+ CodeChannel[CodeChannel["autopause"] = 11] = "autopause";
18
+ CodeChannel[CodeChannel["unknown"] = 12] = "unknown";
19
+ })(CodeChannel = exports.CodeChannel || (exports.CodeChannel = {}));
@@ -0,0 +1,9 @@
1
+ export declare enum Compatibility {
2
+ Default = "Default",
3
+ RepRapFirmware = "RepRapFirmware",
4
+ Marlin = "Marlin",
5
+ Teacup = "Teacup",
6
+ Sprinter = "Sprinter",
7
+ Repetier = "Repetier",
8
+ NanoDLP = "NanoDLP"
9
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Compatibility = void 0;
4
+ var Compatibility;
5
+ (function (Compatibility) {
6
+ Compatibility["Default"] = "Default";
7
+ Compatibility["RepRapFirmware"] = "RepRapFirmware";
8
+ Compatibility["Marlin"] = "Marlin";
9
+ Compatibility["Teacup"] = "Teacup";
10
+ Compatibility["Sprinter"] = "Sprinter";
11
+ Compatibility["Repetier"] = "Repetier";
12
+ Compatibility["NanoDLP"] = "NanoDLP";
13
+ })(Compatibility = exports.Compatibility || (exports.Compatibility = {}));
@@ -0,0 +1,27 @@
1
+ import { Compatibility } from "./Compatibility";
2
+ import ModelObject from "../ModelObject";
3
+ export declare enum DistanceUnit {
4
+ mm = "mm",
5
+ inch = "inch"
6
+ }
7
+ export declare enum InputChannelState {
8
+ awaitingAcknowledgement = "awaitingAcknowledgement",
9
+ idle = "idle",
10
+ executing = "executing",
11
+ waiting = "waiting",
12
+ reading = "reading"
13
+ }
14
+ export default class InputChannel extends ModelObject {
15
+ axesRelative: boolean;
16
+ compatibility: Compatibility;
17
+ distanceUnit: DistanceUnit;
18
+ drivesRelative: boolean;
19
+ feedRate: number;
20
+ inMacro: boolean;
21
+ macroRestartable: boolean;
22
+ name: string;
23
+ stackDepth: number;
24
+ state: InputChannelState;
25
+ lineNumber: bigint;
26
+ volumetric: boolean;
27
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InputChannelState = exports.DistanceUnit = void 0;
4
+ const Compatibility_1 = require("./Compatibility");
5
+ const ModelObject_1 = require("../ModelObject");
6
+ var DistanceUnit;
7
+ (function (DistanceUnit) {
8
+ DistanceUnit["mm"] = "mm";
9
+ DistanceUnit["inch"] = "inch";
10
+ })(DistanceUnit = exports.DistanceUnit || (exports.DistanceUnit = {}));
11
+ var InputChannelState;
12
+ (function (InputChannelState) {
13
+ InputChannelState["awaitingAcknowledgement"] = "awaitingAcknowledgement";
14
+ InputChannelState["idle"] = "idle";
15
+ InputChannelState["executing"] = "executing";
16
+ InputChannelState["waiting"] = "waiting";
17
+ InputChannelState["reading"] = "reading";
18
+ })(InputChannelState = exports.InputChannelState || (exports.InputChannelState = {}));
19
+ class InputChannel extends ModelObject_1.default {
20
+ constructor() {
21
+ super(...arguments);
22
+ this.axesRelative = false;
23
+ this.compatibility = Compatibility_1.Compatibility.RepRapFirmware;
24
+ this.distanceUnit = DistanceUnit.mm;
25
+ this.drivesRelative = true;
26
+ this.feedRate = 50;
27
+ this.inMacro = false;
28
+ this.macroRestartable = false;
29
+ this.name = "";
30
+ this.stackDepth = 0;
31
+ this.state = InputChannelState.idle;
32
+ this.lineNumber = 0n;
33
+ this.volumetric = false;
34
+ }
35
+ }
36
+ exports.default = InputChannel;
@@ -0,0 +1,14 @@
1
+ import ModelObject from "../ModelObject";
2
+ import ModelCollection from "../ModelCollection";
3
+ export declare class BuildObject extends ModelObject {
4
+ cancelled: boolean;
5
+ name: string | null;
6
+ x: Array<number | null>;
7
+ y: Array<number | null>;
8
+ }
9
+ export default class Build extends ModelObject {
10
+ currentObject: number;
11
+ m486names: boolean;
12
+ m486numbers: boolean;
13
+ readonly objects: ModelCollection<BuildObject>;
14
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BuildObject = void 0;
4
+ const ModelObject_1 = require("../ModelObject");
5
+ const ModelCollection_1 = require("../ModelCollection");
6
+ class BuildObject extends ModelObject_1.default {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.cancelled = false;
10
+ this.name = null;
11
+ this.x = new Array();
12
+ this.y = new Array();
13
+ }
14
+ }
15
+ exports.BuildObject = BuildObject;
16
+ class Build extends ModelObject_1.default {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.currentObject = -1;
20
+ this.m486names = false;
21
+ this.m486numbers = false;
22
+ this.objects = new ModelCollection_1.default(BuildObject);
23
+ }
24
+ }
25
+ exports.default = Build;
@@ -0,0 +1,16 @@
1
+ import ModelObject from "../ModelObject";
2
+ import ModelCollection from "../ModelCollection";
3
+ import ThumbnailInfo from "./ThumbnailInfo";
4
+ export default class GCodeFileInfo extends ModelObject {
5
+ filament: Array<number>;
6
+ fileName: string;
7
+ generatedBy: string;
8
+ height: number;
9
+ lastModified: string | null;
10
+ layerHeight: number;
11
+ numLayers: number;
12
+ printTime: bigint | null;
13
+ simulatedTime: bigint | null;
14
+ size: bigint;
15
+ readonly thumbnails: ModelCollection<ThumbnailInfo>;
16
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const ModelObject_1 = require("../ModelObject");
4
+ const ModelCollection_1 = require("../ModelCollection");
5
+ const ThumbnailInfo_1 = require("./ThumbnailInfo");
6
+ class GCodeFileInfo extends ModelObject_1.default {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.filament = new Array();
10
+ this.fileName = "";
11
+ this.generatedBy = "";
12
+ this.height = 0;
13
+ this.lastModified = null;
14
+ this.layerHeight = 0;
15
+ this.numLayers = 0;
16
+ this.printTime = null;
17
+ this.simulatedTime = null;
18
+ this.size = 0n;
19
+ this.thumbnails = new ModelCollection_1.default(ThumbnailInfo_1.default);
20
+ }
21
+ }
22
+ exports.default = GCodeFileInfo;
@@ -0,0 +1,14 @@
1
+ import ModelObject from "../ModelObject";
2
+ export declare enum ThumbnailFormat {
3
+ jpeg = "jpeg",
4
+ png = "png",
5
+ qoi = "qoi"
6
+ }
7
+ export default class ThumbnailInfo extends ModelObject {
8
+ data: string | null;
9
+ format: ThumbnailFormat;
10
+ height: number;
11
+ offset: number;
12
+ size: number;
13
+ width: number;
14
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ThumbnailFormat = void 0;
4
+ const ModelObject_1 = require("../ModelObject");
5
+ var ThumbnailFormat;
6
+ (function (ThumbnailFormat) {
7
+ ThumbnailFormat["jpeg"] = "jpeg";
8
+ ThumbnailFormat["png"] = "png";
9
+ ThumbnailFormat["qoi"] = "qoi";
10
+ })(ThumbnailFormat = exports.ThumbnailFormat || (exports.ThumbnailFormat = {}));
11
+ class ThumbnailInfo extends ModelObject_1.default {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.data = null;
15
+ this.format = ThumbnailFormat.png;
16
+ this.height = 0;
17
+ this.offset = 0;
18
+ this.size = 0;
19
+ this.width = 0;
20
+ }
21
+ }
22
+ exports.default = ThumbnailInfo;
@@ -0,0 +1,36 @@
1
+ import Build from "./Build";
2
+ import ModelCollection from "../ModelCollection";
3
+ import ModelObject from "../ModelObject";
4
+ import GCodeFileInfo from "./GCodeFileInfo";
5
+ export declare class Layer extends ModelObject {
6
+ duration: number;
7
+ filament: Array<number>;
8
+ fractionPrinted: number;
9
+ height: number;
10
+ temperatures: Array<number>;
11
+ }
12
+ export declare class TimesLeft extends ModelObject {
13
+ filament: number | null;
14
+ file: number | null;
15
+ layer: number | null;
16
+ slicer: number | null;
17
+ }
18
+ export default class Job extends ModelObject {
19
+ constructor();
20
+ build: Build;
21
+ duration: number | null;
22
+ file: GCodeFileInfo | null;
23
+ filePosition: bigint | null;
24
+ lastDuration: number | null;
25
+ lastFileName: string | null;
26
+ lastFileAborted: boolean;
27
+ lastFileCancelled: boolean;
28
+ lastFileSimulated: boolean;
29
+ layer: number | null;
30
+ readonly layers: ModelCollection<Layer>;
31
+ layerTime: number | null;
32
+ pauseDuration: number | null;
33
+ rawExtrusion: number | null;
34
+ readonly timesLeft: TimesLeft;
35
+ warmUpDuration: number | null;
36
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TimesLeft = exports.Layer = void 0;
4
+ const Build_1 = require("./Build");
5
+ const ModelCollection_1 = require("../ModelCollection");
6
+ const ModelObject_1 = require("../ModelObject");
7
+ const GCodeFileInfo_1 = require("./GCodeFileInfo");
8
+ class Layer extends ModelObject_1.default {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.duration = 0;
12
+ this.filament = new Array();
13
+ this.fractionPrinted = 0;
14
+ this.height = 0;
15
+ this.temperatures = new Array();
16
+ }
17
+ }
18
+ exports.Layer = Layer;
19
+ class TimesLeft extends ModelObject_1.default {
20
+ constructor() {
21
+ super(...arguments);
22
+ this.filament = null;
23
+ this.file = null;
24
+ this.layer = null;
25
+ this.slicer = null;
26
+ }
27
+ }
28
+ exports.TimesLeft = TimesLeft;
29
+ class Job extends ModelObject_1.default {
30
+ constructor() {
31
+ super();
32
+ this.build = new Build_1.default();
33
+ this.duration = null;
34
+ this.file = null;
35
+ this.filePosition = null;
36
+ this.lastDuration = null;
37
+ this.lastFileName = null;
38
+ this.lastFileAborted = false;
39
+ this.lastFileCancelled = false;
40
+ this.lastFileSimulated = false;
41
+ this.layer = null;
42
+ this.layers = new ModelCollection_1.default(Layer);
43
+ this.layerTime = null;
44
+ this.pauseDuration = null;
45
+ this.rawExtrusion = null;
46
+ this.timesLeft = new TimesLeft();
47
+ this.warmUpDuration = null;
48
+ this.wrapModelProperty("build", Build_1.default);
49
+ this.wrapModelProperty("file", GCodeFileInfo_1.default);
50
+ }
51
+ }
52
+ exports.default = Job;
@@ -0,0 +1,28 @@
1
+ import ModelObject from "../ModelObject";
2
+ export default class Limits extends ModelObject {
3
+ axes: number | null;
4
+ axesPlusExtruders: number | null;
5
+ bedHeaters: number | null;
6
+ boards: number | null;
7
+ chamberHeaters: number | null;
8
+ drivers: number | null;
9
+ driversPerAxis: number | null;
10
+ extruders: number | null;
11
+ extrudersPerTool: number | null;
12
+ fans: number | null;
13
+ gpInPorts: number | null;
14
+ gpOutPorts: number | null;
15
+ heaters: number | null;
16
+ heatersPerTool: number | null;
17
+ monitorsPerHeater: number | null;
18
+ restorePoints: number | null;
19
+ sensors: number | null;
20
+ spindles: number | null;
21
+ tools: number | null;
22
+ trackedObjects: number | null;
23
+ triggers: number | null;
24
+ volumes: number | null;
25
+ workplaces: number | null;
26
+ zProbeProgramBytes: number | null;
27
+ zProbes: number | null;
28
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const ModelObject_1 = require("../ModelObject");
4
+ class Limits extends ModelObject_1.default {
5
+ constructor() {
6
+ super(...arguments);
7
+ this.axes = null;
8
+ this.axesPlusExtruders = null;
9
+ this.bedHeaters = null;
10
+ this.boards = null;
11
+ this.chamberHeaters = null;
12
+ this.drivers = null;
13
+ this.driversPerAxis = null;
14
+ this.extruders = null;
15
+ this.extrudersPerTool = null;
16
+ this.fans = null;
17
+ this.gpInPorts = null;
18
+ this.gpOutPorts = null;
19
+ this.heaters = null;
20
+ this.heatersPerTool = null;
21
+ this.monitorsPerHeater = null;
22
+ this.restorePoints = null;
23
+ this.sensors = null;
24
+ this.spindles = null;
25
+ this.tools = null;
26
+ this.trackedObjects = null;
27
+ this.triggers = null;
28
+ this.volumes = null;
29
+ this.workplaces = null;
30
+ this.zProbeProgramBytes = null;
31
+ this.zProbes = null;
32
+ }
33
+ }
34
+ exports.default = Limits;
@@ -0,0 +1,12 @@
1
+ import ModelObject from "../ModelObject";
2
+ export declare enum MessageType {
3
+ success = 0,
4
+ warning = 1,
5
+ error = 2
6
+ }
7
+ export default class Message extends ModelObject {
8
+ content: string;
9
+ time: Date;
10
+ type: MessageType;
11
+ toString(): string;
12
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MessageType = void 0;
4
+ const ModelObject_1 = require("../ModelObject");
5
+ var MessageType;
6
+ (function (MessageType) {
7
+ MessageType[MessageType["success"] = 0] = "success";
8
+ MessageType[MessageType["warning"] = 1] = "warning";
9
+ MessageType[MessageType["error"] = 2] = "error";
10
+ })(MessageType = exports.MessageType || (exports.MessageType = {}));
11
+ class Message extends ModelObject_1.default {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.content = "";
15
+ this.time = new Date();
16
+ this.type = MessageType.success;
17
+ }
18
+ toString() {
19
+ switch (this.type) {
20
+ case MessageType.success: return this.content;
21
+ case MessageType.warning: return "Warning: " + this.content;
22
+ case MessageType.error: return "Error: " + this.content;
23
+ }
24
+ }
25
+ }
26
+ exports.default = Message;
@@ -0,0 +1,51 @@
1
+ import ModelObject from "../ModelObject";
2
+ import ModelCollection from "../ModelCollection";
3
+ import DriverId from "./DriverId";
4
+ import Microstepping from "./Microstepping";
5
+ export declare enum AxisLetter {
6
+ X = "X",
7
+ Y = "Y",
8
+ Z = "Z",
9
+ U = "U",
10
+ V = "V",
11
+ W = "W",
12
+ A = "A",
13
+ B = "B",
14
+ C = "C",
15
+ D = "D",
16
+ a = "a",
17
+ b = "b",
18
+ c = "c",
19
+ d = "d",
20
+ e = "e",
21
+ f = "f",
22
+ g = "g",
23
+ h = "h",
24
+ i = "i",
25
+ j = "j",
26
+ k = "k",
27
+ l = "l",
28
+ none = ""
29
+ }
30
+ export default class Axis extends ModelObject {
31
+ acceleration: number;
32
+ babystep: number;
33
+ current: number;
34
+ readonly drivers: ModelCollection<DriverId>;
35
+ homed: boolean;
36
+ jerk: number;
37
+ letter: AxisLetter;
38
+ machinePosition: number | null;
39
+ max: number;
40
+ maxProbed: boolean;
41
+ readonly microstepping: Microstepping;
42
+ min: number;
43
+ minProbed: boolean;
44
+ percentCurrent: number;
45
+ percentStstCurrent: number | null;
46
+ speed: number;
47
+ stepsPerMm: number;
48
+ userPosition: number | null;
49
+ visible: boolean;
50
+ workplaceOffsets: Array<number>;
51
+ }