@duet3d/objectmodel 3.4.0-b9 → 3.5.0-b1
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/ModelCollection.d.ts +1 -1
- package/dist/ModelCollection.js +8 -1
- package/dist/ModelObject.js +22 -2
- package/dist/ObjectModel.d.ts +6 -4
- package/dist/ObjectModel.js +3 -1
- package/dist/boards/index.d.ts +1 -0
- package/dist/boards/index.js +2 -1
- package/dist/fans/index.d.ts +1 -0
- package/dist/fans/index.js +2 -1
- package/dist/heat/Heater.d.ts +3 -0
- package/dist/heat/Heater.js +3 -0
- package/dist/heat/HeaterModel.d.ts +1 -1
- package/dist/heat/HeaterModel.js +1 -1
- package/dist/heat/HeaterMonitor.d.ts +2 -2
- package/dist/heat/HeaterMonitor.js +2 -2
- package/dist/heat/index.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/inputs/InputChannel.d.ts +4 -2
- package/dist/inputs/InputChannel.js +4 -2
- package/dist/job/GCodeFileInfo.d.ts +3 -3
- package/dist/job/GCodeFileInfo.js +1 -1
- package/dist/job/index.d.ts +1 -1
- package/dist/move/DriverId.d.ts +1 -1
- package/dist/move/DriverId.js +12 -5
- package/dist/move/Extruder.d.ts +1 -0
- package/dist/move/Extruder.js +1 -0
- package/dist/move/kinematics/HangprinterKinematics.js +1 -0
- package/dist/move/kinematics/index.d.ts +1 -1
- package/dist/move/kinematics/index.js +4 -3
- package/dist/network/NetworkInterface.d.ts +12 -0
- package/dist/network/NetworkInterface.js +14 -1
- package/dist/plugins/PluginManifest.d.ts +2 -1
- package/dist/plugins/PluginManifest.js +2 -1
- package/dist/sensors/AnalogSensor.d.ts +0 -1
- package/dist/sensors/AnalogSensor.js +0 -1
- package/dist/sensors/index.d.ts +5 -5
- package/dist/state/MachineStatus.d.ts +3 -3
- package/dist/state/MachineStatus.js +3 -3
- package/dist/state/MessageBox.d.ts +11 -2
- package/dist/state/MessageBox.js +10 -1
- package/dist/state/index.d.ts +1 -1
- package/dist/volumes/index.d.ts +2 -2
- package/package.json +32 -30
|
@@ -2,7 +2,7 @@ import { IModelObject } from "./ModelObject";
|
|
|
2
2
|
/**
|
|
3
3
|
* Class for storing model object items in an array
|
|
4
4
|
*/
|
|
5
|
-
export declare class ModelCollection<T extends IModelObject> extends Array<T> implements IModelObject {
|
|
5
|
+
export declare class ModelCollection<T extends IModelObject | null> extends Array<T> implements IModelObject {
|
|
6
6
|
private readonly itemConstructor;
|
|
7
7
|
/**
|
|
8
8
|
* Constructor of this class
|
package/dist/ModelCollection.js
CHANGED
|
@@ -72,7 +72,14 @@ class ModelCollection extends Array {
|
|
|
72
72
|
}
|
|
73
73
|
// Add new items
|
|
74
74
|
for (let i = this.length; i < jsonElement.length; i++) {
|
|
75
|
-
|
|
75
|
+
const itemToAdd = jsonElement[i];
|
|
76
|
+
if (itemToAdd === null) {
|
|
77
|
+
super.push(itemToAdd);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
const newItem = new this.itemConstructor();
|
|
81
|
+
super.push(newItem.update(itemToAdd));
|
|
82
|
+
}
|
|
76
83
|
}
|
|
77
84
|
return this;
|
|
78
85
|
}
|
package/dist/ModelObject.js
CHANGED
|
@@ -43,6 +43,9 @@ class ModelObject {
|
|
|
43
43
|
console.warn(`Model object ${key} changed but it could not be set due to missing setter`);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
+
else if (process.env.NODE_ENV !== "production") {
|
|
47
|
+
console.warn(`Model object ${key} changed but it lacks the property descriptor`);
|
|
48
|
+
}
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
else if (prop instanceof Array) {
|
|
@@ -111,7 +114,7 @@ class ModelObject {
|
|
|
111
114
|
}
|
|
112
115
|
}
|
|
113
116
|
else if (propType === "number") {
|
|
114
|
-
if (typeof value === "number") {
|
|
117
|
+
if (typeof value === "number" || typeof value === "bigint") {
|
|
115
118
|
this[ownKey] = value;
|
|
116
119
|
}
|
|
117
120
|
else if (process.env.NODE_ENV !== "production") {
|
|
@@ -184,7 +187,24 @@ function initObject(itemType, data) {
|
|
|
184
187
|
for (let key in data) {
|
|
185
188
|
const resultKey = result[key];
|
|
186
189
|
if (isModelObject(resultKey)) {
|
|
187
|
-
resultKey.update(data[key]);
|
|
190
|
+
const updatedObject = resultKey.update(data[key]);
|
|
191
|
+
if (resultKey !== updatedObject) {
|
|
192
|
+
const propDescriptor = Object.getOwnPropertyDescriptor(result, key);
|
|
193
|
+
if (propDescriptor !== undefined) {
|
|
194
|
+
if (propDescriptor.writable) {
|
|
195
|
+
result[key] = updatedObject;
|
|
196
|
+
}
|
|
197
|
+
else if (propDescriptor.set !== undefined) {
|
|
198
|
+
propDescriptor.set(updatedObject);
|
|
199
|
+
}
|
|
200
|
+
else if (process.env.NODE_ENV !== "production") {
|
|
201
|
+
console.warn(`Model object ${key} changed but it could not be set due to missing setter`);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
else if (process.env.NODE_ENV !== "production") {
|
|
205
|
+
console.warn(`Model object ${key} changed but it lacks the property descriptor`);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
188
208
|
}
|
|
189
209
|
else {
|
|
190
210
|
result[key] = data[key];
|
package/dist/ObjectModel.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import ModelCollection from "./ModelCollection";
|
|
|
2
2
|
import ModelDictionary from "./ModelDictionary";
|
|
3
3
|
import ModelObject from "./ModelObject";
|
|
4
4
|
import Board from "./boards";
|
|
5
|
-
import State from "./state";
|
|
6
5
|
import Directories from "./directories";
|
|
7
6
|
import Fan from "./fans";
|
|
8
7
|
import Heat from "./heat";
|
|
@@ -17,6 +16,8 @@ import Plugin from "./plugins";
|
|
|
17
16
|
import Scanner from "./scanner";
|
|
18
17
|
import Sensors from "./sensors";
|
|
19
18
|
import Spindle from "./spindles";
|
|
19
|
+
import State from "./state";
|
|
20
|
+
import Tool from "./tools";
|
|
20
21
|
import UserSession from "./userSessions";
|
|
21
22
|
import Volume from "./volumes";
|
|
22
23
|
/**
|
|
@@ -25,11 +26,11 @@ import Volume from "./volumes";
|
|
|
25
26
|
export declare class ObjectModel extends ModelObject {
|
|
26
27
|
readonly boards: ModelCollection<Board>;
|
|
27
28
|
readonly directories: Directories;
|
|
28
|
-
readonly fans: ModelCollection<Fan>;
|
|
29
|
+
readonly fans: ModelCollection<Fan | null>;
|
|
29
30
|
readonly global: ModelDictionary<any>;
|
|
30
31
|
readonly heat: Heat;
|
|
31
32
|
readonly httpEndpoints: ModelCollection<HttpEndpoint>;
|
|
32
|
-
readonly inputs: ModelCollection<InputChannel>;
|
|
33
|
+
readonly inputs: ModelCollection<InputChannel | null>;
|
|
33
34
|
readonly job: Job;
|
|
34
35
|
readonly limits: Limits;
|
|
35
36
|
readonly messages: ModelCollection<Message>;
|
|
@@ -38,8 +39,9 @@ export declare class ObjectModel extends ModelObject {
|
|
|
38
39
|
readonly plugins: ModelDictionary<Plugin>;
|
|
39
40
|
readonly scanner: Scanner;
|
|
40
41
|
readonly sensors: Sensors;
|
|
41
|
-
readonly spindles: ModelCollection<Spindle>;
|
|
42
|
+
readonly spindles: ModelCollection<Spindle | null>;
|
|
42
43
|
readonly state: State;
|
|
44
|
+
readonly tools: ModelCollection<Tool | null>;
|
|
43
45
|
readonly userSessions: ModelCollection<UserSession>;
|
|
44
46
|
readonly volumes: ModelCollection<Volume>;
|
|
45
47
|
}
|
package/dist/ObjectModel.js
CHANGED
|
@@ -5,7 +5,6 @@ const ModelCollection_1 = require("./ModelCollection");
|
|
|
5
5
|
const ModelDictionary_1 = require("./ModelDictionary");
|
|
6
6
|
const ModelObject_1 = require("./ModelObject");
|
|
7
7
|
const boards_1 = require("./boards");
|
|
8
|
-
const state_1 = require("./state");
|
|
9
8
|
const directories_1 = require("./directories");
|
|
10
9
|
const fans_1 = require("./fans");
|
|
11
10
|
const heat_1 = require("./heat");
|
|
@@ -20,6 +19,8 @@ const plugins_1 = require("./plugins");
|
|
|
20
19
|
const scanner_1 = require("./scanner");
|
|
21
20
|
const sensors_1 = require("./sensors");
|
|
22
21
|
const spindles_1 = require("./spindles");
|
|
22
|
+
const state_1 = require("./state");
|
|
23
|
+
const tools_1 = require("./tools");
|
|
23
24
|
const userSessions_1 = require("./userSessions");
|
|
24
25
|
const volumes_1 = require("./volumes");
|
|
25
26
|
/**
|
|
@@ -45,6 +46,7 @@ class ObjectModel extends ModelObject_1.default {
|
|
|
45
46
|
this.sensors = new sensors_1.default();
|
|
46
47
|
this.spindles = new ModelCollection_1.default(spindles_1.default);
|
|
47
48
|
this.state = new state_1.default();
|
|
49
|
+
this.tools = new ModelCollection_1.default(tools_1.default);
|
|
48
50
|
this.userSessions = new ModelCollection_1.default(userSessions_1.default);
|
|
49
51
|
this.volumes = new ModelCollection_1.default(volumes_1.default);
|
|
50
52
|
}
|
package/dist/boards/index.d.ts
CHANGED
package/dist/boards/index.js
CHANGED
|
@@ -49,7 +49,7 @@ class Board extends ModelObject_1.default {
|
|
|
49
49
|
super();
|
|
50
50
|
this.accelerometer = null;
|
|
51
51
|
this.bootloaderFileName = null;
|
|
52
|
-
this.canAddress =
|
|
52
|
+
this.canAddress = null;
|
|
53
53
|
this.closedLoop = null;
|
|
54
54
|
this.directDisplay = null;
|
|
55
55
|
this.firmwareDate = "";
|
|
@@ -67,6 +67,7 @@ class Board extends ModelObject_1.default {
|
|
|
67
67
|
this.uniqueId = null;
|
|
68
68
|
this.v12 = null;
|
|
69
69
|
this.vIn = null;
|
|
70
|
+
this.wifiFirmwareFileName = null;
|
|
70
71
|
this.wrapModelProperty("accelerometer", Accelerometer);
|
|
71
72
|
this.wrapModelProperty("closedLoop", ClosedLoop);
|
|
72
73
|
this.wrapModelProperty("directDisplay", DirectDisplay);
|
package/dist/fans/index.d.ts
CHANGED
package/dist/fans/index.js
CHANGED
|
@@ -5,9 +5,10 @@ const ModelObject_1 = require("../ModelObject");
|
|
|
5
5
|
class FanThermostaticControl extends ModelObject_1.default {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
8
|
-
this.heaters =
|
|
8
|
+
this.heaters = []; // *** deprecated as of v3.5, use sensors instead
|
|
9
9
|
this.highTemperature = null;
|
|
10
10
|
this.lowTemperature = null;
|
|
11
|
+
this.sensors = [];
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
exports.FanThermostaticControl = FanThermostaticControl;
|
package/dist/heat/Heater.d.ts
CHANGED
|
@@ -15,6 +15,9 @@ export declare class Heater extends ModelObject {
|
|
|
15
15
|
avgPwm: number;
|
|
16
16
|
current: number;
|
|
17
17
|
max: number;
|
|
18
|
+
maxBadReadings: number;
|
|
19
|
+
maxHeatingFaultTime: number;
|
|
20
|
+
maxTempExcursion: number;
|
|
18
21
|
min: number;
|
|
19
22
|
readonly model: HeaterModel;
|
|
20
23
|
readonly monitors: ModelCollection<HeaterMonitor>;
|
package/dist/heat/Heater.js
CHANGED
|
@@ -21,6 +21,9 @@ class Heater extends ModelObject_1.default {
|
|
|
21
21
|
this.avgPwm = 0;
|
|
22
22
|
this.current = -273.15;
|
|
23
23
|
this.max = 285;
|
|
24
|
+
this.maxBadReadings = 3;
|
|
25
|
+
this.maxHeatingFaultTime = 5;
|
|
26
|
+
this.maxTempExcursion = 15;
|
|
24
27
|
this.min = -10;
|
|
25
28
|
this.model = new HeaterModel_1.default();
|
|
26
29
|
this.monitors = new ModelCollection_1.default(HeaterMonitor_1.default);
|
package/dist/heat/HeaterModel.js
CHANGED
|
@@ -11,8 +11,8 @@ export declare enum HeaterMonitorCondition {
|
|
|
11
11
|
tooLow = "tooLow"
|
|
12
12
|
}
|
|
13
13
|
export declare class HeaterMonitor extends ModelObject {
|
|
14
|
-
action: HeaterMonitorAction;
|
|
14
|
+
action: HeaterMonitorAction | null;
|
|
15
15
|
condition: HeaterMonitorCondition;
|
|
16
|
-
limit: number;
|
|
16
|
+
limit: number | null;
|
|
17
17
|
}
|
|
18
18
|
export default HeaterMonitor;
|
|
@@ -18,9 +18,9 @@ var HeaterMonitorCondition;
|
|
|
18
18
|
class HeaterMonitor extends ModelObject_1.default {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(...arguments);
|
|
21
|
-
this.action =
|
|
21
|
+
this.action = null;
|
|
22
22
|
this.condition = HeaterMonitorCondition.disabled;
|
|
23
|
-
this.limit =
|
|
23
|
+
this.limit = null;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
exports.HeaterMonitor = HeaterMonitor;
|
package/dist/heat/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare class Heat extends ModelObject {
|
|
|
6
6
|
chamberHeaters: Array<number>;
|
|
7
7
|
coldExtrudeTemperature: number;
|
|
8
8
|
coldRetractTemperature: number;
|
|
9
|
-
readonly heaters: ModelCollection<Heater>;
|
|
9
|
+
readonly heaters: ModelCollection<Heater | null>;
|
|
10
10
|
}
|
|
11
11
|
export default Heat;
|
|
12
12
|
export * from "./Heater";
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -35,6 +35,7 @@ __exportStar(require("./plugins"), exports);
|
|
|
35
35
|
__exportStar(require("./scanner"), exports);
|
|
36
36
|
__exportStar(require("./sensors"), exports);
|
|
37
37
|
__exportStar(require("./spindles"), exports);
|
|
38
|
+
__exportStar(require("./tools"), exports);
|
|
38
39
|
__exportStar(require("./userSessions"), exports);
|
|
39
40
|
__exportStar(require("./volumes"), exports);
|
|
40
41
|
__exportStar(require("./ObjectModel"), exports);
|
|
@@ -2,7 +2,7 @@ import ModelObject from "../ModelObject";
|
|
|
2
2
|
import Compatibility from "./Compatibility";
|
|
3
3
|
export declare enum DistanceUnit {
|
|
4
4
|
mm = "mm",
|
|
5
|
-
inch = "
|
|
5
|
+
inch = "in"
|
|
6
6
|
}
|
|
7
7
|
export declare enum InputChannelState {
|
|
8
8
|
awaitingAcknowledgement = "awaitingAcknowledgement",
|
|
@@ -19,10 +19,12 @@ export declare class InputChannel extends ModelObject {
|
|
|
19
19
|
feedRate: number;
|
|
20
20
|
inMacro: boolean;
|
|
21
21
|
macroRestartable: boolean;
|
|
22
|
+
motionSystem: number;
|
|
22
23
|
name: string;
|
|
24
|
+
selectedPlane: number;
|
|
23
25
|
stackDepth: number;
|
|
24
26
|
state: InputChannelState;
|
|
25
|
-
lineNumber: bigint;
|
|
27
|
+
lineNumber: number | bigint;
|
|
26
28
|
volumetric: boolean;
|
|
27
29
|
}
|
|
28
30
|
export default InputChannel;
|
|
@@ -6,7 +6,7 @@ const Compatibility_1 = require("./Compatibility");
|
|
|
6
6
|
var DistanceUnit;
|
|
7
7
|
(function (DistanceUnit) {
|
|
8
8
|
DistanceUnit["mm"] = "mm";
|
|
9
|
-
DistanceUnit["inch"] = "
|
|
9
|
+
DistanceUnit["inch"] = "in";
|
|
10
10
|
})(DistanceUnit = exports.DistanceUnit || (exports.DistanceUnit = {}));
|
|
11
11
|
var InputChannelState;
|
|
12
12
|
(function (InputChannelState) {
|
|
@@ -26,10 +26,12 @@ class InputChannel extends ModelObject_1.default {
|
|
|
26
26
|
this.feedRate = 50;
|
|
27
27
|
this.inMacro = false;
|
|
28
28
|
this.macroRestartable = false;
|
|
29
|
+
this.motionSystem = 0;
|
|
29
30
|
this.name = "";
|
|
31
|
+
this.selectedPlane = 0;
|
|
30
32
|
this.stackDepth = 0;
|
|
31
33
|
this.state = InputChannelState.idle;
|
|
32
|
-
this.lineNumber =
|
|
34
|
+
this.lineNumber = 0;
|
|
33
35
|
this.volumetric = false;
|
|
34
36
|
}
|
|
35
37
|
}
|
|
@@ -9,9 +9,9 @@ export declare class GCodeFileInfo extends ModelObject {
|
|
|
9
9
|
lastModified: string | null;
|
|
10
10
|
layerHeight: number;
|
|
11
11
|
numLayers: number;
|
|
12
|
-
printTime: bigint | null;
|
|
13
|
-
simulatedTime: bigint | null;
|
|
14
|
-
size: bigint;
|
|
12
|
+
printTime: number | bigint | null;
|
|
13
|
+
simulatedTime: number | bigint | null;
|
|
14
|
+
size: number | bigint;
|
|
15
15
|
readonly thumbnails: ModelCollection<ThumbnailInfo>;
|
|
16
16
|
}
|
|
17
17
|
export default GCodeFileInfo;
|
package/dist/job/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare class Job extends ModelObject {
|
|
|
20
20
|
build: Build;
|
|
21
21
|
duration: number | null;
|
|
22
22
|
file: GCodeFileInfo | null;
|
|
23
|
-
filePosition: bigint | null;
|
|
23
|
+
filePosition: number | bigint | null;
|
|
24
24
|
lastDuration: number | null;
|
|
25
25
|
lastFileName: string | null;
|
|
26
26
|
lastFileAborted: boolean;
|
package/dist/move/DriverId.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ModelObject, { IModelObject } from "../ModelObject";
|
|
2
2
|
export declare function isDriverId(value: any): value is DriverId;
|
|
3
3
|
export declare class DriverId extends ModelObject {
|
|
4
|
-
board: number;
|
|
4
|
+
board: number | null;
|
|
5
5
|
driver: number;
|
|
6
6
|
equals(value?: DriverId | null): boolean;
|
|
7
7
|
update(jsonElement: any): IModelObject | null;
|
package/dist/move/DriverId.js
CHANGED
|
@@ -3,22 +3,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DriverId = exports.isDriverId = void 0;
|
|
4
4
|
const ModelObject_1 = require("../ModelObject");
|
|
5
5
|
function isDriverId(value) {
|
|
6
|
-
return (value instanceof Object) &&
|
|
6
|
+
return (value instanceof Object) && value.board !== undefined && value.driver !== undefined;
|
|
7
7
|
}
|
|
8
8
|
exports.isDriverId = isDriverId;
|
|
9
9
|
class DriverId extends ModelObject_1.default {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
12
|
-
this.board =
|
|
12
|
+
this.board = null;
|
|
13
13
|
this.driver = 0;
|
|
14
14
|
}
|
|
15
15
|
equals(value) {
|
|
16
|
-
|
|
16
|
+
if (isDriverId(value)) {
|
|
17
|
+
if (!this.board && !value.board) {
|
|
18
|
+
return this.driver === value.driver;
|
|
19
|
+
}
|
|
20
|
+
return (value.board === this.board) && (value.driver === this.driver);
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
17
23
|
}
|
|
18
24
|
update(jsonElement) {
|
|
19
25
|
if (isDriverId(jsonElement)) {
|
|
20
26
|
this.board = jsonElement.board;
|
|
21
27
|
this.driver = jsonElement.driver;
|
|
28
|
+
return this;
|
|
22
29
|
}
|
|
23
30
|
if (typeof jsonElement === "string") {
|
|
24
31
|
const matches = /(\d+)\.(\d+)/.exec(jsonElement);
|
|
@@ -27,7 +34,7 @@ class DriverId extends ModelObject_1.default {
|
|
|
27
34
|
this.driver = Number(matches[2]);
|
|
28
35
|
}
|
|
29
36
|
else {
|
|
30
|
-
this.board =
|
|
37
|
+
this.board = null;
|
|
31
38
|
this.driver = Number(jsonElement);
|
|
32
39
|
}
|
|
33
40
|
return this;
|
|
@@ -35,7 +42,7 @@ class DriverId extends ModelObject_1.default {
|
|
|
35
42
|
return null;
|
|
36
43
|
}
|
|
37
44
|
toString() {
|
|
38
|
-
return `${this.board}.${this.driver}`;
|
|
45
|
+
return (this.board === null) ? this.driver.toString() : `${this.board}.${this.driver}`;
|
|
39
46
|
}
|
|
40
47
|
}
|
|
41
48
|
exports.DriverId = DriverId;
|
package/dist/move/Extruder.d.ts
CHANGED
package/dist/move/Extruder.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IModelObject } from "../../ModelObject";
|
|
2
2
|
import KinematicsBase, { KinematicsName } from "./KinematicsBase";
|
|
3
3
|
export declare class Kinematics extends KinematicsBase {
|
|
4
|
-
constructor();
|
|
4
|
+
constructor(name?: KinematicsName);
|
|
5
5
|
update(jsonElement: any): IModelObject | null;
|
|
6
6
|
}
|
|
7
7
|
export default Kinematics;
|
|
@@ -22,8 +22,8 @@ const HangprinterKinematics_1 = require("./HangprinterKinematics");
|
|
|
22
22
|
const ScaraKinematics_1 = require("./ScaraKinematics");
|
|
23
23
|
const PolarKinematics_1 = require("./PolarKinematics");
|
|
24
24
|
class Kinematics extends KinematicsBase_1.default {
|
|
25
|
-
constructor() {
|
|
26
|
-
super(
|
|
25
|
+
constructor(name = KinematicsBase_1.KinematicsName.unknown) {
|
|
26
|
+
super(name);
|
|
27
27
|
}
|
|
28
28
|
update(jsonElement) {
|
|
29
29
|
if (jsonElement === null) {
|
|
@@ -47,8 +47,9 @@ function getKinematics(name) {
|
|
|
47
47
|
case KinematicsBase_1.KinematicsName.markForged:
|
|
48
48
|
return new CoreKinematics_1.default(name);
|
|
49
49
|
case KinematicsBase_1.KinematicsName.delta:
|
|
50
|
-
case KinematicsBase_1.KinematicsName.rotaryDelta:
|
|
51
50
|
return new DeltaKinematics_1.default(name);
|
|
51
|
+
case KinematicsBase_1.KinematicsName.rotaryDelta:
|
|
52
|
+
return new Kinematics(name);
|
|
52
53
|
case KinematicsBase_1.KinematicsName.hangprinter:
|
|
53
54
|
return new HangprinterKinematics_1.default();
|
|
54
55
|
case KinematicsBase_1.KinematicsName.fiveBarScara:
|
|
@@ -7,6 +7,17 @@ export declare enum NetworkProtocol {
|
|
|
7
7
|
Telnet = "telnet",
|
|
8
8
|
SSH = "ssh"
|
|
9
9
|
}
|
|
10
|
+
export declare enum NetworkInterfaceState {
|
|
11
|
+
disabled = "disabled",
|
|
12
|
+
enabled = "enabled",
|
|
13
|
+
starting1 = "starting1",
|
|
14
|
+
starting2 = "starting2",
|
|
15
|
+
changingMode = "changingMode",
|
|
16
|
+
establishingLink = "establishingLink",
|
|
17
|
+
obtainingIP = "obtainingIP",
|
|
18
|
+
connected = "connected",
|
|
19
|
+
active = "active"
|
|
20
|
+
}
|
|
10
21
|
export declare enum NetworkInterfaceType {
|
|
11
22
|
lan = "lan",
|
|
12
23
|
wifi = "wifi"
|
|
@@ -22,6 +33,7 @@ export declare class NetworkInterface extends ModelObject {
|
|
|
22
33
|
numReconnects: number | null;
|
|
23
34
|
signal: number | null;
|
|
24
35
|
speed: number | null;
|
|
36
|
+
state: NetworkInterfaceState | null;
|
|
25
37
|
subnet: string | null;
|
|
26
38
|
type: NetworkInterfaceType;
|
|
27
39
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NetworkInterface = exports.NetworkInterfaceType = exports.NetworkProtocol = void 0;
|
|
3
|
+
exports.NetworkInterface = exports.NetworkInterfaceType = exports.NetworkInterfaceState = exports.NetworkProtocol = void 0;
|
|
4
4
|
const ModelObject_1 = require("../ModelObject");
|
|
5
5
|
var NetworkProtocol;
|
|
6
6
|
(function (NetworkProtocol) {
|
|
@@ -11,6 +11,18 @@ var NetworkProtocol;
|
|
|
11
11
|
NetworkProtocol["Telnet"] = "telnet";
|
|
12
12
|
NetworkProtocol["SSH"] = "ssh";
|
|
13
13
|
})(NetworkProtocol = exports.NetworkProtocol || (exports.NetworkProtocol = {}));
|
|
14
|
+
var NetworkInterfaceState;
|
|
15
|
+
(function (NetworkInterfaceState) {
|
|
16
|
+
NetworkInterfaceState["disabled"] = "disabled";
|
|
17
|
+
NetworkInterfaceState["enabled"] = "enabled";
|
|
18
|
+
NetworkInterfaceState["starting1"] = "starting1";
|
|
19
|
+
NetworkInterfaceState["starting2"] = "starting2";
|
|
20
|
+
NetworkInterfaceState["changingMode"] = "changingMode";
|
|
21
|
+
NetworkInterfaceState["establishingLink"] = "establishingLink";
|
|
22
|
+
NetworkInterfaceState["obtainingIP"] = "obtainingIP";
|
|
23
|
+
NetworkInterfaceState["connected"] = "connected";
|
|
24
|
+
NetworkInterfaceState["active"] = "active";
|
|
25
|
+
})(NetworkInterfaceState = exports.NetworkInterfaceState || (exports.NetworkInterfaceState = {}));
|
|
14
26
|
var NetworkInterfaceType;
|
|
15
27
|
(function (NetworkInterfaceType) {
|
|
16
28
|
NetworkInterfaceType["lan"] = "lan";
|
|
@@ -29,6 +41,7 @@ class NetworkInterface extends ModelObject_1.default {
|
|
|
29
41
|
this.numReconnects = null;
|
|
30
42
|
this.signal = null;
|
|
31
43
|
this.speed = null;
|
|
44
|
+
this.state = null;
|
|
32
45
|
this.subnet = null;
|
|
33
46
|
this.type = NetworkInterfaceType.wifi;
|
|
34
47
|
}
|
|
@@ -13,7 +13,7 @@ export declare enum SbcPermission {
|
|
|
13
13
|
readFilaments = "readFilaments",
|
|
14
14
|
writeFilaments = "writeFilaments",
|
|
15
15
|
readFirmware = "readFirmware",
|
|
16
|
-
writeFirmware = "
|
|
16
|
+
writeFirmware = "writeFirmware",
|
|
17
17
|
readGCodes = "readGCodes",
|
|
18
18
|
writeGCodes = "writeGCodes",
|
|
19
19
|
readMacros = "readMacros",
|
|
@@ -41,6 +41,7 @@ export declare class PluginManifest extends ModelObject {
|
|
|
41
41
|
version: string;
|
|
42
42
|
license: string;
|
|
43
43
|
homepage: string | null;
|
|
44
|
+
tags: Array<string>;
|
|
44
45
|
dwcVersion: string | null;
|
|
45
46
|
dwcDependencies: Array<string>;
|
|
46
47
|
sbcRequired: boolean;
|
|
@@ -29,7 +29,7 @@ var SbcPermission;
|
|
|
29
29
|
SbcPermission["readFilaments"] = "readFilaments";
|
|
30
30
|
SbcPermission["writeFilaments"] = "writeFilaments";
|
|
31
31
|
SbcPermission["readFirmware"] = "readFirmware";
|
|
32
|
-
SbcPermission["writeFirmware"] = "
|
|
32
|
+
SbcPermission["writeFirmware"] = "writeFirmware";
|
|
33
33
|
SbcPermission["readGCodes"] = "readGCodes";
|
|
34
34
|
SbcPermission["writeGCodes"] = "writeGCodes";
|
|
35
35
|
SbcPermission["readMacros"] = "readMacros";
|
|
@@ -56,6 +56,7 @@ class PluginManifest extends ModelObject_1.default {
|
|
|
56
56
|
this.version = "1.0.0";
|
|
57
57
|
this.license = "LGPL-3.0-or-later";
|
|
58
58
|
this.homepage = null;
|
|
59
|
+
this.tags = [];
|
|
59
60
|
this.dwcVersion = null;
|
|
60
61
|
this.dwcDependencies = [];
|
|
61
62
|
this.sbcRequired = false;
|
|
@@ -10,7 +10,6 @@ var AnalogSensorType;
|
|
|
10
10
|
AnalogSensorType["max31855"] = "thermocouplemax31855";
|
|
11
11
|
AnalogSensorType["max31856"] = "thermocouplemax31856";
|
|
12
12
|
AnalogSensorType["linearAnalog"] = "linearanalog";
|
|
13
|
-
AnalogSensorType["dht11"] = "dht11";
|
|
14
13
|
AnalogSensorType["dht21"] = "dht21";
|
|
15
14
|
AnalogSensorType["dht22"] = "dht22";
|
|
16
15
|
AnalogSensorType["dhtHumidity"] = "dhthumidity";
|
package/dist/sensors/index.d.ts
CHANGED
|
@@ -8,11 +8,11 @@ export declare class GpInputPort extends ModelObject {
|
|
|
8
8
|
value: number;
|
|
9
9
|
}
|
|
10
10
|
export declare class Sensors extends ModelObject {
|
|
11
|
-
readonly analog: ModelCollection<AnalogSensor>;
|
|
12
|
-
readonly endstops: ModelCollection<Endstop>;
|
|
13
|
-
readonly filamentMonitors: ModelCollection<FilamentMonitor>;
|
|
14
|
-
readonly gpIn: ModelCollection<GpInputPort>;
|
|
15
|
-
readonly probes: ModelCollection<Probe>;
|
|
11
|
+
readonly analog: ModelCollection<AnalogSensor | null>;
|
|
12
|
+
readonly endstops: ModelCollection<Endstop | null>;
|
|
13
|
+
readonly filamentMonitors: ModelCollection<FilamentMonitor | null>;
|
|
14
|
+
readonly gpIn: ModelCollection<GpInputPort | null>;
|
|
15
|
+
readonly probes: ModelCollection<Probe | null>;
|
|
16
16
|
}
|
|
17
17
|
export default Sensors;
|
|
18
18
|
export * from "./FilamentMonitors";
|
|
@@ -3,13 +3,13 @@ export declare enum MachineStatus {
|
|
|
3
3
|
starting = "starting",
|
|
4
4
|
updating = "updating",
|
|
5
5
|
off = "off",
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
halted = "halted",
|
|
7
|
+
pausing = "pausing",
|
|
8
8
|
paused = "paused",
|
|
9
9
|
resuming = "resuming",
|
|
10
10
|
cancelling = "cancelling",
|
|
11
11
|
processing = "processing",
|
|
12
|
-
simulating = "
|
|
12
|
+
simulating = "simulating",
|
|
13
13
|
busy = "busy",
|
|
14
14
|
changingTool = "changingTool",
|
|
15
15
|
idle = "idle"
|
|
@@ -7,13 +7,13 @@ var MachineStatus;
|
|
|
7
7
|
MachineStatus["starting"] = "starting";
|
|
8
8
|
MachineStatus["updating"] = "updating";
|
|
9
9
|
MachineStatus["off"] = "off";
|
|
10
|
-
MachineStatus["
|
|
11
|
-
MachineStatus["
|
|
10
|
+
MachineStatus["halted"] = "halted";
|
|
11
|
+
MachineStatus["pausing"] = "pausing";
|
|
12
12
|
MachineStatus["paused"] = "paused";
|
|
13
13
|
MachineStatus["resuming"] = "resuming";
|
|
14
14
|
MachineStatus["cancelling"] = "cancelling";
|
|
15
15
|
MachineStatus["processing"] = "processing";
|
|
16
|
-
MachineStatus["simulating"] = "
|
|
16
|
+
MachineStatus["simulating"] = "simulating";
|
|
17
17
|
MachineStatus["busy"] = "busy";
|
|
18
18
|
MachineStatus["changingTool"] = "changingTool";
|
|
19
19
|
MachineStatus["idle"] = "idle";
|
|
@@ -3,11 +3,20 @@ export declare enum MessageBoxMode {
|
|
|
3
3
|
noButtons = 0,
|
|
4
4
|
closeOnly = 1,
|
|
5
5
|
okOnly = 2,
|
|
6
|
-
okCancel = 3
|
|
6
|
+
okCancel = 3,
|
|
7
|
+
multipleChoice = 4,
|
|
8
|
+
intInput = 5,
|
|
9
|
+
floatInput = 6,
|
|
10
|
+
stringInput = 7
|
|
7
11
|
}
|
|
8
12
|
export declare class MessageBox extends ModelObject {
|
|
9
|
-
axisControls: number;
|
|
13
|
+
axisControls: number | null;
|
|
14
|
+
cancelButton: boolean;
|
|
15
|
+
choices: Array<string> | null;
|
|
16
|
+
default: number | string | null;
|
|
17
|
+
max: number | null;
|
|
10
18
|
message: string;
|
|
19
|
+
min: number | null;
|
|
11
20
|
mode: MessageBoxMode;
|
|
12
21
|
seq: number;
|
|
13
22
|
timeout: number;
|
package/dist/state/MessageBox.js
CHANGED
|
@@ -8,12 +8,21 @@ var MessageBoxMode;
|
|
|
8
8
|
MessageBoxMode[MessageBoxMode["closeOnly"] = 1] = "closeOnly";
|
|
9
9
|
MessageBoxMode[MessageBoxMode["okOnly"] = 2] = "okOnly";
|
|
10
10
|
MessageBoxMode[MessageBoxMode["okCancel"] = 3] = "okCancel";
|
|
11
|
+
MessageBoxMode[MessageBoxMode["multipleChoice"] = 4] = "multipleChoice";
|
|
12
|
+
MessageBoxMode[MessageBoxMode["intInput"] = 5] = "intInput";
|
|
13
|
+
MessageBoxMode[MessageBoxMode["floatInput"] = 6] = "floatInput";
|
|
14
|
+
MessageBoxMode[MessageBoxMode["stringInput"] = 7] = "stringInput";
|
|
11
15
|
})(MessageBoxMode = exports.MessageBoxMode || (exports.MessageBoxMode = {}));
|
|
12
16
|
class MessageBox extends ModelObject_1.default {
|
|
13
17
|
constructor() {
|
|
14
18
|
super(...arguments);
|
|
15
|
-
this.axisControls =
|
|
19
|
+
this.axisControls = null;
|
|
20
|
+
this.cancelButton = false;
|
|
21
|
+
this.choices = null;
|
|
22
|
+
this.default = null;
|
|
23
|
+
this.max = null;
|
|
16
24
|
this.message = "";
|
|
25
|
+
this.min = null;
|
|
17
26
|
this.mode = MessageBoxMode.okOnly;
|
|
18
27
|
this.seq = -1;
|
|
19
28
|
this.timeout = 0;
|
package/dist/state/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export declare class State extends ModelObject {
|
|
|
32
32
|
dsfVersion: string | null;
|
|
33
33
|
dsfPluginSupport: boolean;
|
|
34
34
|
dsfRootPluginSupport: boolean;
|
|
35
|
-
readonly gpOut: ModelCollection<GpOutputPort>;
|
|
35
|
+
readonly gpOut: ModelCollection<GpOutputPort | null>;
|
|
36
36
|
laserPwm: number | null;
|
|
37
37
|
logFile: string | null;
|
|
38
38
|
logLevel: LogLevel;
|
package/dist/volumes/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ModelObject from "../ModelObject";
|
|
2
2
|
export declare class Volume extends ModelObject {
|
|
3
|
-
capacity: bigint | null;
|
|
4
|
-
freeSpace: bigint | null;
|
|
3
|
+
capacity: number | bigint | null;
|
|
4
|
+
freeSpace: number | bigint | null;
|
|
5
5
|
mounted: boolean;
|
|
6
6
|
name: string | null;
|
|
7
7
|
openFiles: number | null;
|
package/package.json
CHANGED
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@duet3d/objectmodel",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "TypeScript implementation of the Duet3D Object Model",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "jest --config jestconfig.json",
|
|
9
|
-
"build": "tsc",
|
|
10
|
-
"prepare"
|
|
11
|
-
"prepublishOnly"
|
|
12
|
-
},
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/Duet3D/ObjectModel.git"
|
|
16
|
-
},
|
|
17
|
-
"author": "Christian Hammacher",
|
|
18
|
-
"license": "LGPL-2.1",
|
|
19
|
-
"bugs": {
|
|
20
|
-
"url": "https://github.com/Duet3D/ObjectModel/issues"
|
|
21
|
-
},
|
|
22
|
-
"homepage": "https://github.com/Duet3D/ObjectModel#readme",
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@types/jest": "^27.0
|
|
25
|
-
"jest": "^27.
|
|
26
|
-
"ts-jest": "^27.1.
|
|
27
|
-
"typescript": "^4.
|
|
28
|
-
},
|
|
29
|
-
"files": [
|
|
30
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@duet3d/objectmodel",
|
|
3
|
+
"version": "3.5.0-b1",
|
|
4
|
+
"description": "TypeScript implementation of the Duet3D Object Model",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "jest --config jestconfig.json",
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"prepare": "npm run build",
|
|
11
|
+
"prepublishOnly": "npm test"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/Duet3D/ObjectModel.git"
|
|
16
|
+
},
|
|
17
|
+
"author": "Christian Hammacher",
|
|
18
|
+
"license": "LGPL-2.1",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/Duet3D/ObjectModel/issues"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/Duet3D/ObjectModel#readme",
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/jest": "^27.5.0",
|
|
25
|
+
"jest": "^27.5.1",
|
|
26
|
+
"ts-jest": "^27.1.4",
|
|
27
|
+
"typescript": "^4.6.4"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"/dist"
|
|
31
|
+
]
|
|
32
|
+
}
|