@duet3d/objectmodel 3.5.0 → 3.5.2
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.js +2 -2
- package/dist/ModelDictionary.js +2 -2
- package/dist/ModelObject.js +3 -3
- package/dist/boards/directDisplay/index.js +2 -2
- package/dist/httpEndpoints/index.d.ts +19 -0
- package/dist/httpEndpoints/index.js +27 -0
- package/dist/index.js +1 -2
- package/dist/move/DriverId.js +2 -2
- package/dist/move/kinematics/index.js +2 -2
- package/dist/sensors/FilamentMonitors/index.js +2 -2
- package/dist/tools/ToolRetraction.d.ts +9 -0
- package/dist/tools/ToolRetraction.js +16 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.js +2 -0
- package/dist/userSessions/index.d.ts +18 -0
- package/dist/userSessions/index.js +27 -0
- package/package.json +1 -1
package/dist/ModelCollection.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ModelCollection = void 0;
|
|
4
|
+
exports.initCollection = initCollection;
|
|
4
5
|
const ModelObject_1 = require("./ModelObject");
|
|
5
6
|
const index_1 = require("./index");
|
|
6
7
|
/**
|
|
@@ -103,4 +104,3 @@ function initCollection(itemType, data) {
|
|
|
103
104
|
}
|
|
104
105
|
return result;
|
|
105
106
|
}
|
|
106
|
-
exports.initCollection = initCollection;
|
package/dist/ModelDictionary.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ModelDictionary = void 0;
|
|
4
|
+
exports.initDictionary = initDictionary;
|
|
4
5
|
const ModelObject_1 = require("./ModelObject");
|
|
5
6
|
/**
|
|
6
7
|
* Dictionary class to map object model data
|
|
@@ -105,4 +106,3 @@ function initDictionary(nullDeletesKeys, itemConstructor, data) {
|
|
|
105
106
|
}
|
|
106
107
|
return result;
|
|
107
108
|
}
|
|
108
|
-
exports.initDictionary = initDictionary;
|
package/dist/ModelObject.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ModelObject = void 0;
|
|
4
|
+
exports.isModelObject = isModelObject;
|
|
5
|
+
exports.initObject = initObject;
|
|
4
6
|
const index_1 = require("./index");
|
|
5
7
|
/**
|
|
6
8
|
* Check whether a given value provides model update functionality
|
|
@@ -9,7 +11,6 @@ const index_1 = require("./index");
|
|
|
9
11
|
function isModelObject(value) {
|
|
10
12
|
return (value instanceof Object) && value.update !== undefined;
|
|
11
13
|
}
|
|
12
|
-
exports.isModelObject = isModelObject;
|
|
13
14
|
/**
|
|
14
15
|
* Base class for object model classes
|
|
15
16
|
*/
|
|
@@ -237,4 +238,3 @@ exports.default = ModelObject;
|
|
|
237
238
|
function initObject(itemType, data) {
|
|
238
239
|
return new itemType().update(data);
|
|
239
240
|
}
|
|
240
|
-
exports.initObject = initObject;
|
|
@@ -14,7 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.DirectDisplay = exports.DirectDisplayEncoder = exports.DirectDisplayController = void 0;
|
|
18
|
+
exports.getDirectDisplayScreen = getDirectDisplayScreen;
|
|
18
19
|
const ModelObject_1 = require("../../ModelObject");
|
|
19
20
|
const DirectDisplayScreen_1 = require("./DirectDisplayScreen");
|
|
20
21
|
const DirectDisplayScreenST7567_1 = require("./DirectDisplayScreenST7567");
|
|
@@ -51,6 +52,5 @@ function getDirectDisplayScreen(controller) {
|
|
|
51
52
|
return new DirectDisplayScreenST7567_1.DirectDisplayScreenST7567();
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
|
-
exports.getDirectDisplayScreen = getDirectDisplayScreen;
|
|
55
55
|
__exportStar(require("./DirectDisplayScreen"), exports);
|
|
56
56
|
__exportStar(require("./DirectDisplayScreenST7567"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import ModelObject from "../ModelObject";
|
|
2
|
+
export declare enum HttpEndpointType {
|
|
3
|
+
GET = "GET",
|
|
4
|
+
POST = "POST",
|
|
5
|
+
PUT = "PUT",
|
|
6
|
+
PATCH = "PATCH",
|
|
7
|
+
TRACE = "TRACE",
|
|
8
|
+
DELETE = "DELETE",
|
|
9
|
+
OPTIONS = "OPTIONS",
|
|
10
|
+
WebSocket = "WebSocket"
|
|
11
|
+
}
|
|
12
|
+
export declare class HttpEndpoint extends ModelObject {
|
|
13
|
+
endpointType: HttpEndpointType;
|
|
14
|
+
namespace: string;
|
|
15
|
+
path: string;
|
|
16
|
+
isUploadRequest: boolean;
|
|
17
|
+
unixSocket: string;
|
|
18
|
+
}
|
|
19
|
+
export default HttpEndpoint;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HttpEndpoint = 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.HttpEndpoint = HttpEndpoint;
|
|
27
|
+
exports.default = HttpEndpoint;
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.setArrayItem =
|
|
17
|
+
exports.setArrayItem = setArrayItem;
|
|
18
18
|
// Expose all the sub-exports
|
|
19
19
|
__exportStar(require("./ModelCollection"), exports);
|
|
20
20
|
__exportStar(require("./ModelDictionary"), exports);
|
|
@@ -52,4 +52,3 @@ globalThis._duetModelSetArray = (array, index, value) => array[index] = value;
|
|
|
52
52
|
function setArrayItem(array, index, value) {
|
|
53
53
|
globalThis._duetModelSetArray(array, index, value);
|
|
54
54
|
}
|
|
55
|
-
exports.setArrayItem = setArrayItem;
|
package/dist/move/DriverId.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DriverId =
|
|
3
|
+
exports.DriverId = void 0;
|
|
4
|
+
exports.isDriverId = isDriverId;
|
|
4
5
|
const ModelObject_1 = require("../ModelObject");
|
|
5
6
|
function isDriverId(value) {
|
|
6
7
|
return (value instanceof Object) && value.board !== undefined && value.driver !== undefined;
|
|
7
8
|
}
|
|
8
|
-
exports.isDriverId = isDriverId;
|
|
9
9
|
class DriverId extends ModelObject_1.default {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
@@ -14,7 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.Kinematics = void 0;
|
|
18
|
+
exports.getKinematics = getKinematics;
|
|
18
19
|
const KinematicsBase_1 = require("./KinematicsBase");
|
|
19
20
|
const CoreKinematics_1 = require("./CoreKinematics");
|
|
20
21
|
const DeltaKinematics_1 = require("./DeltaKinematics");
|
|
@@ -64,7 +65,6 @@ function getKinematics(name) {
|
|
|
64
65
|
return new CoreKinematics_1.default(name);
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
|
-
exports.getKinematics = getKinematics;
|
|
68
68
|
__exportStar(require("./CoreKinematics"), exports);
|
|
69
69
|
__exportStar(require("./DeltaKinematics"), exports);
|
|
70
70
|
__exportStar(require("./HangprinterKinematics"), exports);
|
|
@@ -14,7 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.FilamentMonitor = void 0;
|
|
18
|
+
exports.getFilamentMonitor = getFilamentMonitor;
|
|
18
19
|
const FilamentMonitorBase_1 = require("./FilamentMonitorBase");
|
|
19
20
|
const LaserFilamentMonitor_1 = require("./LaserFilamentMonitor");
|
|
20
21
|
const PulsedFilamentMonitor_1 = require("./PulsedFilamentMonitor");
|
|
@@ -44,7 +45,6 @@ function getFilamentMonitor(type) {
|
|
|
44
45
|
return new FilamentMonitor(type);
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
|
-
exports.getFilamentMonitor = getFilamentMonitor;
|
|
48
48
|
__exportStar(require("./FilamentMonitorBase"), exports);
|
|
49
49
|
__exportStar(require("./Duet3DFilamentMonitor"), exports);
|
|
50
50
|
__exportStar(require("./LaserFilamentMonitor"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToolRetraction = void 0;
|
|
4
|
+
const ModelObject_1 = require("../ModelObject");
|
|
5
|
+
class ToolRetraction extends ModelObject_1.default {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.extraRestart = 0;
|
|
9
|
+
this.length = 0;
|
|
10
|
+
this.speed = 0;
|
|
11
|
+
this.unretractSpeed = 0;
|
|
12
|
+
this.zHop = 0;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.ToolRetraction = ToolRetraction;
|
|
16
|
+
exports.default = ToolRetraction;
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import ModelObject from "../ModelObject";
|
|
2
|
+
import ToolRetraction from "./ToolRetraction";
|
|
2
3
|
export declare enum ToolState {
|
|
3
4
|
off = "off",
|
|
4
5
|
active = "active",
|
|
@@ -18,6 +19,7 @@ export declare class Tool extends ModelObject {
|
|
|
18
19
|
number: number;
|
|
19
20
|
offsets: Array<number>;
|
|
20
21
|
offsetsProbed: boolean;
|
|
22
|
+
retraction: ToolRetraction;
|
|
21
23
|
spindle: number;
|
|
22
24
|
spindleRpm: number;
|
|
23
25
|
standby: Array<number>;
|
package/dist/tools/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Tool = exports.ToolState = void 0;
|
|
4
4
|
const ModelObject_1 = require("../ModelObject");
|
|
5
|
+
const ToolRetraction_1 = require("./ToolRetraction");
|
|
5
6
|
var ToolState;
|
|
6
7
|
(function (ToolState) {
|
|
7
8
|
ToolState["off"] = "off";
|
|
@@ -24,6 +25,7 @@ class Tool extends ModelObject_1.default {
|
|
|
24
25
|
this.number = 0;
|
|
25
26
|
this.offsets = [];
|
|
26
27
|
this.offsetsProbed = false;
|
|
28
|
+
this.retraction = new ToolRetraction_1.default();
|
|
27
29
|
this.spindle = -1;
|
|
28
30
|
this.spindleRpm = 0;
|
|
29
31
|
this.standby = [];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import ModelObject from "../ModelObject";
|
|
2
|
+
export declare enum AccessLevel {
|
|
3
|
+
readOnly = "readOnly",
|
|
4
|
+
readWrite = "readWrite"
|
|
5
|
+
}
|
|
6
|
+
export declare enum SessionType {
|
|
7
|
+
local = "local",
|
|
8
|
+
http = "http",
|
|
9
|
+
telnet = "telnet"
|
|
10
|
+
}
|
|
11
|
+
export declare class UserSession extends ModelObject {
|
|
12
|
+
accessLevel: AccessLevel;
|
|
13
|
+
id: number;
|
|
14
|
+
origin: string | null;
|
|
15
|
+
originId: number;
|
|
16
|
+
sessionType: SessionType;
|
|
17
|
+
}
|
|
18
|
+
export default UserSession;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserSession = exports.SessionType = exports.AccessLevel = void 0;
|
|
4
|
+
const ModelObject_1 = require("../ModelObject");
|
|
5
|
+
var AccessLevel;
|
|
6
|
+
(function (AccessLevel) {
|
|
7
|
+
AccessLevel["readOnly"] = "readOnly";
|
|
8
|
+
AccessLevel["readWrite"] = "readWrite";
|
|
9
|
+
})(AccessLevel = exports.AccessLevel || (exports.AccessLevel = {}));
|
|
10
|
+
var SessionType;
|
|
11
|
+
(function (SessionType) {
|
|
12
|
+
SessionType["local"] = "local";
|
|
13
|
+
SessionType["http"] = "http";
|
|
14
|
+
SessionType["telnet"] = "telnet";
|
|
15
|
+
})(SessionType = exports.SessionType || (exports.SessionType = {}));
|
|
16
|
+
class UserSession extends ModelObject_1.default {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.accessLevel = AccessLevel.readOnly;
|
|
20
|
+
this.id = 0;
|
|
21
|
+
this.origin = null;
|
|
22
|
+
this.originId = -1;
|
|
23
|
+
this.sessionType = SessionType.local;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.UserSession = UserSession;
|
|
27
|
+
exports.default = UserSession;
|