node-opcua-address-space 2.170.1 → 2.173.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/dist/source/address_space_ts.d.ts +13 -13
- package/dist/source/address_space_ts.js +4 -0
- package/dist/source/address_space_ts.js.map +1 -1
- package/dist/source/continuation_points/continuation_point_manager.d.ts +6 -3
- package/dist/source/continuation_points/continuation_point_manager.js +4 -4
- package/dist/source/continuation_points/continuation_point_manager.js.map +1 -1
- package/dist/source/helpers/adjust_browse_direction.d.ts +1 -1
- package/dist/source/helpers/argument_list.d.ts +13 -11
- package/dist/source/helpers/argument_list.js +24 -15
- package/dist/source/helpers/argument_list.js.map +1 -1
- package/dist/source/helpers/call_helpers.d.ts +6 -3
- package/dist/source/helpers/call_helpers.js +5 -6
- package/dist/source/helpers/call_helpers.js.map +1 -1
- package/dist/source/helpers/coerce_enum_value.d.ts +2 -2
- package/dist/source/helpers/coerce_enum_value.js +2 -2
- package/dist/source/helpers/coerce_enum_value.js.map +1 -1
- package/dist/source/helpers/dump_tools.d.ts +3 -3
- package/dist/source/helpers/dump_tools.js +2 -2
- package/dist/source/helpers/dump_tools.js.map +1 -1
- package/dist/source/helpers/ensure_secure_access.d.ts +1 -1
- package/dist/source/helpers/ensure_secure_access.js +1 -1
- package/dist/source/helpers/ensure_secure_access.js.map +1 -1
- package/dist/source/helpers/make_optionals_map.js +0 -5
- package/dist/source/helpers/make_optionals_map.js.map +1 -1
- package/dist/source/helpers/multiform_func.d.ts +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.d.ts +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js.map +1 -1
- package/dist/source/index.d.ts +38 -38
- package/dist/source/index.js +53 -54
- package/dist/source/index.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +11 -11
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +6 -6
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +4 -4
- package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +4 -3
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +10 -13
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +11 -11
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.d.ts +11 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +5 -5
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +21 -29
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +3 -7
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +0 -23
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +8 -10
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +4 -6
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +5 -5
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +3 -3
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +7 -7
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +5 -8
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +5 -5
- package/dist/source/interfaces/data_access/ua_y_array_item_ex.d.ts +3 -3
- package/dist/source/interfaces/extension_object_constructor.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +2 -2
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +6 -6
- package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +7 -6
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js +4 -0
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +1 -1
- package/dist/source/interfaces/state_machine/ua_transition_ex.d.ts +2 -2
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +2 -2
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js +3 -0
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -1
- package/dist/source/loader/decode_xml_extension_object.d.ts +4 -4
- package/dist/source/loader/decode_xml_extension_object.js +3 -3
- package/dist/source/loader/decode_xml_extension_object.js.map +1 -1
- package/dist/source/loader/ensure_datatype_extracted.d.ts +2 -2
- package/dist/source/loader/ensure_datatype_extracted.js +5 -5
- package/dist/source/loader/ensure_datatype_extracted.js.map +1 -1
- package/dist/source/loader/generateAddressSpaceRaw.d.ts +3 -3
- package/dist/source/loader/generateAddressSpaceRaw.js +6 -6
- package/dist/source/loader/generateAddressSpaceRaw.js.map +1 -1
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/source/loader/make_xml_extension_object_parser.d.ts +2 -2
- package/dist/source/loader/make_xml_extension_object_parser.js +19 -19
- package/dist/source/loader/make_xml_extension_object_parser.js.map +1 -1
- package/dist/source/loader/namespace_post_step.d.ts +1 -1
- package/dist/source/loader/namespace_post_step.js.map +1 -1
- package/dist/source/loader/parsers/extension_object_parser.d.ts +4 -4
- package/dist/source/loader/parsers/extension_object_parser.js +22 -23
- package/dist/source/loader/parsers/extension_object_parser.js.map +1 -1
- package/dist/source/loader/parsers/localized_text_parser.d.ts +2 -2
- package/dist/source/loader/parsers/localized_text_parser.js.map +1 -1
- package/dist/source/loader/parsers/nodeid_parser.d.ts +1 -1
- package/dist/source/loader/parsers/nodeid_parser.js.map +1 -1
- package/dist/source/loader/parsers/qualified_name_parser.d.ts +3 -3
- package/dist/source/loader/parsers/qualified_name_parser.js.map +1 -1
- package/dist/source/loader/parsers/variant_parser.d.ts +5 -5
- package/dist/source/loader/parsers/variant_parser.js +13 -13
- package/dist/source/loader/parsers/variant_parser.js.map +1 -1
- package/dist/source/loader/register_node_promoter.d.ts +1 -1
- package/dist/source/loader/register_node_promoter.js.map +1 -1
- package/dist/source/namespace.d.ts +4 -4
- package/dist/source/namespace_alarm_and_condition.d.ts +22 -21
- package/dist/source/namespace_data_access.d.ts +11 -11
- package/dist/source/namespace_machine_state.d.ts +4 -4
- package/dist/source/pseudo_session.d.ts +8 -5
- package/dist/source/pseudo_session.js +28 -28
- package/dist/source/pseudo_session.js.map +1 -1
- package/dist/source/session_context.js +1 -1
- package/dist/source/session_context.js.map +1 -1
- package/dist/source/set_namespace_meta_data.d.ts +1 -1
- package/dist/source/set_namespace_meta_data.js +1 -1
- package/dist/source/set_namespace_meta_data.js.map +1 -1
- package/dist/source/ua_addin.d.ts +3 -3
- package/dist/source/ua_addin.js +1 -1
- package/dist/source/ua_addin.js.map +1 -1
- package/dist/source/ua_interface.js +4 -1
- package/dist/source/ua_interface.js.map +1 -1
- package/dist/source/ua_root_folder.d.ts +1 -1
- package/dist/source/ua_two_state_variable_ex.d.ts +5 -5
- package/dist/src/_instantiate_helpers.js +1 -1
- package/dist/src/_instantiate_helpers.js.map +1 -1
- package/dist/src/_mandatory_child_or_requested_optional_filter.d.ts +2 -2
- package/dist/src/_mandatory_child_or_requested_optional_filter.js +7 -8
- package/dist/src/_mandatory_child_or_requested_optional_filter.js.map +1 -1
- package/dist/src/address_space.js +5 -6
- package/dist/src/address_space.js.map +1 -1
- package/dist/src/address_space_change_event_tools.d.ts +3 -3
- package/dist/src/address_space_change_event_tools.js +8 -10
- package/dist/src/address_space_change_event_tools.js.map +1 -1
- package/dist/src/address_space_private.d.ts +11 -11
- package/dist/src/address_space_private.js +3 -0
- package/dist/src/address_space_private.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +6 -6
- package/dist/src/alarms_and_conditions/condition_info_impl.js +6 -15
- package/dist/src/alarms_and_conditions/condition_info_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +10 -10
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +76 -47
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +8 -5
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +15 -9
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -1
- package/dist/src/alarms_and_conditions/index.d.ts +3 -3
- package/dist/src/alarms_and_conditions/index.js +3 -3
- package/dist/src/alarms_and_conditions/index.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +21 -14
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +26 -21
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +6 -7
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +30 -28
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +9 -11
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js +10 -10
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +3 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +6 -5
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +16 -42
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +100 -82
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +12 -7
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +9 -8
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +18 -18
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +16 -18
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +4 -4
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +2 -2
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +10 -9
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +20 -19
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +2 -4
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +12 -38
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +50 -65
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +15 -17
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +15 -11
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +22 -15
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +35 -24
- 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.d.ts +15 -16
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +19 -14
- 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.d.ts +4 -4
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/apply_condition_refresh.d.ts +4 -4
- package/dist/src/apply_condition_refresh.js +1 -1
- package/dist/src/apply_condition_refresh.js.map +1 -1
- package/dist/src/base_node_impl.d.ts +4 -6
- package/dist/src/base_node_impl.js +3 -3
- package/dist/src/base_node_impl.js.map +1 -1
- package/dist/src/base_node_private.js +1 -2
- package/dist/src/base_node_private.js.map +1 -1
- package/dist/src/check_value_rank_compatibility.js +10 -6
- package/dist/src/check_value_rank_compatibility.js.map +1 -1
- package/dist/src/data_access/add_dataItem_stuff.d.ts +1 -1
- package/dist/src/data_access/add_dataItem_stuff.js +2 -22
- package/dist/src/data_access/add_dataItem_stuff.js.map +1 -1
- package/dist/src/data_access/adjust_datavalue_status_code.d.ts +6 -3
- package/dist/src/data_access/adjust_datavalue_status_code.js +3 -3
- package/dist/src/data_access/adjust_datavalue_status_code.js.map +1 -1
- package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +13 -11
- package/dist/src/data_access/ua_multistate_discrete_impl.js +28 -23
- package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +19 -23
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js +31 -31
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +10 -16
- package/dist/src/data_access/ua_two_state_discrete_impl.js +18 -14
- package/dist/src/data_access/ua_two_state_discrete_impl.js.map +1 -1
- package/dist/src/event_data.js.map +1 -1
- package/dist/src/extension_object_array_node.d.ts +5 -2
- package/dist/src/extension_object_array_node.js +21 -24
- package/dist/src/extension_object_array_node.js.map +1 -1
- package/dist/src/get_basic_datatype.d.ts +2 -2
- package/dist/src/get_basic_datatype.js.map +1 -1
- package/dist/src/historical_access/address_space_historical_data_node.d.ts +3 -3
- package/dist/src/historical_access/address_space_historical_data_node.js +24 -17
- package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -1
- package/dist/src/idx_iterator.js +1 -1
- package/dist/src/idx_iterator.js.map +1 -1
- package/dist/src/index_current.d.ts +31 -31
- package/dist/src/index_current.js +45 -45
- package/dist/src/index_current.js.map +1 -1
- package/dist/src/namespace_impl.d.ts +4 -3
- package/dist/src/namespace_impl.js +17 -14
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/namespace_private.js.map +1 -1
- package/dist/src/nodeid_manager.d.ts +3 -3
- package/dist/src/nodeid_manager.js +19 -16
- package/dist/src/nodeid_manager.js.map +1 -1
- package/dist/src/nodeset_tools/adjust_namespace_array.d.ts +1 -1
- package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +2 -2
- package/dist/src/nodeset_tools/construct_namespace_dependency.js +22 -9
- package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +1 -1
- package/dist/src/nodeset_tools/dump_to_bsd.d.ts +1 -1
- package/dist/src/nodeset_tools/dump_to_bsd.js +15 -11
- package/dist/src/nodeset_tools/dump_to_bsd.js.map +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +5 -3
- package/dist/src/nodeset_tools/nodeset_to_xml.js +69 -72
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/src/private_namespace.d.ts +2 -2
- package/dist/src/private_namespace.js.map +1 -1
- package/dist/src/reference_impl.d.ts +2 -2
- package/dist/src/reference_impl.js +9 -11
- package/dist/src/reference_impl.js.map +1 -1
- package/dist/src/role_permissions.d.ts +1 -1
- package/dist/src/role_permissions.js.map +1 -1
- package/dist/src/state_machine/finite_state_machine.d.ts +11 -14
- package/dist/src/state_machine/finite_state_machine.js +36 -30
- package/dist/src/state_machine/finite_state_machine.js.map +1 -1
- package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +8 -6
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js +16 -18
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
- package/dist/src/state_machine/ua_two_state_variable.d.ts +12 -11
- package/dist/src/state_machine/ua_two_state_variable.js +24 -29
- package/dist/src/state_machine/ua_two_state_variable.js.map +1 -1
- package/dist/src/tool_isSubtypeOf.d.ts +5 -5
- package/dist/src/tool_isSubtypeOf.js +21 -18
- package/dist/src/tool_isSubtypeOf.js.map +1 -1
- package/dist/src/ua_condition_type.d.ts +1 -1
- package/dist/src/ua_data_type_impl.js.map +1 -1
- package/dist/src/ua_method_impl.d.ts +9 -5
- package/dist/src/ua_method_impl.js +1 -1
- package/dist/src/ua_method_impl.js.map +1 -1
- package/dist/src/ua_object_impl.d.ts +7 -5
- package/dist/src/ua_object_impl.js +13 -11
- package/dist/src/ua_object_impl.js.map +1 -1
- package/dist/src/ua_object_type_impl.d.ts +7 -5
- package/dist/src/ua_object_type_impl.js +4 -5
- package/dist/src/ua_object_type_impl.js.map +1 -1
- package/dist/src/ua_reference_type_impl.d.ts +6 -8
- package/dist/src/ua_reference_type_impl.js +16 -14
- package/dist/src/ua_reference_type_impl.js.map +1 -1
- package/dist/src/ua_variable_impl.d.ts +43 -45
- package/dist/src/ua_variable_impl.js +99 -83
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/dist/src/ua_variable_impl_ext_obj.d.ts +3 -3
- package/dist/src/ua_variable_impl_ext_obj.js +37 -29
- package/dist/src/ua_variable_impl_ext_obj.js.map +1 -1
- package/dist/src/ua_variable_type_impl.d.ts +11 -11
- package/dist/src/ua_variable_type_impl.js +13 -21
- package/dist/src/ua_variable_type_impl.js.map +1 -1
- package/dist/src/ua_view_impl.d.ts +3 -4
- package/dist/src/ua_view_impl.js +5 -6
- package/dist/src/ua_view_impl.js.map +1 -1
- package/dist/src/validate_data_type_correctness.d.ts +2 -2
- package/dist/src/validate_data_type_correctness.js +12 -3
- package/dist/src/validate_data_type_correctness.js.map +1 -1
- package/dist/tsconfig_base.tsbuildinfo +1 -1
- package/distHelpers/add_event_generator_object.d.ts +5 -2
- package/distHelpers/add_event_generator_object.js +2 -2
- package/distHelpers/add_event_generator_object.js.map +1 -1
- package/distHelpers/alarms_and_conditions_demo.d.ts +1 -1
- package/distHelpers/alarms_and_conditions_demo.js +4 -6
- package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
- package/distHelpers/assertHasMatchingReference.d.ts +1 -1
- package/distHelpers/assertHasMatchingReference.js +2 -2
- package/distHelpers/assertHasMatchingReference.js.map +1 -1
- package/distHelpers/boiler_system.d.ts +6 -3
- package/distHelpers/boiler_system.js +44 -42
- package/distHelpers/boiler_system.js.map +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.d.ts +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.js +25 -27
- package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -1
- package/distHelpers/get_address_space_fixture.js +1 -1
- package/distHelpers/get_address_space_fixture.js.map +1 -1
- package/distHelpers/mock_session.d.ts +7 -7
- package/distHelpers/mock_session.js +4 -4
- package/distHelpers/mock_session.js.map +1 -1
- package/distNodeJS/generate_address_space.d.ts +2 -2
- package/distNodeJS/generate_address_space.js +2 -2
- package/distNodeJS/generate_address_space.js.map +1 -1
- package/package.json +36 -36
- package/source/address_space_ts.ts +29 -30
- package/source/continuation_points/continuation_point_manager.ts +8 -7
- package/source/helpers/adjust_browse_direction.ts +1 -1
- package/source/helpers/argument_list.ts +37 -25
- package/source/helpers/call_helpers.ts +10 -15
- package/source/helpers/coerce_enum_value.ts +4 -4
- package/source/helpers/dump_tools.ts +6 -11
- package/source/helpers/ensure_secure_access.ts +2 -2
- package/source/helpers/make_optionals_map.ts +3 -10
- package/source/helpers/multiform_func.ts +1 -1
- package/source/helpers/resolve_opaque_on_address_space.ts +2 -2
- package/source/index.ts +44 -54
- package/source/interfaces/alarms_and_conditions/condition_info_i.ts +3 -4
- package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +13 -13
- package/source/interfaces/alarms_and_conditions/deviation_stuff.ts +8 -10
- package/source/interfaces/alarms_and_conditions/install_setpoint_options.ts +4 -5
- package/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +4 -6
- package/source/interfaces/alarms_and_conditions/instantiate_condition_options.ts +3 -3
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +6 -3
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +11 -11
- package/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +11 -25
- package/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +16 -13
- package/source/interfaces/alarms_and_conditions/ua_base_event_ex.ts +12 -0
- package/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +5 -5
- package/source/interfaces/alarms_and_conditions/ua_condition_ex.ts +30 -54
- package/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +3 -34
- package/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +18 -22
- package/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +8 -15
- package/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +4 -7
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +5 -6
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +3 -3
- package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +9 -16
- package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +5 -8
- package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +5 -5
- package/source/interfaces/data_access/ua_y_array_item_ex.ts +3 -3
- package/source/interfaces/extension_object_constructor.ts +3 -4
- package/source/interfaces/i_condition_variable_type_setter_options.ts +1 -3
- package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +3 -3
- package/source/interfaces/state_machine/ua_finite_state_machine_type.ts +2 -2
- package/source/interfaces/state_machine/ua_program_state_machine_type.ts +3 -3
- package/source/interfaces/state_machine/ua_shelved_state_machine_ex.ts +10 -7
- package/source/interfaces/state_machine/ua_state_machine_type.ts +11 -8
- package/source/interfaces/state_machine/ua_transition_ex.ts +2 -2
- package/source/interfaces/ua_subscription_diagnostics_variable_ex.ts +3 -2
- package/source/loader/decode_xml_extension_object.ts +7 -7
- package/source/loader/ensure_datatype_extracted.ts +14 -19
- package/source/loader/generateAddressSpaceRaw.ts +12 -13
- package/source/loader/load_nodeset2.ts +3 -3
- package/source/loader/make_xml_extension_object_parser.ts +55 -39
- package/source/loader/namespace_post_step.ts +3 -4
- package/source/loader/parsers/extension_object_parser.ts +63 -62
- package/source/loader/parsers/localized_text_parser.ts +3 -3
- package/source/loader/parsers/nodeid_parser.ts +2 -3
- package/source/loader/parsers/qualified_name_parser.ts +6 -7
- package/source/loader/parsers/variant_parser.ts +48 -55
- package/source/loader/register_node_promoter.ts +2 -2
- package/source/namespace.ts +4 -4
- package/source/namespace_alarm_and_condition.ts +22 -22
- package/source/namespace_data_access.ts +12 -13
- package/source/namespace_machine_state.ts +10 -5
- package/source/pseudo_session.ts +53 -50
- package/source/session_context.ts +1 -1
- package/source/set_namespace_meta_data.ts +3 -3
- package/source/ua_addin.ts +10 -11
- package/source/ua_interface.ts +10 -7
- package/source/ua_root_folder.ts +1 -1
- package/source/ua_two_state_variable_ex.ts +5 -5
- package/source_nodejs/generate_address_space.ts +5 -9
- package/src/_instantiate_helpers.ts +26 -16
- package/src/_mandatory_child_or_requested_optional_filter.ts +16 -15
- package/src/address_space.ts +24 -33
- package/src/address_space_change_event_tools.ts +25 -30
- package/src/address_space_private.ts +20 -21
- package/src/alarms_and_conditions/condition.ts +0 -2
- package/src/alarms_and_conditions/condition_info_impl.ts +11 -19
- package/src/alarms_and_conditions/condition_snapshot_impl.ts +106 -82
- package/src/alarms_and_conditions/deviation_alarm_helper.ts +20 -15
- package/src/alarms_and_conditions/index.ts +3 -3
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +44 -32
- package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +35 -34
- package/src/alarms_and_conditions/ua_base_event_impl.ts +15 -19
- package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +6 -2
- package/src/alarms_and_conditions/ua_condition_impl.ts +140 -130
- package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +20 -12
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +40 -43
- package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +7 -7
- package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +28 -30
- package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +3 -6
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +59 -90
- package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +31 -27
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +57 -36
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +31 -27
- package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +6 -6
- package/src/apply_condition_refresh.ts +7 -8
- package/src/base_node_impl.ts +63 -44
- package/src/base_node_private.ts +12 -4
- package/src/check_value_rank_compatibility.ts +18 -14
- package/src/data_access/add_dataItem_stuff.ts +3 -4
- package/src/data_access/adjust_datavalue_status_code.ts +7 -7
- package/src/data_access/ua_multistate_discrete_impl.ts +44 -28
- package/src/data_access/ua_multistate_value_discrete_impl.ts +77 -66
- package/src/data_access/ua_two_state_discrete_impl.ts +29 -36
- package/src/event_data.ts +53 -53
- package/src/extension_object_array_node.ts +27 -28
- package/src/get_basic_datatype.ts +4 -5
- package/src/historical_access/address_space_historical_data_node.ts +65 -50
- package/src/idx_iterator.ts +4 -12
- package/src/index_current.ts +33 -45
- package/src/namespace_impl.ts +75 -62
- package/src/namespace_private.ts +2 -8
- package/src/nodeid_manager.ts +30 -27
- package/src/nodeset_tools/adjust_namespace_array.ts +1 -1
- package/src/nodeset_tools/construct_namespace_dependency.ts +30 -18
- package/src/nodeset_tools/dump_to_bsd.ts +27 -22
- package/src/nodeset_tools/nodeset_to_xml.ts +100 -119
- package/src/private_namespace.ts +3 -6
- package/src/reference_impl.ts +11 -14
- package/src/role_permissions.ts +1 -1
- package/src/state_machine/finite_state_machine.ts +60 -61
- package/src/state_machine/ua_shelving_state_machine_ex.ts +23 -23
- package/src/state_machine/ua_two_state_variable.ts +34 -31
- package/src/tool_isSubtypeOf.ts +48 -33
- package/src/ua_condition_type.ts +1 -1
- package/src/ua_data_type_impl.ts +12 -13
- package/src/ua_method_impl.ts +17 -12
- package/src/ua_object_impl.ts +38 -33
- package/src/ua_object_type_impl.ts +22 -22
- package/src/ua_reference_type_impl.ts +19 -19
- package/src/ua_variable_impl.ts +240 -220
- package/src/ua_variable_impl_ext_obj.ts +63 -50
- package/src/ua_variable_type_impl.ts +43 -49
- package/src/ua_view_impl.ts +5 -5
- package/src/validate_data_type_correctness.ts +17 -8
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.dumpToBSD = dumpToBSD;
|
|
4
4
|
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
5
|
-
const node_opcua_types_1 = require("node-opcua-types");
|
|
6
5
|
const node_opcua_nodeid_1 = require("node-opcua-nodeid");
|
|
6
|
+
const node_opcua_types_1 = require("node-opcua-types");
|
|
7
7
|
const construct_namespace_dependency_1 = require("./construct_namespace_dependency");
|
|
8
8
|
// tslint:disable-next-line: no-var-requires
|
|
9
9
|
const XMLWriter = require("xml-writer");
|
|
@@ -27,12 +27,16 @@ function buildXmlName(addressSpace, map, nodeId) {
|
|
|
27
27
|
const node = addressSpace.findNode(nodeId);
|
|
28
28
|
// c8 ignore next
|
|
29
29
|
if (!node) {
|
|
30
|
-
throw new Error(
|
|
30
|
+
throw new Error(`Cannot find Node for${nodeId?.toString()}`);
|
|
31
31
|
}
|
|
32
32
|
const typeName = node.browseName.name;
|
|
33
33
|
const n = node.nodeId;
|
|
34
|
-
const prefix =
|
|
35
|
-
|
|
34
|
+
const prefix = n.identifierType === node_opcua_nodeid_1.NodeIdType.NUMERIC && n.namespace === 0
|
|
35
|
+
? n.value <= 15
|
|
36
|
+
? "opc"
|
|
37
|
+
: "ua"
|
|
38
|
+
: map.get(node.nodeId.namespace);
|
|
39
|
+
return `${prefix}:${typeName === "Structure" && prefix === "ua" ? "ExtensionObject" : typeName}`;
|
|
36
40
|
}
|
|
37
41
|
// eslint-disable-next-line max-statements
|
|
38
42
|
function dumpDataTypeStructure(xw, addressSpace, map, structureDefinition, structureDefinitionBase, name, doc) {
|
|
@@ -52,7 +56,7 @@ function dumpDataTypeStructure(xw, addressSpace, map, structureDefinition, struc
|
|
|
52
56
|
const f = fields[index];
|
|
53
57
|
if (f.isOptional) {
|
|
54
58
|
xw.startElement("opc:Field");
|
|
55
|
-
xw.writeAttribute("Name", f.name
|
|
59
|
+
xw.writeAttribute("Name", `${f.name}Specified`);
|
|
56
60
|
xw.writeAttribute("TypeName", "opc:Bit");
|
|
57
61
|
xw.endElement();
|
|
58
62
|
optionalsCount++;
|
|
@@ -85,10 +89,10 @@ function dumpDataTypeStructure(xw, addressSpace, map, structureDefinition, struc
|
|
|
85
89
|
const isArray = f.valueRank > 0 && f.arrayDimensions?.length;
|
|
86
90
|
if (isArray) {
|
|
87
91
|
xw.startElement("opc:Field");
|
|
88
|
-
xw.writeAttribute("Name",
|
|
92
|
+
xw.writeAttribute("Name", `NoOf${f.name}`);
|
|
89
93
|
xw.writeAttribute("TypeName", "opc:Int32");
|
|
90
94
|
if (f.isOptional) {
|
|
91
|
-
xw.writeAttribute("SwitchField", f.name
|
|
95
|
+
xw.writeAttribute("SwitchField", `${f.name}Specified`);
|
|
92
96
|
}
|
|
93
97
|
xw.endElement();
|
|
94
98
|
}
|
|
@@ -97,10 +101,10 @@ function dumpDataTypeStructure(xw, addressSpace, map, structureDefinition, struc
|
|
|
97
101
|
const typeName = buildXmlName(addressSpace, map, f.dataType);
|
|
98
102
|
xw.writeAttribute("TypeName", typeName);
|
|
99
103
|
if (isArray) {
|
|
100
|
-
xw.writeAttribute("LengthField",
|
|
104
|
+
xw.writeAttribute("LengthField", `NoOf${f.name}`);
|
|
101
105
|
}
|
|
102
106
|
if (f.isOptional) {
|
|
103
|
-
xw.writeAttribute("SwitchField", f.name
|
|
107
|
+
xw.writeAttribute("SwitchField", `${f.name}Specified`);
|
|
104
108
|
}
|
|
105
109
|
xw.endElement();
|
|
106
110
|
}
|
|
@@ -119,11 +123,11 @@ function dumpDataTypeToBSD(xw, dataType, map) {
|
|
|
119
123
|
}
|
|
120
124
|
}
|
|
121
125
|
function shortcut(namespace) {
|
|
122
|
-
return
|
|
126
|
+
return `n${namespace.index}`;
|
|
123
127
|
}
|
|
124
128
|
function dumpToBSD(namespace) {
|
|
125
129
|
const dependency = (0, construct_namespace_dependency_1.constructNamespaceDependency)(namespace);
|
|
126
|
-
const
|
|
130
|
+
const _addressSpace = namespace.addressSpace;
|
|
127
131
|
const xw = new XMLWriter(true);
|
|
128
132
|
//xx xw.startDocument():// { encoding: "utf-8", version: "1.0" });
|
|
129
133
|
xw.startElement("opc:TypeDictionary");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dump_to_bsd.js","sourceRoot":"","sources":["../../../src/nodeset_tools/dump_to_bsd.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"dump_to_bsd.js","sourceRoot":"","sources":["../../../src/nodeset_tools/dump_to_bsd.ts"],"names":[],"mappings":";;AA0JA,8BAgDC;AAzMD,yDAA2C;AAC3C,yDAAqE;AACrE,uDAAuE;AAIvE,qFAAgF;AAEhF,4CAA4C;AAC5C,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAExC,SAAS,kBAAkB,CAAC,EAAa,EAAE,CAAiB,EAAE,IAAY;IACtE,EAAE,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;IACtC,EAAE,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAChC,EAAE,CAAC,cAAc,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;IACxC,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC;QAC7B,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,EAAE,EAAE,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;IACtE,CAAC;IAED,EAAE,CAAC,cAAc,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAC;IACtD,EAAE,CAAC,cAAc,CAAC,iBAAiB,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IAE7D,yDAAyD;IACzD,KAAK,MAAM,kBAAkB,IAAI,UAAU,EAAE,CAAC;QAC1C,IAAI,kBAAkB,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,EAAE,CAAC;YAC/C,SAAS;QACb,CAAC;QACD,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,cAAc,CAAC,WAAW,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC,UAAU,EAAE,CAAC;IAC5G,CAAC;IACD,EAAE;IACF,KAAK,MAAM,QAAQ,IAAI,SAAS,CAAC,iBAAiB,EAAE,EAAE,CAAC;QACnD,iBAAiB,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;IACzC,CAAC;IACD,EAAE,CAAC,UAAU,EAAE,CAAC;IAChB,uBAAuB;IAEvB,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC;AACzB,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-address-space
|
|
3
|
+
*/
|
|
4
|
+
import type { BaseNode } from "node-opcua-address-space-base";
|
|
2
5
|
export declare function sortByBrowseName(x: BaseNode, y: BaseNode): number;
|
|
3
6
|
type NodeIdString = string;
|
|
4
7
|
export interface BuildAliasesData {
|
|
5
8
|
aliases: Record<string, NodeIdString>;
|
|
6
9
|
aliases_visited?: Set<string>;
|
|
7
10
|
}
|
|
8
|
-
export
|
|
9
|
-
}
|
|
11
|
+
export type DumpXMLOptions = {};
|
|
10
12
|
export {};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sortByBrowseName = sortByBrowseName;
|
|
4
2
|
/* eslint-disable complexity */
|
|
5
3
|
/**
|
|
6
4
|
* @module node-opcua-address-space
|
|
7
5
|
*/
|
|
8
6
|
// produce nodeset xml files
|
|
9
|
-
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.sortByBrowseName = sortByBrowseName;
|
|
9
|
+
const node_util_1 = require("node:util");
|
|
10
10
|
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
11
|
+
const node_opcua_basic_types_1 = require("node-opcua-basic-types");
|
|
11
12
|
const node_opcua_constants_1 = require("node-opcua-constants");
|
|
12
|
-
const node_opcua_debug_1 = require("node-opcua-debug");
|
|
13
13
|
const node_opcua_data_model_1 = require("node-opcua-data-model");
|
|
14
|
+
const node_opcua_debug_1 = require("node-opcua-debug");
|
|
14
15
|
const node_opcua_nodeid_1 = require("node-opcua-nodeid");
|
|
16
|
+
const node_opcua_types_1 = require("node-opcua-types");
|
|
15
17
|
const node_opcua_utils_1 = require("node-opcua-utils");
|
|
16
18
|
const node_opcua_variant_1 = require("node-opcua-variant");
|
|
17
|
-
const
|
|
18
|
-
const node_opcua_types_1 = require("node-opcua-types");
|
|
19
|
-
const reference_impl_1 = require("../reference_impl");
|
|
19
|
+
const decode_xml_extension_object_1 = require("../../source/loader/decode_xml_extension_object");
|
|
20
20
|
const base_node_impl_1 = require("../base_node_impl");
|
|
21
|
-
const
|
|
22
|
-
const ua_object_type_impl_1 = require("../ua_object_type_impl");
|
|
23
|
-
const ua_variable_impl_1 = require("../ua_variable_impl");
|
|
24
|
-
const ua_object_impl_1 = require("../ua_object_impl");
|
|
21
|
+
const index_current_1 = require("../index_current");
|
|
25
22
|
const namespace_impl_1 = require("../namespace_impl");
|
|
26
|
-
const
|
|
23
|
+
const reference_impl_1 = require("../reference_impl");
|
|
27
24
|
const ua_data_type_impl_1 = require("../ua_data_type_impl");
|
|
25
|
+
const ua_method_impl_1 = require("../ua_method_impl");
|
|
26
|
+
const ua_object_impl_1 = require("../ua_object_impl");
|
|
27
|
+
const ua_object_type_impl_1 = require("../ua_object_type_impl");
|
|
28
|
+
const ua_reference_type_impl_1 = require("../ua_reference_type_impl");
|
|
29
|
+
const ua_variable_impl_1 = require("../ua_variable_impl");
|
|
28
30
|
const ua_variable_type_impl_1 = require("../ua_variable_type_impl");
|
|
29
|
-
const index_current_1 = require("../index_current");
|
|
30
31
|
const ua_view_impl_1 = require("../ua_view_impl");
|
|
31
|
-
const decode_xml_extension_object_1 = require("../../source/loader/decode_xml_extension_object");
|
|
32
32
|
const construct_namespace_dependency_1 = require("./construct_namespace_dependency");
|
|
33
33
|
// tslint:disable:no-var-requires
|
|
34
34
|
const XMLWriter = require("xml-writer");
|
|
@@ -40,12 +40,12 @@ function _hash(node) {
|
|
|
40
40
|
return node.nodeId.toString();
|
|
41
41
|
}
|
|
42
42
|
function _dumpDisplayName(xw, node) {
|
|
43
|
-
if (node.displayName
|
|
43
|
+
if (node.displayName?.[0]) {
|
|
44
44
|
xw.startElement("DisplayName").text(node.displayName[0].text).endElement();
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
function _dumpDescription(xw, node) {
|
|
48
|
-
if (node.description
|
|
48
|
+
if (node.description?.text?.length) {
|
|
49
49
|
let desc = node.description.text;
|
|
50
50
|
desc = desc || "";
|
|
51
51
|
xw.startElement("Description").text(desc).endElement();
|
|
@@ -94,11 +94,6 @@ function _dumpReferences(xw, node) {
|
|
|
94
94
|
function referenceToKeep(reference) {
|
|
95
95
|
const referenceType = reference._referenceType;
|
|
96
96
|
const targetedNamespaceIndex = reference.nodeId.namespace;
|
|
97
|
-
if (_hasHigherPriorityThan(xw, targetedNamespaceIndex, node.nodeId.namespace)) {
|
|
98
|
-
// this reference has nothing to do here ! drop it
|
|
99
|
-
// because the target namespace is higher in the hierarchy
|
|
100
|
-
return false;
|
|
101
|
-
}
|
|
102
97
|
// get the direct backward reference to a external namespace
|
|
103
98
|
if (referenceType.isSubtypeOf(aggregateReferenceType) && !reference.isForward) {
|
|
104
99
|
if (reference.nodeId.namespace !== node.nodeId.namespace) {
|
|
@@ -112,6 +107,9 @@ function _dumpReferences(xw, node) {
|
|
|
112
107
|
}
|
|
113
108
|
// only keep
|
|
114
109
|
if (referenceType.isSubtypeOf(aggregateReferenceType) && reference.isForward) {
|
|
110
|
+
if (_hasHigherPriorityThan(xw, targetedNamespaceIndex, node.nodeId.namespace)) {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
115
113
|
return true;
|
|
116
114
|
}
|
|
117
115
|
else if (referenceType.isSubtypeOf(hasSubtypeReferenceType) && !reference.isForward) {
|
|
@@ -121,9 +119,11 @@ function _dumpReferences(xw, node) {
|
|
|
121
119
|
return true;
|
|
122
120
|
}
|
|
123
121
|
else if (referenceType.isSubtypeOf(nonHierarchicalReferencesType) && reference.isForward) {
|
|
122
|
+
// e.g. HasInterface — always keep, the current node owns this reference
|
|
124
123
|
return true;
|
|
125
124
|
}
|
|
126
125
|
else if (referenceType.isSubtypeOf(organizesReferencesType) && !reference.isForward) {
|
|
126
|
+
// Organizes inverse — the current node is organized by an external folder
|
|
127
127
|
return true;
|
|
128
128
|
}
|
|
129
129
|
else if (connectsToReferenceType && referenceType.isSubtypeOf(connectsToReferenceType) && reference.isForward) {
|
|
@@ -152,7 +152,7 @@ function _dumpReferences(xw, node) {
|
|
|
152
152
|
}
|
|
153
153
|
function _dumpLocalizedText(xw, v) {
|
|
154
154
|
const uax = getPrefix(xw, "http://opcfoundation.org/UA/2008/02/Types.xsd");
|
|
155
|
-
if (v.locale
|
|
155
|
+
if (v.locale?.length) {
|
|
156
156
|
xw.startElement(`${uax}Locale`);
|
|
157
157
|
xw.text(v.locale);
|
|
158
158
|
xw.endElement();
|
|
@@ -199,14 +199,14 @@ function findXsdNamespaceUri(xw, nodeId) {
|
|
|
199
199
|
if (!namespace) {
|
|
200
200
|
return "";
|
|
201
201
|
}
|
|
202
|
-
return namespace.replace(/\/$/, "")
|
|
202
|
+
return `${namespace.replace(/\/$/, "")}/Types.xsd`;
|
|
203
203
|
}
|
|
204
204
|
function getPrefix(xw, namespace) {
|
|
205
205
|
const xwe = xw;
|
|
206
206
|
if (!xwe.map)
|
|
207
207
|
return "";
|
|
208
208
|
const p = xwe.map[namespace] || "";
|
|
209
|
-
return p ? p
|
|
209
|
+
return p ? `${p}:` : "";
|
|
210
210
|
}
|
|
211
211
|
function restoreDefaultNamespace(xw) {
|
|
212
212
|
const xwe = xw;
|
|
@@ -226,8 +226,8 @@ function setDefaultNamespace(xw, namespace) {
|
|
|
226
226
|
});
|
|
227
227
|
xwe.map[namespace] = "";
|
|
228
228
|
}
|
|
229
|
-
function startElementEx(xw,
|
|
230
|
-
const
|
|
229
|
+
function startElementEx(xw, _ns, name, defaultNamespace) {
|
|
230
|
+
const _xwe = xw;
|
|
231
231
|
xw.startElement(name);
|
|
232
232
|
setDefaultNamespace(xw, defaultNamespace);
|
|
233
233
|
}
|
|
@@ -269,7 +269,7 @@ function _dumpVariantInnerExtensionObject(xw, definitionMap, definition, address
|
|
|
269
269
|
const { name, definition } = definitionMap.findDefinition(dataTypeNodeId);
|
|
270
270
|
startElementEx(xw, ns, fieldName, namespaceUri);
|
|
271
271
|
// xw.startElement(fieldName);
|
|
272
|
-
let fun = (
|
|
272
|
+
let fun = (_value) => {
|
|
273
273
|
/** */
|
|
274
274
|
};
|
|
275
275
|
if (definition instanceof node_opcua_types_1.StructureDefinition) {
|
|
@@ -278,7 +278,7 @@ function _dumpVariantInnerExtensionObject(xw, definitionMap, definition, address
|
|
|
278
278
|
else if (definition instanceof node_opcua_types_1.EnumDefinition) {
|
|
279
279
|
fun = _dumpVariantInnerValueEnum.bind(null, xw, definition);
|
|
280
280
|
}
|
|
281
|
-
else if (definition?.dataType
|
|
281
|
+
else if (definition?.dataType === node_opcua_variant_1.DataType.Variant) {
|
|
282
282
|
fun = (value) => {
|
|
283
283
|
xw.startElement("Value");
|
|
284
284
|
_dumpVariantValue(xw, field.dataType, value.dataType, addressSpace, value.value);
|
|
@@ -304,7 +304,7 @@ function _dumpVariantInnerExtensionObject(xw, definitionMap, definition, address
|
|
|
304
304
|
}
|
|
305
305
|
catch (err) {
|
|
306
306
|
// eslint-disable-next-line max-depth
|
|
307
|
-
if (
|
|
307
|
+
if (node_util_1.types.isNativeError(err)) {
|
|
308
308
|
errorLog("Error in _dumpVariantExtensionObjectValue_Body !!!", err.message);
|
|
309
309
|
}
|
|
310
310
|
debugLog(name);
|
|
@@ -398,7 +398,7 @@ function _dumpVariantInnerValue(xw, dataType, dataTypeNodeId, definitionMap, add
|
|
|
398
398
|
_dumpVariantInnerValue(xw, value.dataType, dataTypeNodeId, definitionMap, addressSpace, value.value);
|
|
399
399
|
break;
|
|
400
400
|
default:
|
|
401
|
-
errorLog(
|
|
401
|
+
errorLog(`_dumpVariantInnerValue incomplete ${value} DataType=${dataType}=${node_opcua_variant_1.DataType[dataType]}`);
|
|
402
402
|
// throw new Error("_dumpVariantInnerValue incomplete " + value + " " + "DataType=" + dataType + "=" + DataType[dataType]);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
@@ -435,13 +435,11 @@ function _dumpVariantExtensionObjectValue(xw, dataTypeNodeId, definitionMap, add
|
|
|
435
435
|
{
|
|
436
436
|
const uax = getPrefix(xw, "http://opcfoundation.org/UA/2008/02/Types.xsd");
|
|
437
437
|
xw.startElement(`${uax}TypeId`);
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
xw.endElement();
|
|
444
|
-
}
|
|
438
|
+
// find HasEncoding node
|
|
439
|
+
// xx var encodingDefaultXml = schema.encodingDefaultXml;
|
|
440
|
+
xw.startElement(`${uax}Identifier`);
|
|
441
|
+
xw.text(n(xw, encodingDefaultXml));
|
|
442
|
+
xw.endElement();
|
|
445
443
|
xw.endElement();
|
|
446
444
|
startElementEx(xw, uax, "Body", "http://opcfoundation.org/UA/2008/02/Types.xsd");
|
|
447
445
|
_dumpVariantExtensionObjectValue_Body(xw, definitionMap, name, definition, addressSpace, value);
|
|
@@ -541,7 +539,7 @@ function _dumpValue(xw, node, variant) {
|
|
|
541
539
|
debugLog("Cannot find dataType:", node.dataType.toString());
|
|
542
540
|
return;
|
|
543
541
|
}
|
|
544
|
-
const dataTypeName = dataTypeNode.browseName.name
|
|
542
|
+
const dataTypeName = dataTypeNode.browseName.name?.toString();
|
|
545
543
|
const baseDataTypeName = node_opcua_variant_1.DataType[variant.dataType];
|
|
546
544
|
if (baseDataTypeName === "Null") {
|
|
547
545
|
return;
|
|
@@ -600,7 +598,7 @@ function _dumpArrayDimensionsAttribute(xw, node) {
|
|
|
600
598
|
xw.writeAttribute("ArrayDimensions", node.arrayDimensions.join(","));
|
|
601
599
|
}
|
|
602
600
|
}
|
|
603
|
-
function
|
|
601
|
+
function _visitUANode(node, data, forward) {
|
|
604
602
|
const addressSpace = node.addressSpace;
|
|
605
603
|
// visit references
|
|
606
604
|
function process_reference(reference) {
|
|
@@ -616,7 +614,7 @@ function visitUANode(node, data, forward) {
|
|
|
616
614
|
data.index_el[k] = 1;
|
|
617
615
|
const o = addressSpace.findNode(k);
|
|
618
616
|
if (o) {
|
|
619
|
-
|
|
617
|
+
_visitUANode(o, data, forward);
|
|
620
618
|
}
|
|
621
619
|
}
|
|
622
620
|
}
|
|
@@ -632,12 +630,12 @@ function dumpReferencedNodes(xw, node, forward) {
|
|
|
632
630
|
if (!forward) {
|
|
633
631
|
{
|
|
634
632
|
const r = node.findReferencesEx("HasTypeDefinition");
|
|
635
|
-
if (r
|
|
633
|
+
if (r?.length) {
|
|
636
634
|
(0, node_opcua_assert_1.assert)(r.length === 1);
|
|
637
635
|
const typeDefinitionObj = reference_impl_1.ReferenceImpl.resolveReferenceNode(addressSpace, r[0]);
|
|
638
636
|
if (!typeDefinitionObj) {
|
|
639
637
|
warningLog(node.toString());
|
|
640
|
-
warningLog(
|
|
638
|
+
warningLog(`dumpReferencedNodes: Warning : ${node.browseName.toString()} unknown typeDefinition, `, r[0].toString());
|
|
641
639
|
}
|
|
642
640
|
else {
|
|
643
641
|
(0, node_opcua_assert_1.assert)(typeDefinitionObj instanceof base_node_impl_1.BaseNodeImpl);
|
|
@@ -653,7 +651,7 @@ function dumpReferencedNodes(xw, node, forward) {
|
|
|
653
651
|
//
|
|
654
652
|
{
|
|
655
653
|
const r = node.findReferencesEx("HasSubtype", node_opcua_data_model_1.BrowseDirection.Inverse);
|
|
656
|
-
if (r
|
|
654
|
+
if (r?.length) {
|
|
657
655
|
const subTypeOf = reference_impl_1.ReferenceImpl.resolveReferenceNode(addressSpace, r[0]);
|
|
658
656
|
(0, node_opcua_assert_1.assert)(r.length === 1);
|
|
659
657
|
if (subTypeOf.nodeId.namespace === node.nodeId.namespace) {
|
|
@@ -695,21 +693,21 @@ function dumpCommonAttributes(xw, node) {
|
|
|
695
693
|
xw.writeAttribute("ParentNodeId", n(xw, parentNode.nodeId));
|
|
696
694
|
}
|
|
697
695
|
}
|
|
698
|
-
if (Object.
|
|
696
|
+
if (Object.hasOwn(node, "symbolicName")) {
|
|
699
697
|
xw.writeAttribute("SymbolicName", node.symbolicName);
|
|
700
698
|
}
|
|
701
|
-
if (Object.
|
|
699
|
+
if (Object.hasOwn(node, "isAbstract")) {
|
|
702
700
|
if (node.isAbstract) {
|
|
703
701
|
xw.writeAttribute("IsAbstract", node.isAbstract ? "true" : "false");
|
|
704
702
|
}
|
|
705
703
|
}
|
|
706
|
-
if (Object.
|
|
704
|
+
if (Object.hasOwn(node, "accessLevel")) {
|
|
707
705
|
// CurrentRead is by default
|
|
708
706
|
if (node.accessLevel !== currentReadFlag) {
|
|
709
707
|
xw.writeAttribute("AccessLevel", node.accessLevel.toString());
|
|
710
708
|
}
|
|
711
709
|
}
|
|
712
|
-
if (Object.
|
|
710
|
+
if (Object.hasOwn(node, "minimumSamplingInterval")) {
|
|
713
711
|
const minimumSamplingInterval = node.minimumSamplingInterval;
|
|
714
712
|
if (minimumSamplingInterval > 0) {
|
|
715
713
|
xw.writeAttribute("MinimumSamplingInterval", minimumSamplingInterval);
|
|
@@ -809,7 +807,8 @@ function _dumpUADataTypeDefinition(xw, uaDataType) {
|
|
|
809
807
|
// in case the namespace is conforming to 1.03 specification the DataTypeDefinition attribute
|
|
810
808
|
// will be not be readable....
|
|
811
809
|
const dataValue = uaDataType.readAttribute(index_current_1.SessionContext.defaultContext, node_opcua_basic_types_1.AttributeIds.DataTypeDefinition);
|
|
812
|
-
|
|
810
|
+
const t = true;
|
|
811
|
+
if (t || dataValue.statusCode.isGood()) {
|
|
813
812
|
const definition = uaDataType.getStructureDefinition();
|
|
814
813
|
const baseDefinition = uaDataTypeBase ? uaDataTypeBase.getStructureDefinition() : null;
|
|
815
814
|
xw.startElement("Definition");
|
|
@@ -932,9 +931,9 @@ function dumpUAVariableType(xw, node) {
|
|
|
932
931
|
dumpAggregates(xw, node);
|
|
933
932
|
}
|
|
934
933
|
function dumpUAObject(xw, node) {
|
|
935
|
-
xw.writeComment(
|
|
934
|
+
xw.writeComment(`Object - ${b(xw, node.browseName)} {{{{ `);
|
|
936
935
|
_dumpUAObject(xw, node);
|
|
937
|
-
xw.writeComment(
|
|
936
|
+
xw.writeComment(`Object - ${b(xw, node.browseName)} }}}} `);
|
|
938
937
|
}
|
|
939
938
|
function _dumpUAObject(xw, node) {
|
|
940
939
|
(0, node_opcua_assert_1.assert)(node.nodeClass === node_opcua_data_model_1.NodeClass.Object);
|
|
@@ -954,7 +953,7 @@ function _dumpUAObject(xw, node) {
|
|
|
954
953
|
function dumpElementInFolder(xw, node) {
|
|
955
954
|
const aggregates = node
|
|
956
955
|
.getFolderElements()
|
|
957
|
-
.sort((x, y) => (x
|
|
956
|
+
.sort((x, y) => ((x?.browseName.name?.toString() || 0) > (y?.browseName.name?.toString() || 0) ? 1 : -1));
|
|
958
957
|
for (const aggregate of aggregates.sort(sortByNodeId)) {
|
|
959
958
|
// do not export node that do not belong to our namespace
|
|
960
959
|
if (node.nodeId.namespace !== aggregate.nodeId.namespace) {
|
|
@@ -988,7 +987,7 @@ function dumpAggregates(xw, node) {
|
|
|
988
987
|
function dumpUAObjectType(xw, node) {
|
|
989
988
|
(0, node_opcua_assert_1.assert)(node.nodeClass === node_opcua_data_model_1.NodeClass.ObjectType);
|
|
990
989
|
(0, node_opcua_assert_1.assert)(node instanceof ua_object_type_impl_1.UAObjectTypeImpl);
|
|
991
|
-
xw.writeComment(
|
|
990
|
+
xw.writeComment(`ObjectType - ${b(xw, node.browseName)} {{{{ `);
|
|
992
991
|
_markAsVisited(xw, node);
|
|
993
992
|
// dump SubtypeOf and HasTypeDefinition node if part of the same namespace
|
|
994
993
|
dumpReferencedNodes(xw, node, false);
|
|
@@ -997,7 +996,7 @@ function dumpUAObjectType(xw, node) {
|
|
|
997
996
|
dumpCommonElements(xw, node);
|
|
998
997
|
xw.endElement();
|
|
999
998
|
dumpAggregates(xw, node);
|
|
1000
|
-
xw.writeComment(
|
|
999
|
+
xw.writeComment(`ObjectType - ${b(xw, node.browseName)} }}}}`);
|
|
1001
1000
|
}
|
|
1002
1001
|
function dumpUAMethod(xw, node) {
|
|
1003
1002
|
(0, node_opcua_assert_1.assert)(node.nodeClass === node_opcua_data_model_1.NodeClass.Method);
|
|
@@ -1024,7 +1023,7 @@ function resolveDataTypeName(addressSpace, dataType) {
|
|
|
1024
1023
|
dataTypeNode = o ? o : null;
|
|
1025
1024
|
}
|
|
1026
1025
|
if (!dataTypeNode) {
|
|
1027
|
-
errorLog(
|
|
1026
|
+
errorLog(`resolveDataTypeName: warning cannot find DataType ${dataType.toString()}`);
|
|
1028
1027
|
return new node_opcua_data_model_1.QualifiedName({ name: "", namespaceIndex: 0 });
|
|
1029
1028
|
}
|
|
1030
1029
|
return dataTypeNode.browseName;
|
|
@@ -1099,7 +1098,7 @@ function dumpReferenceType(xw, referenceType) {
|
|
|
1099
1098
|
dumpCommonElements(xw, referenceType);
|
|
1100
1099
|
if (!isSymmetric) {
|
|
1101
1100
|
xw.startElement("InverseName");
|
|
1102
|
-
xw.text(referenceType.inverseName
|
|
1101
|
+
xw.text(referenceType.inverseName?.text || "");
|
|
1103
1102
|
xw.endElement();
|
|
1104
1103
|
}
|
|
1105
1104
|
xw.endElement();
|
|
@@ -1143,7 +1142,7 @@ ua_view_impl_1.UAViewImpl.prototype.dumpXML = function (xw) {
|
|
|
1143
1142
|
dumpUAView(xw, this);
|
|
1144
1143
|
};
|
|
1145
1144
|
function makeTypeXsd(namespaceUri) {
|
|
1146
|
-
return namespaceUri.replace(/\/$/, "")
|
|
1145
|
+
return `${namespaceUri.replace(/\/$/, "")}/Type.xsd`;
|
|
1147
1146
|
}
|
|
1148
1147
|
// eslint-disable-next-line max-statements
|
|
1149
1148
|
namespace_impl_1.NamespaceImpl.prototype.toNodeset2XML = function () {
|
|
@@ -1181,8 +1180,8 @@ namespace_impl_1.NamespaceImpl.prototype.toNodeset2XML = function () {
|
|
|
1181
1180
|
initXmlWriterEx(xw, namespacesMap, namespaceArray);
|
|
1182
1181
|
xw.startElement("NamespaceUris");
|
|
1183
1182
|
// let's sort the dependencies in the same order as the translation table
|
|
1184
|
-
const sortedDependencies = dependency.sort((a, b) =>
|
|
1185
|
-
doDebug && debugLog(sortedDependencies.map((a) => a.index +
|
|
1183
|
+
const sortedDependencies = dependency.sort((a, b) => translationTable.get(a.index) > translationTable.get(b.index) ? 1 : -1);
|
|
1184
|
+
doDebug && debugLog(sortedDependencies.map((a) => `${a.index} + ${a.namespaceUri}`).join("\n"));
|
|
1186
1185
|
doDebug && debugLog("translation table ", translationTable.entries());
|
|
1187
1186
|
for (const depend of sortedDependencies) {
|
|
1188
1187
|
if (depend.index === 0) {
|
|
@@ -1195,24 +1194,22 @@ namespace_impl_1.NamespaceImpl.prototype.toNodeset2XML = function () {
|
|
|
1195
1194
|
xw.endElement();
|
|
1196
1195
|
// ------------- INamespace Uris
|
|
1197
1196
|
xw.startElement("Models");
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
continue; // ignore our namespace 0
|
|
1206
|
-
}
|
|
1207
|
-
xw.startElement("RequiredModel");
|
|
1208
|
-
xw.writeAttribute("ModelUri", depend.namespaceUri);
|
|
1209
|
-
xw.writeAttribute("Version", depend.version);
|
|
1210
|
-
xw.writeAttribute("PublicationDate", depend.publicationDate.toISOString());
|
|
1211
|
-
xw.endElement();
|
|
1197
|
+
xw.startElement("Model");
|
|
1198
|
+
xw.writeAttribute("ModelUri", this.namespaceUri);
|
|
1199
|
+
xw.writeAttribute("Version", this.version);
|
|
1200
|
+
xw.writeAttribute("PublicationDate", this.publicationDate.toISOString());
|
|
1201
|
+
for (const depend of sortedDependencies) {
|
|
1202
|
+
if (depend.index === this.index) {
|
|
1203
|
+
continue; // ignore our namespace 0
|
|
1212
1204
|
}
|
|
1205
|
+
xw.startElement("RequiredModel");
|
|
1206
|
+
xw.writeAttribute("ModelUri", depend.namespaceUri);
|
|
1207
|
+
xw.writeAttribute("Version", depend.version);
|
|
1208
|
+
xw.writeAttribute("PublicationDate", depend.publicationDate.toISOString());
|
|
1213
1209
|
xw.endElement();
|
|
1214
1210
|
}
|
|
1215
1211
|
xw.endElement();
|
|
1212
|
+
xw.endElement();
|
|
1216
1213
|
const data = { aliases: {} };
|
|
1217
1214
|
for (const node of this.nodeIterator()) {
|
|
1218
1215
|
buildUpAliases(node, xw, data);
|