@kuriousdesign/machine-sdk 1.0.45 → 1.0.46

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.
@@ -17,10 +17,11 @@ export interface ApiOpcuaData {
17
17
  export declare const initialApiOpcuaData: ApiOpcuaData;
18
18
  export declare enum ApiReqRespStates {
19
19
  INACTIVE = 0,
20
- REQUEST_READY = 1,
21
- REJECTED_INVALID_CHECKSUM = 2,
22
- REJECTED_ACTION_NOT_ACCEPTED = 3,
23
- REJECTED_INVALID_SENDERID = 4,
20
+ WRITING = 10,
21
+ REQUEST_READY = 20,
22
+ REJECTED_INVALID_CHECKSUM = 30,
23
+ REJECTED_ACTION_NOT_ACCEPTED = 40,
24
+ REJECTED_INVALID_SENDERID = 50,
24
25
  ACCEPTED = 1000
25
26
  }
26
27
  export declare function apiReqRespStateToString(state: ApiReqRespStates): string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ApiReqRespStates = exports.initialApiOpcuaData = exports.initialApiOpcuaReqData = void 0;
3
+ exports.initialApiOpcuaData = exports.initialApiOpcuaReqData = void 0;
4
4
  exports.apiReqRespStateToString = apiReqRespStateToString;
5
5
  const Actions_1 = require("./Actions");
6
6
  exports.initialApiOpcuaReqData = {
@@ -17,19 +17,12 @@ exports.initialApiOpcuaData = {
17
17
  req: {},
18
18
  resp: {}
19
19
  };
20
- var ApiReqRespStates;
21
- (function (ApiReqRespStates) {
22
- ApiReqRespStates[ApiReqRespStates["INACTIVE"] = 0] = "INACTIVE";
23
- ApiReqRespStates[ApiReqRespStates["REQUEST_READY"] = 1] = "REQUEST_READY";
24
- ApiReqRespStates[ApiReqRespStates["REJECTED_INVALID_CHECKSUM"] = 2] = "REJECTED_INVALID_CHECKSUM";
25
- ApiReqRespStates[ApiReqRespStates["REJECTED_ACTION_NOT_ACCEPTED"] = 3] = "REJECTED_ACTION_NOT_ACCEPTED";
26
- ApiReqRespStates[ApiReqRespStates["REJECTED_INVALID_SENDERID"] = 4] = "REJECTED_INVALID_SENDERID";
27
- ApiReqRespStates[ApiReqRespStates["ACCEPTED"] = 1000] = "ACCEPTED";
28
- })(ApiReqRespStates || (exports.ApiReqRespStates = ApiReqRespStates = {}));
29
20
  function apiReqRespStateToString(state) {
30
21
  switch (state) {
31
22
  case ApiReqRespStates.INACTIVE:
32
23
  return "INACTIVE";
24
+ case ApiReqRespStates.WRITING:
25
+ return "WRITING";
33
26
  case ApiReqRespStates.REQUEST_READY:
34
27
  return "REQUEST_READY";
35
28
  case ApiReqRespStates.REJECTED_INVALID_CHECKSUM:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuriousdesign/machine-sdk",
3
- "version": "1.0.45",
3
+ "version": "1.0.46",
4
4
  "description": "Shared data types and helpers for machine-related repositories",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -32,19 +32,25 @@ export const initialApiOpcuaData: ApiOpcuaData = {
32
32
  resp: {} as ApiOpcuaReqData
33
33
  };
34
34
 
35
- export enum ApiReqRespStates {
36
- INACTIVE = 0,
37
- REQUEST_READY = 1,
38
- REJECTED_INVALID_CHECKSUM = 2,
39
- REJECTED_ACTION_NOT_ACCEPTED = 3,
40
- REJECTED_INVALID_SENDERID = 4,
41
- ACCEPTED = 1000
35
+
36
+ export declare enum ApiReqRespStates {
37
+ INACTIVE = 0,
38
+ WRITING = 10,
39
+ REQUEST_READY = 20,
40
+ REJECTED_INVALID_CHECKSUM = 30,
41
+ REJECTED_ACTION_NOT_ACCEPTED = 40,
42
+ REJECTED_INVALID_SENDERID = 50,
43
+ ACCEPTED = 1000,
44
+ // ERROR = 911,
45
+ // DONE = 1000
42
46
  }
43
47
 
44
48
  export function apiReqRespStateToString(state: ApiReqRespStates): string {
45
49
  switch (state) {
46
50
  case ApiReqRespStates.INACTIVE:
47
51
  return "INACTIVE";
52
+ case ApiReqRespStates.WRITING:
53
+ return "WRITING";
48
54
  case ApiReqRespStates.REQUEST_READY:
49
55
  return "REQUEST_READY";
50
56
  case ApiReqRespStates.REJECTED_INVALID_CHECKSUM: