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
|
@@ -4,33 +4,30 @@
|
|
|
4
4
|
// tslint:disable:max-classes-per-file
|
|
5
5
|
// tslint:disable:no-console
|
|
6
6
|
import chalk from "chalk";
|
|
7
|
-
|
|
8
7
|
import {
|
|
9
|
-
|
|
10
|
-
UAObject,
|
|
11
|
-
UAObjectType,
|
|
12
|
-
UAVariable,
|
|
13
|
-
UAVariableType,
|
|
8
|
+
CloneHelper,
|
|
14
9
|
reconstructFunctionalGroupType,
|
|
15
10
|
reconstructNonHierarchicalReferences,
|
|
16
|
-
|
|
11
|
+
type UAMethod,
|
|
12
|
+
type UAObject,
|
|
13
|
+
type UAObjectType,
|
|
14
|
+
type UAVariable,
|
|
15
|
+
type UAVariableType
|
|
17
16
|
} from "node-opcua-address-space-base";
|
|
18
|
-
|
|
19
|
-
import { checkDebugFlag,
|
|
20
|
-
import { sameNodeId } from "node-opcua-nodeid";
|
|
21
|
-
|
|
22
|
-
import { makeOptionalsMap, OptionalMap } from "../source/helpers/make_optionals_map";
|
|
23
|
-
|
|
24
|
-
import { _clone_hierarchical_references } from "./base_node_private";
|
|
17
|
+
import { BrowseDirection } from "node-opcua-data-model";
|
|
18
|
+
import { checkDebugFlag, make_errorLog, make_warningLog } from "node-opcua-debug";
|
|
19
|
+
import { resolveNodeId, sameNodeId } from "node-opcua-nodeid";
|
|
20
|
+
import { makeOptionalsMap, type OptionalMap } from "../source/helpers/make_optionals_map";
|
|
25
21
|
import { MandatoryChildOrRequestedOptionalFilter } from "./_mandatory_child_or_requested_optional_filter";
|
|
22
|
+
import { _clone_hierarchical_references } from "./base_node_private";
|
|
26
23
|
|
|
27
|
-
const debugLog = make_debugLog(
|
|
28
|
-
const doDebug = checkDebugFlag(
|
|
29
|
-
const warningLog = make_warningLog(
|
|
30
|
-
const errorLog = make_errorLog(
|
|
24
|
+
// const debugLog = make_debugLog("INSTANTIATE");
|
|
25
|
+
// const doDebug = checkDebugFlag("INSTANTIATE");
|
|
26
|
+
const warningLog = make_warningLog("INSTANTIATE");
|
|
27
|
+
const errorLog = make_errorLog("INSTANTIATE");
|
|
31
28
|
|
|
32
29
|
// eslint-disable-next-line prefer-const
|
|
33
|
-
|
|
30
|
+
const doTrace = checkDebugFlag("INSTANTIATE");
|
|
34
31
|
const traceLog = errorLog;
|
|
35
32
|
|
|
36
33
|
// install properties and components on a instantiated Object
|
|
@@ -58,7 +55,7 @@ function _initialize_properties_and_components<B extends UAObject | UAVariable |
|
|
|
58
55
|
warningLog("optionalsMap =", Object.keys(optionalsMap).join(" "));
|
|
59
56
|
|
|
60
57
|
const c = typeDefinitionNode.findReferencesEx("Aggregates");
|
|
61
|
-
warningLog("typeDefinition aggregates =", c.map((x) => x.node
|
|
58
|
+
warningLog("typeDefinition aggregates =", c.map((x) => x.node?.browseName.toString()).join(" "));
|
|
62
59
|
}
|
|
63
60
|
optionalsMap = optionalsMap || {};
|
|
64
61
|
|
|
@@ -71,7 +68,7 @@ function _initialize_properties_and_components<B extends UAObject | UAVariable |
|
|
|
71
68
|
doTrace &&
|
|
72
69
|
traceLog(
|
|
73
70
|
chalk.cyan(extraInfo.pad(), "cloning relevant member of typeDefinition class"),
|
|
74
|
-
typeDefinitionNode.browseName.toString()
|
|
71
|
+
`${typeDefinitionNode.browseName.toString()}\n optionals${JSON.stringify(optionalsMap)}`
|
|
75
72
|
);
|
|
76
73
|
|
|
77
74
|
_clone_hierarchical_references(typeDefinitionNode, instance, copyAlsoModellingRules, filter, extraInfo, browseNameMap);
|
|
@@ -79,7 +76,7 @@ function _initialize_properties_and_components<B extends UAObject | UAVariable |
|
|
|
79
76
|
// now apply recursion on baseTypeDefinition to get properties and components from base class
|
|
80
77
|
|
|
81
78
|
const baseTypeDefinitionNodeId = typeDefinitionNode.subtypeOf;
|
|
82
|
-
const baseTypeDefinition = typeDefinitionNode.subtypeOfObj
|
|
79
|
+
const baseTypeDefinition = typeDefinitionNode.subtypeOfObj;
|
|
83
80
|
|
|
84
81
|
doTrace &&
|
|
85
82
|
traceLog(
|
|
@@ -87,7 +84,7 @@ function _initialize_properties_and_components<B extends UAObject | UAVariable |
|
|
|
87
84
|
extraInfo.pad(),
|
|
88
85
|
"now apply recursion on baseTypeDefinition to get properties and components from base class"
|
|
89
86
|
),
|
|
90
|
-
baseTypeDefinition.browseName.toString()
|
|
87
|
+
baseTypeDefinition ? baseTypeDefinition.browseName.toString() : "undefined"
|
|
91
88
|
);
|
|
92
89
|
|
|
93
90
|
// c8 ignore next
|
|
@@ -111,10 +108,14 @@ function _initialize_properties_and_components<B extends UAObject | UAVariable |
|
|
|
111
108
|
export function initialize_properties_and_components<
|
|
112
109
|
B extends UAObject | UAVariable | UAMethod,
|
|
113
110
|
T extends UAVariableType | UAObjectType
|
|
114
|
-
>(
|
|
111
|
+
>(
|
|
112
|
+
instance: B,
|
|
113
|
+
topMostType: T,
|
|
114
|
+
nodeType: T,
|
|
115
115
|
copyAlsoModellingRules: boolean,
|
|
116
116
|
copyAlsoAllOptionals: boolean,
|
|
117
|
-
optionals?: string[]
|
|
117
|
+
optionals?: string[]
|
|
118
|
+
): void {
|
|
118
119
|
const extraInfo = new CloneHelper();
|
|
119
120
|
|
|
120
121
|
extraInfo.pushContext({
|
|
@@ -141,7 +142,59 @@ export function initialize_properties_and_components<
|
|
|
141
142
|
browseNameMap
|
|
142
143
|
);
|
|
143
144
|
|
|
145
|
+
// instantiate optionals from interfaces
|
|
146
|
+
instantiate_interface_children<B>(
|
|
147
|
+
nodeType,
|
|
148
|
+
extraInfo,
|
|
149
|
+
instance,
|
|
150
|
+
copyAlsoModellingRules,
|
|
151
|
+
copyAlsoAllOptionals,
|
|
152
|
+
optionalsMap,
|
|
153
|
+
browseNameMap
|
|
154
|
+
);
|
|
155
|
+
|
|
144
156
|
reconstructFunctionalGroupType(extraInfo);
|
|
145
157
|
|
|
146
158
|
reconstructNonHierarchicalReferences(extraInfo);
|
|
147
159
|
}
|
|
160
|
+
|
|
161
|
+
function instantiate_interface_children<B extends UAObject | UAVariable | UAMethod>(
|
|
162
|
+
nodeType: UAObjectType | UAVariableType,
|
|
163
|
+
extraInfo: CloneHelper,
|
|
164
|
+
instance: B,
|
|
165
|
+
copyAlsoModellingRules: boolean,
|
|
166
|
+
copyAlsoAllOptionals: boolean,
|
|
167
|
+
optionalsMap: OptionalMap,
|
|
168
|
+
browseNameMap: Set<string>
|
|
169
|
+
) {
|
|
170
|
+
const interfaces = nodeType.findReferencesEx(resolveNodeId("HasInterface"), BrowseDirection.Forward);
|
|
171
|
+
if (interfaces.length === 0) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
for (const reference of interfaces) {
|
|
175
|
+
const interfaceType = (reference.node as UAObjectType) || nodeType.addressSpace.findObjectType(reference.nodeId);
|
|
176
|
+
if (!interfaceType) {
|
|
177
|
+
warningLog(" cannot find node ", reference.nodeId.toString());
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
const topMostTypeBaseInterface = nodeType.addressSpace.findObjectType("BaseInterfaceType");
|
|
181
|
+
if (!topMostTypeBaseInterface) {
|
|
182
|
+
throw new Error("cannot find BaseInterfaceType");
|
|
183
|
+
}
|
|
184
|
+
doTrace &&
|
|
185
|
+
traceLog(
|
|
186
|
+
chalk.cyan(extraInfo.pad(), "instantiating optionals from interface"),
|
|
187
|
+
`${interfaceType.browseName.toString()}`
|
|
188
|
+
);
|
|
189
|
+
_initialize_properties_and_components(
|
|
190
|
+
instance,
|
|
191
|
+
topMostTypeBaseInterface,
|
|
192
|
+
interfaceType,
|
|
193
|
+
copyAlsoModellingRules,
|
|
194
|
+
copyAlsoAllOptionals,
|
|
195
|
+
optionalsMap,
|
|
196
|
+
extraInfo,
|
|
197
|
+
browseNameMap
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type BaseNode,
|
|
3
|
+
type CloneFilter,
|
|
4
|
+
fullPath2,
|
|
5
|
+
type UAMethod,
|
|
6
|
+
type UAObject,
|
|
7
|
+
type UAReference,
|
|
8
|
+
type UAVariable
|
|
9
|
+
} from "node-opcua-address-space-base";
|
|
1
10
|
import { assert } from "node-opcua-assert";
|
|
2
|
-
import { BaseNode, UAMethod, UAObject, UAReference, UAVariable, CloneFilter, fullPath2 } from "node-opcua-address-space-base";
|
|
3
|
-
import { checkDebugFlag, make_debugLog, make_warningLog, make_errorLog } from "node-opcua-debug";
|
|
4
11
|
import { BrowseDirection } from "node-opcua-data-model";
|
|
5
|
-
|
|
6
|
-
import { _clone_hierarchical_references } from "./base_node_private";
|
|
12
|
+
import { checkDebugFlag, make_errorLog, make_warningLog } from "node-opcua-debug";
|
|
7
13
|
|
|
8
14
|
// const debugLog = make_debugLog(__filename);
|
|
9
|
-
const
|
|
15
|
+
const _doDebug = checkDebugFlag(__filename);
|
|
10
16
|
const warningLog = make_warningLog(__filename);
|
|
11
17
|
const errorLog = make_errorLog(__filename);
|
|
12
18
|
const doTrace = checkDebugFlag("INSTANTIATE");
|
|
@@ -14,17 +20,18 @@ const traceLog = errorLog;
|
|
|
14
20
|
|
|
15
21
|
export type OptionalMap = Record<string, string | Record<string, any>>;
|
|
16
22
|
export class MandatoryChildOrRequestedOptionalFilter implements CloneFilter {
|
|
17
|
-
private readonly instance: BaseNode;
|
|
18
23
|
private readonly optionalsMap: OptionalMap;
|
|
19
24
|
private readonly references: UAReference[];
|
|
20
25
|
private readonly copyAlsoAllOptionals: boolean = false;
|
|
21
26
|
|
|
27
|
+
private readonly _instance: BaseNode;
|
|
28
|
+
|
|
22
29
|
constructor(instance: BaseNode, copyAlsoAllOptionals: boolean, optionalsMap: OptionalMap) {
|
|
23
30
|
this.copyAlsoAllOptionals = copyAlsoAllOptionals;
|
|
24
31
|
// should we clone the node to be a component or propertyOf of a instance
|
|
25
32
|
assert(null !== instance);
|
|
26
33
|
this.optionalsMap = optionalsMap;
|
|
27
|
-
this.
|
|
34
|
+
this._instance = instance;
|
|
28
35
|
this.references = instance.findReferencesEx("Aggregates", BrowseDirection.Forward);
|
|
29
36
|
}
|
|
30
37
|
|
|
@@ -32,13 +39,13 @@ export class MandatoryChildOrRequestedOptionalFilter implements CloneFilter {
|
|
|
32
39
|
const addressSpace = node.addressSpace;
|
|
33
40
|
|
|
34
41
|
const alreadyIn = this.references.filter((r: UAReference) => {
|
|
35
|
-
const n = addressSpace.findNode(r.nodeId)
|
|
42
|
+
const n = addressSpace.findNode(r.nodeId);
|
|
36
43
|
// c8 ignore next
|
|
37
44
|
if (!n) {
|
|
38
45
|
warningLog(" cannot find node ", r.nodeId.toString());
|
|
39
46
|
return false;
|
|
40
47
|
}
|
|
41
|
-
return n.browseName
|
|
48
|
+
return n.browseName?.name?.toString() === node.browseName?.name?.toString();
|
|
42
49
|
});
|
|
43
50
|
|
|
44
51
|
if (alreadyIn.length > 0) {
|
|
@@ -54,13 +61,7 @@ export class MandatoryChildOrRequestedOptionalFilter implements CloneFilter {
|
|
|
54
61
|
case null:
|
|
55
62
|
case undefined:
|
|
56
63
|
// c8 ignore next
|
|
57
|
-
doTrace &&
|
|
58
|
-
traceLog(
|
|
59
|
-
"node ",
|
|
60
|
-
fullPath2(node),
|
|
61
|
-
" has no modellingRule ",
|
|
62
|
-
node ? fullPath2(node) : ""
|
|
63
|
-
);
|
|
64
|
+
doTrace && traceLog("node ", fullPath2(node), " has no modellingRule ", node ? fullPath2(node) : "");
|
|
64
65
|
/**
|
|
65
66
|
* in some badly generated NodeSet2.xml file, the modellingRule is not specified
|
|
66
67
|
*
|
|
@@ -76,7 +77,7 @@ export class MandatoryChildOrRequestedOptionalFilter implements CloneFilter {
|
|
|
76
77
|
return true; // keep;
|
|
77
78
|
case "Optional":
|
|
78
79
|
// only if in requested optionals
|
|
79
|
-
return this.copyAlsoAllOptionals || (node.browseName
|
|
80
|
+
return this.copyAlsoAllOptionals || (node.browseName?.name || "") in this.optionalsMap;
|
|
80
81
|
case "OptionalPlaceholder":
|
|
81
82
|
return false; // ignored
|
|
82
83
|
default:
|
|
@@ -85,12 +86,12 @@ export class MandatoryChildOrRequestedOptionalFilter implements CloneFilter {
|
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
public filterFor(childInstance: UAVariable | UAObject | UAMethod): CloneFilter {
|
|
88
|
-
const browseName: string = childInstance.browseName.name
|
|
89
|
+
const browseName: string = childInstance.browseName.name || "";
|
|
89
90
|
|
|
90
91
|
let map: OptionalMap = Object.create(null);
|
|
91
92
|
|
|
92
93
|
if (browseName in this.optionalsMap) {
|
|
93
|
-
map = this.optionalsMap[browseName] as
|
|
94
|
+
map = this.optionalsMap[browseName] as OptionalMap;
|
|
94
95
|
}
|
|
95
96
|
// c8 ignore next
|
|
96
97
|
doTrace && traceLog("filterFor ", browseName, map);
|
package/src/address_space.ts
CHANGED
|
@@ -51,24 +51,17 @@ import type {
|
|
|
51
51
|
ModelChangeStructureDataType,
|
|
52
52
|
RelativePathElement
|
|
53
53
|
} from "node-opcua-types";
|
|
54
|
-
import {
|
|
55
|
-
BrowsePath,
|
|
56
|
-
BrowsePathResult,
|
|
57
|
-
} from "node-opcua-types";
|
|
54
|
+
import { BrowsePath, BrowsePathResult } from "node-opcua-types";
|
|
58
55
|
import { isNullOrUndefined, lowerFirstLetter } from "node-opcua-utils";
|
|
59
56
|
import { DataType, Variant, VariantArrayType, type VariantOptions, type VariantT } from "node-opcua-variant";
|
|
60
57
|
import { adjustBrowseDirection } from "../source/helpers/adjust_browse_direction";
|
|
61
|
-
import type {
|
|
62
|
-
ExtensionObjectConstructorFuncWithSchema
|
|
63
|
-
} from "../source/interfaces/extension_object_constructor";
|
|
58
|
+
import type { ExtensionObjectConstructorFuncWithSchema } from "../source/interfaces/extension_object_constructor";
|
|
64
59
|
import type { UARootFolder } from "../source/ua_root_folder";
|
|
65
60
|
import type { AddressSpacePrivate } from "./address_space_private";
|
|
66
|
-
import {
|
|
61
|
+
import { UAAcknowledgeableConditionImplBase, UAConditionImplBase } from "./alarms_and_conditions";
|
|
67
62
|
import { BaseNodeImpl } from "./base_node_impl";
|
|
68
63
|
import { EventData } from "./event_data";
|
|
69
|
-
import {
|
|
70
|
-
AddressSpace_installHistoricalDataNode
|
|
71
|
-
} from "./historical_access/address_space_historical_data_node";
|
|
64
|
+
import { AddressSpace_installHistoricalDataNode } from "./historical_access/address_space_historical_data_node";
|
|
72
65
|
import { isNonEmptyQualifiedName, NamespaceImpl } from "./namespace_impl";
|
|
73
66
|
import type { NamespacePrivate } from "./namespace_private";
|
|
74
67
|
import { ReferenceImpl } from "./reference_impl";
|
|
@@ -139,7 +132,7 @@ function _extract_namespace_and_browse_name_as_string(
|
|
|
139
132
|
}
|
|
140
133
|
|
|
141
134
|
/* c8 ignore next */
|
|
142
|
-
if (!result
|
|
135
|
+
if (!result?.[0]) {
|
|
143
136
|
throw new Error(` Cannot find namespace associated with ${browseNameOrNodeId} ${namespaceIndex}`);
|
|
144
137
|
}
|
|
145
138
|
return result as [NamespacePrivate, string];
|
|
@@ -510,9 +503,9 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
510
503
|
if (!(dataTypeNode instanceof UADataTypeImpl)) {
|
|
511
504
|
throw new Error(
|
|
512
505
|
"we are expecting an UADataType here : " +
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
506
|
+
_orig_dataTypeNode.toString() +
|
|
507
|
+
" should not refer to a " +
|
|
508
|
+
(dataTypeNode as BaseNode).browseName.name
|
|
516
509
|
);
|
|
517
510
|
}
|
|
518
511
|
|
|
@@ -693,30 +686,24 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
693
686
|
/*=
|
|
694
687
|
* construct a simple javascript object with all the default properties of the event
|
|
695
688
|
*
|
|
696
|
-
* @return result.$eventDataSource {BaseNode} the event type node
|
|
697
|
-
* @return result.eventId {NodeId} the
|
|
698
|
-
* ...
|
|
699
|
-
*
|
|
700
689
|
*
|
|
701
690
|
* eventTypeId can be a UAEventType
|
|
702
691
|
*
|
|
703
692
|
* @private
|
|
704
693
|
*/
|
|
705
|
-
public constructEventData(eventTypeId: UAEventType,
|
|
706
|
-
data =
|
|
694
|
+
public constructEventData(eventTypeId: UAEventType, dataInput: Record<string, unknown>): IEventData {
|
|
695
|
+
const data: RaiseEventData = (dataInput || {}) as RaiseEventData;
|
|
707
696
|
|
|
708
697
|
// construct the reference dataStructure to store event Data
|
|
709
|
-
let eventTypeNode = eventTypeId;
|
|
698
|
+
let eventTypeNode: UAEventType | null = eventTypeId;
|
|
710
699
|
|
|
711
700
|
// make sure that eventType is really a object that derived from EventType
|
|
712
701
|
if (eventTypeId instanceof UAObjectTypeImpl) {
|
|
713
|
-
eventTypeNode = this.findEventType(eventTypeId)
|
|
702
|
+
eventTypeNode = this.findEventType(eventTypeId) as UAEventType | null;
|
|
714
703
|
}
|
|
715
|
-
|
|
716
704
|
/* c8 ignore next */
|
|
717
|
-
if (!eventTypeNode) {
|
|
718
|
-
|
|
719
|
-
}
|
|
705
|
+
if (!eventTypeNode) throw new Error(` cannot find EventType for ${eventTypeId}`);
|
|
706
|
+
|
|
720
707
|
assert(eventTypeNode instanceof UAObjectTypeImpl, "eventTypeId must represent a UAObjectType");
|
|
721
708
|
|
|
722
709
|
// eventId
|
|
@@ -732,11 +719,15 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
732
719
|
assert(data.sourceNode.dataType === DataType.NodeId);
|
|
733
720
|
|
|
734
721
|
// sourceName
|
|
735
|
-
const sourceNode = this.findNode(data.sourceNode.value)
|
|
736
|
-
|
|
722
|
+
const sourceNode = this.findNode(data.sourceNode.value);
|
|
723
|
+
if (!sourceNode) {
|
|
724
|
+
warningLog(
|
|
725
|
+
`constructEventData: cannot find sourceNode ${data.sourceNode.value?.toString()} for event ${eventTypeNode.browseName.toString()}`
|
|
726
|
+
);
|
|
727
|
+
}
|
|
737
728
|
data.sourceName = data.sourceName || {
|
|
738
729
|
dataType: DataType.String,
|
|
739
|
-
value: sourceNode
|
|
730
|
+
value: sourceNode?.getDisplayName("en") || ""
|
|
740
731
|
};
|
|
741
732
|
|
|
742
733
|
const nowUTC = new Date();
|
|
@@ -794,18 +785,18 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
794
785
|
// tslint:disable:no-console
|
|
795
786
|
errorLog(
|
|
796
787
|
chalk.red("ERROR : AddressSpace#constructEventData(eventType,options) " + "cannot find property ") +
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
788
|
+
self.browseName.toString() +
|
|
789
|
+
" => " +
|
|
790
|
+
chalk.cyan(lowerName)
|
|
800
791
|
);
|
|
801
792
|
} else {
|
|
802
793
|
errorLog(
|
|
803
794
|
chalk.yellow(
|
|
804
795
|
"Warning : AddressSpace#constructEventData(eventType,options)" + " cannot find property "
|
|
805
796
|
) +
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
797
|
+
self.browseName.toString() +
|
|
798
|
+
" => " +
|
|
799
|
+
chalk.cyan(lowerName)
|
|
809
800
|
);
|
|
810
801
|
}
|
|
811
802
|
}
|
|
@@ -822,11 +813,11 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
822
813
|
if (!alreadyVisited(k)) {
|
|
823
814
|
warningLog(
|
|
824
815
|
"constructEventData: cannot find property '" +
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
816
|
+
k +
|
|
817
|
+
"' in [ " +
|
|
818
|
+
Object.keys(visitedProperties).join(", ") +
|
|
819
|
+
"] when filling " +
|
|
820
|
+
eventTypeNode?.browseName.toString()
|
|
830
821
|
);
|
|
831
822
|
}
|
|
832
823
|
});
|
|
@@ -964,7 +955,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
964
955
|
// TranslateBrowsePathToNodeIds further restrict RelativePath targetName rules:
|
|
965
956
|
// The last element in the relativePath shall always have a targetName specified.
|
|
966
957
|
const last_el = browsePath.relativePath.elements[elements_length - 1];
|
|
967
|
-
if (!last_el.targetName
|
|
958
|
+
if (!last_el.targetName?.name || last_el.targetName.name.length === 0) {
|
|
968
959
|
return new BrowsePathResult({ statusCode: StatusCodes.BadBrowseNameInvalid });
|
|
969
960
|
}
|
|
970
961
|
|
|
@@ -1360,7 +1351,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
1360
1351
|
params.node = params.nodeId as BaseNode;
|
|
1361
1352
|
params.nodeId = params.node.nodeId;
|
|
1362
1353
|
} else {
|
|
1363
|
-
let _nodeId = params.nodeId
|
|
1354
|
+
let _nodeId = params.nodeId as NodeId;
|
|
1364
1355
|
assert(!!_nodeId, "missing 'nodeId' in reference");
|
|
1365
1356
|
if (_nodeId && (_nodeId as any).nodeId) {
|
|
1366
1357
|
_nodeId = (_nodeId as any).nodeId as NodeId;
|
|
@@ -1393,8 +1384,8 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
1393
1384
|
*
|
|
1394
1385
|
*/
|
|
1395
1386
|
public installAlarmsAndConditionsService(): void {
|
|
1396
|
-
|
|
1397
|
-
|
|
1387
|
+
UAConditionImplBase.install_condition_refresh_handle(this);
|
|
1388
|
+
UAAcknowledgeableConditionImplBase.install_method_handle_on_type(this);
|
|
1398
1389
|
}
|
|
1399
1390
|
|
|
1400
1391
|
// -- internal stuff -----------------------------------------------------------------------------------------------
|
|
@@ -2,16 +2,13 @@
|
|
|
2
2
|
* @module node-opcua-address-space
|
|
3
3
|
*/
|
|
4
4
|
import chalk from "chalk";
|
|
5
|
-
|
|
6
|
-
import { UAReference, BaseNode, UAObject, UAVariable, UAObjectType, UAVariableType } from "node-opcua-address-space-base";
|
|
7
|
-
import { assert } from "node-opcua-assert";
|
|
5
|
+
import type { BaseNode, UAObject, UAReference, UAVariable } from "node-opcua-address-space-base";
|
|
8
6
|
import { BrowseDirection, NodeClass } from "node-opcua-data-model";
|
|
9
|
-
import { Enum
|
|
10
|
-
import { NodeId } from "node-opcua-nodeid";
|
|
7
|
+
import { Enum } from "node-opcua-enum";
|
|
8
|
+
import type { NodeId } from "node-opcua-nodeid";
|
|
11
9
|
import { ModelChangeStructureDataType } from "node-opcua-types";
|
|
12
|
-
|
|
13
|
-
import {
|
|
14
|
-
import { BaseNodeImpl } from "./base_node_impl";
|
|
10
|
+
import type { AddressSpacePrivate } from "./address_space_private";
|
|
11
|
+
import type { BaseNodeImpl } from "./base_node_impl";
|
|
15
12
|
|
|
16
13
|
const verbFlags = new Enum({
|
|
17
14
|
// NodeAdded 0 Indicates the affected Node has been added.
|
|
@@ -35,29 +32,27 @@ const verbFlags = new Enum({
|
|
|
35
32
|
DataTypeChanged: 0x10
|
|
36
33
|
});
|
|
37
34
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
type VerbFlagNames = "NodeAdded" | "NodeDeleted" | "ReferenceAdded" | "ReferenceDeleted" | "DataTypeChanged";
|
|
36
|
+
|
|
37
|
+
function makeVerb(verbs: VerbFlagNames): number {
|
|
38
|
+
const e = verbFlags.get(verbs);
|
|
39
|
+
return e?.value || 0;
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
function _getTypeDef(node: BaseNode) {
|
|
45
43
|
if (node.nodeClass === NodeClass.Object || node.nodeClass === NodeClass.Variable) {
|
|
46
|
-
return (
|
|
44
|
+
return (node as unknown as UAObject | UAVariable).typeDefinitionObj.nodeId;
|
|
47
45
|
}
|
|
48
46
|
return null;
|
|
49
47
|
}
|
|
50
48
|
export function _handle_add_reference_change_event(node1: BaseNode, node2id: NodeId): void {
|
|
51
|
-
|
|
52
49
|
const addressSpace = node1.addressSpace as AddressSpacePrivate;
|
|
53
50
|
const node2 = addressSpace.findNode(node2id);
|
|
54
51
|
if (!node2) return;
|
|
55
52
|
|
|
56
|
-
if (node1.getNodeVersion() ||node2.getNodeVersion()) {
|
|
57
|
-
|
|
53
|
+
if (node1.getNodeVersion() || node2.getNodeVersion()) {
|
|
58
54
|
// a event has to be send
|
|
59
55
|
addressSpace.modelChangeTransaction(() => {
|
|
60
|
-
|
|
61
56
|
let modelChangeTgt = new ModelChangeStructureDataType({
|
|
62
57
|
affected: node1.nodeId,
|
|
63
58
|
affectedType: _getTypeDef(node1),
|
|
@@ -78,7 +73,7 @@ export function _handle_add_reference_change_event(node1: BaseNode, node2id: Nod
|
|
|
78
73
|
}
|
|
79
74
|
|
|
80
75
|
try {
|
|
81
|
-
|
|
76
|
+
ModelChangeStructureDataType.prototype.toString = function (options?: { addressSpace: AddressSpacePrivate }): string {
|
|
82
77
|
if (!options) {
|
|
83
78
|
return "";
|
|
84
79
|
}
|
|
@@ -88,16 +83,16 @@ try {
|
|
|
88
83
|
if (!nodeId || nodeId.isEmpty()) {
|
|
89
84
|
return "";
|
|
90
85
|
}
|
|
91
|
-
const node = addressSpace.findNode(nodeId)
|
|
92
|
-
return
|
|
86
|
+
const node = addressSpace.findNode(nodeId);
|
|
87
|
+
return `"${nodeId.toString()}"${chalk.yellow(` /* ${node ? node.browseName.toString() : "???"} */`)}`;
|
|
93
88
|
}
|
|
94
89
|
|
|
95
|
-
let str =
|
|
96
|
-
str +=
|
|
97
|
-
str +=
|
|
90
|
+
let str = `{ verb:${verbFlags.get(this.verb)?.key},`;
|
|
91
|
+
str += ` affected: ${n(this.affected)},`;
|
|
92
|
+
str += ` type: ${n(this.affectedType)} }`;
|
|
98
93
|
return str;
|
|
99
94
|
};
|
|
100
|
-
} catch (
|
|
95
|
+
} catch (_err) {
|
|
101
96
|
//
|
|
102
97
|
}
|
|
103
98
|
|
|
@@ -113,7 +108,7 @@ export function _handle_model_change_event(node: BaseNodeImpl): void {
|
|
|
113
108
|
typeDefinitionNodeId = node.typeDefinitionObj.nodeId;
|
|
114
109
|
}
|
|
115
110
|
for (const parent of [...parents, ...containingFolders]) {
|
|
116
|
-
if (parent
|
|
111
|
+
if (parent?.getNodeVersion()) {
|
|
117
112
|
addressSpace.modelChangeTransaction(() => {
|
|
118
113
|
const modelChange1 = new ModelChangeStructureDataType({
|
|
119
114
|
affected: node.nodeId,
|
|
@@ -147,22 +142,22 @@ export function _handle_delete_node_model_change_event(node: BaseNode): void {
|
|
|
147
142
|
const addressSpace = node.addressSpace as AddressSpacePrivate;
|
|
148
143
|
|
|
149
144
|
// get backward references
|
|
150
|
-
const references = node.findReferencesEx("HierarchicalReferences", BrowseDirection.Inverse)
|
|
145
|
+
const references = node.findReferencesEx("HierarchicalReferences", BrowseDirection.Inverse);
|
|
151
146
|
|
|
152
147
|
const parentNodes = references.map((r: UAReference) => {
|
|
153
|
-
return addressSpace.findNode(r.nodeId)
|
|
148
|
+
return addressSpace.findNode(r.nodeId) as BaseNode;
|
|
154
149
|
});
|
|
155
150
|
|
|
156
|
-
const versionableNodes = parentNodes.filter((n) => null!=n.getNodeVersion());
|
|
151
|
+
const versionableNodes = parentNodes.filter((n) => null != n.getNodeVersion());
|
|
157
152
|
|
|
158
153
|
if (versionableNodes.length >= 1 || node.getNodeVersion()) {
|
|
159
154
|
addressSpace.modelChangeTransaction(() => {
|
|
160
155
|
// ...
|
|
161
156
|
for (const r of references) {
|
|
162
|
-
const target = addressSpace.findNode(r.nodeId)
|
|
157
|
+
const target = addressSpace.findNode(r.nodeId);
|
|
163
158
|
|
|
164
159
|
const modelChangeSrc_l = new ModelChangeStructureDataType({
|
|
165
|
-
affected: target
|
|
160
|
+
affected: target?.nodeId,
|
|
166
161
|
affectedType: null,
|
|
167
162
|
verb: makeVerb("ReferenceDeleted")
|
|
168
163
|
});
|
|
@@ -1,33 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space.Private
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
8
|
-
import { ModelChangeStructureDataType, ReadProcessedDetails, HistoryReadResult } from "node-opcua-types";
|
|
9
|
-
import { NumericRange } from "node-opcua-numeric-range";
|
|
10
|
-
import { CallbackT } from "node-opcua-status-code";
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
IAddressSpace,
|
|
4
|
+
|
|
5
|
+
import type {
|
|
6
|
+
AddReferenceOpts,
|
|
14
7
|
BaseNode,
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
ContinuationData,
|
|
9
|
+
IAddressSpace,
|
|
17
10
|
ISessionContext,
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
MethodCallInterceptor,
|
|
12
|
+
UADataType,
|
|
20
13
|
UAObjectType,
|
|
21
14
|
UAReference,
|
|
22
15
|
UAVariable,
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
UAVariableType,
|
|
17
|
+
UAView
|
|
25
18
|
} from "node-opcua-address-space-base";
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
-
import {
|
|
30
|
-
|
|
19
|
+
import type { ExtraDataTypeManager } from "node-opcua-client-dynamic-extension-object";
|
|
20
|
+
import type { NodeClass, QualifiedNameLike } from "node-opcua-data-model";
|
|
21
|
+
import type { ExtensionObject } from "node-opcua-extension-object";
|
|
22
|
+
import type { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
23
|
+
import type { NumericRange } from "node-opcua-numeric-range";
|
|
24
|
+
import type { CallbackT } from "node-opcua-status-code";
|
|
25
|
+
import type { HistoryReadResult, ModelChangeStructureDataType, ReadProcessedDetails } from "node-opcua-types";
|
|
26
|
+
import type { ExtensionObjectConstructorFuncWithSchema } from "../source/interfaces/extension_object_constructor";
|
|
27
|
+
import type { UARootFolder } from "../source/ua_root_folder";
|
|
28
|
+
|
|
29
|
+
import type { NamespacePrivate } from "./namespace_private";
|
|
31
30
|
|
|
32
31
|
export interface AddressSpacePrivate extends IAddressSpace {
|
|
33
32
|
rootFolder: UARootFolder;
|