node-opcua-address-space 2.56.2 → 2.60.0
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/LICENSE +20 -20
- package/dist/source/address_space_ts.d.ts +0 -2
- package/dist/source/helpers/argument_list.js +12 -1
- package/dist/source/helpers/argument_list.js.map +1 -1
- package/dist/source/loader/load_nodeset2.js +76 -67
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/source/session_context.js +2 -2
- package/dist/source/session_context.js.map +1 -1
- package/dist/source/set_namespace_meta_data.js +1 -1
- package/dist/src/address_space.d.ts +2 -3
- package/dist/src/address_space.js +9 -6
- package/dist/src/address_space.js.map +1 -1
- package/dist/src/address_space_private.d.ts +2 -3
- package/dist/src/alarms_and_conditions/condition_snapshot.js +3 -3
- package/dist/src/alarms_and_conditions/condition_snapshot.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +2 -1
- 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 +1 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +8 -6
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +1 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/base_node_private.js +2 -2
- package/dist/src/base_node_private.js.map +1 -1
- package/dist/src/event_data.js +1 -1
- package/dist/src/event_data.js.map +1 -1
- package/dist/src/namespace_impl.d.ts +2 -2
- package/dist/src/namespace_impl.js +9 -9
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.js +16 -10
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/src/nodeset_tools/typedictionary_to_xml.js +17 -10
- package/dist/src/nodeset_tools/typedictionary_to_xml.js.map +1 -1
- package/dist/src/reference_impl.js +1 -1
- package/dist/src/reference_impl.js.map +1 -1
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js +20 -13
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
- package/dist/src/ua_data_type_impl.d.ts +15 -5
- package/dist/src/ua_data_type_impl.js +129 -51
- package/dist/src/ua_data_type_impl.js.map +1 -1
- package/dist/src/ua_method_impl.d.ts +3 -2
- package/dist/src/ua_method_impl.js +5 -0
- package/dist/src/ua_method_impl.js.map +1 -1
- package/dist/src/ua_variable_impl.d.ts +6 -6
- package/dist/src/ua_variable_impl.js +236 -188
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/dist/src/ua_variable_type_impl.d.ts +3 -4
- package/dist/src/ua_variable_type_impl.js +13 -18
- package/dist/src/ua_variable_type_impl.js.map +1 -1
- package/distHelpers/add_event_generator_object.js.map +1 -1
- package/distHelpers/mock_session.js +1 -1
- package/distHelpers/mock_session.js.map +1 -1
- package/generate.js +1 -1
- package/nodeJS.d.ts +1 -1
- package/package.json +36 -36
- package/source/address_space_ts.ts +0 -1
- package/source/helpers/argument_list.ts +13 -3
- package/source/loader/load_nodeset2.ts +99 -79
- package/source/session_context.ts +1 -1
- package/source/set_namespace_meta_data.ts +1 -1
- package/source_nodejs/index.ts +1 -1
- package/src/address_space.ts +21 -14
- package/src/address_space_private.ts +3 -3
- package/src/alarms_and_conditions/condition_snapshot.ts +4 -4
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +7 -6
- package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +2 -2
- package/src/alarms_and_conditions/ua_condition_impl.ts +29 -15
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +1 -1
- package/src/base_node_private.ts +6 -2
- package/src/event_data.ts +1 -1
- package/src/namespace_impl.ts +9 -9
- package/src/nodeset_tools/nodeset_to_xml.ts +22 -12
- package/src/nodeset_tools/typedictionary_to_xml.ts +17 -7
- package/src/reference_impl.ts +3 -3
- package/src/state_machine/ua_shelving_state_machine_ex.ts +32 -19
- package/src/ua_data_type_impl.ts +168 -61
- package/src/ua_method_impl.ts +11 -5
- package/src/ua_variable_impl.ts +290 -218
- package/src/ua_variable_type_impl.ts +9 -15
- package/testHelpers.d.ts +1 -1
- package/test_helpers/add_event_generator_object.ts +4 -3
- package/test_helpers/mock_session.ts +1 -1
- package/test_helpers/test_fixtures/dataType_in_separateNamespace.xml +150 -150
- package/test_helpers/test_fixtures/dataType_in_separateNamespace_basic.xml +57 -57
- package/test_helpers/test_fixtures/dataType_in_separateNamespace_mix.xml +135 -135
- package/test_helpers/test_fixtures/dataType_withEnumeration.xml +82 -82
- package/test_helpers/test_fixtures/dataType_with_isOptionSet.xml +194 -194
- package/test_helpers/test_fixtures/dataType_with_union.xml +1 -1
- package/test_helpers/test_fixtures/fixture_empty_nodeset2.xml +106 -106
- package/test_helpers/test_fixtures/fixture_simple_statemachine_nodeset2.xml +1312 -1303
- package/test_helpers/test_fixtures/fixuture_nodeset_objects_with_some_methods.xml +362 -362
- package/test_helpers/test_fixtures/issue_846.xml +3172 -3172
- package/test_helpers/test_fixtures/issue_899_variable_with_nodeid_value.xml +32 -32
- package/test_helpers/test_fixtures/mini.Node.Set2.xml +14 -0
- package/test_helpers/test_fixtures/mini.nodeset.withVariousVariables.xml +194 -194
- package/test_helpers/test_fixtures/minimalist_nodeset_with_models.xml +8 -8
- package/test_helpers/test_fixtures/minimalist_nodeset_with_models_more_complex.xml +16 -16
- package/test_helpers/test_fixtures/nodeset_with_analog_items.xml +45 -45
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.d.ts +0 -23
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js +0 -3
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_discrete_item.d.ts +0 -6
- package/dist/source/interfaces/data_access/ua_discrete_item.js +0 -3
- package/dist/source/interfaces/data_access/ua_discrete_item.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_multistate_discrete.d.ts +0 -25
- package/dist/source/interfaces/data_access/ua_multistate_discrete.js +0 -3
- package/dist/source/interfaces/data_access/ua_multistate_discrete.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete.d.ts +0 -27
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js +0 -3
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_two_state_discrete.d.ts +0 -17
- package/dist/source/interfaces/data_access/ua_two_state_discrete.js +0 -3
- package/dist/source/interfaces/data_access/ua_two_state_discrete.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_y_array_item.d.ts +0 -19
- package/dist/source/interfaces/data_access/ua_y_array_item.js +0 -3
- package/dist/source/interfaces/data_access/ua_y_array_item.js.map +0 -1
- package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.d.ts +0 -11
- package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js +0 -3
- package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js.map +0 -1
- package/dist/source/interfaces/state_machine/finite_state_machine.d.ts +0 -70
- package/dist/source/interfaces/state_machine/finite_state_machine.js +0 -3
- package/dist/source/interfaces/state_machine/finite_state_machine.js.map +0 -1
- package/dist/source/interfaces/state_machine/program_finite_state_machine.d.ts +0 -74
- package/dist/source/interfaces/state_machine/program_finite_state_machine.js +0 -3
- package/dist/source/interfaces/state_machine/program_finite_state_machine.js.map +0 -1
- package/dist/source/interfaces/state_machine/state_machine.d.ts +0 -342
- package/dist/source/interfaces/state_machine/state_machine.js +0 -3
- package/dist/source/interfaces/state_machine/state_machine.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_finite_state_variable.d.ts +0 -18
- package/dist/source/interfaces/state_machine/ua_finite_state_variable.js +0 -3
- package/dist/source/interfaces/state_machine/ua_finite_state_variable.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_state_variable.d.ts +0 -29
- package/dist/source/interfaces/state_machine/ua_state_variable.js +0 -3
- package/dist/source/interfaces/state_machine/ua_state_variable.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_two_state_variable.d.ts +0 -26
- package/dist/source/interfaces/state_machine/ua_two_state_variable.js +0 -3
- package/dist/source/interfaces/state_machine/ua_two_state_variable.js.map +0 -1
- package/dist/source/interfaces/subscription_diagnostics_variable.d.ts +0 -41
- package/dist/source/interfaces/subscription_diagnostics_variable.js +0 -3
- package/dist/source/interfaces/subscription_diagnostics_variable.js.map +0 -1
- package/dist/src/alarms_and_conditions/base_event_type.d.ts +0 -26
- package/dist/src/alarms_and_conditions/base_event_type.js +0 -41
- package/dist/src/alarms_and_conditions/base_event_type.js.map +0 -1
- package/dist/src/alarms_and_conditions/shelving_state_machine.d.ts +0 -22
- package/dist/src/alarms_and_conditions/shelving_state_machine.js +0 -241
- package/dist/src/alarms_and_conditions/shelving_state_machine.js.map +0 -1
- package/dist/src/alarms_and_conditions/trip_alarm.d.ts +0 -16
- package/dist/src/alarms_and_conditions/trip_alarm.js +0 -21
- package/dist/src/alarms_and_conditions/trip_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.d.ts +0 -54
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js +0 -255
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_base.d.ts +0 -138
- package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js +0 -460
- package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.d.ts +0 -35
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js +0 -32
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_condition_base.d.ts +0 -191
- package/dist/src/alarms_and_conditions/ua_condition_base.js +0 -1029
- package/dist/src/alarms_and_conditions/ua_condition_base.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm.d.ts +0 -11
- package/dist/src/alarms_and_conditions/ua_discrete_alarm.js +0 -58
- package/dist/src/alarms_and_conditions/ua_discrete_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.d.ts +0 -24
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js +0 -59
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.d.ts +0 -14
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js +0 -17
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.d.ts +0 -22
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js +0 -87
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.d.ts +0 -6
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js +0 -11
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm.d.ts +0 -76
- package/dist/src/alarms_and_conditions/ua_limit_alarm.js +0 -237
- package/dist/src/alarms_and_conditions/ua_limit_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.d.ts +0 -27
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js +0 -62
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.d.ts +0 -49
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js +0 -176
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm.d.ts +0 -47
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js +0 -151
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.d.ts +0 -16
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js +0 -18
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js.map +0 -1
- package/dist/src/base_node.d.ts +0 -289
- package/dist/src/base_node.js +0 -1345
- package/dist/src/base_node.js.map +0 -1
- package/dist/src/data_access/ua_analog_item.d.ts +0 -13
- package/dist/src/data_access/ua_analog_item.js +0 -37
- package/dist/src/data_access/ua_analog_item.js.map +0 -1
- package/dist/src/data_access/ua_data_item.d.ts +0 -16
- package/dist/src/data_access/ua_data_item.js +0 -66
- package/dist/src/data_access/ua_data_item.js.map +0 -1
- package/dist/src/data_access/ua_multistate_discrete.d.ts +0 -24
- package/dist/src/data_access/ua_multistate_discrete.js +0 -132
- package/dist/src/data_access/ua_multistate_discrete.js.map +0 -1
- package/dist/src/namespace.d.ts +0 -472
- package/dist/src/namespace.js +0 -1751
- package/dist/src/namespace.js.map +0 -1
- package/dist/src/reference.d.ts +0 -43
- package/dist/src/reference.js +0 -138
- package/dist/src/reference.js.map +0 -1
- package/dist/src/session_context.d.ts +0 -4
- package/dist/src/session_context.js +0 -9
- package/dist/src/session_context.js.map +0 -1
- package/dist/src/ua_data_type.d.ts +0 -83
- package/dist/src/ua_data_type.js +0 -289
- package/dist/src/ua_data_type.js.map +0 -1
- package/dist/src/ua_method.d.ts +0 -41
- package/dist/src/ua_method.js +0 -202
- package/dist/src/ua_method.js.map +0 -1
- package/dist/src/ua_object.d.ts +0 -28
- package/dist/src/ua_object.js +0 -153
- package/dist/src/ua_object.js.map +0 -1
- package/dist/src/ua_object_type.d.ts +0 -49
- package/dist/src/ua_object_type.js +0 -123
- package/dist/src/ua_object_type.js.map +0 -1
- package/dist/src/ua_reference_type.d.ts +0 -42
- package/dist/src/ua_reference_type.js +0 -138
- package/dist/src/ua_reference_type.js.map +0 -1
- package/dist/src/ua_variable.d.ts +0 -339
- package/dist/src/ua_variable.js +0 -1706
- package/dist/src/ua_variable.js.map +0 -1
- package/dist/src/ua_variable_type.d.ts +0 -57
- package/dist/src/ua_variable_type.js +0 -530
- package/dist/src/ua_variable_type.js.map +0 -1
- package/dist/src/ua_view.d.ts +0 -16
- package/dist/src/ua_view.js +0 -42
- package/dist/src/ua_view.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-address-space",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.60.0",
|
|
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",
|
|
@@ -16,40 +16,40 @@
|
|
|
16
16
|
"c": "mocha --version"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@types/lodash": "4.14.
|
|
20
|
-
"async": "^3.2.
|
|
19
|
+
"@types/lodash": "4.14.177",
|
|
20
|
+
"async": "^3.2.2",
|
|
21
21
|
"chalk": "4.1.2",
|
|
22
22
|
"dequeue": "^1.0.5",
|
|
23
23
|
"lodash": "4.17.21",
|
|
24
|
-
"node-opcua-address-space-base": "2.
|
|
24
|
+
"node-opcua-address-space-base": "2.60.0",
|
|
25
25
|
"node-opcua-assert": "2.55.0",
|
|
26
|
-
"node-opcua-basic-types": "2.
|
|
27
|
-
"node-opcua-client-dynamic-extension-object": "2.
|
|
26
|
+
"node-opcua-basic-types": "2.60.0",
|
|
27
|
+
"node-opcua-client-dynamic-extension-object": "2.60.0",
|
|
28
28
|
"node-opcua-constants": "2.52.0",
|
|
29
|
-
"node-opcua-data-access": "2.
|
|
30
|
-
"node-opcua-data-model": "2.
|
|
31
|
-
"node-opcua-data-value": "2.
|
|
32
|
-
"node-opcua-date-time": "2.
|
|
33
|
-
"node-opcua-debug": "2.
|
|
29
|
+
"node-opcua-data-access": "2.60.0",
|
|
30
|
+
"node-opcua-data-model": "2.60.0",
|
|
31
|
+
"node-opcua-data-value": "2.60.0",
|
|
32
|
+
"node-opcua-date-time": "2.60.0",
|
|
33
|
+
"node-opcua-debug": "2.60.0",
|
|
34
34
|
"node-opcua-enum": "2.55.0",
|
|
35
|
-
"node-opcua-factory": "2.
|
|
36
|
-
"node-opcua-nodeid": "2.
|
|
37
|
-
"node-opcua-nodeset-ua": "2.
|
|
38
|
-
"node-opcua-numeric-range": "2.
|
|
39
|
-
"node-opcua-object-registry": "2.
|
|
40
|
-
"node-opcua-pseudo-session": "2.
|
|
41
|
-
"node-opcua-schemas": "2.
|
|
42
|
-
"node-opcua-service-browse": "2.
|
|
43
|
-
"node-opcua-service-call": "2.
|
|
44
|
-
"node-opcua-service-filter": "2.
|
|
45
|
-
"node-opcua-service-history": "2.
|
|
46
|
-
"node-opcua-service-translate-browse-path": "2.
|
|
47
|
-
"node-opcua-service-write": "2.
|
|
35
|
+
"node-opcua-factory": "2.60.0",
|
|
36
|
+
"node-opcua-nodeid": "2.60.0",
|
|
37
|
+
"node-opcua-nodeset-ua": "2.60.0",
|
|
38
|
+
"node-opcua-numeric-range": "2.60.0",
|
|
39
|
+
"node-opcua-object-registry": "2.60.0",
|
|
40
|
+
"node-opcua-pseudo-session": "2.60.0",
|
|
41
|
+
"node-opcua-schemas": "2.60.0",
|
|
42
|
+
"node-opcua-service-browse": "2.60.0",
|
|
43
|
+
"node-opcua-service-call": "2.60.0",
|
|
44
|
+
"node-opcua-service-filter": "2.60.0",
|
|
45
|
+
"node-opcua-service-history": "2.60.0",
|
|
46
|
+
"node-opcua-service-translate-browse-path": "2.60.0",
|
|
47
|
+
"node-opcua-service-write": "2.60.0",
|
|
48
48
|
"node-opcua-status-code": "2.56.0",
|
|
49
|
-
"node-opcua-types": "2.
|
|
50
|
-
"node-opcua-utils": "2.
|
|
51
|
-
"node-opcua-variant": "2.
|
|
52
|
-
"node-opcua-xml2json": "2.
|
|
49
|
+
"node-opcua-types": "2.60.0",
|
|
50
|
+
"node-opcua-utils": "2.60.0",
|
|
51
|
+
"node-opcua-variant": "2.60.0",
|
|
52
|
+
"node-opcua-xml2json": "2.60.0",
|
|
53
53
|
"set-prototype-of": "^1.0.0",
|
|
54
54
|
"thenify": "^3.3.1",
|
|
55
55
|
"xml-writer": "^1.7.0"
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"humanize": "0.0.9",
|
|
59
59
|
"node-opcua-benchmarker": "2.55.0",
|
|
60
60
|
"node-opcua-binary-stream": "2.55.0",
|
|
61
|
-
"node-opcua-extension-object": "2.
|
|
62
|
-
"node-opcua-leak-detector": "2.
|
|
63
|
-
"node-opcua-nodesets": "2.
|
|
64
|
-
"node-opcua-packet-analyzer": "2.
|
|
65
|
-
"node-opcua-test-fixtures": "2.
|
|
61
|
+
"node-opcua-extension-object": "2.60.0",
|
|
62
|
+
"node-opcua-leak-detector": "2.60.0",
|
|
63
|
+
"node-opcua-nodesets": "2.57.0",
|
|
64
|
+
"node-opcua-packet-analyzer": "2.60.0",
|
|
65
|
+
"node-opcua-test-fixtures": "2.60.0",
|
|
66
66
|
"should": "^13.2.3",
|
|
67
|
-
"sinon": "^
|
|
68
|
-
"source-map-support": "^0.5.
|
|
67
|
+
"sinon": "^12.0.1",
|
|
68
|
+
"source-map-support": "^0.5.21"
|
|
69
69
|
},
|
|
70
70
|
"author": "Etienne Rossignon",
|
|
71
71
|
"license": "MIT",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"internet of things"
|
|
83
83
|
],
|
|
84
84
|
"homepage": "http://node-opcua.github.io/",
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "56dc8584b9118ee2f3bfb0b2e9d456b609ccbac8"
|
|
86
86
|
}
|
|
@@ -185,7 +185,6 @@ export declare class VariableHistorian implements IVariableHistorian {
|
|
|
185
185
|
|
|
186
186
|
export type UAClonable = UAObject | UAVariable | UAMethod;
|
|
187
187
|
|
|
188
|
-
export interface Enumeration extends UAVariable {}
|
|
189
188
|
export declare function createExtObjArrayNode<T extends ExtensionObject>(
|
|
190
189
|
parentFolder: UAObject,
|
|
191
190
|
options: any
|
|
@@ -6,13 +6,13 @@ import * as ec from "node-opcua-basic-types";
|
|
|
6
6
|
import { BinaryStream, BinaryStreamSizeCalculator, OutputBinaryStream } from "node-opcua-binary-stream";
|
|
7
7
|
import { checkDebugFlag, make_debugLog, make_warningLog } from "node-opcua-debug";
|
|
8
8
|
import * as factories from "node-opcua-factory";
|
|
9
|
-
import { NodeId, resolveNodeId } from "node-opcua-nodeid";
|
|
9
|
+
import { coerceNodeId, NodeId, resolveNodeId } from "node-opcua-nodeid";
|
|
10
10
|
import { Argument } from "node-opcua-service-call";
|
|
11
11
|
import { StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
12
12
|
import { Variant } from "node-opcua-variant";
|
|
13
13
|
import { DataType } from "node-opcua-variant";
|
|
14
14
|
import { VariantArrayType } from "node-opcua-variant";
|
|
15
|
-
|
|
15
|
+
import { DataTypeIds } from "node-opcua-constants";
|
|
16
16
|
import { NodeClass } from "node-opcua-data-model";
|
|
17
17
|
import { IAddressSpace, UAMethod, UAObject } from "node-opcua-address-space-base";
|
|
18
18
|
|
|
@@ -181,7 +181,17 @@ function isArgumentValid(addressSpace: IAddressSpace, argDefinition: Argument, a
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
// check that dataType is of the same type (derived )
|
|
184
|
-
|
|
184
|
+
if (argDefDataType.isSupertypeOf(argDataType)) {
|
|
185
|
+
return true;
|
|
186
|
+
}
|
|
187
|
+
// special case for Enumeration
|
|
188
|
+
if (arg.dataType === DataType.Int32) {
|
|
189
|
+
const enumDataType = addressSpace.findDataType(coerceNodeId(DataTypeIds.Enumeration))!;
|
|
190
|
+
if (argDefDataType.isSupertypeOf(enumDataType)) {
|
|
191
|
+
return true;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return false;
|
|
185
195
|
}
|
|
186
196
|
|
|
187
197
|
/**
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
UAVariableType
|
|
16
16
|
} from "node-opcua-address-space-base";
|
|
17
17
|
import { assert, renderError } from "node-opcua-assert";
|
|
18
|
-
import { isValidGuid, StatusCodes } from "node-opcua-basic-types";
|
|
18
|
+
import { Int64, isValidGuid, StatusCodes } from "node-opcua-basic-types";
|
|
19
19
|
import { ExtraDataTypeManager, populateDataTypeManager } from "node-opcua-client-dynamic-extension-object";
|
|
20
20
|
import { EUInformation } from "node-opcua-data-access";
|
|
21
21
|
import {
|
|
@@ -27,13 +27,21 @@ import {
|
|
|
27
27
|
QualifiedNameOptions,
|
|
28
28
|
stringToQualifiedName
|
|
29
29
|
} from "node-opcua-data-model";
|
|
30
|
-
import { checkDebugFlag, make_debugLog } from "node-opcua-debug";
|
|
30
|
+
import { checkDebugFlag, make_debugLog, make_errorLog } from "node-opcua-debug";
|
|
31
31
|
import { ExtensionObject } from "node-opcua-extension-object";
|
|
32
32
|
import { DataTypeFactory, findSimpleType, getStandardDataTypeFactory } from "node-opcua-factory";
|
|
33
33
|
import { NodeId, resolveNodeId } from "node-opcua-nodeid";
|
|
34
34
|
import { Argument } from "node-opcua-service-call";
|
|
35
35
|
import { CallbackT, ErrorCallback } from "node-opcua-status-code";
|
|
36
|
-
import {
|
|
36
|
+
import {
|
|
37
|
+
EnumDefinition,
|
|
38
|
+
EnumFieldOptions,
|
|
39
|
+
EnumValueType,
|
|
40
|
+
Range,
|
|
41
|
+
StructureDefinition,
|
|
42
|
+
StructureFieldOptions,
|
|
43
|
+
StructureType
|
|
44
|
+
} from "node-opcua-types";
|
|
37
45
|
import { DataType, Variant, VariantArrayType, VariantOptions } from "node-opcua-variant";
|
|
38
46
|
import {
|
|
39
47
|
_definitionParser,
|
|
@@ -56,6 +64,7 @@ import { promoteObjectsAndVariables } from "./namespace_post_step";
|
|
|
56
64
|
|
|
57
65
|
const doDebug = checkDebugFlag(__filename);
|
|
58
66
|
const debugLog = make_debugLog(__filename);
|
|
67
|
+
const errorLog = make_errorLog(__filename);
|
|
59
68
|
|
|
60
69
|
export async function ensureDatatypeExtracted(addressSpace: IAddressSpace): Promise<ExtraDataTypeManager> {
|
|
61
70
|
const addressSpacePriv: any = addressSpace as AddressSpacePrivate;
|
|
@@ -151,39 +160,6 @@ async function decodeXmlObject(
|
|
|
151
160
|
return userDefinedExtensionObject;
|
|
152
161
|
}
|
|
153
162
|
|
|
154
|
-
function makeEnumDefinition(definitionFields: any[]) {
|
|
155
|
-
return new EnumDefinition({
|
|
156
|
-
fields: definitionFields.map((x) => ({
|
|
157
|
-
description: {
|
|
158
|
-
text: x.description
|
|
159
|
-
},
|
|
160
|
-
name: x.name,
|
|
161
|
-
value: x.value
|
|
162
|
-
}))
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
function makeStructureDefinition(name: string, definitionFields: StructureFieldOptions[], isUnion: boolean): StructureDefinition {
|
|
166
|
-
// Structure = 0,
|
|
167
|
-
// StructureWithOptionalFields = 1,
|
|
168
|
-
// Union = 2,
|
|
169
|
-
const hasOptionalFields = definitionFields.filter((field) => field.isOptional).length > 0;
|
|
170
|
-
|
|
171
|
-
const structureType = isUnion
|
|
172
|
-
? StructureType.Union
|
|
173
|
-
: hasOptionalFields
|
|
174
|
-
? StructureType.StructureWithOptionalFields
|
|
175
|
-
: StructureType.Structure;
|
|
176
|
-
|
|
177
|
-
const sd = new StructureDefinition({
|
|
178
|
-
baseDataType: undefined,
|
|
179
|
-
defaultEncodingId: undefined,
|
|
180
|
-
fields: definitionFields,
|
|
181
|
-
structureType
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
return sd;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
163
|
function __make_back_references(namespace: INamespace) {
|
|
188
164
|
const namespaceP = namespace as NamespacePrivate;
|
|
189
165
|
for (const node of namespaceP.nodeIterator()) {
|
|
@@ -219,14 +195,21 @@ function makeDefaultVariant2(addressSpace: IAddressSpace, dataTypeNode: NodeId,
|
|
|
219
195
|
function makeDefaultVariant(addressSpace: IAddressSpace, dataTypeNode: NodeId, valueRank: number): VariantOptions | undefined {
|
|
220
196
|
let variant: VariantOptions = { dataType: DataType.Null };
|
|
221
197
|
|
|
222
|
-
const nodeDataType = addressSpace.findNode(dataTypeNode);
|
|
198
|
+
const nodeDataType = addressSpace.findNode(dataTypeNode) as UADataType;
|
|
223
199
|
if (nodeDataType) {
|
|
224
|
-
|
|
225
|
-
|
|
200
|
+
|
|
201
|
+
const basicDataType = nodeDataType.basicDataType;
|
|
202
|
+
if (basicDataType === DataType.Variant) {
|
|
203
|
+
/// we don't now what is the variant
|
|
204
|
+
return undefined
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// addressSpace.findCorrespondingBasicDataType(dataTypeNode);
|
|
208
|
+
if (basicDataType === DataType.ExtensionObject) {
|
|
226
209
|
// console.log("xxxxxxxxxx ", dataTypeNode.toString(addressSpace as any));
|
|
227
210
|
return { dataType: DataType.ExtensionObject, value: null };
|
|
228
211
|
}
|
|
229
|
-
const dv = findSimpleType(DataType[
|
|
212
|
+
const dv = findSimpleType(DataType[basicDataType]).defaultValue;
|
|
230
213
|
if (dv === undefined || dv === null) {
|
|
231
214
|
// return
|
|
232
215
|
return { dataType: DataType.Null };
|
|
@@ -247,16 +230,16 @@ function makeDefaultVariant(addressSpace: IAddressSpace, dataTypeNode: NodeId, v
|
|
|
247
230
|
case -2: // any
|
|
248
231
|
case -1:
|
|
249
232
|
arrayType = VariantArrayType.Scalar;
|
|
250
|
-
variant = { dataType, value, arrayType };
|
|
233
|
+
variant = { dataType: basicDataType, value, arrayType };
|
|
251
234
|
break;
|
|
252
235
|
case 0: // one or more dimension
|
|
253
236
|
case 1: // one dimension
|
|
254
237
|
arrayType = VariantArrayType.Array;
|
|
255
|
-
variant = { dataType, value: [], arrayType };
|
|
238
|
+
variant = { dataType: basicDataType, value: [], arrayType };
|
|
256
239
|
break;
|
|
257
240
|
default:
|
|
258
241
|
arrayType = VariantArrayType.Matrix;
|
|
259
|
-
variant = { dataType, value: [], arrayType, dimensions: [] };
|
|
242
|
+
variant = { dataType: basicDataType, value: [], arrayType, dimensions: [] };
|
|
260
243
|
break;
|
|
261
244
|
}
|
|
262
245
|
// console.log(variant, DataType[dataType], valueRank);
|
|
@@ -442,8 +425,16 @@ export function makeStuff(addressSpace: IAddressSpace): any {
|
|
|
442
425
|
this.obj.browseName = convertQualifiedName(attrs.BrowseName);
|
|
443
426
|
this.obj.eventNotifier = ec.coerceByte(attrs.EventNotifier) || 0;
|
|
444
427
|
this.obj.symbolicName = attrs.SymbolicName || null;
|
|
428
|
+
|
|
429
|
+
this.isDraft = attrs.ReleaseStatus === "Draft";
|
|
430
|
+
this.obj.isDeprecated = attrs.ReleaseStatus === "Deprecated";
|
|
445
431
|
},
|
|
446
432
|
finish(this: any) {
|
|
433
|
+
if (this.isDraft || this.isDeprecated) {
|
|
434
|
+
// ignore Draft or Deprecated element
|
|
435
|
+
debugLog("Ignoring Draft/Deprecated UAObject =", this.obj.browseName.toString());
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
447
438
|
_internal_createNode(this.obj);
|
|
448
439
|
},
|
|
449
440
|
parser: {
|
|
@@ -537,58 +528,64 @@ export function makeStuff(addressSpace: IAddressSpace): any {
|
|
|
537
528
|
this.obj.displayName = "";
|
|
538
529
|
this.obj.description = "";
|
|
539
530
|
this.obj.symbolicName = attrs.SymbolicName;
|
|
531
|
+
|
|
540
532
|
this.isDraft = attrs.ReleaseStatus === "Draft";
|
|
533
|
+
this.isDeprecated = attrs.ReleaseStatus === "Deprecated";
|
|
534
|
+
|
|
541
535
|
this.definitionFields = [];
|
|
542
536
|
},
|
|
543
537
|
finish(this: any) {
|
|
544
|
-
if (this.isDraft) {
|
|
545
|
-
// ignore Draft element
|
|
546
|
-
debugLog("Ignoring Draft dataType =", this.obj.browseName.toString());
|
|
538
|
+
if (this.isDraft || this.isDeprecated) {
|
|
539
|
+
// ignore Draft or Deprecated element
|
|
540
|
+
debugLog("Ignoring Draft/Deprecated dataType =", this.obj.browseName.toString());
|
|
547
541
|
return;
|
|
548
542
|
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
543
|
+
/*
|
|
544
|
+
export interface StructureFieldOptions {
|
|
545
|
+
name?: UAString ; // **
|
|
546
|
+
description?: (LocalizedTextLike | null); // **
|
|
547
|
+
dataType?: (NodeIdLike | null);
|
|
548
|
+
valueRank?: Int32 ;
|
|
549
|
+
arrayDimensions?: UInt32 [] | null;
|
|
550
|
+
maxStringLength?: UInt32 ;
|
|
551
|
+
isOptional?: UABoolean ;
|
|
552
|
+
}
|
|
553
|
+
export interface EnumValueTypeOptions {
|
|
554
|
+
value?: Int64 ;
|
|
555
|
+
displayName?: (LocalizedTextLike | null);
|
|
556
|
+
description?: (LocalizedTextLike | null); // **
|
|
557
|
+
}
|
|
558
|
+
export interface EnumFieldOptions extends EnumValueTypeOptions {
|
|
559
|
+
name?: UAString ; // **
|
|
560
|
+
}
|
|
561
|
+
*/
|
|
562
|
+
|
|
563
|
+
const definitionFields = this.definitionFields as StructureFieldOptions[] | EnumFieldOptions[];
|
|
564
|
+
|
|
565
|
+
// replace DataType with nodeId, and description to LocalizedText
|
|
566
|
+
definitionFields.map((x: any) => {
|
|
567
|
+
if (x.description) {
|
|
568
|
+
x.description = { text: x.description };
|
|
569
|
+
}
|
|
570
|
+
if (x.displayName) {
|
|
571
|
+
x.displayName = { text: x.displayName };
|
|
572
|
+
}
|
|
552
573
|
if (x.dataType) {
|
|
553
574
|
x.dataType = convertToNodeId(x.dataType);
|
|
554
575
|
}
|
|
555
576
|
return x;
|
|
556
577
|
});
|
|
557
|
-
|
|
578
|
+
this.obj.partialDefinition = definitionFields;
|
|
579
|
+
|
|
558
580
|
const dataTypeNode = _internal_createNode(this.obj) as UADataType;
|
|
559
581
|
assert(addressSpace1.findNode(this.obj.nodeId));
|
|
560
582
|
const definitionName = dataTypeNode.browseName.name!;
|
|
561
583
|
|
|
562
|
-
let alreadyCalled = false;
|
|
563
584
|
const processBasicDataType = async (addressSpace2: IAddressSpace) => {
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
const structure = addressSpace2.findDataType("Structure");
|
|
569
|
-
const union = addressSpace2.findDataType("Union");
|
|
570
|
-
|
|
571
|
-
// we have a data type from a companion specification
|
|
572
|
-
// let's see if this data type need to be registered
|
|
573
|
-
const isEnumeration = enumeration && dataTypeNode.isSupertypeOf(enumeration);
|
|
574
|
-
const isStructure = structure && dataTypeNode.isSupertypeOf(structure);
|
|
575
|
-
const isUnion = !!(structure && union && dataTypeNode.isSupertypeOf(union!));
|
|
576
|
-
|
|
577
|
-
if (definitionFields.length) {
|
|
578
|
-
// remove <namespace>:
|
|
579
|
-
const nameWithoutNamespace = definitionName.split(":").slice(-1)[0];
|
|
580
|
-
|
|
581
|
-
if (isStructure /*&& dataTypeNode.nodeId.namespace !== 0*/) {
|
|
582
|
-
// note: at this stage, structure definition will be incomplete as we do not know
|
|
583
|
-
// what is the subType yet, encodings are also unknown...
|
|
584
|
-
// structureType may also be inaccurate
|
|
585
|
-
debugLog("setting structure $definition for ", definitionName, nameWithoutNamespace);
|
|
586
|
-
(dataTypeNode as any).$definition = makeStructureDefinition(definitionName, definitionFields, isUnion);
|
|
587
|
-
} else if (isEnumeration /* && dataTypeNode.nodeId.namespace !== 0 */) {
|
|
588
|
-
(dataTypeNode as any).$definition = makeEnumDefinition(definitionFields);
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
if (!isEnumeration && !isStructure && this.obj.nodeId.namespace !== 0) {
|
|
585
|
+
const isStructure = dataTypeNode.isStructure();
|
|
586
|
+
const isEnumeration = dataTypeNode.isEnumeration();
|
|
587
|
+
if (!isEnumeration && !isStructure && dataTypeNode.nodeId.namespace !== 0) {
|
|
588
|
+
// add a custom basic type that is not a structure nor a enumeration
|
|
592
589
|
pendingSimpleTypeToRegister.push({ name: definitionName, dataTypeNodeId: dataTypeNode.nodeId });
|
|
593
590
|
}
|
|
594
591
|
};
|
|
@@ -1274,8 +1271,15 @@ export function makeStuff(addressSpace: IAddressSpace): any {
|
|
|
1274
1271
|
|
|
1275
1272
|
this.obj.accessLevel = convertAccessLevel(attrs.AccessLevel);
|
|
1276
1273
|
this.obj.userAccessLevel = this.obj.accessLevel; // convertAccessLevel(attrs.UserAccessLevel || attrs.AccessLevel);
|
|
1274
|
+
|
|
1275
|
+
this.isDraft = attrs.ReleaseStatus === "Draft";
|
|
1276
|
+
this.isDeprecated = attrs.ReleaseStatus === "Deprecated";
|
|
1277
1277
|
},
|
|
1278
1278
|
finish(this: any) {
|
|
1279
|
+
if (this.isDraft || this.isDeprecated) {
|
|
1280
|
+
debugLog("Ignoring Draft/Deprecated UAVariable =", this.obj.browseName.toString());
|
|
1281
|
+
return;
|
|
1282
|
+
}
|
|
1279
1283
|
/*
|
|
1280
1284
|
// set default value based on obj data Type
|
|
1281
1285
|
if (this.obj.value === undefined) {
|
|
@@ -1296,6 +1300,8 @@ export function makeStuff(addressSpace: IAddressSpace): any {
|
|
|
1296
1300
|
};
|
|
1297
1301
|
postTaskInitializeVariable.push(task);
|
|
1298
1302
|
} else {
|
|
1303
|
+
const captureName = this.obj.browseName.toString();
|
|
1304
|
+
const captureNodeId = this.obj.nodeId;
|
|
1299
1305
|
const task = async (addressSpace2: IAddressSpace) => {
|
|
1300
1306
|
const dataTypeNode = variable.dataType;
|
|
1301
1307
|
const valueRank = variable.valueRank;
|
|
@@ -1351,8 +1357,15 @@ export function makeStuff(addressSpace: IAddressSpace): any {
|
|
|
1351
1357
|
|
|
1352
1358
|
this.obj.historizing = false;
|
|
1353
1359
|
this.obj.nodeId = convertToNodeId(attrs.NodeId) || null;
|
|
1360
|
+
|
|
1361
|
+
this.isDraft = attrs.ReleaseStatus === "Draft";
|
|
1362
|
+
this.isDeprecated = attrs.ReleaseStatus === "Deprecated";
|
|
1354
1363
|
},
|
|
1355
1364
|
finish(this: any) {
|
|
1365
|
+
if (this.isDraft || this.isDeprecated) {
|
|
1366
|
+
debugLog("Ignoring Draft/Deprecated UAVariableType =", this.obj.browseName.toString());
|
|
1367
|
+
return;
|
|
1368
|
+
}
|
|
1356
1369
|
try {
|
|
1357
1370
|
_internal_createNode(this.obj);
|
|
1358
1371
|
} /* istanbul ignore next */ catch (err) {
|
|
@@ -1389,8 +1402,15 @@ export function makeStuff(addressSpace: IAddressSpace): any {
|
|
|
1389
1402
|
this.obj.parentNodeId = attrs.ParentNodeId || null;
|
|
1390
1403
|
this.obj.nodeId = convertToNodeId(attrs.NodeId) || null;
|
|
1391
1404
|
this.obj.methodDeclarationId = attrs.MethodDeclarationId ? _translateNodeId(attrs.MethodDeclarationId) : null;
|
|
1405
|
+
|
|
1406
|
+
this.isDraft = attrs.ReleaseStatus === "Draft";
|
|
1407
|
+
this.isDeprecated = attrs.ReleaseStatus === "Deprecated";
|
|
1392
1408
|
},
|
|
1393
1409
|
finish(this: any) {
|
|
1410
|
+
if (this.isDraft || this.isDeprecated) {
|
|
1411
|
+
debugLog("Ignoring Draft/Deprecated UAMethod =", this.obj.browseName.toString());
|
|
1412
|
+
return;
|
|
1413
|
+
}
|
|
1394
1414
|
_internal_createNode(this.obj);
|
|
1395
1415
|
},
|
|
1396
1416
|
parser: {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { assert } from "node-opcua-assert";
|
|
6
|
-
import { CertificateInternals, exploreCertificate } from "node-opcua-crypto
|
|
6
|
+
import { CertificateInternals, exploreCertificate } from "node-opcua-crypto";
|
|
7
7
|
import { AccessRestrictionsFlag, allPermissions, AttributeIds, PermissionFlag } from "node-opcua-data-model";
|
|
8
8
|
import { PreciseClock } from "node-opcua-date-time";
|
|
9
9
|
import { NodeId, NodeIdLike, resolveNodeId, sameNodeId } from "node-opcua-nodeid";
|
package/source_nodejs/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./generate_address_space";
|
|
1
|
+
export * from "./generate_address_space";
|
package/src/address_space.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { ExtraDataTypeManager } from "node-opcua-client-dynamic-extension-object
|
|
|
10
10
|
import { DataTypeIds, VariableTypeIds } from "node-opcua-constants";
|
|
11
11
|
import { BrowseDirection, NodeClass, QualifiedName } from "node-opcua-data-model";
|
|
12
12
|
import { ExtensionObject } from "node-opcua-extension-object";
|
|
13
|
-
import { coerceExpandedNodeId, makeNodeId, NodeId, NodeIdLike, resolveNodeId, sameNodeId } from "node-opcua-nodeid";
|
|
13
|
+
import { coerceExpandedNodeId, coerceNodeId, makeNodeId, NodeId, NodeIdLike, resolveNodeId, sameNodeId } from "node-opcua-nodeid";
|
|
14
14
|
import { ObjectRegistry } from "node-opcua-object-registry";
|
|
15
15
|
import { BrowseResult } from "node-opcua-service-browse";
|
|
16
16
|
import { StatusCodes } from "node-opcua-status-code";
|
|
@@ -47,12 +47,13 @@ import {
|
|
|
47
47
|
|
|
48
48
|
import { adjustBrowseDirection } from "../source/helpers/adjust_browse_direction";
|
|
49
49
|
import { UARootFolder } from "../source/ua_root_folder";
|
|
50
|
+
import { Namespace } from "../source/namespace";
|
|
50
51
|
|
|
51
52
|
import { AddressSpacePrivate } from "./address_space_private";
|
|
52
53
|
import { UAAcknowledgeableConditionImpl, UAConditionImpl } from "./alarms_and_conditions";
|
|
53
54
|
import { EventData } from "./event_data";
|
|
54
55
|
import { AddressSpace_installHistoricalDataNode } from "./historical_access/address_space_historical_data_node";
|
|
55
|
-
import {
|
|
56
|
+
import { NamespaceImpl } from "./namespace_impl";
|
|
56
57
|
import { isNonEmptyQualifiedName } from "./namespace_impl";
|
|
57
58
|
import { NamespacePrivate } from "./namespace_private";
|
|
58
59
|
import { ExtensionObjectConstructorFuncWithSchema, UADataTypeImpl } from "./ua_data_type_impl";
|
|
@@ -68,7 +69,8 @@ const doDebug = false;
|
|
|
68
69
|
const Dequeue = require("dequeue");
|
|
69
70
|
|
|
70
71
|
const regexNumberColumnString = /^([0-9]+):(.*)/;
|
|
71
|
-
|
|
72
|
+
const enumerationTypeNodeId = coerceNodeId(DataTypeIds.Enumeration);
|
|
73
|
+
|
|
72
74
|
function _extract_namespace_and_browse_name_as_string(
|
|
73
75
|
addressSpace: AddressSpace,
|
|
74
76
|
browseName: NodeIdLike | QualifiedName,
|
|
@@ -153,7 +155,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
153
155
|
|
|
154
156
|
public readonly isNodeIdString = isNodeIdString;
|
|
155
157
|
private readonly _private_namespaceIndex: number;
|
|
156
|
-
private readonly _namespaceArray:
|
|
158
|
+
private readonly _namespaceArray: NamespacePrivate[];
|
|
157
159
|
private _shutdownTask: ShutdownTask[] = [];
|
|
158
160
|
private _modelChangeTransactionCounter = 0;
|
|
159
161
|
private _modelChanges: ModelChangeStructureDataType[] = [];
|
|
@@ -186,7 +188,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
186
188
|
* @param {string|number} namespace index or namespace uri.
|
|
187
189
|
* @return {NameSpace} the namespace
|
|
188
190
|
*/
|
|
189
|
-
public getNamespace(namespaceIndexOrName: string | number):
|
|
191
|
+
public getNamespace(namespaceIndexOrName: string | number): NamespacePrivate {
|
|
190
192
|
if (typeof namespaceIndexOrName === "number") {
|
|
191
193
|
const namespaceIndex = namespaceIndexOrName;
|
|
192
194
|
assert(namespaceIndex >= 0 && namespaceIndex < this._namespaceArray.length, "invalid namespace index ( out of bound)");
|
|
@@ -241,7 +243,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
241
243
|
* @param namespaceUri {string}
|
|
242
244
|
* @returns {Namespace}
|
|
243
245
|
*/
|
|
244
|
-
public registerNamespace(namespaceUri: string):
|
|
246
|
+
public registerNamespace(namespaceUri: string): NamespacePrivate {
|
|
245
247
|
let index = this._namespaceArray.findIndex((ns) => ns.namespaceUri === namespaceUri);
|
|
246
248
|
if (index !== -1) {
|
|
247
249
|
assert((this._namespaceArray[index].addressSpace as any) === (this as any));
|
|
@@ -249,7 +251,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
249
251
|
}
|
|
250
252
|
index = this._namespaceArray.length;
|
|
251
253
|
this._namespaceArray.push(
|
|
252
|
-
new
|
|
254
|
+
new NamespaceImpl({
|
|
253
255
|
addressSpace: this,
|
|
254
256
|
index,
|
|
255
257
|
namespaceUri,
|
|
@@ -471,10 +473,8 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
471
473
|
dataTypeNode.constructor.name
|
|
472
474
|
);
|
|
473
475
|
}
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
const enumerationType = this.findDataType("Enumeration")!;
|
|
477
|
-
if (sameNodeId(enumerationType.nodeId, dataTypeNode!.nodeId)) {
|
|
476
|
+
|
|
477
|
+
if (sameNodeId(enumerationTypeNodeId, dataTypeNode!.nodeId)) {
|
|
478
478
|
return DataType.Int32;
|
|
479
479
|
}
|
|
480
480
|
|
|
@@ -482,11 +482,18 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
482
482
|
// Number
|
|
483
483
|
return DataType.Null; //which one ?
|
|
484
484
|
}
|
|
485
|
-
|
|
486
|
-
if (dataTypeNode.nodeId.namespace === 0 &&
|
|
485
|
+
|
|
486
|
+
if (dataTypeNode.nodeId.namespace === 0 && dataTypeNode.nodeId.value === 0) {
|
|
487
|
+
return DataType.Null;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
if (dataTypeNode.nodeId.namespace === 0 && dataTypeNode.nodeId.value <= 25) {
|
|
487
491
|
return dataTypeNode.nodeId.value as DataType;
|
|
488
492
|
}
|
|
489
|
-
|
|
493
|
+
|
|
494
|
+
const result = this.findCorrespondingBasicDataType(dataTypeNode.subtypeOfObj as UADataType);
|
|
495
|
+
|
|
496
|
+
return result;
|
|
490
497
|
}
|
|
491
498
|
|
|
492
499
|
/**
|
|
@@ -27,7 +27,7 @@ import { UARootFolder } from "../source/ua_root_folder";
|
|
|
27
27
|
|
|
28
28
|
import { NamespacePrivate } from "./namespace_private";
|
|
29
29
|
import { ExtensionObjectConstructorFuncWithSchema } from "./ua_data_type_impl";
|
|
30
|
-
import {
|
|
30
|
+
import { NamespaceImpl } from "./namespace_impl";
|
|
31
31
|
|
|
32
32
|
export interface AddressSpacePrivate extends IAddressSpace {
|
|
33
33
|
rootFolder: UARootFolder;
|
|
@@ -52,9 +52,9 @@ export interface AddressSpacePrivate extends IAddressSpace {
|
|
|
52
52
|
|
|
53
53
|
getOwnNamespace(): NamespacePrivate;
|
|
54
54
|
|
|
55
|
-
getNamespace(indexOrName: number | string):
|
|
55
|
+
getNamespace(indexOrName: number | string): NamespacePrivate;
|
|
56
56
|
|
|
57
|
-
registerNamespace(namespaceUri: string):
|
|
57
|
+
registerNamespace(namespaceUri: string): NamespacePrivate;
|
|
58
58
|
|
|
59
59
|
getNamespaceArray(): NamespacePrivate[];
|
|
60
60
|
|
|
@@ -9,7 +9,7 @@ import { UInt16 } from "node-opcua-basic-types";
|
|
|
9
9
|
import { coerceLocalizedText, LocalizedText, LocalizedTextLike, NodeClass } from "node-opcua-data-model";
|
|
10
10
|
import { DataValue } from "node-opcua-data-value";
|
|
11
11
|
import { checkDebugFlag, make_debugLog } from "node-opcua-debug";
|
|
12
|
-
import { NodeId } from "node-opcua-nodeid";
|
|
12
|
+
import { NodeId, sameNodeId } from "node-opcua-nodeid";
|
|
13
13
|
import { UAAcknowledgeableCondition } from "node-opcua-nodeset-ua";
|
|
14
14
|
import { StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
15
15
|
import { SimpleAttributeOperand, TimeZoneDataType } from "node-opcua-types";
|
|
@@ -175,14 +175,14 @@ export class ConditionSnapshot extends EventEmitter {
|
|
|
175
175
|
// a nodeId/Variant map
|
|
176
176
|
_record_condition_state(this, condition);
|
|
177
177
|
|
|
178
|
-
if (branchId
|
|
178
|
+
if (sameNodeId(branchId, NodeId.nullNodeId)) {
|
|
179
179
|
_installOnChangeEventHandlers(this, condition, "");
|
|
180
180
|
}
|
|
181
181
|
this._set_var("branchId", DataType.NodeId, branchId);
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
public _constructEventData(): IEventData {
|
|
185
|
-
if (this.branchId
|
|
185
|
+
if (this.branchId && sameNodeId(this.branchId, NodeId.nullNodeId)) {
|
|
186
186
|
_ensure_condition_values_correctness(this, this.condition!, "", []);
|
|
187
187
|
}
|
|
188
188
|
const c = this.condition as UAConditionImpl;
|
|
@@ -594,7 +594,7 @@ export class ConditionSnapshot extends EventEmitter {
|
|
|
594
594
|
}
|
|
595
595
|
|
|
596
596
|
public isCurrentBranch(): boolean {
|
|
597
|
-
return this._get_var("branchId")
|
|
597
|
+
return sameNodeId(this._get_var("branchId"), NodeId.nullNodeId);
|
|
598
598
|
}
|
|
599
599
|
|
|
600
600
|
// -- ACKNOWLEDGEABLE -------------------------------------------------------------------
|