@duet3d/objectmodel 3.6.0-alpha.3 → 3.6.0-alpha.5

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.
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initCollection = exports.ModelCollection = void 0;
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;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initDictionary = exports.ModelDictionary = void 0;
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;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initObject = exports.ModelObject = exports.isModelObject = void 0;
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
  */
@@ -234,4 +235,3 @@ exports.default = ModelObject;
234
235
  function initObject(itemType, data) {
235
236
  return new itemType().update(data);
236
237
  }
237
- 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.getDirectDisplayScreen = exports.DirectDisplay = exports.DirectDisplayEncoder = exports.DirectDisplayController = void 0;
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 = void 0;
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;
@@ -58,6 +58,7 @@ export declare class Axis extends ModelObject {
58
58
  minProbed: boolean;
59
59
  percentCurrent: number;
60
60
  percentStstCurrent: number | null;
61
+ printingJerk: number;
61
62
  reducedAcceleration: number;
62
63
  speed: number;
63
64
  stepsPerMm: number;
package/dist/move/Axis.js CHANGED
@@ -64,6 +64,7 @@ class Axis extends ModelObject_1.default {
64
64
  this.minProbed = false;
65
65
  this.percentCurrent = 100;
66
66
  this.percentStstCurrent = null;
67
+ this.printingJerk = 15;
67
68
  this.reducedAcceleration = 0;
68
69
  this.speed = 100;
69
70
  this.stepsPerMm = 80;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DriverId = exports.isDriverId = void 0;
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);
@@ -21,6 +21,7 @@ export declare class Extruder extends ModelObject {
21
21
  percentStstCurrent: number | null;
22
22
  position: number;
23
23
  pressureAdvance: number;
24
+ printingJerk: number;
24
25
  rawPosition: number;
25
26
  speed: number;
26
27
  stepsPerMm: number;
@@ -29,6 +29,7 @@ class Extruder extends ModelObject_1.default {
29
29
  this.percentStstCurrent = null;
30
30
  this.position = 0;
31
31
  this.pressureAdvance = 0;
32
+ this.printingJerk = 15;
32
33
  this.rawPosition = 0;
33
34
  this.speed = 100;
34
35
  this.stepsPerMm = 420;
@@ -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.getKinematics = exports.Kinematics = void 0;
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.getFilamentMonitor = exports.FilamentMonitor = void 0;
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);
@@ -5,16 +5,21 @@ export declare enum SpindleState {
5
5
  forward = "forward",
6
6
  reverse = "reverse"
7
7
  }
8
+ export declare enum SpindleType {
9
+ enaDir = "enaDir",
10
+ fwdRev = "fwdRev"
11
+ }
8
12
  export declare class Spindle extends ModelObject {
9
- active: number;
10
- canReverse: boolean;
11
- current: number;
12
- frequency: number;
13
- idlePwm: number;
14
- min: number;
15
- minPwm: number;
16
- max: number;
17
- maxPwm: number;
13
+ active: number | null;
14
+ canReverse: boolean | null;
15
+ current: number | null;
16
+ frequency: number | null;
17
+ idlePwm: number | null;
18
+ min: number | null;
19
+ minPwm: number | null;
20
+ max: number | null;
21
+ maxPwm: number | null;
18
22
  state: SpindleState;
23
+ type: SpindleType | null;
19
24
  }
20
25
  export default Spindle;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Spindle = exports.SpindleState = void 0;
3
+ exports.Spindle = exports.SpindleType = exports.SpindleState = void 0;
4
4
  const ModelObject_1 = require("../ModelObject");
5
5
  var SpindleState;
6
6
  (function (SpindleState) {
@@ -9,19 +9,25 @@ var SpindleState;
9
9
  SpindleState["forward"] = "forward";
10
10
  SpindleState["reverse"] = "reverse";
11
11
  })(SpindleState || (exports.SpindleState = SpindleState = {}));
12
+ var SpindleType;
13
+ (function (SpindleType) {
14
+ SpindleType["enaDir"] = "enaDir";
15
+ SpindleType["fwdRev"] = "fwdRev";
16
+ })(SpindleType || (exports.SpindleType = SpindleType = {}));
12
17
  class Spindle extends ModelObject_1.default {
13
18
  constructor() {
14
19
  super(...arguments);
15
- this.active = 0;
16
- this.canReverse = false;
17
- this.current = 0;
18
- this.frequency = 0;
19
- this.idlePwm = 0;
20
- this.min = 60;
21
- this.minPwm = 0;
22
- this.max = 10000;
23
- this.maxPwm = 1;
20
+ this.active = null;
21
+ this.canReverse = null;
22
+ this.current = null;
23
+ this.frequency = null;
24
+ this.idlePwm = null;
25
+ this.min = null;
26
+ this.minPwm = null;
27
+ this.max = null;
28
+ this.maxPwm = null;
24
29
  this.state = SpindleState.unconfigured;
30
+ this.type = null;
25
31
  }
26
32
  }
27
33
  exports.Spindle = Spindle;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duet3d/objectmodel",
3
- "version": "3.6.0-alpha.3",
3
+ "version": "3.6.0-alpha.5",
4
4
  "description": "TypeScript implementation of the Duet3D Object Model",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",