node-opcua-address-space 2.54.0 → 2.57.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.js.map +1 -1
- package/dist/source/continuation_points/continuation_point_manager.d.ts +27 -16
- package/dist/source/continuation_points/continuation_point_manager.js +141 -48
- package/dist/source/continuation_points/continuation_point_manager.js.map +1 -1
- package/dist/source/helpers/adjust_browse_direction.js.map +1 -1
- package/dist/source/helpers/call_helpers.js.map +1 -1
- package/dist/source/helpers/check_event_clause.js.map +1 -1
- package/dist/source/helpers/coerce_enum_value.js.map +1 -1
- package/dist/source/helpers/ensure_secure_access.js +0 -13
- package/dist/source/helpers/ensure_secure_access.js.map +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js.map +1 -1
- package/dist/source/loader/load_nodeset2.js +30 -6
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/source/loader/namespace_post_step.js.map +1 -1
- package/dist/source/loader/register_node_promoter.js.map +1 -1
- package/dist/source/namespace_machine_state.d.ts +1 -1
- package/dist/source/pseudo_session.js +23 -24
- package/dist/source/pseudo_session.js.map +1 -1
- package/dist/source/session_context.js.map +1 -1
- package/dist/source/set_namespace_meta_data.js.map +1 -1
- package/dist/src/address_space.d.ts +7 -8
- package/dist/src/address_space.js +2 -2
- package/dist/src/address_space.js.map +1 -1
- package/dist/src/address_space_private.d.ts +4 -5
- package/dist/src/alarms_and_conditions/check_where_clause.js +1 -1
- package/dist/src/alarms_and_conditions/check_where_clause.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition.js.map +1 -1
- package/dist/src/alarms_and_conditions/extract_event_fields.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/base_node_impl.js.map +1 -1
- package/dist/src/data_access/add_dataItem_stuff.js.map +1 -1
- package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js.map +1 -1
- package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -1
- package/dist/src/event_data.js.map +1 -1
- package/dist/src/extension_object_array_node.js.map +1 -1
- package/dist/src/historical_access/address_space_historical_data_node.js +28 -59
- package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -1
- package/dist/src/namespace_impl.d.ts +2 -2
- package/dist/src/namespace_impl.js +6 -6
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/nodeid_manager.js +1 -4
- package/dist/src/nodeid_manager.js.map +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.js +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/src/nodeset_tools/typedictionary_to_xml.d.ts +1 -1
- package/dist/src/nodeset_tools/typedictionary_to_xml.js +3 -2
- package/dist/src/nodeset_tools/typedictionary_to_xml.js.map +1 -1
- package/dist/src/reference_impl.js +3 -1
- package/dist/src/reference_impl.js.map +1 -1
- package/dist/src/state_machine/finite_state_machine.js.map +1 -1
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
- package/dist/src/state_machine/ua_two_state_variable.js.map +1 -1
- package/dist/src/tool_isSupertypeOf.js.map +1 -1
- package/dist/src/ua_method_impl.d.ts +1 -1
- package/dist/src/ua_method_impl.js.map +1 -1
- package/dist/src/ua_object_impl.d.ts +10 -6
- package/dist/src/ua_object_impl.js +1 -1
- package/dist/src/ua_object_impl.js.map +1 -1
- package/dist/src/ua_object_type_impl.js.map +1 -1
- package/dist/src/ua_reference_type_impl.js +3 -1
- package/dist/src/ua_reference_type_impl.js.map +1 -1
- package/dist/src/ua_variable_impl.d.ts +8 -7
- package/dist/src/ua_variable_impl.js +6 -10
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/dist/src/ua_variable_type_impl.js.map +1 -1
- package/dist/src/ua_view_impl.js.map +1 -1
- package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
- package/distHelpers/boiler_system.d.ts +1 -1
- package/distHelpers/boiler_system.js +1 -2
- package/distHelpers/boiler_system.js.map +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.js +1 -0
- package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -1
- package/distHelpers/date_utils.d.ts +3 -0
- package/distHelpers/date_utils.js +10 -0
- package/distHelpers/date_utils.js.map +1 -0
- package/distHelpers/get_mini_address_space.js.map +1 -1
- package/distHelpers/index.d.ts +2 -0
- package/distHelpers/index.js +2 -0
- package/distHelpers/index.js.map +1 -1
- package/distHelpers/mock_session.d.ts +14 -0
- package/distHelpers/mock_session.js +26 -0
- package/distHelpers/mock_session.js.map +1 -0
- package/generate.js +1 -1
- package/nodeJS.d.ts +1 -1
- package/package.json +39 -40
- package/source/address_space_ts.ts +0 -3
- package/source/continuation_points/continuation_point_manager.ts +178 -64
- package/source/helpers/adjust_browse_direction.ts +3 -3
- package/source/helpers/argument_list.ts +1 -1
- package/source/helpers/call_helpers.ts +0 -1
- package/source/helpers/check_event_clause.ts +2 -9
- package/source/helpers/coerce_enum_value.ts +3 -3
- package/source/helpers/ensure_secure_access.ts +1 -13
- package/source/helpers/resolve_opaque_on_address_space.ts +4 -1
- package/source/interfaces/alarms_and_conditions/condition_info_i.ts +13 -13
- package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +0 -1
- package/source/interfaces/data_access/ua_y_array_item_ex.ts +4 -2
- package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +5 -1
- package/source/interfaces/state_machine/ua_state_machine_type.ts +2 -2
- package/source/loader/load_nodeset2.ts +41 -9
- package/source/loader/namespace_post_step.ts +1 -2
- package/source/loader/register_node_promoter.ts +4 -1
- package/source/namespace.ts +4 -6
- package/source/namespace_machine_state.ts +1 -2
- package/source/pseudo_session.ts +37 -29
- package/source/session_context.ts +1 -8
- package/source/set_namespace_meta_data.ts +21 -15
- package/source/xml_writer.ts +0 -1
- package/source_nodejs/index.ts +1 -1
- package/src/address_space.ts +17 -16
- package/src/address_space_private.ts +7 -12
- package/src/alarms_and_conditions/check_where_clause.ts +21 -22
- package/src/alarms_and_conditions/condition.ts +0 -1
- package/src/alarms_and_conditions/extract_event_fields.ts +0 -1
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +7 -4
- package/src/alarms_and_conditions/ua_base_event_impl.ts +11 -15
- package/src/alarms_and_conditions/ua_condition_impl.ts +22 -31
- package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +39 -33
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +2 -2
- package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +4 -5
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +16 -16
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +8 -8
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +9 -10
- package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +2 -4
- package/src/apply_condition_refresh.ts +2 -2
- package/src/base_node_impl.ts +2 -2
- package/src/data_access/add_dataItem_stuff.ts +4 -4
- package/src/data_access/check_variant_compatibility_ua_analog_item.ts +12 -15
- package/src/data_access/ua_multistate_discrete_impl.ts +6 -3
- package/src/data_access/ua_multistate_value_discrete.ts +1 -1
- package/src/event_data.ts +1 -7
- package/src/extension_object_array_node.ts +4 -10
- package/src/historical_access/address_space_historical_data_node.ts +39 -63
- package/src/namespace_impl.ts +5 -5
- package/src/namespace_private.ts +1 -1
- package/src/nodeid_manager.ts +2 -5
- package/src/nodeset_tools/nodeset_to_xml.ts +5 -5
- package/src/nodeset_tools/typedictionary_to_xml.ts +7 -5
- package/src/reference_impl.ts +4 -2
- package/src/state_machine/finite_state_machine.ts +426 -428
- package/src/state_machine/ua_shelving_state_machine_ex.ts +13 -4
- package/src/state_machine/ua_two_state_variable.ts +5 -7
- package/src/tool_isSupertypeOf.ts +2 -6
- package/src/ua_condition_type.ts +0 -1
- package/src/ua_method_impl.ts +18 -8
- package/src/ua_object_impl.ts +13 -8
- package/src/ua_object_type_impl.ts +7 -4
- package/src/ua_reference_type_impl.ts +6 -12
- package/src/ua_variable_impl.ts +11 -15
- package/src/ua_variable_type_impl.ts +2 -2
- package/src/ua_view_impl.ts +3 -6
- package/testHelpers.d.ts +1 -1
- package/test_helpers/add_event_generator_object.ts +2 -2
- package/test_helpers/alarms_and_conditions_demo.ts +9 -8
- package/test_helpers/assertHasMatchingReference.ts +43 -43
- package/test_helpers/boiler_system.ts +610 -618
- package/test_helpers/create_minimalist_address_space_nodeset.ts +13 -13
- package/test_helpers/date_utils.ts +5 -0
- package/test_helpers/dump_statemachine.ts +2 -2
- package/test_helpers/get_address_space_fixture.ts +30 -30
- package/test_helpers/get_mini_address_space.ts +42 -42
- package/test_helpers/index.ts +13 -11
- package/test_helpers/mock_session.ts +34 -0
- 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_issue.xml +80 -0
- 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/datatype_as_per_1.04.xml +1 -2
- package/test_helpers/test_fixtures/fixture_empty_nodeset2.xml +106 -106
- package/test_helpers/test_fixtures/fixture_simple_statemachine_nodeset2.xml +1303 -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.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/.nyc_output/0d52ec22-23b7-4df1-9695-d5cf1dc6a6a7.json +0 -1
- package/.nyc_output/processinfo/0d52ec22-23b7-4df1-9695-d5cf1dc6a6a7.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/.vscode/settings.json +0 -7
- 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/source/ua_namespace_meta_data_type.d.ts +0 -71
- package/dist/source/ua_namespace_meta_data_type.js +0 -3
- package/dist/source/ua_namespace_meta_data_type.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 -279
- package/dist/src/base_node.js +0 -1364
- 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 -23
- package/dist/src/data_access/ua_multistate_discrete.js +0 -131
- package/dist/src/data_access/ua_multistate_discrete.js.map +0 -1
- package/dist/src/namespace.d.ts +0 -479
- package/dist/src/namespace.js +0 -1774
- 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 -42
- package/dist/src/ua_method.js +0 -204
- package/dist/src/ua_method.js.map +0 -1
- package/dist/src/ua_object.d.ts +0 -29
- 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 -124
- 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 -346
- package/dist/src/ua_variable.js +0 -1721
- package/dist/src/ua_variable.js.map +0 -1
- package/dist/src/ua_variable_type.d.ts +0 -54
- package/dist/src/ua_variable_type.js +0 -555
- 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/src/alarms_and_conditions/debug.log +0 -1
- package/test_helpers/test_fixtures/issue_849.xml +0 -3169
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
UAVariable,
|
|
15
15
|
UAVariableType
|
|
16
16
|
} from "node-opcua-address-space-base";
|
|
17
|
-
import { assert } from "node-opcua-assert";
|
|
17
|
+
import { assert, renderError } from "node-opcua-assert";
|
|
18
18
|
import { 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";
|
|
@@ -46,18 +46,14 @@ import {
|
|
|
46
46
|
ReaderStateParserLike,
|
|
47
47
|
Xml2Json,
|
|
48
48
|
XmlAttributes,
|
|
49
|
-
Callback,
|
|
50
49
|
SimpleCallback
|
|
51
50
|
} from "node-opcua-xml2json";
|
|
52
|
-
import * as PrettyError from "pretty-error";
|
|
53
51
|
|
|
54
52
|
import { AddressSpacePrivate } from "../../src/address_space_private";
|
|
55
53
|
import { NamespacePrivate } from "../../src/namespace_private";
|
|
56
54
|
import { PseudoSession } from "../pseudo_session";
|
|
57
55
|
import { promoteObjectsAndVariables } from "./namespace_post_step";
|
|
58
56
|
|
|
59
|
-
const pe = new PrettyError();
|
|
60
|
-
|
|
61
57
|
const doDebug = checkDebugFlag(__filename);
|
|
62
58
|
const debugLog = make_debugLog(__filename);
|
|
63
59
|
|
|
@@ -446,8 +442,17 @@ export function makeStuff(addressSpace: IAddressSpace): any {
|
|
|
446
442
|
this.obj.browseName = convertQualifiedName(attrs.BrowseName);
|
|
447
443
|
this.obj.eventNotifier = ec.coerceByte(attrs.EventNotifier) || 0;
|
|
448
444
|
this.obj.symbolicName = attrs.SymbolicName || null;
|
|
445
|
+
|
|
446
|
+
this.isDraft = attrs.ReleaseStatus === "Draft";
|
|
447
|
+
this.obj.isDeprecated = attrs.ReleaseStatus === "Deprecated";
|
|
448
|
+
|
|
449
449
|
},
|
|
450
450
|
finish(this: any) {
|
|
451
|
+
if (this.isDraft || this.isDeprecated) {
|
|
452
|
+
// ignore Draft or Deprecated element
|
|
453
|
+
debugLog("Ignoring Draft/Deprecated UAObject =", this.obj.browseName.toString());
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
451
456
|
_internal_createNode(this.obj);
|
|
452
457
|
},
|
|
453
458
|
parser: {
|
|
@@ -541,13 +546,16 @@ export function makeStuff(addressSpace: IAddressSpace): any {
|
|
|
541
546
|
this.obj.displayName = "";
|
|
542
547
|
this.obj.description = "";
|
|
543
548
|
this.obj.symbolicName = attrs.SymbolicName;
|
|
549
|
+
|
|
544
550
|
this.isDraft = attrs.ReleaseStatus === "Draft";
|
|
551
|
+
this.isDeprecated = attrs.ReleaseStatus === "Deprecated";
|
|
552
|
+
|
|
545
553
|
this.definitionFields = [];
|
|
546
554
|
},
|
|
547
555
|
finish(this: any) {
|
|
548
|
-
if (this.isDraft) {
|
|
549
|
-
// ignore Draft element
|
|
550
|
-
debugLog("Ignoring Draft dataType =", this.obj.browseName.toString());
|
|
556
|
+
if (this.isDraft || this.isDeprecated) {
|
|
557
|
+
// ignore Draft or Deprecated element
|
|
558
|
+
debugLog("Ignoring Draft/Deprecated dataType =", this.obj.browseName.toString());
|
|
551
559
|
return;
|
|
552
560
|
}
|
|
553
561
|
let definitionFields = this.definitionFields;
|
|
@@ -1278,8 +1286,16 @@ export function makeStuff(addressSpace: IAddressSpace): any {
|
|
|
1278
1286
|
|
|
1279
1287
|
this.obj.accessLevel = convertAccessLevel(attrs.AccessLevel);
|
|
1280
1288
|
this.obj.userAccessLevel = this.obj.accessLevel; // convertAccessLevel(attrs.UserAccessLevel || attrs.AccessLevel);
|
|
1289
|
+
|
|
1290
|
+
this.isDraft = attrs.ReleaseStatus === "Draft";
|
|
1291
|
+
this.isDeprecated = attrs.ReleaseStatus === "Deprecated";
|
|
1292
|
+
|
|
1281
1293
|
},
|
|
1282
1294
|
finish(this: any) {
|
|
1295
|
+
if (this.isDraft || this.isDeprecated) {
|
|
1296
|
+
debugLog("Ignoring Draft/Deprecated UAVariable =", this.obj.browseName.toString());
|
|
1297
|
+
return;
|
|
1298
|
+
}
|
|
1283
1299
|
/*
|
|
1284
1300
|
// set default value based on obj data Type
|
|
1285
1301
|
if (this.obj.value === undefined) {
|
|
@@ -1355,8 +1371,16 @@ export function makeStuff(addressSpace: IAddressSpace): any {
|
|
|
1355
1371
|
|
|
1356
1372
|
this.obj.historizing = false;
|
|
1357
1373
|
this.obj.nodeId = convertToNodeId(attrs.NodeId) || null;
|
|
1374
|
+
|
|
1375
|
+
this.isDraft = attrs.ReleaseStatus === "Draft";
|
|
1376
|
+
this.isDeprecated = attrs.ReleaseStatus === "Deprecated";
|
|
1377
|
+
|
|
1358
1378
|
},
|
|
1359
1379
|
finish(this: any) {
|
|
1380
|
+
if (this.isDraft || this.isDeprecated) {
|
|
1381
|
+
debugLog("Ignoring Draft/Deprecated UAVariableType =", this.obj.browseName.toString());
|
|
1382
|
+
return;
|
|
1383
|
+
}
|
|
1360
1384
|
try {
|
|
1361
1385
|
_internal_createNode(this.obj);
|
|
1362
1386
|
} /* istanbul ignore next */ catch (err) {
|
|
@@ -1393,8 +1417,16 @@ export function makeStuff(addressSpace: IAddressSpace): any {
|
|
|
1393
1417
|
this.obj.parentNodeId = attrs.ParentNodeId || null;
|
|
1394
1418
|
this.obj.nodeId = convertToNodeId(attrs.NodeId) || null;
|
|
1395
1419
|
this.obj.methodDeclarationId = attrs.MethodDeclarationId ? _translateNodeId(attrs.MethodDeclarationId) : null;
|
|
1420
|
+
|
|
1421
|
+
this.isDraft = attrs.ReleaseStatus === "Draft";
|
|
1422
|
+
this.isDeprecated = attrs.ReleaseStatus === "Deprecated";
|
|
1423
|
+
|
|
1396
1424
|
},
|
|
1397
1425
|
finish(this: any) {
|
|
1426
|
+
if (this.isDraft || this.isDeprecated) {
|
|
1427
|
+
debugLog("Ignoring Draft/Deprecated UAMethod =", this.obj.browseName.toString());
|
|
1428
|
+
return;
|
|
1429
|
+
}
|
|
1398
1430
|
_internal_createNode(this.obj);
|
|
1399
1431
|
},
|
|
1400
1432
|
parser: {
|
|
@@ -1561,7 +1593,7 @@ export function makeStuff(addressSpace: IAddressSpace): any {
|
|
|
1561
1593
|
finalSteps()
|
|
1562
1594
|
.then(() => callback!())
|
|
1563
1595
|
.catch((err1: Error) => {
|
|
1564
|
-
console.log("Error ",
|
|
1596
|
+
console.log("Error ", renderError(err1));
|
|
1565
1597
|
callback!(err1);
|
|
1566
1598
|
});
|
|
1567
1599
|
}
|
|
@@ -4,7 +4,6 @@ import { make_debugLog, checkDebugFlag } from "node-opcua-debug";
|
|
|
4
4
|
import { UAObject, UAVariable, IAddressSpace, INamespace } from "node-opcua-address-space-base";
|
|
5
5
|
import { NamespacePrivate } from "../../src/namespace_private";
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
const debugLog = make_debugLog(__filename);
|
|
9
8
|
const doDebug = checkDebugFlag(__filename);
|
|
10
9
|
|
|
@@ -14,7 +13,7 @@ export async function promoteObjectAndVariablesInNamespace(namespace: INamespace
|
|
|
14
13
|
const namespaceP = namespace as NamespacePrivate;
|
|
15
14
|
for (const a of namespaceP.nodeIterator()) {
|
|
16
15
|
if (a.nodeClass === NodeClass.Object || a.nodeClass === NodeClass.Variable) {
|
|
17
|
-
const aa = a as
|
|
16
|
+
const aa = a as UAObject | UAVariable;
|
|
18
17
|
if (aa.typeDefinition) {
|
|
19
18
|
const promoter = g_promotableObject[aa.typeDefinition.toString()];
|
|
20
19
|
if (promoter) {
|
|
@@ -3,6 +3,9 @@ import { UAObject, UAVariable } from "node-opcua-address-space-base";
|
|
|
3
3
|
|
|
4
4
|
import { g_promotableObject } from "./namespace_post_step";
|
|
5
5
|
|
|
6
|
-
export function registerNodePromoter(
|
|
6
|
+
export function registerNodePromoter(
|
|
7
|
+
nodeId: NodeIdLike,
|
|
8
|
+
promoter: ((node: UAVariable) => void) | ((node: UAObject) => void)
|
|
9
|
+
): void {
|
|
7
10
|
g_promotableObject[resolveNodeId(nodeId).toString()] = promoter;
|
|
8
11
|
}
|
package/source/namespace.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { INamespace } from "node-opcua-address-space-base";
|
|
2
2
|
|
|
3
|
-
import { INamespaceAlarmAndCondition} from "./namespace_alarm_and_condition";
|
|
4
|
-
import { INamespaceDataAccess} from "./namespace_data_access";
|
|
5
|
-
import { INamespaceMachineState} from "./namespace_machine_state";
|
|
3
|
+
import { INamespaceAlarmAndCondition } from "./namespace_alarm_and_condition";
|
|
4
|
+
import { INamespaceDataAccess } from "./namespace_data_access";
|
|
5
|
+
import { INamespaceMachineState } from "./namespace_machine_state";
|
|
6
6
|
|
|
7
|
-
export interface Namespace extends INamespace, INamespaceAlarmAndCondition
|
|
8
|
-
|
|
9
|
-
}
|
|
7
|
+
export interface Namespace extends INamespace, INamespaceAlarmAndCondition, INamespaceDataAccess, INamespaceMachineState {}
|
|
@@ -4,10 +4,9 @@ import { UATransitionEx } from "./interfaces/state_machine/ua_transition_ex";
|
|
|
4
4
|
export interface INamespaceMachineState {
|
|
5
5
|
addState(component: UAObject | UAObjectType, stateName: string, stateNumber: number, isInitialState?: boolean): UAState;
|
|
6
6
|
addTransition(
|
|
7
|
-
component: UAObject | UAObjectType
|
|
7
|
+
component: UAObject | UAObjectType /* StateMachine | StateMachineType,*/,
|
|
8
8
|
fromState: string,
|
|
9
9
|
toState: string,
|
|
10
10
|
transitionNumber: number
|
|
11
11
|
): UATransitionEx;
|
|
12
12
|
}
|
|
13
|
-
|
package/source/pseudo_session.ts
CHANGED
|
@@ -25,7 +25,7 @@ import { NodeClass, AttributeIds } from "node-opcua-data-model";
|
|
|
25
25
|
import { WriteValueOptions, ReadValueIdOptions, BrowseDescriptionOptions } from "node-opcua-types";
|
|
26
26
|
import { randomGuid } from "node-opcua-basic-types";
|
|
27
27
|
|
|
28
|
-
import { IAddressSpace, UAVariable, ISessionContext } from "node-opcua-address-space-base";
|
|
28
|
+
import { IAddressSpace, UAVariable, ISessionContext, ContinuationPoint } from "node-opcua-address-space-base";
|
|
29
29
|
|
|
30
30
|
import { ContinuationPointManager } from "./continuation_points/continuation_point_manager";
|
|
31
31
|
import { callMethodHelper } from "./helpers/call_helpers";
|
|
@@ -79,15 +79,22 @@ export class PseudoSession implements IBasicSession {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
// handle continuation points
|
|
82
|
-
results = results.map((result: BrowseResult) => {
|
|
82
|
+
results = results.map((result: BrowseResult, index) => {
|
|
83
83
|
assert(!result.continuationPoint);
|
|
84
|
-
const
|
|
84
|
+
const r = this.continuationPointManager.registerReferences(
|
|
85
85
|
this.requestedMaxReferencesPerNode,
|
|
86
|
-
result.references || []
|
|
86
|
+
result.references || [],
|
|
87
|
+
{ continuationPoint: null, index }
|
|
87
88
|
);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
let { statusCode } = r;
|
|
90
|
+
const { continuationPoint, values } = r;
|
|
91
|
+
assert(statusCode === StatusCodes.Good || statusCode === StatusCodes.GoodNoData);
|
|
92
|
+
statusCode = result.statusCode;
|
|
93
|
+
return new BrowseResult({
|
|
94
|
+
statusCode,
|
|
95
|
+
continuationPoint,
|
|
96
|
+
references: values
|
|
97
|
+
});
|
|
91
98
|
});
|
|
92
99
|
callback!(null, isArray ? results : results[0]);
|
|
93
100
|
});
|
|
@@ -154,7 +161,11 @@ export class PseudoSession implements IBasicSession {
|
|
|
154
161
|
public browseNext(continuationPoint: Buffer, releaseContinuationPoints: boolean): Promise<BrowseResult>;
|
|
155
162
|
|
|
156
163
|
public browseNext(continuationPoints: Buffer[], releaseContinuationPoints: boolean): Promise<BrowseResult[]>;
|
|
157
|
-
public browseNext(
|
|
164
|
+
public browseNext(
|
|
165
|
+
continuationPoints: Buffer | Buffer[],
|
|
166
|
+
releaseContinuationPoints: boolean,
|
|
167
|
+
callback?: ResponseCallback<any>
|
|
168
|
+
): any {
|
|
158
169
|
setImmediate(() => {
|
|
159
170
|
if (continuationPoints instanceof Buffer) {
|
|
160
171
|
return this.browseNext([continuationPoints], releaseContinuationPoints, (err, _results) => {
|
|
@@ -164,26 +175,23 @@ export class PseudoSession implements IBasicSession {
|
|
|
164
175
|
callback!(null, _results![0]);
|
|
165
176
|
});
|
|
166
177
|
}
|
|
167
|
-
let results: any;
|
|
168
|
-
if (releaseContinuationPoints) {
|
|
169
|
-
// releaseContinuationPoints = TRUE
|
|
170
|
-
// passed continuationPoints shall be reset to free resources in
|
|
171
|
-
// the Server. The continuation points are released and the results
|
|
172
|
-
// and diagnosticInfos arrays are empty.
|
|
173
|
-
results = continuationPoints.map((continuationPoint: any) => {
|
|
174
|
-
return this.continuationPointManager.cancel(continuationPoint);
|
|
175
|
-
});
|
|
176
|
-
} else {
|
|
177
|
-
// let extract data from continuation points
|
|
178
178
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
179
|
+
const results = continuationPoints
|
|
180
|
+
.map((continuationPoint: ContinuationPoint, index: number) => {
|
|
181
|
+
return this.continuationPointManager.getNextReferences(0, {
|
|
182
|
+
continuationPoint,
|
|
183
|
+
index,
|
|
184
|
+
releaseContinuationPoints
|
|
185
|
+
});
|
|
186
|
+
})
|
|
187
|
+
.map(
|
|
188
|
+
(r) =>
|
|
189
|
+
new BrowseResult({
|
|
190
|
+
statusCode: r.statusCode,
|
|
191
|
+
continuationPoint: r.continuationPoint,
|
|
192
|
+
references: r.values
|
|
193
|
+
})
|
|
194
|
+
);
|
|
187
195
|
|
|
188
196
|
callback!(null, results);
|
|
189
197
|
});
|
|
@@ -255,7 +263,7 @@ export class PseudoSession implements IBasicSession {
|
|
|
255
263
|
public write(nodesToWrite: WriteValueOptions[]): Promise<StatusCode[]>;
|
|
256
264
|
public write(nodesToWrite: WriteValueOptions[] | WriteValueOptions, callback?: ResponseCallback<any>): any {
|
|
257
265
|
const isArray = nodesToWrite instanceof Array;
|
|
258
|
-
const _nodesToWrite: WriteValueOptions[]
|
|
266
|
+
const _nodesToWrite: WriteValueOptions[] = !isArray ? [nodesToWrite] : nodesToWrite;
|
|
259
267
|
const context = this.context;
|
|
260
268
|
setImmediate(() => {
|
|
261
269
|
const statusCodesPromises = _nodesToWrite.map((nodeToWrite: WriteValueOptions) => {
|
|
@@ -265,7 +273,7 @@ export class PseudoSession implements IBasicSession {
|
|
|
265
273
|
const nodeId = nodeToWrite.nodeId!;
|
|
266
274
|
const obj = this.addressSpace.findNode(nodeId);
|
|
267
275
|
if (!obj) {
|
|
268
|
-
return
|
|
276
|
+
return StatusCodes.BadNodeIdUnknown;
|
|
269
277
|
}
|
|
270
278
|
return promisify(obj.writeAttribute).call(obj, context, nodeToWrite);
|
|
271
279
|
});
|
|
@@ -15,14 +15,7 @@ import {
|
|
|
15
15
|
UserNameIdentityToken,
|
|
16
16
|
X509IdentityToken
|
|
17
17
|
} from "node-opcua-types";
|
|
18
|
-
import {
|
|
19
|
-
ISessionContext,
|
|
20
|
-
UAObject,
|
|
21
|
-
UAObjectType,
|
|
22
|
-
UAVariable,
|
|
23
|
-
BaseNode,
|
|
24
|
-
ISessionBase
|
|
25
|
-
} from "node-opcua-address-space-base";
|
|
18
|
+
import { ISessionContext, UAObject, UAObjectType, UAVariable, BaseNode, ISessionBase } from "node-opcua-address-space-base";
|
|
26
19
|
import { ObjectIds } from "node-opcua-constants";
|
|
27
20
|
import { StatusCodes } from "node-opcua-status-code";
|
|
28
21
|
import { NamespacePrivate } from "../src/namespace_private";
|
|
@@ -50,19 +50,25 @@ export function setNamespaceMetaData(namespace: INamespace): void {
|
|
|
50
50
|
const namespaceVersion = metaData.namespaceVersion;
|
|
51
51
|
namespaceVersion.setValueFromSource({ dataType: DataType.String, value: "1.0.0" });
|
|
52
52
|
|
|
53
|
-
metaData.defaultAccessRestrictions?.bindVariable(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
53
|
+
metaData.defaultAccessRestrictions?.bindVariable(
|
|
54
|
+
{
|
|
55
|
+
get: () =>
|
|
56
|
+
new Variant({
|
|
57
|
+
dataType: DataType.UInt32,
|
|
58
|
+
value: namespace.getDefaultAccessRestrictions()
|
|
59
|
+
})
|
|
60
|
+
},
|
|
61
|
+
true
|
|
62
|
+
);
|
|
63
|
+
metaData.defaultRolePermissions?.bindVariable(
|
|
64
|
+
{
|
|
65
|
+
get: () =>
|
|
66
|
+
new Variant({
|
|
67
|
+
dataType: DataType.ExtensionObject,
|
|
68
|
+
arrayType: VariantArrayType.Array,
|
|
69
|
+
value: namespace.getDefaultRolePermissions()
|
|
70
|
+
})
|
|
71
|
+
},
|
|
72
|
+
true
|
|
73
|
+
);
|
|
68
74
|
}
|
package/source/xml_writer.ts
CHANGED
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
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "node-opcua-types";
|
|
26
26
|
import * as utils from "node-opcua-utils";
|
|
27
27
|
import { lowerFirstLetter } from "node-opcua-utils";
|
|
28
|
-
import { DataType, Variant, VariantArrayType, VariantT } from "node-opcua-variant";
|
|
28
|
+
import { DataType, Variant, VariantArrayType, VariantOptions, VariantT } from "node-opcua-variant";
|
|
29
29
|
import {
|
|
30
30
|
AddReferenceOpts,
|
|
31
31
|
IEventData,
|
|
@@ -41,17 +41,19 @@ import {
|
|
|
41
41
|
UAVariableType,
|
|
42
42
|
UAReferenceType,
|
|
43
43
|
UAObject,
|
|
44
|
-
UAView
|
|
44
|
+
UAView,
|
|
45
|
+
RaiseEventData
|
|
45
46
|
} from "node-opcua-address-space-base";
|
|
46
47
|
|
|
47
48
|
import { adjustBrowseDirection } from "../source/helpers/adjust_browse_direction";
|
|
48
49
|
import { UARootFolder } from "../source/ua_root_folder";
|
|
50
|
+
import { Namespace } from "../source/namespace";
|
|
49
51
|
|
|
50
52
|
import { AddressSpacePrivate } from "./address_space_private";
|
|
51
53
|
import { UAAcknowledgeableConditionImpl, UAConditionImpl } from "./alarms_and_conditions";
|
|
52
54
|
import { EventData } from "./event_data";
|
|
53
55
|
import { AddressSpace_installHistoricalDataNode } from "./historical_access/address_space_historical_data_node";
|
|
54
|
-
import {
|
|
56
|
+
import { NamespaceImpl } from "./namespace_impl";
|
|
55
57
|
import { isNonEmptyQualifiedName } from "./namespace_impl";
|
|
56
58
|
import { NamespacePrivate } from "./namespace_private";
|
|
57
59
|
import { ExtensionObjectConstructorFuncWithSchema, UADataTypeImpl } from "./ua_data_type_impl";
|
|
@@ -152,7 +154,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
152
154
|
|
|
153
155
|
public readonly isNodeIdString = isNodeIdString;
|
|
154
156
|
private readonly _private_namespaceIndex: number;
|
|
155
|
-
private readonly _namespaceArray:
|
|
157
|
+
private readonly _namespaceArray: NamespacePrivate[];
|
|
156
158
|
private _shutdownTask: ShutdownTask[] = [];
|
|
157
159
|
private _modelChangeTransactionCounter = 0;
|
|
158
160
|
private _modelChanges: ModelChangeStructureDataType[] = [];
|
|
@@ -185,7 +187,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
185
187
|
* @param {string|number} namespace index or namespace uri.
|
|
186
188
|
* @return {NameSpace} the namespace
|
|
187
189
|
*/
|
|
188
|
-
public getNamespace(namespaceIndexOrName: string | number):
|
|
190
|
+
public getNamespace(namespaceIndexOrName: string | number): NamespacePrivate {
|
|
189
191
|
if (typeof namespaceIndexOrName === "number") {
|
|
190
192
|
const namespaceIndex = namespaceIndexOrName;
|
|
191
193
|
assert(namespaceIndex >= 0 && namespaceIndex < this._namespaceArray.length, "invalid namespace index ( out of bound)");
|
|
@@ -240,7 +242,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
240
242
|
* @param namespaceUri {string}
|
|
241
243
|
* @returns {Namespace}
|
|
242
244
|
*/
|
|
243
|
-
public registerNamespace(namespaceUri: string):
|
|
245
|
+
public registerNamespace(namespaceUri: string): NamespacePrivate {
|
|
244
246
|
let index = this._namespaceArray.findIndex((ns) => ns.namespaceUri === namespaceUri);
|
|
245
247
|
if (index !== -1) {
|
|
246
248
|
assert((this._namespaceArray[index].addressSpace as any) === (this as any));
|
|
@@ -248,7 +250,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
248
250
|
}
|
|
249
251
|
index = this._namespaceArray.length;
|
|
250
252
|
this._namespaceArray.push(
|
|
251
|
-
new
|
|
253
|
+
new NamespaceImpl({
|
|
252
254
|
addressSpace: this,
|
|
253
255
|
index,
|
|
254
256
|
namespaceUri,
|
|
@@ -659,7 +661,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
659
661
|
*
|
|
660
662
|
* @private
|
|
661
663
|
*/
|
|
662
|
-
public constructEventData(eventTypeId: UAEventType, data:
|
|
664
|
+
public constructEventData(eventTypeId: UAEventType, data: RaiseEventData): IEventData {
|
|
663
665
|
data = data || {};
|
|
664
666
|
|
|
665
667
|
// construct the reference dataStructure to store event Data
|
|
@@ -737,7 +739,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
737
739
|
|
|
738
740
|
visitedProperties[lowerName] = node;
|
|
739
741
|
if (Object.prototype.hasOwnProperty.call(data, lowerName)) {
|
|
740
|
-
eventData.setValue(lowerName, node, data[lowerName]);
|
|
742
|
+
eventData.setValue(lowerName, node, data[lowerName] as VariantOptions);
|
|
741
743
|
// xx eventData[lowerName] = _coerceVariant(data[lowerName]);
|
|
742
744
|
} else {
|
|
743
745
|
// add a property , but with a null variant
|
|
@@ -1019,7 +1021,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
1019
1021
|
* @example
|
|
1020
1022
|
*
|
|
1021
1023
|
* // example 1
|
|
1022
|
-
* var extObj = addressSpace.constructExtensionObject("BuildInfo",{ productName: "
|
|
1024
|
+
* var extObj = addressSpace.constructExtensionObject("BuildInfo",{ productName: "PRODUCT_NAME"});
|
|
1023
1025
|
*
|
|
1024
1026
|
* // example 2
|
|
1025
1027
|
* serverStatusDataType.nodeClass.should.eql(NodeClass.DataType);
|
|
@@ -1027,7 +1029,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
1027
1029
|
* var serverStatus = addressSpace.constructExtensionObject(serverStatusDataType);
|
|
1028
1030
|
* serverStatus.constructor.name.should.eql("ServerStatusDataType");
|
|
1029
1031
|
*/
|
|
1030
|
-
public constructExtensionObject(dataType: UADataType | NodeId, options
|
|
1032
|
+
public constructExtensionObject(dataType: UADataType | NodeId, options?: Record<string, unknown>): ExtensionObject {
|
|
1031
1033
|
const Constructor = this.getExtensionObjectConstructor(dataType);
|
|
1032
1034
|
return new Constructor(options);
|
|
1033
1035
|
}
|
|
@@ -1147,7 +1149,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
1147
1149
|
* @param modelChange
|
|
1148
1150
|
* @private
|
|
1149
1151
|
*/
|
|
1150
|
-
public _collectModelChange(view: UAView | null, modelChange: ModelChangeStructureDataType) {
|
|
1152
|
+
public _collectModelChange(view: UAView | null, modelChange: ModelChangeStructureDataType): void {
|
|
1151
1153
|
// xx console.log("in _collectModelChange", modelChange.verb, verbFlags.get(modelChange.verb).toString());
|
|
1152
1154
|
this._modelChanges.push(modelChange);
|
|
1153
1155
|
}
|
|
@@ -1194,7 +1196,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
1194
1196
|
results.push(parent as UAView);
|
|
1195
1197
|
} else {
|
|
1196
1198
|
const key = parent.nodeId.toString();
|
|
1197
|
-
if (Object.prototype.hasOwnProperty.call(visitedMap,key)) {
|
|
1199
|
+
if (Object.prototype.hasOwnProperty.call(visitedMap, key)) {
|
|
1198
1200
|
continue;
|
|
1199
1201
|
}
|
|
1200
1202
|
visitedMap[key] = parent;
|
|
@@ -1210,8 +1212,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
1210
1212
|
* @param func
|
|
1211
1213
|
* @private
|
|
1212
1214
|
*/
|
|
1213
|
-
public modelChangeTransaction(func:
|
|
1214
|
-
|
|
1215
|
+
public modelChangeTransaction(func: () => void): void {
|
|
1215
1216
|
this._modelChangeTransactionCounter = this._modelChangeTransactionCounter || 0;
|
|
1216
1217
|
|
|
1217
1218
|
function beginModelChange(this: AddressSpace) {
|
|
@@ -1315,7 +1316,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
1315
1316
|
|
|
1316
1317
|
// ----------- now resolve target NodeId;
|
|
1317
1318
|
if (params.nodeId instanceof BaseNodeImpl) {
|
|
1318
|
-
assert(!Object.prototype.hasOwnProperty.call(params,"node"));
|
|
1319
|
+
assert(!Object.prototype.hasOwnProperty.call(params, "node"));
|
|
1319
1320
|
params.node = params.nodeId as BaseNode;
|
|
1320
1321
|
params.nodeId = params.node.nodeId;
|
|
1321
1322
|
} else {
|
|
@@ -16,21 +16,20 @@ import {
|
|
|
16
16
|
UAView,
|
|
17
17
|
ISessionContext,
|
|
18
18
|
AddReferenceOpts,
|
|
19
|
-
ContinuationPoint,
|
|
20
19
|
UAVariableType,
|
|
21
20
|
UAObjectType,
|
|
22
21
|
UAReference,
|
|
23
|
-
UAVariable
|
|
22
|
+
UAVariable,
|
|
23
|
+
ContinuationData
|
|
24
24
|
} from "node-opcua-address-space-base";
|
|
25
25
|
|
|
26
26
|
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
|
-
|
|
34
33
|
rootFolder: UARootFolder;
|
|
35
34
|
|
|
36
35
|
isFrugal: boolean;
|
|
@@ -44,11 +43,7 @@ export interface AddressSpacePrivate extends IAddressSpace {
|
|
|
44
43
|
|
|
45
44
|
_coerce_DataType(dataType: NodeIdLike | BaseNode): NodeId;
|
|
46
45
|
|
|
47
|
-
_coerceType(
|
|
48
|
-
baseType: string | NodeId | BaseNode,
|
|
49
|
-
topMostBaseType: string,
|
|
50
|
-
nodeClass: NodeClass
|
|
51
|
-
): UAVariableType | UAObjectType;
|
|
46
|
+
_coerceType(baseType: string | NodeId | BaseNode, topMostBaseType: string, nodeClass: NodeClass): UAVariableType | UAObjectType;
|
|
52
47
|
_coerceTypeDefinition(typeDefinition: string | NodeId): NodeId;
|
|
53
48
|
|
|
54
49
|
_coerce_VariableTypeIds(dataType: NodeId | string | BaseNode): NodeId;
|
|
@@ -57,9 +52,9 @@ export interface AddressSpacePrivate extends IAddressSpace {
|
|
|
57
52
|
|
|
58
53
|
getOwnNamespace(): NamespacePrivate;
|
|
59
54
|
|
|
60
|
-
getNamespace(indexOrName: number | string):
|
|
55
|
+
getNamespace(indexOrName: number | string): NamespacePrivate;
|
|
61
56
|
|
|
62
|
-
registerNamespace(namespaceUri: string):
|
|
57
|
+
registerNamespace(namespaceUri: string): NamespacePrivate;
|
|
63
58
|
|
|
64
59
|
getNamespaceArray(): NamespacePrivate[];
|
|
65
60
|
|
|
@@ -90,7 +85,7 @@ export interface AddressSpacePrivate extends IAddressSpace {
|
|
|
90
85
|
historyReadDetails: ReadProcessedDetails,
|
|
91
86
|
indexRange: NumericRange | null,
|
|
92
87
|
dataEncoding: QualifiedNameLike | null,
|
|
93
|
-
|
|
88
|
+
continuationData: ContinuationData,
|
|
94
89
|
callback: CallbackT<HistoryReadResult>
|
|
95
90
|
) => void;
|
|
96
91
|
|