node-opcua-modeler 2.64.0 → 2.64.1

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 (42) hide show
  1. package/MyModel.NodeSet2.xml +125 -0
  2. package/dist/addExtensionObjectDataType.d.ts +21 -21
  3. package/dist/addExtensionObjectDataType.js +130 -130
  4. package/dist/buildModel.d.ts +16 -0
  5. package/dist/buildModel.js +91 -0
  6. package/dist/buildModel.js.map +1 -0
  7. package/dist/build_model_inner.d.ts +17 -17
  8. package/dist/build_model_inner.js +40 -40
  9. package/dist/display.d.ts +2 -0
  10. package/dist/display.js +96 -0
  11. package/dist/display.js.map +1 -0
  12. package/dist/displayNodeElement.d.ts +5 -5
  13. package/dist/displayNodeElement.js +191 -191
  14. package/dist/dump_state_machine_to_graphviz.d.ts +6 -6
  15. package/dist/dump_state_machine_to_graphviz.js +119 -119
  16. package/dist/generate_markdown_doc.d.ts +6 -6
  17. package/dist/generate_markdown_doc.js +266 -266
  18. package/dist/index.d.ts +24 -24
  19. package/dist/index.js +48 -48
  20. package/dist/promoteToMandatory.d.ts +8 -8
  21. package/dist/promoteToMandatory.js +97 -97
  22. package/dist/setNamespaceMetaData.d.ts +1 -1
  23. package/dist/setNamespaceMetaData.js +5 -5
  24. package/dist/symbol.d.ts +1 -1
  25. package/dist/symbol.js +2 -2
  26. package/dist/tableHelper.d.ts +9 -9
  27. package/dist/tableHelper.js +60 -60
  28. package/dist/to_cvs.d.ts +2 -2
  29. package/dist/to_cvs.js +11 -11
  30. package/dist/to_graphivz.d.ts +14 -14
  31. package/dist/to_graphivz.js +294 -294
  32. package/dist/types.d.ts +1 -1
  33. package/dist/types.js +2 -2
  34. package/distNodeJS/build_documentation_to_file.d.ts +2 -2
  35. package/distNodeJS/build_documentation_to_file.js +26 -26
  36. package/distNodeJS/build_model.d.ts +7 -7
  37. package/distNodeJS/build_model.js +21 -21
  38. package/distNodeJS/index.d.ts +5 -5
  39. package/distNodeJS/index.js +19 -19
  40. package/distNodeJS/symbol_cvs.d.ts +3 -3
  41. package/distNodeJS/symbol_cvs.js +63 -63
  42. package/package.json +52 -53
@@ -1,120 +1,120 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dumpStateMachineToGraphViz = exports.dumpStateMachineToPlantUML = void 0;
4
- function dumpStateMachineToPlantUML(stateMachineType) {
5
- const lines = [];
6
- function w(str) {
7
- lines.push(str);
8
- }
9
- function s(state) {
10
- return state ? state.nodeId.value.toString() : "";
11
- }
12
- function n(state) {
13
- return state ? state.browseName.name.toString() : "";
14
- }
15
- //w("@startuml "); // + stateMachineType.browseName.toString() + ".png");
16
- // initial state if any
17
- if (stateMachineType.initialState) {
18
- w(" [*] --> " + s(stateMachineType.initialState));
19
- w(" " + s(stateMachineType.initialState) + ":" + n(stateMachineType.initialState));
20
- }
21
- else {
22
- w("[*] --> [*]");
23
- }
24
- function t(transition) {
25
- let name = n(transition);
26
- name = name.replace(":", "");
27
- name = name.replace("To", "\\nTo\\n");
28
- name = name.replace("Transition", "\\nTransition");
29
- return name;
30
- }
31
- stateMachineType.states && stateMachineType.states.forEach((state) => w(" " + s(state) + ": " + n(state)));
32
- stateMachineType.transitions && stateMachineType.transitions.forEach((transition) => w(" " + s(transition.fromStateNode) + " --> " + s(transition.toStateNode) + " : " + t(transition)));
33
- // w("@enduml");
34
- return lines.join("\n");
35
- }
36
- exports.dumpStateMachineToPlantUML = dumpStateMachineToPlantUML;
37
- /*
38
- @startuml
39
-
40
- 2930: Unshelved
41
-
42
- 2932: TimedShelved
43
-
44
- 2933: OneShotShelved
45
-
46
- 2930 --> 2932 : "2935\nUnshelvedToTimedShelved"
47
-
48
- 2930 --> 2933 : "2936\nUnshelvedToOneShotShelved"
49
-
50
- 2932 --> 2930 : "2940\nTimedShelvedToUnshelved"
51
-
52
- 2932 --> 2933 : "2942\nTimedShelvedToOneShotShelved"
53
-
54
- 2933 --> 2930 : "2943\nOneShotShelvedToUnshelved"
55
-
56
- 2933 --> 2932 : "2945\nOneShotShelvedToTimedShelved"
57
-
58
- @enduml
59
-
60
- */
61
- /*
62
- digraph finite_state_machine {
63
- rankdir=LR;
64
- size="8,5"
65
- node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8;
66
- node [shape = circle];
67
- LR_0 -> LR_2 [ label = "SS(B)" ];
68
- LR_0 -> LR_1 [ label = "SS(S)" ];
69
- LR_1 -> LR_3 [ label = "S($end)" ];
70
- LR_2 -> LR_6 [ label = "SS(b)" ];
71
- LR_2 -> LR_5 [ label = "SS(a)" ];
72
- LR_2 -> LR_4 [ label = "S(A)" ];
73
- LR_5 -> LR_7 [ label = "S(b)" ];
74
- LR_5 -> LR_5 [ label = "S(a)" ];
75
- LR_6 -> LR_6 [ label = "S(b)" ];
76
- LR_6 -> LR_5 [ label = "S(a)" ];
77
- LR_7 -> LR_8 [ label = "S(b)" ];
78
- LR_7 -> LR_5 [ label = "S(a)" ];
79
- LR_8 -> LR_6 [ label = "S(b)" ];
80
- LR_8 -> LR_5 [ label = "S(a)" ];
81
- }
82
- */
83
- function dumpStateMachineToGraphViz(
84
- /*StateMachineProxy*/
85
- stateMachineType) {
86
- const lines = [];
87
- function w(str) {
88
- lines.push(str);
89
- }
90
- function s(state) {
91
- return state.nodeId.value.toString();
92
- }
93
- function n(state) {
94
- return state.browseName.name.toString();
95
- }
96
- function s_full(state) {
97
- return s(state) + ' [ label = "' + n(state) + '" ]';
98
- }
99
- w("digraph finite_state_machine {");
100
- // initial state if any
101
- if (stateMachineType.initialState) {
102
- w("node [ shape = doublecircle];");
103
- w(" _" + s_full(stateMachineType.initialState) + " ;");
104
- }
105
- w("node [ shape = circle];");
106
- stateMachineType.states.forEach((state) => w(" _" + s_full(state)));
107
- stateMachineType.transitions.forEach((transition) => w(" _" +
108
- s(transition.fromStateNode) +
109
- " -> _" +
110
- s(transition.toStateNode) +
111
- " [ " +
112
- // " labeltooltip = \"" + i(transition) + "\" " +
113
- ', label = "' +
114
- n(transition) +
115
- '" ];'));
116
- w("}");
117
- return lines.join("\n");
118
- }
119
- exports.dumpStateMachineToGraphViz = dumpStateMachineToGraphViz;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dumpStateMachineToGraphViz = exports.dumpStateMachineToPlantUML = void 0;
4
+ function dumpStateMachineToPlantUML(stateMachineType) {
5
+ const lines = [];
6
+ function w(str) {
7
+ lines.push(str);
8
+ }
9
+ function s(state) {
10
+ return state ? state.nodeId.value.toString() : "";
11
+ }
12
+ function n(state) {
13
+ return state ? state.browseName.name.toString() : "";
14
+ }
15
+ //w("@startuml "); // + stateMachineType.browseName.toString() + ".png");
16
+ // initial state if any
17
+ if (stateMachineType.initialState) {
18
+ w(" [*] --> " + s(stateMachineType.initialState));
19
+ w(" " + s(stateMachineType.initialState) + ":" + n(stateMachineType.initialState));
20
+ }
21
+ else {
22
+ w("[*] --> [*]");
23
+ }
24
+ function t(transition) {
25
+ let name = n(transition);
26
+ name = name.replace(":", "");
27
+ name = name.replace("To", "\\nTo\\n");
28
+ name = name.replace("Transition", "\\nTransition");
29
+ return name;
30
+ }
31
+ stateMachineType.states && stateMachineType.states.forEach((state) => w(" " + s(state) + ": " + n(state)));
32
+ stateMachineType.transitions && stateMachineType.transitions.forEach((transition) => w(" " + s(transition.fromStateNode) + " --> " + s(transition.toStateNode) + " : " + t(transition)));
33
+ // w("@enduml");
34
+ return lines.join("\n");
35
+ }
36
+ exports.dumpStateMachineToPlantUML = dumpStateMachineToPlantUML;
37
+ /*
38
+ @startuml
39
+
40
+ 2930: Unshelved
41
+
42
+ 2932: TimedShelved
43
+
44
+ 2933: OneShotShelved
45
+
46
+ 2930 --> 2932 : "2935\nUnshelvedToTimedShelved"
47
+
48
+ 2930 --> 2933 : "2936\nUnshelvedToOneShotShelved"
49
+
50
+ 2932 --> 2930 : "2940\nTimedShelvedToUnshelved"
51
+
52
+ 2932 --> 2933 : "2942\nTimedShelvedToOneShotShelved"
53
+
54
+ 2933 --> 2930 : "2943\nOneShotShelvedToUnshelved"
55
+
56
+ 2933 --> 2932 : "2945\nOneShotShelvedToTimedShelved"
57
+
58
+ @enduml
59
+
60
+ */
61
+ /*
62
+ digraph finite_state_machine {
63
+ rankdir=LR;
64
+ size="8,5"
65
+ node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8;
66
+ node [shape = circle];
67
+ LR_0 -> LR_2 [ label = "SS(B)" ];
68
+ LR_0 -> LR_1 [ label = "SS(S)" ];
69
+ LR_1 -> LR_3 [ label = "S($end)" ];
70
+ LR_2 -> LR_6 [ label = "SS(b)" ];
71
+ LR_2 -> LR_5 [ label = "SS(a)" ];
72
+ LR_2 -> LR_4 [ label = "S(A)" ];
73
+ LR_5 -> LR_7 [ label = "S(b)" ];
74
+ LR_5 -> LR_5 [ label = "S(a)" ];
75
+ LR_6 -> LR_6 [ label = "S(b)" ];
76
+ LR_6 -> LR_5 [ label = "S(a)" ];
77
+ LR_7 -> LR_8 [ label = "S(b)" ];
78
+ LR_7 -> LR_5 [ label = "S(a)" ];
79
+ LR_8 -> LR_6 [ label = "S(b)" ];
80
+ LR_8 -> LR_5 [ label = "S(a)" ];
81
+ }
82
+ */
83
+ function dumpStateMachineToGraphViz(
84
+ /*StateMachineProxy*/
85
+ stateMachineType) {
86
+ const lines = [];
87
+ function w(str) {
88
+ lines.push(str);
89
+ }
90
+ function s(state) {
91
+ return state.nodeId.value.toString();
92
+ }
93
+ function n(state) {
94
+ return state.browseName.name.toString();
95
+ }
96
+ function s_full(state) {
97
+ return s(state) + ' [ label = "' + n(state) + '" ]';
98
+ }
99
+ w("digraph finite_state_machine {");
100
+ // initial state if any
101
+ if (stateMachineType.initialState) {
102
+ w("node [ shape = doublecircle];");
103
+ w(" _" + s_full(stateMachineType.initialState) + " ;");
104
+ }
105
+ w("node [ shape = circle];");
106
+ stateMachineType.states.forEach((state) => w(" _" + s_full(state)));
107
+ stateMachineType.transitions.forEach((transition) => w(" _" +
108
+ s(transition.fromStateNode) +
109
+ " -> _" +
110
+ s(transition.toStateNode) +
111
+ " [ " +
112
+ // " labeltooltip = \"" + i(transition) + "\" " +
113
+ ', label = "' +
114
+ n(transition) +
115
+ '" ];'));
116
+ w("}");
117
+ return lines.join("\n");
118
+ }
119
+ exports.dumpStateMachineToGraphViz = dumpStateMachineToGraphViz;
120
120
  //# sourceMappingURL=dump_state_machine_to_graphviz.js.map
@@ -1,6 +1,6 @@
1
- import { Namespace } from "node-opcua-address-space";
2
- export interface IWriter {
3
- writeLine(...args: any[]): void;
4
- }
5
- export declare function buildDocumentationToString(namespace: Namespace): Promise<string>;
6
- export declare function buildDocumentation(namespace: Namespace, writer: IWriter): Promise<void>;
1
+ import { Namespace } from "node-opcua-address-space";
2
+ export interface IWriter {
3
+ writeLine(...args: any[]): void;
4
+ }
5
+ export declare function buildDocumentationToString(namespace: Namespace): Promise<string>;
6
+ export declare function buildDocumentation(namespace: Namespace, writer: IWriter): Promise<void>;