node-opcua-address-space 2.112.0 → 2.113.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.
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +2 -0
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +2 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +3 -2
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +2 -1
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +2 -1
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +2 -1
- package/dist/source/interfaces/i_set_state_options.d.ts +4 -0
- package/dist/source/interfaces/i_set_state_options.js +3 -0
- package/dist/source/interfaces/i_set_state_options.js.map +1 -0
- package/dist/source/loader/decode_xml_extension_object.js +0 -2
- package/dist/source/loader/decode_xml_extension_object.js.map +1 -1
- package/dist/source/loader/load_nodeset2.js +4 -2
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/source/loader/make_xml_extension_object_parser.js +1 -3
- package/dist/source/loader/make_xml_extension_object_parser.js.map +1 -1
- package/dist/source/loader/namespace_post_step.js +1 -0
- package/dist/source/loader/namespace_post_step.js.map +1 -1
- package/dist/source/ua_two_state_variable_ex.d.ts +2 -1
- package/dist/src/address_space.js +6 -14
- package/dist/src/address_space.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +6 -5
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +13 -15
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +6 -2
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +5 -5
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +0 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +3 -2
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +12 -14
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/base_node_impl.js +9 -19
- package/dist/src/base_node_impl.js.map +1 -1
- package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +3 -2
- package/dist/src/data_access/ua_multistate_discrete_impl.js +2 -2
- package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +3 -2
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js +3 -3
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +2 -1
- package/dist/src/data_access/ua_two_state_discrete_impl.js +3 -3
- package/dist/src/data_access/ua_two_state_discrete_impl.js.map +1 -1
- package/dist/src/namespace_impl.js +5 -6
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/nodeset_tools/construct_namespace_dependency.js +11 -6
- package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.js +8 -9
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/src/reference_impl.js +4 -1
- package/dist/src/reference_impl.js.map +1 -1
- package/dist/src/state_machine/finite_state_machine.js +2 -3
- package/dist/src/state_machine/finite_state_machine.js.map +1 -1
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js +2 -2
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
- package/dist/src/state_machine/ua_two_state_variable.d.ts +2 -1
- package/dist/src/state_machine/ua_two_state_variable.js +10 -9
- package/dist/src/state_machine/ua_two_state_variable.js.map +1 -1
- package/dist/src/ua_data_type_impl.js +0 -23
- package/dist/src/ua_data_type_impl.js.map +1 -1
- package/dist/src/ua_variable_impl_ext_obj.js +15 -8
- package/dist/src/ua_variable_impl_ext_obj.js.map +1 -1
- package/dist/tsconfig_common.tsbuildinfo +1 -1
- package/distHelpers/add_event_generator_object.js +0 -4
- package/distHelpers/add_event_generator_object.js.map +1 -1
- package/package.json +30 -30
- package/source/interfaces/alarms_and_conditions/condition_info_i.ts +3 -0
- package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +2 -1
- package/source/interfaces/alarms_and_conditions/ua_condition_ex.ts +4 -2
- package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +2 -1
- package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +2 -1
- package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +2 -1
- package/source/interfaces/i_set_state_options.ts +4 -0
- package/source/loader/decode_xml_extension_object.ts +0 -2
- package/source/loader/load_nodeset2.ts +4 -2
- package/source/loader/make_xml_extension_object_parser.ts +1 -4
- package/source/loader/namespace_post_step.ts +1 -0
- package/source/ua_two_state_variable_ex.ts +2 -1
- package/src/address_space.ts +7 -15
- package/src/alarms_and_conditions/condition.ts +1 -1
- package/src/alarms_and_conditions/condition_snapshot_impl.ts +16 -16
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +6 -3
- package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +6 -6
- package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +0 -1
- package/src/alarms_and_conditions/ua_condition_impl.ts +13 -14
- package/src/base_node_impl.ts +12 -20
- package/src/data_access/ua_multistate_discrete_impl.ts +5 -3
- package/src/data_access/ua_multistate_value_discrete_impl.ts +5 -4
- package/src/data_access/ua_two_state_discrete_impl.ts +5 -3
- package/src/namespace_impl.ts +5 -6
- package/src/nodeset_tools/construct_namespace_dependency.ts +12 -7
- package/src/nodeset_tools/nodeset_to_xml.ts +8 -9
- package/src/reference_impl.ts +5 -1
- package/src/state_machine/finite_state_machine.ts +3 -4
- package/src/state_machine/ua_shelving_state_machine_ex.ts +2 -3
- package/src/state_machine/ua_two_state_variable.ts +14 -9
- package/src/ua_data_type_impl.ts +0 -24
- package/src/ua_variable_impl_ext_obj.ts +110 -82
|
@@ -37,10 +37,6 @@ function add_eventGeneratorObject(namespace, parentFolder) {
|
|
|
37
37
|
outputArguments: []
|
|
38
38
|
});
|
|
39
39
|
method.bindMethod((inputArguments, context, callback) => {
|
|
40
|
-
// xx console.log("In Event Generator Method");
|
|
41
|
-
// xx console.log(this.toString());
|
|
42
|
-
// xx console.log(context.object.toString());
|
|
43
|
-
// xx console.log("inputArguments ", inputArguments[0].toString());
|
|
44
40
|
const message = inputArguments[0].value || "Hello from Event Generator Object";
|
|
45
41
|
const severity = inputArguments[1].value || 0;
|
|
46
42
|
const myEventType = namespace.addressSpace.findEventType("MyEventType", namespace.index);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add_event_generator_object.js","sourceRoot":"","sources":["../test_helpers/add_event_generator_object.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,mEAAgE;AAChE,2DAAuD;AAKvD,SAAgB,wBAAwB,CAAC,SAAqB,EAAE,YAA+B;IAC3F,MAAM,SAAS,GAAG,SAAS,CAAC,YAAY,CAAC;QACrC,UAAU,EAAE,aAAa;QACzB,SAAS,EAAE,eAAe,CAAC,qBAAqB;KACnD,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAC;QACjC,UAAU,EAAE,sBAAsB;QAClC,aAAa,EAAE,CAAC;QAChB,WAAW,EAAE,YAAY;KAC5B,CAAC,CAAC;IAEH,QAAQ,CAAC,YAAY,CAAC;QAClB,MAAM,EAAE,SAAS;QACjB,aAAa,EAAE,sBAAsB;KACxC,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE;QACzC,UAAU,EAAE,sBAAsB;QAClC,cAAc,EAAE;YACZ;gBACI,QAAQ,EAAE,6BAAQ,CAAC,MAAM;gBACzB,WAAW,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE;gBACtC,IAAI,EAAE,SAAS;aAClB;YACD;gBACI,QAAQ,EAAE,6BAAQ,CAAC,MAAM;gBACzB,WAAW,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;gBACvC,IAAI,EAAE,UAAU;aACnB;SACJ;QACD,eAAe,EAAE,EAAE;KACtB,CAAC,CAAC;IAEH,MAAM,CAAC,UAAU,CAAC,CAAC,cAAyB,EAAE,OAAwB,EAAE,QAA4C,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"add_event_generator_object.js","sourceRoot":"","sources":["../test_helpers/add_event_generator_object.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,mEAAgE;AAChE,2DAAuD;AAKvD,SAAgB,wBAAwB,CAAC,SAAqB,EAAE,YAA+B;IAC3F,MAAM,SAAS,GAAG,SAAS,CAAC,YAAY,CAAC;QACrC,UAAU,EAAE,aAAa;QACzB,SAAS,EAAE,eAAe,CAAC,qBAAqB;KACnD,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAC;QACjC,UAAU,EAAE,sBAAsB;QAClC,aAAa,EAAE,CAAC;QAChB,WAAW,EAAE,YAAY;KAC5B,CAAC,CAAC;IAEH,QAAQ,CAAC,YAAY,CAAC;QAClB,MAAM,EAAE,SAAS;QACjB,aAAa,EAAE,sBAAsB;KACxC,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE;QACzC,UAAU,EAAE,sBAAsB;QAClC,cAAc,EAAE;YACZ;gBACI,QAAQ,EAAE,6BAAQ,CAAC,MAAM;gBACzB,WAAW,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE;gBACtC,IAAI,EAAE,SAAS;aAClB;YACD;gBACI,QAAQ,EAAE,6BAAQ,CAAC,MAAM;gBACzB,WAAW,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;gBACvC,IAAI,EAAE,UAAU;aACnB;SACJ;QACD,eAAe,EAAE,EAAE;KACtB,CAAC,CAAC;IAEH,MAAM,CAAC,UAAU,CAAC,CAAC,cAAyB,EAAE,OAAwB,EAAE,QAA4C,EAAE,EAAE;QAEpH,MAAM,OAAO,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,mCAAmC,CAAC;QAC/E,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;QAE9C,MAAM,WAAW,GAAG,SAAS,CAAC,YAAY,CAAC,aAAa,CAAC,aAAa,EAAE,SAAS,CAAC,KAAK,CAAE,CAAC;QACzF,OAAO,CAAC,MAAmB,CAAC,UAAU,CAAC,WAAW,EAAE;YACjD,OAAO,EAAE;gBACL,QAAQ,EAAE,6BAAQ,CAAC,aAAa;gBAChC,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;aAC3B;YACD,QAAQ,EAAE;gBACN,QAAQ,EAAE,6BAAQ,CAAC,MAAM;gBACzB,KAAK,EAAE,QAAQ;aAClB;SACJ,CAAC,CAAC;QACH,MAAM,gBAAgB,GAAG;YACrB,eAAe,EAAE,EAAE;YACnB,UAAU,EAAE,oCAAW,CAAC,IAAI;SAC/B,CAAC;QACF,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACP,CAAC;AAxDD,4DAwDC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-address-space",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.113.1",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module address-space",
|
|
5
5
|
"main": "./dist/src/index_current.js",
|
|
6
6
|
"types": "./dist/source/index.d.ts",
|
|
@@ -22,36 +22,36 @@
|
|
|
22
22
|
"chalk": "4.1.2",
|
|
23
23
|
"dequeue": "^1.0.5",
|
|
24
24
|
"lodash": "4.17.21",
|
|
25
|
-
"node-opcua-address-space-base": "2.
|
|
25
|
+
"node-opcua-address-space-base": "2.113.0",
|
|
26
26
|
"node-opcua-assert": "2.105.0",
|
|
27
|
-
"node-opcua-basic-types": "2.
|
|
27
|
+
"node-opcua-basic-types": "2.113.0",
|
|
28
28
|
"node-opcua-binary-stream": "2.110.0",
|
|
29
|
-
"node-opcua-client-dynamic-extension-object": "2.
|
|
29
|
+
"node-opcua-client-dynamic-extension-object": "2.113.0",
|
|
30
30
|
"node-opcua-constants": "2.98.1",
|
|
31
|
-
"node-opcua-crypto": "4.
|
|
32
|
-
"node-opcua-data-access": "2.
|
|
33
|
-
"node-opcua-data-model": "2.
|
|
34
|
-
"node-opcua-data-value": "2.
|
|
35
|
-
"node-opcua-date-time": "2.
|
|
36
|
-
"node-opcua-debug": "2.
|
|
31
|
+
"node-opcua-crypto": "4.5.0",
|
|
32
|
+
"node-opcua-data-access": "2.113.0",
|
|
33
|
+
"node-opcua-data-model": "2.113.0",
|
|
34
|
+
"node-opcua-data-value": "2.113.0",
|
|
35
|
+
"node-opcua-date-time": "2.113.0",
|
|
36
|
+
"node-opcua-debug": "2.113.0",
|
|
37
37
|
"node-opcua-enum": "2.110.0",
|
|
38
|
-
"node-opcua-extension-object": "2.
|
|
39
|
-
"node-opcua-factory": "2.
|
|
40
|
-
"node-opcua-nodeid": "2.
|
|
41
|
-
"node-opcua-nodeset-ua": "2.
|
|
42
|
-
"node-opcua-numeric-range": "2.
|
|
43
|
-
"node-opcua-object-registry": "2.
|
|
44
|
-
"node-opcua-pseudo-session": "2.
|
|
45
|
-
"node-opcua-service-browse": "2.
|
|
46
|
-
"node-opcua-service-call": "2.
|
|
47
|
-
"node-opcua-service-history": "2.
|
|
48
|
-
"node-opcua-service-translate-browse-path": "2.
|
|
49
|
-
"node-opcua-service-write": "2.
|
|
38
|
+
"node-opcua-extension-object": "2.113.0",
|
|
39
|
+
"node-opcua-factory": "2.113.0",
|
|
40
|
+
"node-opcua-nodeid": "2.113.0",
|
|
41
|
+
"node-opcua-nodeset-ua": "2.113.0",
|
|
42
|
+
"node-opcua-numeric-range": "2.113.0",
|
|
43
|
+
"node-opcua-object-registry": "2.113.0",
|
|
44
|
+
"node-opcua-pseudo-session": "2.113.0",
|
|
45
|
+
"node-opcua-service-browse": "2.113.0",
|
|
46
|
+
"node-opcua-service-call": "2.113.0",
|
|
47
|
+
"node-opcua-service-history": "2.113.0",
|
|
48
|
+
"node-opcua-service-translate-browse-path": "2.113.0",
|
|
49
|
+
"node-opcua-service-write": "2.113.0",
|
|
50
50
|
"node-opcua-status-code": "2.110.0",
|
|
51
|
-
"node-opcua-types": "2.
|
|
51
|
+
"node-opcua-types": "2.113.0",
|
|
52
52
|
"node-opcua-utils": "2.110.0",
|
|
53
|
-
"node-opcua-variant": "2.
|
|
54
|
-
"node-opcua-xml2json": "2.
|
|
53
|
+
"node-opcua-variant": "2.113.0",
|
|
54
|
+
"node-opcua-xml2json": "2.113.0",
|
|
55
55
|
"semver": "^7.5.4",
|
|
56
56
|
"set-prototype-of": "^1.0.0",
|
|
57
57
|
"thenify": "^3.3.1",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"mocha": "^10.2.0",
|
|
62
62
|
"node-opcua-benchmarker": "2.110.0",
|
|
63
|
-
"node-opcua-leak-detector": "2.
|
|
63
|
+
"node-opcua-leak-detector": "2.113.0",
|
|
64
64
|
"node-opcua-nodesets": "2.110.0",
|
|
65
|
-
"node-opcua-packet-analyzer": "2.
|
|
66
|
-
"node-opcua-service-filter": "2.
|
|
67
|
-
"node-opcua-test-fixtures": "2.
|
|
65
|
+
"node-opcua-packet-analyzer": "2.113.0",
|
|
66
|
+
"node-opcua-service-filter": "2.113.0",
|
|
67
|
+
"node-opcua-test-fixtures": "2.113.0",
|
|
68
68
|
"should": "^13.2.3",
|
|
69
69
|
"sinon": "^15.2.0",
|
|
70
70
|
"source-map-support": "^0.5.21"
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"internet of things"
|
|
85
85
|
],
|
|
86
86
|
"homepage": "http://node-opcua.github.io/",
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "5990ba93b03458f3d7304c36a99e5eb814bbcf3c",
|
|
88
88
|
"files": [
|
|
89
89
|
"dist",
|
|
90
90
|
"distHelpers",
|
|
@@ -10,6 +10,7 @@ import { NodeId } from "node-opcua-nodeid";
|
|
|
10
10
|
import { StatusCode } from "node-opcua-status-code";
|
|
11
11
|
import { TimeZoneDataType } from "node-opcua-types";
|
|
12
12
|
import { UtcTime } from "../state_machine/ua_state_machine_type";
|
|
13
|
+
import { ISetStateOptions } from "../i_set_state_options";
|
|
13
14
|
|
|
14
15
|
export interface ConditionSnapshot {
|
|
15
16
|
on(eventName: "value_changed", eventHandler: (node: UAVariable, variant: Variant) => void): this;
|
|
@@ -62,7 +63,7 @@ export interface ConditionSnapshot extends EventEmitter {
|
|
|
62
63
|
* @param value {Boolean}
|
|
63
64
|
* @return void
|
|
64
65
|
*/
|
|
65
|
-
setEnabledState(value: boolean): void;
|
|
66
|
+
setEnabledState(value: boolean, options?: ISetStateOptions): void;
|
|
66
67
|
/**
|
|
67
68
|
* @method getEnabledStateAsString
|
|
68
69
|
* @return {String}
|
|
@@ -4,10 +4,11 @@ import { NodeId } from "node-opcua-nodeid";
|
|
|
4
4
|
import { UACondition_Base } from "node-opcua-nodeset-ua";
|
|
5
5
|
import { StatusCode } from "node-opcua-status-code";
|
|
6
6
|
import { TimeZoneDataType } from "node-opcua-types";
|
|
7
|
+
import { DataType } from "node-opcua-basic-types";
|
|
8
|
+
import { ISetStateOptions } from "../i_set_state_options";
|
|
7
9
|
import { UATwoStateVariableEx } from "../../ua_two_state_variable_ex";
|
|
8
10
|
import { ConditionInfoOptions } from "./condition_info_i";
|
|
9
11
|
import { ConditionSnapshot } from "./condition_snapshot";
|
|
10
|
-
import { DataType } from "node-opcua-basic-types";
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
|
|
@@ -26,6 +27,7 @@ export interface UAConditionHelper {
|
|
|
26
27
|
on(eventName: "branch_deleted", eventHandler: (branchId: string) => void): this;
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
|
|
29
31
|
export interface UAConditionHelper extends UABaseEventHelper {
|
|
30
32
|
getBranchCount(): number;
|
|
31
33
|
getBranches(): ConditionSnapshot[];
|
|
@@ -34,7 +36,7 @@ export interface UAConditionHelper extends UABaseEventHelper {
|
|
|
34
36
|
deleteBranch(branch: ConditionSnapshot): void;
|
|
35
37
|
getEnabledState(): boolean;
|
|
36
38
|
getEnabledStateAsString(): string;
|
|
37
|
-
setEnabledState(requestedEnabledState: boolean): StatusCode;
|
|
39
|
+
setEnabledState(requestedEnabledState: boolean, options?: ISetStateOptions): StatusCode;
|
|
38
40
|
setReceiveTime(time: Date): void;
|
|
39
41
|
setLocalTime(time: TimeZoneDataType): void;
|
|
40
42
|
setTime(time: Date): void;
|
|
@@ -13,6 +13,7 @@ import { DataType, Variant } from "node-opcua-variant";
|
|
|
13
13
|
import { StatusCode } from "node-opcua-status-code";
|
|
14
14
|
import { UAMultiStateDiscrete_Base } from "node-opcua-nodeset-ua";
|
|
15
15
|
import { UAVariableT } from "node-opcua-address-space-base";
|
|
16
|
+
import { ISetStateOptions } from "../i_set_state_options";
|
|
16
17
|
|
|
17
18
|
export { UAMultiStateDiscrete } from "node-opcua-nodeset-ua";
|
|
18
19
|
|
|
@@ -21,6 +22,6 @@ export interface UAMultiStateDiscreteEx<T, DT extends DataType> extends UAVariab
|
|
|
21
22
|
getValue(): number;
|
|
22
23
|
getValueAsString(): string;
|
|
23
24
|
getIndex(value: string): number;
|
|
24
|
-
setValue(value: string | number): void;
|
|
25
|
+
setValue(value: string | number, options?: ISetStateOptions): void;
|
|
25
26
|
checkVariantCompatibility(value: Variant): StatusCode;
|
|
26
27
|
}
|
|
@@ -5,6 +5,7 @@ import { DataType, Variant } from "node-opcua-variant";
|
|
|
5
5
|
import { Int64, UInt64 } from "node-opcua-basic-types";
|
|
6
6
|
import { UAMultiStateValueDiscrete_Base } from "node-opcua-nodeset-ua";
|
|
7
7
|
import { UAVariableT } from "node-opcua-address-space-base";
|
|
8
|
+
import { ISetStateOptions } from "../i_set_state_options";
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* @see https://reference.opcfoundation.org/v104/Core/docs/Part8/5.3.3/#5.3.3.4
|
|
@@ -27,7 +28,7 @@ export interface UAMultiStateValueDiscreteEx<T, DT extends DataType>
|
|
|
27
28
|
getValueAsString(): string;
|
|
28
29
|
getValueAsNumber(): number;
|
|
29
30
|
|
|
30
|
-
setValue(value: string | number | Int64): void;
|
|
31
|
+
setValue(value: string | number | Int64, options?: ISetStateOptions): void;
|
|
31
32
|
|
|
32
33
|
findValueAsText(value: number | UInt64): Variant;
|
|
33
34
|
}
|
|
@@ -2,6 +2,7 @@ import { LocalizedTextLike } from "node-opcua-data-model";
|
|
|
2
2
|
import { DataType } from "node-opcua-variant";
|
|
3
3
|
import { UAVariableT } from "node-opcua-address-space-base";
|
|
4
4
|
import { UATwoStateDiscrete_Base } from "node-opcua-nodeset-ua";
|
|
5
|
+
import { ISetStateOptions } from "../i_set_state_options";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* @see https://reference.opcfoundation.org/v104/Core/VariableTypes/TwoStateDiscreteType/
|
|
@@ -10,5 +11,5 @@ export interface UATwoStateDiscreteEx extends UAVariableT<boolean, DataType.Bool
|
|
|
10
11
|
// --- helpers ---
|
|
11
12
|
getValue(): boolean;
|
|
12
13
|
getValueAsString(): string;
|
|
13
|
-
setValue(value: boolean | LocalizedTextLike): void;
|
|
14
|
+
setValue(value: boolean | LocalizedTextLike, options?: ISetStateOptions): void;
|
|
14
15
|
}
|
|
@@ -18,7 +18,6 @@ function encodingNodeIdToDataTypeNode(addressSpace: IAddressSpace, encodingNodeI
|
|
|
18
18
|
if (!encodingNode) {
|
|
19
19
|
throw new Error("findDataTypeNode: Cannot find encoding NodeId" + encodingNodeId.toString());
|
|
20
20
|
}
|
|
21
|
-
// xx console.log("encodingNode", encodingNode.toString());
|
|
22
21
|
const refs = encodingNode.findReferences("HasEncoding", false);
|
|
23
22
|
const dataTypes = refs.map((ref) => addressSpace.findNode(ref.nodeId)).filter((obj: any) => obj !== null);
|
|
24
23
|
// istanbul ignore next
|
|
@@ -40,7 +39,6 @@ export function makeDefinitionMap(addressSpace: IAddressSpace): DefinitionMap2 {
|
|
|
40
39
|
throw new Error("Expecting a DataType node here");
|
|
41
40
|
}
|
|
42
41
|
const name = dataTypeNode.browseName.name || "";
|
|
43
|
-
// console.log("yy)=", dataTypeNode.toString());
|
|
44
42
|
if (dataTypeNode.isStructure()) {
|
|
45
43
|
const definition = dataTypeNode.getStructureDefinition();
|
|
46
44
|
return { name, definition };
|
|
@@ -881,10 +881,12 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
881
881
|
break;
|
|
882
882
|
}
|
|
883
883
|
let captureXmlBody = this.bodyXML;
|
|
884
|
+
// istanbul ignore next
|
|
884
885
|
if (doDebug) {
|
|
885
886
|
debugLog("xxxx ", chalk.yellow(captureXmlBody));
|
|
886
887
|
}
|
|
887
888
|
// this is a user defined Extension Object
|
|
889
|
+
// istanbul ignore next
|
|
888
890
|
debugLog(
|
|
889
891
|
"load nodeset2: typeDefinitionId in ExtensionObject Default XML = " + xmlEncodingNodeId.toString()
|
|
890
892
|
);
|
|
@@ -1699,7 +1701,7 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
1699
1701
|
// istanbul ignore next
|
|
1700
1702
|
// tslint:disable:no-console
|
|
1701
1703
|
if (types.isNativeError(err)) {
|
|
1702
|
-
|
|
1704
|
+
errorLog(" performPostLoadingTasks Err => ", err.message, "\n", err);
|
|
1703
1705
|
}
|
|
1704
1706
|
await task(addressSpace1);
|
|
1705
1707
|
}
|
|
@@ -1748,7 +1750,7 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
1748
1750
|
finalSteps()
|
|
1749
1751
|
.then(() => callback!())
|
|
1750
1752
|
.catch((err1: Error) => {
|
|
1751
|
-
|
|
1753
|
+
errorLog("Error ", renderError(err1));
|
|
1752
1754
|
callback!(err1);
|
|
1753
1755
|
});
|
|
1754
1756
|
}
|
|
@@ -210,7 +210,7 @@ const partials: { [key: string]: ReaderStateParserLike } = {
|
|
|
210
210
|
Variant: {
|
|
211
211
|
finish(this: any) {
|
|
212
212
|
/** to do */
|
|
213
|
-
|
|
213
|
+
warningLog(" Missing Implemntation contact sterfive.com!");
|
|
214
214
|
}
|
|
215
215
|
},
|
|
216
216
|
|
|
@@ -279,8 +279,6 @@ function _makeTypeReader(
|
|
|
279
279
|
const { name, definition } = definitionMap.findDefinition(n);
|
|
280
280
|
const dataTypeName = name;
|
|
281
281
|
|
|
282
|
-
// console.log("NAME = ", dataTypeNodeId.toString(), name, definition);
|
|
283
|
-
|
|
284
282
|
let reader: ReaderStateParserLike = readerMap[dataTypeName]!;
|
|
285
283
|
|
|
286
284
|
if (reader) {
|
|
@@ -355,7 +353,6 @@ function _makeTypeReader(
|
|
|
355
353
|
readerMap[dataTypeName] = reader;
|
|
356
354
|
return { name, parser: reader };
|
|
357
355
|
} else if (definition instanceof EnumDefinition) {
|
|
358
|
-
// console.log("xxxx enum found !", definition.toString());
|
|
359
356
|
const turnToInt = (value: any) => {
|
|
360
357
|
// Green_100
|
|
361
358
|
return parseInt(value.split("_")[1], 10);
|
|
@@ -43,6 +43,7 @@ export async function promoteObjectAndVariablesInNamespace(namespace: INamespace
|
|
|
43
43
|
|
|
44
44
|
promoter.promoter(a as any);
|
|
45
45
|
const after = a.constructor.name;
|
|
46
|
+
// istanbul ignore next
|
|
46
47
|
if (doDebug) {
|
|
47
48
|
debugLog(`promoting ${a.browseName.toString()} from ${before} to ${after}`);
|
|
48
49
|
}
|
|
@@ -5,6 +5,7 @@ import { UAVariableT } from "node-opcua-address-space-base";
|
|
|
5
5
|
import { LocalizedText } from "node-opcua-data-model";
|
|
6
6
|
import { UAStateVariable, UATwoStateVariable_Base } from "node-opcua-nodeset-ua";
|
|
7
7
|
import { DataType } from "node-opcua-variant";
|
|
8
|
+
import { ISetStateOptions } from "./interfaces/i_set_state_options";
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* @see https://reference.opcfoundation.org/v104/Core/docs/Part9/5.2/
|
|
@@ -18,7 +19,7 @@ export interface UATwoStateVariableHelper {
|
|
|
18
19
|
readonly isTrueSubStateOf: UAStateVariable<LocalizedText> | null;
|
|
19
20
|
|
|
20
21
|
// --- helpers ---
|
|
21
|
-
setValue(boolValue: boolean): void;
|
|
22
|
+
setValue(boolValue: boolean, options?: ISetStateOptions): void;
|
|
22
23
|
|
|
23
24
|
getValue(): boolean;
|
|
24
25
|
|
package/src/address_space.ts
CHANGED
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
ShutdownTask,
|
|
57
57
|
RaiseEventData
|
|
58
58
|
} from "node-opcua-address-space-base";
|
|
59
|
-
import { make_errorLog } from "node-opcua-debug";
|
|
59
|
+
import { make_debugLog, make_errorLog } from "node-opcua-debug";
|
|
60
60
|
|
|
61
61
|
import { adjustBrowseDirection } from "../source/helpers/adjust_browse_direction";
|
|
62
62
|
import { UARootFolder } from "../source/ua_root_folder";
|
|
@@ -79,6 +79,7 @@ import { BaseNodeImpl } from "./base_node_impl";
|
|
|
79
79
|
|
|
80
80
|
const doDebug = false;
|
|
81
81
|
const errorLog = make_errorLog(__filename);
|
|
82
|
+
const debugLog = make_debugLog(__filename);
|
|
82
83
|
|
|
83
84
|
// tslint:disable-next-line:no-var-requires
|
|
84
85
|
const Dequeue = require("dequeue");
|
|
@@ -773,17 +774,18 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
773
774
|
// add a property , but with a null variant
|
|
774
775
|
eventData._createValue(fullBrowsePath, node, { dataType: DataType.Null });
|
|
775
776
|
|
|
777
|
+
// istanbul ignore next
|
|
776
778
|
if (doDebug) {
|
|
777
779
|
if (node.modellingRule === "Mandatory") {
|
|
778
780
|
// tslint:disable:no-console
|
|
779
|
-
|
|
781
|
+
errorLog(
|
|
780
782
|
chalk.red("ERROR : AddressSpace#constructEventData(eventType,options) " + "cannot find property ") +
|
|
781
783
|
self.browseName.toString() +
|
|
782
784
|
" => " +
|
|
783
785
|
chalk.cyan(lowerName)
|
|
784
786
|
);
|
|
785
787
|
} else {
|
|
786
|
-
|
|
788
|
+
errorLog(
|
|
787
789
|
chalk.yellow(
|
|
788
790
|
"Warning : AddressSpace#constructEventData(eventType,options)" + " cannot find property "
|
|
789
791
|
) +
|
|
@@ -842,18 +844,16 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
842
844
|
|
|
843
845
|
// istanbul ignore next
|
|
844
846
|
if (doDebug) {
|
|
845
|
-
|
|
847
|
+
debugLog(" " + chalk.bgWhite.cyan(self.browseName.toString()));
|
|
846
848
|
}
|
|
847
849
|
|
|
848
850
|
for (const node of children) {
|
|
849
851
|
// only keep those that have a "HasModellingRule"
|
|
850
852
|
if (!(node as any).modellingRule) {
|
|
851
|
-
// xx console.log(" skipping node without modelling rule", node.browseName.toString());
|
|
852
853
|
continue;
|
|
853
854
|
}
|
|
854
855
|
// ignore also methods
|
|
855
856
|
if (node.nodeClass === NodeClass.Method) {
|
|
856
|
-
// xx console.log(" skipping method ", node.browseName.toString());
|
|
857
857
|
continue;
|
|
858
858
|
}
|
|
859
859
|
|
|
@@ -866,8 +866,6 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
866
866
|
if (children2.length > 0) {
|
|
867
867
|
const lowerName = lowerFirstLetter(node.browseName.name!);
|
|
868
868
|
const standardName = node.browseName.toString();
|
|
869
|
-
// console.log(" Children to visit = ",lowerName,
|
|
870
|
-
// children.map(function(a){ return a.browseName.toString();}).join(" "));
|
|
871
869
|
for (const child2 of children2) {
|
|
872
870
|
_process_var(self, lowerName + ".", standardName + ".", child2);
|
|
873
871
|
}
|
|
@@ -1027,7 +1025,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
1027
1025
|
// to do verify that dataType is of type "Structure"
|
|
1028
1026
|
/* istanbul ignore next */
|
|
1029
1027
|
if (!_dataType.isSubtypeOf(this.findDataType("Structure")!)) {
|
|
1030
|
-
|
|
1028
|
+
debugLog(_dataType.toString());
|
|
1031
1029
|
}
|
|
1032
1030
|
assert(_dataType.isSubtypeOf(this.findDataType("Structure")!));
|
|
1033
1031
|
if (!_dataType._extensionObjectConstructor) {
|
|
@@ -1144,7 +1142,6 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
1144
1142
|
if (!obj) {
|
|
1145
1143
|
// Object Not Found
|
|
1146
1144
|
browseResult.statusCode = StatusCodes.BadNodeIdUnknown;
|
|
1147
|
-
// xx console.log("xxxxxx browsing ",nodeId.toString() , " not found" );
|
|
1148
1145
|
} else {
|
|
1149
1146
|
browseResult.statusCode = StatusCodes.Good;
|
|
1150
1147
|
browseResult.references = obj.browseNode(browseDescription, context);
|
|
@@ -1172,7 +1169,6 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
1172
1169
|
* @private
|
|
1173
1170
|
*/
|
|
1174
1171
|
public _collectModelChange(view: UAView | null, modelChange: ModelChangeStructureDataType): void {
|
|
1175
|
-
// xx console.log("in _collectModelChange", modelChange.verb, verbFlags.get(modelChange.verb).toString());
|
|
1176
1172
|
this._modelChanges.push(modelChange);
|
|
1177
1173
|
}
|
|
1178
1174
|
|
|
@@ -1253,7 +1249,6 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
1253
1249
|
if (this._modelChanges.length === 0) {
|
|
1254
1250
|
return; // nothing to do
|
|
1255
1251
|
}
|
|
1256
|
-
// xx console.log( "xx dealing with ",this._modelChanges.length);
|
|
1257
1252
|
// increase version number of participating nodes
|
|
1258
1253
|
|
|
1259
1254
|
// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore
|
|
@@ -1269,7 +1264,6 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
1269
1264
|
const eventTypeNode = this.findEventType("GeneralModelChangeEventType");
|
|
1270
1265
|
|
|
1271
1266
|
if (eventTypeNode) {
|
|
1272
|
-
// xx console.log("xx raising event on server object");
|
|
1273
1267
|
this.rootFolder.objects.server.raiseEvent(eventTypeNode, {
|
|
1274
1268
|
// Part 5 - 6.4.32 GeneralModelChangeEventType
|
|
1275
1269
|
changes: {
|
|
@@ -1421,7 +1415,6 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
1421
1415
|
const typeDefinitionNode = this.findNode(typeDefinition)!;
|
|
1422
1416
|
typeDefinition = typeDefinitionNode.nodeId;
|
|
1423
1417
|
}
|
|
1424
|
-
// xx console.log("typeDefinition = ",typeDefinition);
|
|
1425
1418
|
assert(typeDefinition instanceof NodeId);
|
|
1426
1419
|
return typeDefinition;
|
|
1427
1420
|
}
|
|
@@ -1573,6 +1566,5 @@ function _increase_version_number(node: BaseNode | null) {
|
|
|
1573
1566
|
dataType: DataType.String,
|
|
1574
1567
|
value: (previousValue + 1).toString()
|
|
1575
1568
|
});
|
|
1576
|
-
// xx console.log("xxx increasing version number of node ", node.browseName.toString(),previousValue);
|
|
1577
1569
|
}
|
|
1578
1570
|
}
|
|
@@ -21,7 +21,7 @@ export function _setAckedState(
|
|
|
21
21
|
if (ackedState && requestedAckedState) {
|
|
22
22
|
return StatusCodes.BadConditionBranchAlreadyAcked;
|
|
23
23
|
}
|
|
24
|
-
self._set_twoStateVariable("AckedState", requestedAckedState);
|
|
24
|
+
self._set_twoStateVariable("AckedState", requestedAckedState,/* effective transition time will be now*/);
|
|
25
25
|
return StatusCodes.Good;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -17,6 +17,7 @@ import { DataType, Variant } from "node-opcua-variant";
|
|
|
17
17
|
|
|
18
18
|
import { ConditionSnapshot } from "../../source/interfaces/alarms_and_conditions/condition_snapshot";
|
|
19
19
|
import { UtcTime } from "../../source/interfaces/state_machine/ua_state_machine_type";
|
|
20
|
+
import { ISetStateOptions } from "../../source/interfaces/i_set_state_options";
|
|
20
21
|
import { EventData } from "../event_data";
|
|
21
22
|
import { UATwoStateVariableImpl } from "../state_machine/ua_two_state_variable";
|
|
22
23
|
import { _setAckedState } from "./condition";
|
|
@@ -136,6 +137,7 @@ const _varTable = {
|
|
|
136
137
|
"EnabledState.EffectiveDisplayName": 1,
|
|
137
138
|
"EnabledState.Id": 1,
|
|
138
139
|
"EnabledState.TransitionTime": 1,
|
|
140
|
+
"EnabledState.EffectiveTransitionTime": 1,
|
|
139
141
|
EventId: 1,
|
|
140
142
|
EventType: 1,
|
|
141
143
|
LocalTime: 1,
|
|
@@ -143,6 +145,8 @@ const _varTable = {
|
|
|
143
145
|
SourceNode: 1,
|
|
144
146
|
Time: 1
|
|
145
147
|
};
|
|
148
|
+
|
|
149
|
+
|
|
146
150
|
type FullBrowsePath = string;
|
|
147
151
|
export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnapshot {
|
|
148
152
|
public static normalizeName = normalizeName;
|
|
@@ -222,7 +226,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
222
226
|
public _get_var(varName: string): any {
|
|
223
227
|
const c = this.condition as UAConditionImpl;
|
|
224
228
|
if (!c.getEnabledState() && !Object.prototype.hasOwnProperty.call(_varTable, varName)) {
|
|
225
|
-
// xx
|
|
229
|
+
// xx debuglog("ConditionSnapshot#_get_var condition enabled =", self.condition.getEnabledState());
|
|
226
230
|
return disabledVar;
|
|
227
231
|
}
|
|
228
232
|
|
|
@@ -238,6 +242,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
238
242
|
const key = normalizeName(varName);
|
|
239
243
|
// istanbul ignore next
|
|
240
244
|
if (!Object.prototype.hasOwnProperty.call(this._map, key)) {
|
|
245
|
+
// istanbul ignore next
|
|
241
246
|
if (doDebug) {
|
|
242
247
|
debugLog(" cannot find node " + varName);
|
|
243
248
|
debugLog(" map=", Object.keys(this._map).join(" "));
|
|
@@ -310,9 +315,6 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
310
315
|
const eventId = addressSpace.generateEventId();
|
|
311
316
|
const ret = this._set_var("EventId", DataType.ByteString, eventId.value);
|
|
312
317
|
|
|
313
|
-
// xx var branch = self; console.log("MMMMMMMMrenewEventId branch " +
|
|
314
|
-
// branch.getBranchId().toString() + " eventId = " + branch.getEventId().toString("hex"));
|
|
315
|
-
|
|
316
318
|
return ret;
|
|
317
319
|
}
|
|
318
320
|
|
|
@@ -329,8 +331,8 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
329
331
|
* @param value {Boolean}
|
|
330
332
|
* @return void
|
|
331
333
|
*/
|
|
332
|
-
public setEnabledState(value: boolean): void {
|
|
333
|
-
return this._set_twoStateVariable("EnabledState", value);
|
|
334
|
+
public setEnabledState(value: boolean, options?: ISetStateOptions): void {
|
|
335
|
+
return this._set_twoStateVariable("EnabledState", value, options);
|
|
334
336
|
}
|
|
335
337
|
|
|
336
338
|
/**
|
|
@@ -615,7 +617,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
615
617
|
return this._get_twoStateVariable("ConfirmedState");
|
|
616
618
|
}
|
|
617
619
|
|
|
618
|
-
public setConfirmedStateIfExists(confirmedState: boolean): void {
|
|
620
|
+
public setConfirmedStateIfExists(confirmedState: boolean, options?: ISetStateOptions): void {
|
|
619
621
|
confirmedState = !!confirmedState;
|
|
620
622
|
const acknowledgeableCondition = this.condition as UAAcknowledgeableCondition;
|
|
621
623
|
if (!acknowledgeableCondition.confirmedState) {
|
|
@@ -624,7 +626,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
624
626
|
return;
|
|
625
627
|
}
|
|
626
628
|
// todo deal with Error code BadConditionBranchAlreadyConfirmed
|
|
627
|
-
return this._set_twoStateVariable("ConfirmedState", confirmedState);
|
|
629
|
+
return this._set_twoStateVariable("ConfirmedState", confirmedState, options);
|
|
628
630
|
}
|
|
629
631
|
|
|
630
632
|
public setConfirmedState(confirmedState: boolean): void {
|
|
@@ -649,21 +651,21 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
649
651
|
* @method setSuppressedState
|
|
650
652
|
* @param suppressed {Boolean}
|
|
651
653
|
*/
|
|
652
|
-
public setSuppressedState(suppressed: boolean): void {
|
|
654
|
+
public setSuppressedState(suppressed: boolean, options?: ISetStateOptions): void {
|
|
653
655
|
suppressed = !!suppressed;
|
|
654
|
-
this._set_twoStateVariable("SuppressedState", suppressed);
|
|
656
|
+
this._set_twoStateVariable("SuppressedState", suppressed, options);
|
|
655
657
|
}
|
|
656
658
|
|
|
657
659
|
public getActiveState(): boolean {
|
|
658
660
|
return this._get_twoStateVariable("ActiveState");
|
|
659
661
|
}
|
|
660
662
|
|
|
661
|
-
public setActiveState(newActiveState: boolean): StatusCode {
|
|
663
|
+
public setActiveState(newActiveState: boolean, options?: ISetStateOptions): StatusCode {
|
|
662
664
|
// xx var activeState = self.getActiveState();
|
|
663
665
|
// xx if (activeState === newActiveState) {
|
|
664
666
|
// xx return StatusCodes.Bad;
|
|
665
667
|
// xx }
|
|
666
|
-
this._set_twoStateVariable("ActiveState", newActiveState);
|
|
668
|
+
this._set_twoStateVariable("ActiveState", newActiveState, options);
|
|
667
669
|
return StatusCodes.Good;
|
|
668
670
|
}
|
|
669
671
|
|
|
@@ -706,7 +708,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
706
708
|
* @param value
|
|
707
709
|
* @private
|
|
708
710
|
*/
|
|
709
|
-
public _set_twoStateVariable(varName: string, value: boolean): void {
|
|
711
|
+
public _set_twoStateVariable(varName: string, value: boolean, options?: ISetStateOptions): void {
|
|
710
712
|
value = !!value;
|
|
711
713
|
|
|
712
714
|
const hrKey = ConditionSnapshotImpl.normalizeName(varName);
|
|
@@ -735,9 +737,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
735
737
|
// also change ConditionNode if we are on currentBranch
|
|
736
738
|
if (this.isCurrentBranch()) {
|
|
737
739
|
assert(twoStateNode instanceof UATwoStateVariableImpl);
|
|
738
|
-
twoStateNode.setValue(value as boolean);
|
|
739
|
-
// xx console.log("Is current branch", twoStateNode.toString(),variant.toString());
|
|
740
|
-
// xx console.log(" = ",twoStateNode.getValue());
|
|
740
|
+
twoStateNode.setValue(value as boolean, options);
|
|
741
741
|
}
|
|
742
742
|
this.emit("value_changed", node, variant);
|
|
743
743
|
}
|
|
@@ -9,6 +9,7 @@ import { CallbackT, StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
|
9
9
|
import { DataType, VariantLike, VariantOptions } from "node-opcua-variant";
|
|
10
10
|
import { INamespace, RaiseEventData, ISessionContext, UAEventType, UAMethod } from "node-opcua-address-space-base";
|
|
11
11
|
import { CallMethodResultOptions } from "node-opcua-service-call";
|
|
12
|
+
import { make_debugLog } from "node-opcua-debug";
|
|
12
13
|
|
|
13
14
|
import { AddressSpacePrivate } from "../address_space_private";
|
|
14
15
|
import { _install_TwoStateVariable_machinery } from "../state_machine/ua_two_state_variable";
|
|
@@ -20,7 +21,8 @@ import { _setAckedState } from "./condition";
|
|
|
20
21
|
import { ConditionSnapshotImpl } from "./condition_snapshot_impl";
|
|
21
22
|
import { UAConditionImpl } from "./ua_condition_impl";
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
const debugLog = make_debugLog(__filename);
|
|
25
|
+
const doDebug = false;;
|
|
24
26
|
export declare interface UAAcknowledgeableConditionImpl extends UAAcknowledgeableConditionEx, UAConditionImpl {
|
|
25
27
|
on(eventName: string, eventHandler: any): this;
|
|
26
28
|
}
|
|
@@ -258,8 +260,9 @@ export class UAAcknowledgeableConditionImpl extends UAConditionImpl implements U
|
|
|
258
260
|
}
|
|
259
261
|
assert(!branch.getConfirmedState(), "already confirmed ?");
|
|
260
262
|
const conditionEventId = branch.getEventId();
|
|
261
|
-
|
|
262
|
-
|
|
263
|
+
|
|
264
|
+
// istanbul ignore next
|
|
265
|
+
doDebug && debugLog("autoConfirmBranch getAckedState ", branch.getAckedState());
|
|
263
266
|
this._confirm_branch(conditionEventId, comment, branch, "Server/Confirm");
|
|
264
267
|
}
|
|
265
268
|
|