node-opcua-address-space 2.169.0 → 2.172.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.d.ts +2 -3
- package/dist/source/ua_interface.js +13 -33
- 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.d.ts +1 -1
- package/dist/src/_instantiate_helpers.js +32 -9
- 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 +9 -10
- package/dist/src/_mandatory_child_or_requested_optional_filter.js.map +1 -1
- package/dist/src/address_space.d.ts +2 -2
- package/dist/src/address_space.js +13 -15
- 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 +77 -48
- 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 +5 -7
- 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.d.ts +10 -7
- package/dist/src/base_node_private.js +73 -50
- package/dist/src/base_node_private.js.map +1 -1
- package/dist/src/check_value_rank_compatibility.js +11 -7
- 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.d.ts +8 -21
- package/dist/src/event_data.js +24 -19
- 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 +7 -7
- 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 +64 -67
- 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 +10 -7
- package/dist/src/ua_object_impl.js +43 -15
- 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 +6 -7
- 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 +44 -45
- package/dist/src/ua_variable_impl.js +177 -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 +15 -15
- package/distHelpers/get_address_space_fixture.js.map +1 -1
- package/distHelpers/index.d.ts +2 -2
- package/distHelpers/index.js +2 -2
- package/distHelpers/index.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 +27 -38
- 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 +78 -25
- package/src/_mandatory_child_or_requested_optional_filter.ts +20 -19
- package/src/address_space.ts +36 -45
- 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 +109 -85
- 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 +64 -45
- package/src/base_node_private.ts +171 -139
- package/src/check_value_rank_compatibility.ts +19 -15
- 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 +29 -26
- 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 +15 -16
- package/src/nodeset_tools/dump_to_bsd.ts +27 -22
- package/src/nodeset_tools/nodeset_to_xml.ts +95 -114
- 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 +73 -39
- package/src/ua_object_type_impl.ts +25 -25
- package/src/ua_reference_type_impl.ts +19 -19
- package/src/ua_variable_impl.ts +316 -219
- 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
|
@@ -3,26 +3,11 @@
|
|
|
3
3
|
* @module node-opcua-address-space
|
|
4
4
|
*/
|
|
5
5
|
// produce nodeset xml files
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { make_debugLog, make_errorLog, make_warningLog } from "node-opcua-debug";
|
|
10
|
-
import { ExtensionObject } from "node-opcua-extension-object";
|
|
11
|
-
import {
|
|
12
|
-
BrowseDirection,
|
|
13
|
-
LocalizedText,
|
|
14
|
-
makeNodeClassMask,
|
|
15
|
-
makeResultMask,
|
|
16
|
-
NodeClass,
|
|
17
|
-
makeAccessLevelFlag,
|
|
18
|
-
QualifiedName
|
|
19
|
-
} from "node-opcua-data-model";
|
|
20
|
-
import { NodeId, NodeIdType, resolveNodeId } from "node-opcua-nodeid";
|
|
21
|
-
import { lowerFirstLetter, isNullOrUndefined } from "node-opcua-utils";
|
|
22
|
-
import { Variant, VariantArrayType, DataType } from "node-opcua-variant";
|
|
23
|
-
import {
|
|
24
|
-
IAddressSpace,
|
|
6
|
+
|
|
7
|
+
import { types } from "node:util";
|
|
8
|
+
import type {
|
|
25
9
|
BaseNode,
|
|
10
|
+
IAddressSpace,
|
|
26
11
|
UADataType,
|
|
27
12
|
UAMethod,
|
|
28
13
|
UAObject,
|
|
@@ -32,31 +17,44 @@ import {
|
|
|
32
17
|
UAVariableType,
|
|
33
18
|
UAView
|
|
34
19
|
} from "node-opcua-address-space-base";
|
|
35
|
-
import {
|
|
20
|
+
import { assert } from "node-opcua-assert";
|
|
21
|
+
import { AttributeIds, type Int64, isMinDate, type StatusCode } from "node-opcua-basic-types";
|
|
22
|
+
import { ObjectIds, VariableIds } from "node-opcua-constants";
|
|
23
|
+
import {
|
|
24
|
+
BrowseDirection,
|
|
25
|
+
type LocalizedText,
|
|
26
|
+
makeAccessLevelFlag,
|
|
27
|
+
makeNodeClassMask,
|
|
28
|
+
makeResultMask,
|
|
29
|
+
NodeClass,
|
|
30
|
+
QualifiedName
|
|
31
|
+
} from "node-opcua-data-model";
|
|
32
|
+
import { make_debugLog, make_errorLog, make_warningLog } from "node-opcua-debug";
|
|
33
|
+
import type { ExtensionObject } from "node-opcua-extension-object";
|
|
34
|
+
import { NodeId, NodeIdType, resolveNodeId } from "node-opcua-nodeid";
|
|
36
35
|
import { BrowseDescription, EnumDefinition, StructureDefinition, StructureType } from "node-opcua-types";
|
|
37
|
-
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
36
|
+
import { isNullOrUndefined, lowerFirstLetter } from "node-opcua-utils";
|
|
37
|
+
import { DataType, Variant, VariantArrayType } from "node-opcua-variant";
|
|
38
|
+
import { makeDefinitionMap } from "../../source/loader/decode_xml_extension_object";
|
|
39
|
+
import type { DefinitionMap2 } from "../../source/loader/make_xml_extension_object_parser";
|
|
40
|
+
import type { XmlWriter } from "../../source/xml_writer";
|
|
40
41
|
import { BaseNodeImpl, getReferenceType } from "../base_node_impl";
|
|
41
|
-
import {
|
|
42
|
-
import { UAObjectTypeImpl } from "../ua_object_type_impl";
|
|
43
|
-
import { UAVariableImpl } from "../ua_variable_impl";
|
|
44
|
-
import { UAObjectImpl } from "../ua_object_impl";
|
|
42
|
+
import { SessionContext } from "../index_current";
|
|
45
43
|
import { NamespaceImpl } from "../namespace_impl";
|
|
46
|
-
import {
|
|
44
|
+
import { ReferenceImpl } from "../reference_impl";
|
|
47
45
|
import { UADataTypeImpl } from "../ua_data_type_impl";
|
|
46
|
+
import { UAMethodImpl } from "../ua_method_impl";
|
|
47
|
+
import { UAObjectImpl } from "../ua_object_impl";
|
|
48
|
+
import { UAObjectTypeImpl } from "../ua_object_type_impl";
|
|
49
|
+
import { UAReferenceTypeImpl } from "../ua_reference_type_impl";
|
|
50
|
+
import { UAVariableImpl } from "../ua_variable_impl";
|
|
48
51
|
import { UAVariableTypeImpl } from "../ua_variable_type_impl";
|
|
49
|
-
import { AddressSpace, SessionContext } from "../index_current";
|
|
50
52
|
import { UAViewImpl } from "../ua_view_impl";
|
|
51
|
-
|
|
52
|
-
import { DefinitionMap2 } from "../../source/loader/make_xml_extension_object_parser";
|
|
53
|
-
import { makeDefinitionMap } from "../../source/loader/decode_xml_extension_object";
|
|
54
53
|
import {
|
|
55
54
|
_constructNamespaceTranslationTable,
|
|
56
55
|
constructNamespaceDependency,
|
|
57
56
|
constructNamespacePriorityTable
|
|
58
57
|
} from "./construct_namespace_dependency";
|
|
59
|
-
import { start } from "repl";
|
|
60
58
|
|
|
61
59
|
// tslint:disable:no-var-requires
|
|
62
60
|
const XMLWriter = require("xml-writer");
|
|
@@ -71,12 +69,12 @@ function _hash(node: BaseNode | UAReference): string {
|
|
|
71
69
|
}
|
|
72
70
|
|
|
73
71
|
function _dumpDisplayName(xw: XmlWriter, node: BaseNode): void {
|
|
74
|
-
if (node.displayName
|
|
72
|
+
if (node.displayName?.[0]) {
|
|
75
73
|
xw.startElement("DisplayName").text(node.displayName[0].text!).endElement();
|
|
76
74
|
}
|
|
77
75
|
}
|
|
78
76
|
function _dumpDescription(xw: XmlWriter, node: { description?: LocalizedText }): void {
|
|
79
|
-
if (node.description
|
|
77
|
+
if (node.description?.text?.length) {
|
|
80
78
|
let desc = node.description.text;
|
|
81
79
|
desc = desc || "";
|
|
82
80
|
xw.startElement("Description").text(desc).endElement();
|
|
@@ -192,7 +190,7 @@ function _dumpReferences(xw: XmlWriter, node: BaseNode) {
|
|
|
192
190
|
}
|
|
193
191
|
function _dumpLocalizedText(xw: XmlWriter, v: LocalizedText) {
|
|
194
192
|
const uax = getPrefix(xw, "http://opcfoundation.org/UA/2008/02/Types.xsd");
|
|
195
|
-
if (v.locale
|
|
193
|
+
if (v.locale?.length) {
|
|
196
194
|
xw.startElement(`${uax}Locale`);
|
|
197
195
|
xw.text(v.locale);
|
|
198
196
|
xw.endElement();
|
|
@@ -264,14 +262,14 @@ function findXsdNamespaceUri(xw: XmlWriter, nodeId: NodeId): string {
|
|
|
264
262
|
if (!namespace) {
|
|
265
263
|
return "";
|
|
266
264
|
}
|
|
267
|
-
return namespace.replace(/\/$/, "")
|
|
265
|
+
return `${namespace.replace(/\/$/, "")}/Types.xsd`;
|
|
268
266
|
}
|
|
269
267
|
|
|
270
268
|
function getPrefix(xw: XmlWriter, namespace: XmlNamespaceUri): XmlNs {
|
|
271
269
|
const xwe = xw as XmlWriterEx;
|
|
272
270
|
if (!xwe.map) return "";
|
|
273
271
|
const p = xwe.map[namespace] || "";
|
|
274
|
-
return p ? p
|
|
272
|
+
return p ? `${p}:` : "";
|
|
275
273
|
}
|
|
276
274
|
|
|
277
275
|
function restoreDefaultNamespace(xw: XmlWriter) {
|
|
@@ -293,8 +291,8 @@ function setDefaultNamespace(xw: XmlWriter, namespace: XmlNamespaceUri): void {
|
|
|
293
291
|
xwe.map[namespace] = "";
|
|
294
292
|
}
|
|
295
293
|
|
|
296
|
-
function startElementEx(xw: XmlWriter,
|
|
297
|
-
const
|
|
294
|
+
function startElementEx(xw: XmlWriter, _ns: XmlNs, name: string, defaultNamespace: XmlNamespaceUri) {
|
|
295
|
+
const _xwe = xw as XmlWriterEx;
|
|
298
296
|
xw.startElement(name);
|
|
299
297
|
setDefaultNamespace(xw, defaultNamespace);
|
|
300
298
|
}
|
|
@@ -306,13 +304,7 @@ function _dumpNodeId(xw: XmlWriter, v: NodeId) {
|
|
|
306
304
|
xw.endElement();
|
|
307
305
|
}
|
|
308
306
|
|
|
309
|
-
function _dumpVariantValue(
|
|
310
|
-
xw: XmlWriter,
|
|
311
|
-
dataTypeNodeId: NodeId,
|
|
312
|
-
dataType: DataType,
|
|
313
|
-
addressSpace: IAddressSpace,
|
|
314
|
-
value: any
|
|
315
|
-
) {
|
|
307
|
+
function _dumpVariantValue(xw: XmlWriter, dataTypeNodeId: NodeId, dataType: DataType, addressSpace: IAddressSpace, value: any) {
|
|
316
308
|
if (value === undefined || value === null) {
|
|
317
309
|
return;
|
|
318
310
|
}
|
|
@@ -336,7 +328,8 @@ function _dumpVariantInnerExtensionObject(
|
|
|
336
328
|
const namespaceUri = findXsdNamespaceUri(xw, definition.defaultEncodingId);
|
|
337
329
|
const ns = getPrefix(xw, namespaceUri);
|
|
338
330
|
|
|
339
|
-
const isUnion =
|
|
331
|
+
const isUnion =
|
|
332
|
+
definition.structureType === StructureType.Union || definition.structureType === StructureType.UnionWithSubtypedValues;
|
|
340
333
|
|
|
341
334
|
for (const field of definition.fields || []) {
|
|
342
335
|
const dataTypeNodeId = field.dataType;
|
|
@@ -359,20 +352,19 @@ function _dumpVariantInnerExtensionObject(
|
|
|
359
352
|
startElementEx(xw, ns, fieldName, namespaceUri);
|
|
360
353
|
// xw.startElement(fieldName);
|
|
361
354
|
|
|
362
|
-
let fun: (value: any) => void = (
|
|
355
|
+
let fun: (value: any) => void = (_value: any) => {
|
|
363
356
|
/** */
|
|
364
357
|
};
|
|
365
358
|
if (definition instanceof StructureDefinition) {
|
|
366
359
|
fun = _dumpVariantInnerExtensionObject.bind(null, xw, definitionMap, definition, addressSpace);
|
|
367
360
|
} else if (definition instanceof EnumDefinition) {
|
|
368
361
|
fun = _dumpVariantInnerValueEnum.bind(null, xw, definition);
|
|
369
|
-
} else if (definition?.dataType
|
|
370
|
-
fun = (value: Variant)=> {
|
|
371
|
-
|
|
362
|
+
} else if (definition?.dataType === DataType.Variant) {
|
|
363
|
+
fun = (value: Variant) => {
|
|
372
364
|
xw.startElement("Value");
|
|
373
365
|
_dumpVariantValue(xw, field.dataType, value.dataType, addressSpace, value.value);
|
|
374
366
|
xw.endElement();
|
|
375
|
-
}
|
|
367
|
+
};
|
|
376
368
|
} else {
|
|
377
369
|
const baseType = definition.dataType;
|
|
378
370
|
fun = _dumpVariantInnerValue.bind(null, xw, baseType, dataTypeNodeId, definitionMap, addressSpace);
|
|
@@ -493,7 +485,7 @@ function _dumpVariantInnerValue(
|
|
|
493
485
|
_dumpVariantInnerValue(xw, value.dataType, dataTypeNodeId, definitionMap, addressSpace, value.value);
|
|
494
486
|
break;
|
|
495
487
|
default:
|
|
496
|
-
errorLog(
|
|
488
|
+
errorLog(`_dumpVariantInnerValue incomplete ${value} DataType=${dataType}=${DataType[dataType]}`);
|
|
497
489
|
// throw new Error("_dumpVariantInnerValue incomplete " + value + " " + "DataType=" + dataType + "=" + DataType[dataType]);
|
|
498
490
|
}
|
|
499
491
|
}
|
|
@@ -545,23 +537,15 @@ function _dumpVariantExtensionObjectValue(
|
|
|
545
537
|
{
|
|
546
538
|
const uax = getPrefix(xw, "http://opcfoundation.org/UA/2008/02/Types.xsd");
|
|
547
539
|
xw.startElement(`${uax}TypeId`);
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
xw.endElement();
|
|
554
|
-
}
|
|
540
|
+
// find HasEncoding node
|
|
541
|
+
// xx var encodingDefaultXml = schema.encodingDefaultXml;
|
|
542
|
+
xw.startElement(`${uax}Identifier`);
|
|
543
|
+
xw.text(n(xw, encodingDefaultXml));
|
|
544
|
+
xw.endElement();
|
|
555
545
|
xw.endElement();
|
|
556
546
|
startElementEx(xw, uax, "Body", "http://opcfoundation.org/UA/2008/02/Types.xsd");
|
|
557
547
|
|
|
558
|
-
_dumpVariantExtensionObjectValue_Body(
|
|
559
|
-
xw,
|
|
560
|
-
definitionMap,
|
|
561
|
-
name,
|
|
562
|
-
definition as StructureDefinition,
|
|
563
|
-
addressSpace,
|
|
564
|
-
value);
|
|
548
|
+
_dumpVariantExtensionObjectValue_Body(xw, definitionMap, name, definition as StructureDefinition, addressSpace, value);
|
|
565
549
|
|
|
566
550
|
restoreDefaultNamespace(xw);
|
|
567
551
|
xw.endElement();
|
|
@@ -578,7 +562,7 @@ function _dumpVariantExtensionObjectValue2(xw: XmlWriter, addressSpace: IAddress
|
|
|
578
562
|
warningLog("_dumpVariantExtensionObjectValue2: Cannot find dataType for ", dataTypeNodeId.toString());
|
|
579
563
|
return;
|
|
580
564
|
}
|
|
581
|
-
_dumpVariantExtensionObjectValue(xw, dataTypeNode.nodeId, definitionMap,addressSpace, value);
|
|
565
|
+
_dumpVariantExtensionObjectValue(xw, dataTypeNode.nodeId, definitionMap, addressSpace, value);
|
|
582
566
|
}
|
|
583
567
|
|
|
584
568
|
// eslint-disable-next-line complexity
|
|
@@ -665,7 +649,7 @@ function _dumpValue(xw: XmlWriter, node: UAVariable | UAVariableType, variant: V
|
|
|
665
649
|
return;
|
|
666
650
|
}
|
|
667
651
|
|
|
668
|
-
const dataTypeName = dataTypeNode.browseName.name
|
|
652
|
+
const dataTypeName = dataTypeNode.browseName.name?.toString();
|
|
669
653
|
const baseDataTypeName = DataType[variant.dataType];
|
|
670
654
|
|
|
671
655
|
if (baseDataTypeName === "Null") {
|
|
@@ -731,7 +715,7 @@ function _dumpArrayDimensionsAttribute(xw: XmlWriter, node: UAVariableType | UAV
|
|
|
731
715
|
}
|
|
732
716
|
}
|
|
733
717
|
|
|
734
|
-
function
|
|
718
|
+
function _visitUANode(node: BaseNode, data: DumpData, forward: boolean) {
|
|
735
719
|
const addressSpace = node.addressSpace;
|
|
736
720
|
|
|
737
721
|
// visit references
|
|
@@ -750,7 +734,7 @@ function visitUANode(node: BaseNode, data: DumpData, forward: boolean) {
|
|
|
750
734
|
|
|
751
735
|
const o = addressSpace.findNode(k)! as BaseNode;
|
|
752
736
|
if (o) {
|
|
753
|
-
|
|
737
|
+
_visitUANode(o, data, forward);
|
|
754
738
|
}
|
|
755
739
|
}
|
|
756
740
|
}
|
|
@@ -768,13 +752,13 @@ function dumpReferencedNodes(xw: XmlWriter, node: BaseNode, forward: boolean) {
|
|
|
768
752
|
if (!forward) {
|
|
769
753
|
{
|
|
770
754
|
const r = node.findReferencesEx("HasTypeDefinition");
|
|
771
|
-
if (r
|
|
755
|
+
if (r?.length) {
|
|
772
756
|
assert(r.length === 1);
|
|
773
757
|
const typeDefinitionObj = ReferenceImpl.resolveReferenceNode(addressSpace, r[0])! as BaseNode;
|
|
774
758
|
if (!typeDefinitionObj) {
|
|
775
759
|
warningLog(node.toString());
|
|
776
760
|
warningLog(
|
|
777
|
-
|
|
761
|
+
`dumpReferencedNodes: Warning : ${node.browseName.toString()} unknown typeDefinition, `,
|
|
778
762
|
r[0].toString()
|
|
779
763
|
);
|
|
780
764
|
} else {
|
|
@@ -792,7 +776,7 @@ function dumpReferencedNodes(xw: XmlWriter, node: BaseNode, forward: boolean) {
|
|
|
792
776
|
//
|
|
793
777
|
{
|
|
794
778
|
const r = node.findReferencesEx("HasSubtype", BrowseDirection.Inverse);
|
|
795
|
-
if (r
|
|
779
|
+
if (r?.length) {
|
|
796
780
|
const subTypeOf = ReferenceImpl.resolveReferenceNode(addressSpace, r[0])! as BaseNode;
|
|
797
781
|
assert(r.length === 1);
|
|
798
782
|
if (subTypeOf.nodeId.namespace === node.nodeId.namespace) {
|
|
@@ -841,21 +825,21 @@ function dumpCommonAttributes(xw: XmlWriter, node: BaseNode) {
|
|
|
841
825
|
xw.writeAttribute("ParentNodeId", n(xw, parentNode.nodeId));
|
|
842
826
|
}
|
|
843
827
|
}
|
|
844
|
-
if (Object.
|
|
828
|
+
if (Object.hasOwn(node, "symbolicName")) {
|
|
845
829
|
xw.writeAttribute("SymbolicName", (node as any).symbolicName);
|
|
846
830
|
}
|
|
847
|
-
if (Object.
|
|
831
|
+
if (Object.hasOwn(node, "isAbstract")) {
|
|
848
832
|
if ((node as any).isAbstract) {
|
|
849
833
|
xw.writeAttribute("IsAbstract", (node as any).isAbstract ? "true" : "false");
|
|
850
834
|
}
|
|
851
835
|
}
|
|
852
|
-
if (Object.
|
|
836
|
+
if (Object.hasOwn(node, "accessLevel")) {
|
|
853
837
|
// CurrentRead is by default
|
|
854
838
|
if ((node as UAVariable).accessLevel !== currentReadFlag) {
|
|
855
839
|
xw.writeAttribute("AccessLevel", (node as UAVariable).accessLevel.toString());
|
|
856
840
|
}
|
|
857
841
|
}
|
|
858
|
-
if (Object.
|
|
842
|
+
if (Object.hasOwn(node, "minimumSamplingInterval")) {
|
|
859
843
|
const minimumSamplingInterval = (node as UAVariable).minimumSamplingInterval;
|
|
860
844
|
if (minimumSamplingInterval > 0) {
|
|
861
845
|
xw.writeAttribute("MinimumSamplingInterval", minimumSamplingInterval);
|
|
@@ -972,7 +956,8 @@ function _dumpUADataTypeDefinition(xw: XmlWriter, uaDataType: UADataType) {
|
|
|
972
956
|
|
|
973
957
|
const dataValue = uaDataType.readAttribute(SessionContext.defaultContext, AttributeIds.DataTypeDefinition);
|
|
974
958
|
|
|
975
|
-
|
|
959
|
+
const t = true;
|
|
960
|
+
if (t || dataValue.statusCode.isGood()) {
|
|
976
961
|
const definition = uaDataType.getStructureDefinition();
|
|
977
962
|
const baseDefinition = uaDataTypeBase ? uaDataTypeBase.getStructureDefinition() : null;
|
|
978
963
|
xw.startElement("Definition");
|
|
@@ -1100,11 +1085,11 @@ function dumpUAVariableType(xw: XmlWriter, node: UAVariableType) {
|
|
|
1100
1085
|
// throw new Error(" cannot find datatype " + node.dataType);
|
|
1101
1086
|
debugLog(
|
|
1102
1087
|
" cannot find datatype " +
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1088
|
+
node.dataType +
|
|
1089
|
+
" for node " +
|
|
1090
|
+
node.browseName.toString() +
|
|
1091
|
+
" id =" +
|
|
1092
|
+
node.nodeId.toString()
|
|
1108
1093
|
);
|
|
1109
1094
|
} else {
|
|
1110
1095
|
const dataTypeName = b(xw, resolveDataTypeName(addressSpace, dataTypeNode.nodeId));
|
|
@@ -1129,9 +1114,9 @@ function dumpUAVariableType(xw: XmlWriter, node: UAVariableType) {
|
|
|
1129
1114
|
}
|
|
1130
1115
|
|
|
1131
1116
|
function dumpUAObject(xw: XmlWriter, node: UAObject) {
|
|
1132
|
-
xw.writeComment(
|
|
1117
|
+
xw.writeComment(`Object - ${b(xw, node.browseName)} {{{{ `);
|
|
1133
1118
|
_dumpUAObject(xw, node);
|
|
1134
|
-
xw.writeComment(
|
|
1119
|
+
xw.writeComment(`Object - ${b(xw, node.browseName)} }}}} `);
|
|
1135
1120
|
}
|
|
1136
1121
|
|
|
1137
1122
|
function _dumpUAObject(xw: XmlWriter, node: UAObject) {
|
|
@@ -1157,7 +1142,7 @@ function _dumpUAObject(xw: XmlWriter, node: UAObject) {
|
|
|
1157
1142
|
function dumpElementInFolder(xw: XmlWriter, node: BaseNodeImpl) {
|
|
1158
1143
|
const aggregates = node
|
|
1159
1144
|
.getFolderElements()
|
|
1160
|
-
.sort((x: BaseNode, y: BaseNode) => (x
|
|
1145
|
+
.sort((x: BaseNode, y: BaseNode) => ((x?.browseName.name?.toString() || 0) > (y?.browseName.name?.toString() || 0) ? 1 : -1));
|
|
1161
1146
|
for (const aggregate of aggregates.sort(sortByNodeId)) {
|
|
1162
1147
|
// do not export node that do not belong to our namespace
|
|
1163
1148
|
if (node.nodeId.namespace !== aggregate.nodeId.namespace) {
|
|
@@ -1195,7 +1180,7 @@ function dumpAggregates(xw: XmlWriter, node: BaseNode) {
|
|
|
1195
1180
|
function dumpUAObjectType(xw: XmlWriter, node: UAObjectTypeImpl) {
|
|
1196
1181
|
assert(node.nodeClass === NodeClass.ObjectType);
|
|
1197
1182
|
assert(node instanceof UAObjectTypeImpl);
|
|
1198
|
-
xw.writeComment(
|
|
1183
|
+
xw.writeComment(`ObjectType - ${b(xw, node.browseName)} {{{{ `);
|
|
1199
1184
|
_markAsVisited(xw, node);
|
|
1200
1185
|
|
|
1201
1186
|
// dump SubtypeOf and HasTypeDefinition node if part of the same namespace
|
|
@@ -1208,7 +1193,7 @@ function dumpUAObjectType(xw: XmlWriter, node: UAObjectTypeImpl) {
|
|
|
1208
1193
|
|
|
1209
1194
|
dumpAggregates(xw, node);
|
|
1210
1195
|
|
|
1211
|
-
xw.writeComment(
|
|
1196
|
+
xw.writeComment(`ObjectType - ${b(xw, node.browseName)} }}}}`);
|
|
1212
1197
|
}
|
|
1213
1198
|
|
|
1214
1199
|
function dumpUAMethod(xw: XmlWriter, node: UAMethod) {
|
|
@@ -1238,7 +1223,7 @@ function resolveDataTypeName(addressSpace: IAddressSpace, dataType: string | Nod
|
|
|
1238
1223
|
dataTypeNode = o ? o : null;
|
|
1239
1224
|
}
|
|
1240
1225
|
if (!dataTypeNode) {
|
|
1241
|
-
errorLog(
|
|
1226
|
+
errorLog(`resolveDataTypeName: warning cannot find DataType ${dataType.toString()}`);
|
|
1242
1227
|
return new QualifiedName({ name: "", namespaceIndex: 0 });
|
|
1243
1228
|
}
|
|
1244
1229
|
return dataTypeNode.browseName;
|
|
@@ -1327,7 +1312,7 @@ function dumpReferenceType(xw: XmlWriter, referenceType: UAReferenceType) {
|
|
|
1327
1312
|
|
|
1328
1313
|
if (!isSymmetric) {
|
|
1329
1314
|
xw.startElement("InverseName");
|
|
1330
|
-
xw.text(referenceType.inverseName
|
|
1315
|
+
xw.text(referenceType.inverseName?.text || "");
|
|
1331
1316
|
xw.endElement();
|
|
1332
1317
|
}
|
|
1333
1318
|
|
|
@@ -1362,9 +1347,7 @@ interface DumpData extends BuildAliasesData {
|
|
|
1362
1347
|
index_el: Record<string, number>;
|
|
1363
1348
|
}
|
|
1364
1349
|
|
|
1365
|
-
export
|
|
1366
|
-
/** */
|
|
1367
|
-
}
|
|
1350
|
+
export type DumpXMLOptions = {};
|
|
1368
1351
|
|
|
1369
1352
|
UAMethodImpl.prototype.dumpXML = function (xw) {
|
|
1370
1353
|
dumpUAMethod(xw, this);
|
|
@@ -1394,7 +1377,7 @@ UAViewImpl.prototype.dumpXML = function (xw: XmlWriter) {
|
|
|
1394
1377
|
};
|
|
1395
1378
|
|
|
1396
1379
|
function makeTypeXsd(namespaceUri: string): string {
|
|
1397
|
-
return namespaceUri.replace(/\/$/, "")
|
|
1380
|
+
return `${namespaceUri.replace(/\/$/, "")}/Type.xsd`;
|
|
1398
1381
|
}
|
|
1399
1382
|
|
|
1400
1383
|
// eslint-disable-next-line max-statements
|
|
@@ -1444,11 +1427,11 @@ NamespaceImpl.prototype.toNodeset2XML = function (this: NamespaceImpl) {
|
|
|
1444
1427
|
xw.startElement("NamespaceUris");
|
|
1445
1428
|
|
|
1446
1429
|
// let's sort the dependencies in the same order as the translation table
|
|
1447
|
-
const sortedDependencies = dependency.sort(
|
|
1448
|
-
(a
|
|
1449
|
-
|
|
1430
|
+
const sortedDependencies = dependency.sort((a, b) =>
|
|
1431
|
+
translationTable.get(a.index)! > translationTable.get(b.index)! ? 1 : -1
|
|
1432
|
+
);
|
|
1450
1433
|
|
|
1451
|
-
doDebug && debugLog(sortedDependencies.map((a) => a.index +
|
|
1434
|
+
doDebug && debugLog(sortedDependencies.map((a) => `${a.index} + ${a.namespaceUri}`).join("\n"));
|
|
1452
1435
|
doDebug && debugLog("translation table ", translationTable.entries());
|
|
1453
1436
|
|
|
1454
1437
|
for (const depend of sortedDependencies) {
|
|
@@ -1463,24 +1446,22 @@ NamespaceImpl.prototype.toNodeset2XML = function (this: NamespaceImpl) {
|
|
|
1463
1446
|
|
|
1464
1447
|
// ------------- INamespace Uris
|
|
1465
1448
|
xw.startElement("Models");
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
continue; // ignore our namespace 0
|
|
1474
|
-
}
|
|
1475
|
-
xw.startElement("RequiredModel");
|
|
1476
|
-
xw.writeAttribute("ModelUri", depend.namespaceUri);
|
|
1477
|
-
xw.writeAttribute("Version", depend.version);
|
|
1478
|
-
xw.writeAttribute("PublicationDate", depend.publicationDate.toISOString());
|
|
1479
|
-
xw.endElement();
|
|
1449
|
+
xw.startElement("Model");
|
|
1450
|
+
xw.writeAttribute("ModelUri", this.namespaceUri);
|
|
1451
|
+
xw.writeAttribute("Version", this.version);
|
|
1452
|
+
xw.writeAttribute("PublicationDate", this.publicationDate.toISOString());
|
|
1453
|
+
for (const depend of sortedDependencies) {
|
|
1454
|
+
if (depend.index === this.index) {
|
|
1455
|
+
continue; // ignore our namespace 0
|
|
1480
1456
|
}
|
|
1457
|
+
xw.startElement("RequiredModel");
|
|
1458
|
+
xw.writeAttribute("ModelUri", depend.namespaceUri);
|
|
1459
|
+
xw.writeAttribute("Version", depend.version);
|
|
1460
|
+
xw.writeAttribute("PublicationDate", depend.publicationDate.toISOString());
|
|
1481
1461
|
xw.endElement();
|
|
1482
1462
|
}
|
|
1483
1463
|
xw.endElement();
|
|
1464
|
+
xw.endElement();
|
|
1484
1465
|
|
|
1485
1466
|
const data: BuildAliasesData = { aliases: {} };
|
|
1486
1467
|
for (const node of this.nodeIterator()) {
|
package/src/private_namespace.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { Namespace } from "../source/namespace";
|
|
4
|
-
import { NamespacePrivate } from "./namespace_private";
|
|
5
|
-
import { NodeEntry1, NodeIdManager } from "./nodeid_manager";
|
|
1
|
+
import type { Namespace } from "../source/namespace";
|
|
2
|
+
import type { NodeEntry1, NodeIdManager } from "./nodeid_manager";
|
|
6
3
|
|
|
7
4
|
export function getNodeIdManager(ns: Namespace): NodeIdManager {
|
|
8
5
|
const nodeIdManager = (ns as any)._nodeIdManager as NodeIdManager;
|
|
@@ -16,4 +13,4 @@ export function setSymbols(ns: Namespace, symbols: NodeEntry1[]) {
|
|
|
16
13
|
export function getSymbols(ns: Namespace): NodeEntry1[] {
|
|
17
14
|
const nodeIdManager = getNodeIdManager(ns);
|
|
18
15
|
return nodeIdManager?.getSymbols() || [];
|
|
19
|
-
}
|
|
16
|
+
}
|
package/src/reference_impl.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
// tslint:disable:no-console
|
|
5
5
|
import chalk from "chalk";
|
|
6
|
-
import { AddReferenceOpts,
|
|
6
|
+
import type { AddReferenceOpts, BaseNode, UAReference, UAReferenceType } from "node-opcua-address-space-base";
|
|
7
7
|
import { assert } from "node-opcua-assert";
|
|
8
|
-
import { coerceNodeId, NodeId, NodeIdLike, sameNodeId } from "node-opcua-nodeid";
|
|
8
|
+
import { coerceNodeId, NodeId, type NodeIdLike, sameNodeId } from "node-opcua-nodeid";
|
|
9
9
|
import { isNullOrUndefined } from "node-opcua-utils";
|
|
10
10
|
|
|
11
11
|
export function isNodeIdString(str: string): boolean {
|
|
@@ -15,9 +15,7 @@ export function isNodeIdString(str: string): boolean {
|
|
|
15
15
|
|
|
16
16
|
function is_valid_reference(ref: UAReference): boolean {
|
|
17
17
|
const hasRequestedProperties =
|
|
18
|
-
Object.
|
|
19
|
-
Object.prototype.hasOwnProperty.call(ref, "nodeId") &&
|
|
20
|
-
!isNullOrUndefined(ref.isForward);
|
|
18
|
+
Object.hasOwn(ref, "referenceType") && Object.hasOwn(ref, "nodeId") && !isNullOrUndefined(ref.isForward);
|
|
21
19
|
|
|
22
20
|
if (!hasRequestedProperties) {
|
|
23
21
|
return false;
|
|
@@ -44,9 +42,9 @@ function _arrow(text: string, length: number, isForward: boolean): string {
|
|
|
44
42
|
const extra = text.length % 2 === 1 ? "-" : "";
|
|
45
43
|
|
|
46
44
|
if (isForward) {
|
|
47
|
-
return extra + h
|
|
45
|
+
return `${extra + h} ${text} ${h}> `;
|
|
48
46
|
}
|
|
49
|
-
return
|
|
47
|
+
return `<${h} ${text} ${h}${extra} `;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
function _w(str: string, width: number): string {
|
|
@@ -54,7 +52,7 @@ function _w(str: string, width: number): string {
|
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
function _localCoerceToNodeID(nodeIdLike: string | NodeIdLike | { nodeId: NodeId }): NodeId {
|
|
57
|
-
if (Object.
|
|
55
|
+
if (typeof nodeIdLike === "object" && Object.hasOwn(nodeIdLike, "nodeId")) {
|
|
58
56
|
return (nodeIdLike as { nodeId: NodeId }).nodeId;
|
|
59
57
|
}
|
|
60
58
|
return coerceNodeId(nodeIdLike);
|
|
@@ -133,13 +131,13 @@ export class ReferenceImpl implements UAReference {
|
|
|
133
131
|
let infoNode = _w(this.nodeId.toString(), 24);
|
|
134
132
|
let refType = this.referenceType.toString();
|
|
135
133
|
|
|
136
|
-
if (options
|
|
134
|
+
if (options?.addressSpace) {
|
|
137
135
|
const node = options.addressSpace.findNode(this.nodeId);
|
|
138
|
-
infoNode =
|
|
136
|
+
infoNode = `[${infoNode}]${_w(node?.browseName.toString(), 40)}`;
|
|
139
137
|
|
|
140
138
|
const ref = options.addressSpace.findReferenceType(this.referenceType);
|
|
141
139
|
const refNode = options.addressSpace.findNode(ref.nodeId);
|
|
142
|
-
refType = refNode.browseName.toString()
|
|
140
|
+
refType = `${refNode.browseName.toString()} (${ref.nodeId.toString()})`;
|
|
143
141
|
}
|
|
144
142
|
return _arrow(refType, 40, this.isForward) + infoNode;
|
|
145
143
|
}
|
|
@@ -149,7 +147,7 @@ export class ReferenceImpl implements UAReference {
|
|
|
149
147
|
*/
|
|
150
148
|
get hash(): string {
|
|
151
149
|
if (!this.__hash) {
|
|
152
|
-
this.__hash = (this.isForward ? "" : "!") + this.referenceType.toString()
|
|
150
|
+
this.__hash = `${(this.isForward ? "" : "!") + this.referenceType.toString()}-${this.nodeId.toString()}`;
|
|
153
151
|
}
|
|
154
152
|
return this.__hash;
|
|
155
153
|
}
|
|
@@ -167,7 +165,6 @@ export class ReferenceImpl implements UAReference {
|
|
|
167
165
|
*/
|
|
168
166
|
}
|
|
169
167
|
}
|
|
170
|
-
function errorLog(
|
|
168
|
+
function errorLog(_arg0: string, _reference: UAReference) {
|
|
171
169
|
throw new Error("Function not implemented.");
|
|
172
170
|
}
|
|
173
|
-
|
package/src/role_permissions.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RolePermissionType, RolePermissionTypeOptions } from "node-opcua-types";
|
|
1
|
+
import { RolePermissionType, type RolePermissionTypeOptions } from "node-opcua-types";
|
|
2
2
|
|
|
3
3
|
export function coerceRolePermissions(rolePermissions: RolePermissionTypeOptions[] | undefined): RolePermissionType[] | undefined {
|
|
4
4
|
if (!rolePermissions) return undefined;
|