node-opcua-address-space 2.170.1 → 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.js +4 -1
- package/dist/source/ua_interface.js.map +1 -1
- package/dist/source/ua_root_folder.d.ts +1 -1
- package/dist/source/ua_two_state_variable_ex.d.ts +5 -5
- package/dist/src/_instantiate_helpers.js +1 -1
- package/dist/src/_instantiate_helpers.js.map +1 -1
- package/dist/src/_mandatory_child_or_requested_optional_filter.d.ts +2 -2
- package/dist/src/_mandatory_child_or_requested_optional_filter.js +7 -8
- package/dist/src/_mandatory_child_or_requested_optional_filter.js.map +1 -1
- package/dist/src/address_space.js +4 -4
- package/dist/src/address_space.js.map +1 -1
- package/dist/src/address_space_change_event_tools.d.ts +3 -3
- package/dist/src/address_space_change_event_tools.js +8 -10
- package/dist/src/address_space_change_event_tools.js.map +1 -1
- package/dist/src/address_space_private.d.ts +11 -11
- package/dist/src/address_space_private.js +3 -0
- package/dist/src/address_space_private.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +6 -6
- package/dist/src/alarms_and_conditions/condition_info_impl.js +6 -15
- package/dist/src/alarms_and_conditions/condition_info_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +10 -10
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +76 -47
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +8 -5
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +15 -9
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -1
- package/dist/src/alarms_and_conditions/index.d.ts +3 -3
- package/dist/src/alarms_and_conditions/index.js +3 -3
- package/dist/src/alarms_and_conditions/index.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +21 -14
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +26 -21
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +6 -7
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +30 -28
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +9 -11
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js +10 -10
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +3 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +6 -5
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +16 -42
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +100 -82
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +12 -7
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +9 -8
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +18 -18
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +16 -18
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +4 -4
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +2 -2
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +10 -9
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +20 -19
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +2 -4
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +12 -38
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +50 -65
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +15 -17
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +15 -11
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +22 -15
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +35 -24
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +15 -16
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +19 -14
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +4 -4
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/apply_condition_refresh.d.ts +4 -4
- package/dist/src/apply_condition_refresh.js +1 -1
- package/dist/src/apply_condition_refresh.js.map +1 -1
- package/dist/src/base_node_impl.d.ts +4 -6
- package/dist/src/base_node_impl.js +3 -3
- package/dist/src/base_node_impl.js.map +1 -1
- package/dist/src/base_node_private.js +1 -2
- package/dist/src/base_node_private.js.map +1 -1
- package/dist/src/check_value_rank_compatibility.js +10 -6
- package/dist/src/check_value_rank_compatibility.js.map +1 -1
- package/dist/src/data_access/add_dataItem_stuff.d.ts +1 -1
- package/dist/src/data_access/add_dataItem_stuff.js +2 -22
- package/dist/src/data_access/add_dataItem_stuff.js.map +1 -1
- package/dist/src/data_access/adjust_datavalue_status_code.d.ts +6 -3
- package/dist/src/data_access/adjust_datavalue_status_code.js +3 -3
- package/dist/src/data_access/adjust_datavalue_status_code.js.map +1 -1
- package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +13 -11
- package/dist/src/data_access/ua_multistate_discrete_impl.js +28 -23
- package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +19 -23
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js +31 -31
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +10 -16
- package/dist/src/data_access/ua_two_state_discrete_impl.js +18 -14
- package/dist/src/data_access/ua_two_state_discrete_impl.js.map +1 -1
- package/dist/src/event_data.js.map +1 -1
- package/dist/src/extension_object_array_node.d.ts +5 -2
- package/dist/src/extension_object_array_node.js +21 -24
- package/dist/src/extension_object_array_node.js.map +1 -1
- package/dist/src/get_basic_datatype.d.ts +2 -2
- package/dist/src/get_basic_datatype.js.map +1 -1
- package/dist/src/historical_access/address_space_historical_data_node.d.ts +3 -3
- package/dist/src/historical_access/address_space_historical_data_node.js +24 -17
- package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -1
- package/dist/src/idx_iterator.js +1 -1
- package/dist/src/idx_iterator.js.map +1 -1
- package/dist/src/index_current.d.ts +31 -31
- package/dist/src/index_current.js +45 -45
- package/dist/src/index_current.js.map +1 -1
- package/dist/src/namespace_impl.d.ts +4 -3
- package/dist/src/namespace_impl.js +17 -14
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/namespace_private.js.map +1 -1
- package/dist/src/nodeid_manager.d.ts +3 -3
- package/dist/src/nodeid_manager.js +19 -16
- package/dist/src/nodeid_manager.js.map +1 -1
- package/dist/src/nodeset_tools/adjust_namespace_array.d.ts +1 -1
- package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +2 -2
- package/dist/src/nodeset_tools/construct_namespace_dependency.js +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 +7 -5
- package/dist/src/ua_object_impl.js +13 -11
- package/dist/src/ua_object_impl.js.map +1 -1
- package/dist/src/ua_object_type_impl.d.ts +7 -5
- package/dist/src/ua_object_type_impl.js +4 -5
- package/dist/src/ua_object_type_impl.js.map +1 -1
- package/dist/src/ua_reference_type_impl.d.ts +6 -8
- package/dist/src/ua_reference_type_impl.js +16 -14
- package/dist/src/ua_reference_type_impl.js.map +1 -1
- package/dist/src/ua_variable_impl.d.ts +43 -45
- package/dist/src/ua_variable_impl.js +99 -83
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/dist/src/ua_variable_impl_ext_obj.d.ts +3 -3
- package/dist/src/ua_variable_impl_ext_obj.js +37 -29
- package/dist/src/ua_variable_impl_ext_obj.js.map +1 -1
- package/dist/src/ua_variable_type_impl.d.ts +11 -11
- package/dist/src/ua_variable_type_impl.js +13 -21
- package/dist/src/ua_variable_type_impl.js.map +1 -1
- package/dist/src/ua_view_impl.d.ts +3 -4
- package/dist/src/ua_view_impl.js +5 -6
- package/dist/src/ua_view_impl.js.map +1 -1
- package/dist/src/validate_data_type_correctness.d.ts +2 -2
- package/dist/src/validate_data_type_correctness.js +12 -3
- package/dist/src/validate_data_type_correctness.js.map +1 -1
- package/dist/tsconfig_base.tsbuildinfo +1 -1
- package/distHelpers/add_event_generator_object.d.ts +5 -2
- package/distHelpers/add_event_generator_object.js +2 -2
- package/distHelpers/add_event_generator_object.js.map +1 -1
- package/distHelpers/alarms_and_conditions_demo.d.ts +1 -1
- package/distHelpers/alarms_and_conditions_demo.js +4 -6
- package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
- package/distHelpers/assertHasMatchingReference.d.ts +1 -1
- package/distHelpers/assertHasMatchingReference.js +2 -2
- package/distHelpers/assertHasMatchingReference.js.map +1 -1
- package/distHelpers/boiler_system.d.ts +6 -3
- package/distHelpers/boiler_system.js +44 -42
- package/distHelpers/boiler_system.js.map +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.d.ts +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.js +25 -27
- package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -1
- package/distHelpers/get_address_space_fixture.js +1 -1
- package/distHelpers/get_address_space_fixture.js.map +1 -1
- package/distHelpers/mock_session.d.ts +7 -7
- package/distHelpers/mock_session.js +4 -4
- package/distHelpers/mock_session.js.map +1 -1
- package/distNodeJS/generate_address_space.d.ts +2 -2
- package/distNodeJS/generate_address_space.js +2 -2
- package/distNodeJS/generate_address_space.js.map +1 -1
- package/package.json +36 -36
- package/source/address_space_ts.ts +29 -30
- package/source/continuation_points/continuation_point_manager.ts +8 -7
- package/source/helpers/adjust_browse_direction.ts +1 -1
- package/source/helpers/argument_list.ts +37 -25
- package/source/helpers/call_helpers.ts +10 -15
- package/source/helpers/coerce_enum_value.ts +4 -4
- package/source/helpers/dump_tools.ts +6 -11
- package/source/helpers/ensure_secure_access.ts +2 -2
- package/source/helpers/make_optionals_map.ts +3 -10
- package/source/helpers/multiform_func.ts +1 -1
- package/source/helpers/resolve_opaque_on_address_space.ts +2 -2
- package/source/index.ts +44 -54
- package/source/interfaces/alarms_and_conditions/condition_info_i.ts +3 -4
- package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +13 -13
- package/source/interfaces/alarms_and_conditions/deviation_stuff.ts +8 -10
- package/source/interfaces/alarms_and_conditions/install_setpoint_options.ts +4 -5
- package/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +4 -6
- package/source/interfaces/alarms_and_conditions/instantiate_condition_options.ts +3 -3
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +6 -3
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +11 -11
- package/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +11 -25
- package/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +16 -13
- package/source/interfaces/alarms_and_conditions/ua_base_event_ex.ts +12 -0
- package/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +5 -5
- package/source/interfaces/alarms_and_conditions/ua_condition_ex.ts +30 -54
- package/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +3 -34
- package/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +18 -22
- package/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +8 -15
- package/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +4 -7
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +5 -6
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +3 -3
- package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +9 -16
- package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +5 -8
- package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +5 -5
- package/source/interfaces/data_access/ua_y_array_item_ex.ts +3 -3
- package/source/interfaces/extension_object_constructor.ts +3 -4
- package/source/interfaces/i_condition_variable_type_setter_options.ts +1 -3
- package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +3 -3
- package/source/interfaces/state_machine/ua_finite_state_machine_type.ts +2 -2
- package/source/interfaces/state_machine/ua_program_state_machine_type.ts +3 -3
- package/source/interfaces/state_machine/ua_shelved_state_machine_ex.ts +10 -7
- package/source/interfaces/state_machine/ua_state_machine_type.ts +11 -8
- package/source/interfaces/state_machine/ua_transition_ex.ts +2 -2
- package/source/interfaces/ua_subscription_diagnostics_variable_ex.ts +3 -2
- package/source/loader/decode_xml_extension_object.ts +7 -7
- package/source/loader/ensure_datatype_extracted.ts +14 -19
- package/source/loader/generateAddressSpaceRaw.ts +12 -13
- package/source/loader/load_nodeset2.ts +3 -3
- package/source/loader/make_xml_extension_object_parser.ts +55 -39
- package/source/loader/namespace_post_step.ts +3 -4
- package/source/loader/parsers/extension_object_parser.ts +63 -62
- package/source/loader/parsers/localized_text_parser.ts +3 -3
- package/source/loader/parsers/nodeid_parser.ts +2 -3
- package/source/loader/parsers/qualified_name_parser.ts +6 -7
- package/source/loader/parsers/variant_parser.ts +48 -55
- package/source/loader/register_node_promoter.ts +2 -2
- package/source/namespace.ts +4 -4
- package/source/namespace_alarm_and_condition.ts +22 -22
- package/source/namespace_data_access.ts +12 -13
- package/source/namespace_machine_state.ts +10 -5
- package/source/pseudo_session.ts +53 -50
- package/source/session_context.ts +1 -1
- package/source/set_namespace_meta_data.ts +3 -3
- package/source/ua_addin.ts +10 -11
- package/source/ua_interface.ts +10 -7
- package/source/ua_root_folder.ts +1 -1
- package/source/ua_two_state_variable_ex.ts +5 -5
- package/source_nodejs/generate_address_space.ts +5 -9
- package/src/_instantiate_helpers.ts +26 -16
- package/src/_mandatory_child_or_requested_optional_filter.ts +16 -15
- package/src/address_space.ts +23 -31
- package/src/address_space_change_event_tools.ts +25 -30
- package/src/address_space_private.ts +20 -21
- package/src/alarms_and_conditions/condition.ts +0 -2
- package/src/alarms_and_conditions/condition_info_impl.ts +11 -19
- package/src/alarms_and_conditions/condition_snapshot_impl.ts +106 -82
- package/src/alarms_and_conditions/deviation_alarm_helper.ts +20 -15
- package/src/alarms_and_conditions/index.ts +3 -3
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +44 -32
- package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +35 -34
- package/src/alarms_and_conditions/ua_base_event_impl.ts +15 -19
- package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +6 -2
- package/src/alarms_and_conditions/ua_condition_impl.ts +140 -130
- package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +20 -12
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +40 -43
- package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +7 -7
- package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +28 -30
- package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +3 -6
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +59 -90
- package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +31 -27
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +57 -36
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +31 -27
- package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +6 -6
- package/src/apply_condition_refresh.ts +7 -8
- package/src/base_node_impl.ts +63 -44
- package/src/base_node_private.ts +12 -4
- package/src/check_value_rank_compatibility.ts +18 -14
- package/src/data_access/add_dataItem_stuff.ts +3 -4
- package/src/data_access/adjust_datavalue_status_code.ts +7 -7
- package/src/data_access/ua_multistate_discrete_impl.ts +44 -28
- package/src/data_access/ua_multistate_value_discrete_impl.ts +77 -66
- package/src/data_access/ua_two_state_discrete_impl.ts +29 -36
- package/src/event_data.ts +53 -53
- package/src/extension_object_array_node.ts +27 -28
- package/src/get_basic_datatype.ts +4 -5
- package/src/historical_access/address_space_historical_data_node.ts +65 -50
- package/src/idx_iterator.ts +4 -12
- package/src/index_current.ts +33 -45
- package/src/namespace_impl.ts +75 -62
- package/src/namespace_private.ts +2 -8
- package/src/nodeid_manager.ts +30 -27
- package/src/nodeset_tools/adjust_namespace_array.ts +1 -1
- package/src/nodeset_tools/construct_namespace_dependency.ts +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 +38 -33
- package/src/ua_object_type_impl.ts +22 -22
- package/src/ua_reference_type_impl.ts +19 -19
- package/src/ua_variable_impl.ts +240 -220
- package/src/ua_variable_impl_ext_obj.ts +63 -50
- package/src/ua_variable_type_impl.ts +43 -49
- package/src/ua_view_impl.ts +5 -5
- package/src/validate_data_type_correctness.ts +17 -8
package/source/pseudo_session.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
import { promisify } from "node:util";
|
|
6
|
+
import type { ContinuationPoint, IAddressSpace, ISessionContext, UAVariable } from "node-opcua-address-space-base";
|
|
5
7
|
import { assert } from "node-opcua-assert";
|
|
8
|
+
import { randomGuid } from "node-opcua-basic-types";
|
|
9
|
+
import { AttributeIds, NodeClass } from "node-opcua-data-model";
|
|
6
10
|
import { DataValue } from "node-opcua-data-value";
|
|
7
11
|
import { make_errorLog } from "node-opcua-debug";
|
|
8
|
-
import { NodeId,
|
|
12
|
+
import { NodeId, NodeIdType, resolveNodeId } from "node-opcua-nodeid";
|
|
9
13
|
import {
|
|
10
|
-
ArgumentDefinition,
|
|
11
|
-
BrowseDescriptionLike,
|
|
12
|
-
CallMethodRequestLike,
|
|
14
|
+
type ArgumentDefinition,
|
|
15
|
+
type BrowseDescriptionLike,
|
|
16
|
+
type CallMethodRequestLike,
|
|
13
17
|
getArgumentDefinitionHelper,
|
|
14
|
-
IBasicSession,
|
|
15
|
-
MethodId,
|
|
16
|
-
ResponseCallback
|
|
18
|
+
type IBasicSession,
|
|
19
|
+
type MethodId,
|
|
20
|
+
type ResponseCallback
|
|
17
21
|
} from "node-opcua-pseudo-session";
|
|
18
22
|
import { BrowseDescription, BrowseResult } from "node-opcua-service-browse";
|
|
19
|
-
import { CallMethodRequest, CallMethodResult
|
|
20
|
-
import { BrowsePath, BrowsePathResult } from "node-opcua-service-translate-browse-path";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { WriteValueOptions, ReadValueIdOptions, BrowseDescriptionOptions } from "node-opcua-types";
|
|
24
|
-
import { randomGuid } from "node-opcua-basic-types";
|
|
25
|
-
|
|
26
|
-
import { IAddressSpace, UAVariable, ISessionContext, ContinuationPoint } from "node-opcua-address-space-base";
|
|
23
|
+
import { CallMethodRequest, CallMethodResult } from "node-opcua-service-call";
|
|
24
|
+
import type { BrowsePath, BrowsePathResult } from "node-opcua-service-translate-browse-path";
|
|
25
|
+
import { type StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
26
|
+
import type { BrowseDescriptionOptions, ReadValueIdOptions, WriteValueOptions } from "node-opcua-types";
|
|
27
27
|
|
|
28
28
|
import { ContinuationPointManager } from "./continuation_points/continuation_point_manager";
|
|
29
29
|
import { callMethodHelper } from "./helpers/call_helpers";
|
|
@@ -57,10 +57,10 @@ export function innerBrowse(
|
|
|
57
57
|
): void {
|
|
58
58
|
engine.browseAll(nodesToBrowse, (err, results) => {
|
|
59
59
|
if (err || !results) {
|
|
60
|
-
return callback
|
|
60
|
+
return callback?.(err);
|
|
61
61
|
}
|
|
62
62
|
// handle continuation points
|
|
63
|
-
results = results.map((result: BrowseResult,
|
|
63
|
+
results = results.map((result: BrowseResult, _index) => {
|
|
64
64
|
assert(!result.continuationPoint);
|
|
65
65
|
// c8 ignore next
|
|
66
66
|
if (!engine.continuationPointManager) {
|
|
@@ -86,7 +86,7 @@ export function innerBrowse(
|
|
|
86
86
|
references: values
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
|
-
callback
|
|
89
|
+
callback?.(null, results);
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -100,7 +100,7 @@ export function innerBrowseNext(
|
|
|
100
100
|
callback?: ResponseCallback<BrowseResult[]>
|
|
101
101
|
): void {
|
|
102
102
|
const results = continuationPoints
|
|
103
|
-
.map((continuationPoint: ContinuationPoint,
|
|
103
|
+
.map((continuationPoint: ContinuationPoint, _index: number) => {
|
|
104
104
|
return engine.continuationPointManager.getNextReferences(0, {
|
|
105
105
|
continuationPoint,
|
|
106
106
|
releaseContinuationPoints
|
|
@@ -114,7 +114,7 @@ export function innerBrowseNext(
|
|
|
114
114
|
references: r.values
|
|
115
115
|
})
|
|
116
116
|
);
|
|
117
|
-
callback
|
|
117
|
+
callback?.(null, results);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
const $addressSpace = Symbol("addressSpace");
|
|
@@ -154,7 +154,7 @@ export class PseudoSession implements IBasicSession {
|
|
|
154
154
|
const isArray = Array.isArray(nodesToBrowse);
|
|
155
155
|
if (!isArray) {
|
|
156
156
|
return this.browse([nodesToBrowse as BrowseDescriptionLike], (err, results) => {
|
|
157
|
-
return callback
|
|
157
|
+
return callback?.(err, results ? results[0] : undefined);
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
160
|
const browseAll = (nodesToBrowse: BrowseDescriptionOptions[], callack: ResponseCallback<BrowseResult[]>) => {
|
|
@@ -166,7 +166,7 @@ export class PseudoSession implements IBasicSession {
|
|
|
166
166
|
const r = this[$addressSpace].browseSingleNode(nodeId, _browseDescription, this[$context]);
|
|
167
167
|
results.push(r);
|
|
168
168
|
}
|
|
169
|
-
callack
|
|
169
|
+
callack?.(null, results);
|
|
170
170
|
};
|
|
171
171
|
|
|
172
172
|
setImmediate(() => {
|
|
@@ -202,8 +202,8 @@ export class PseudoSession implements IBasicSession {
|
|
|
202
202
|
return new DataValue({ statusCode: StatusCodes.BadNodeIdUnknown });
|
|
203
203
|
}
|
|
204
204
|
// refresh the variable value if the attribute to read is the Value attribute
|
|
205
|
-
if (obj.nodeClass === NodeClass.Variable && nodeToRead.attributeId
|
|
206
|
-
|
|
205
|
+
if (obj.nodeClass === NodeClass.Variable && nodeToRead.attributeId === AttributeIds.Value) {
|
|
206
|
+
return await (obj as UAVariable).readValueAsync(context);
|
|
207
207
|
}
|
|
208
208
|
assert(!!nodeToRead.nodeId, "expecting a nodeId");
|
|
209
209
|
assert(!!nodeToRead.attributeId, "expecting a attributeId");
|
|
@@ -214,8 +214,8 @@ export class PseudoSession implements IBasicSession {
|
|
|
214
214
|
return dataValue;
|
|
215
215
|
};
|
|
216
216
|
Promise.all(_nodesToRead.map(async (nodeToRead: ReadValueIdOptions) => await readV(nodeToRead)))
|
|
217
|
-
.then((dataValues) => callback
|
|
218
|
-
.catch((err) => callback
|
|
217
|
+
.then((dataValues) => callback?.(null, isArray ? dataValues : dataValues[0]))
|
|
218
|
+
.catch((err) => callback?.(err));
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
public browseNext(
|
|
@@ -242,9 +242,9 @@ export class PseudoSession implements IBasicSession {
|
|
|
242
242
|
if (continuationPoints instanceof Buffer) {
|
|
243
243
|
return this.browseNext([continuationPoints], releaseContinuationPoints, (err, _results) => {
|
|
244
244
|
if (err) {
|
|
245
|
-
return callback
|
|
245
|
+
return callback?.(err);
|
|
246
246
|
}
|
|
247
|
-
callback
|
|
247
|
+
callback?.(null, _results?.[0]);
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
250
|
innerBrowseNext(
|
|
@@ -266,23 +266,25 @@ export class PseudoSession implements IBasicSession {
|
|
|
266
266
|
if (!isArray) {
|
|
267
267
|
methodsToCall = [methodsToCall as CallMethodRequestLike];
|
|
268
268
|
}
|
|
269
|
-
Promise.all(
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
269
|
+
Promise.all(
|
|
270
|
+
(methodsToCall as CallMethodRequestLike[]).map(async (methodToCall) => {
|
|
271
|
+
const callMethodRequest = new CallMethodRequest(methodToCall);
|
|
272
|
+
try {
|
|
273
|
+
const result = await callMethodHelper(this[$context], this[$addressSpace], callMethodRequest);
|
|
274
|
+
return new CallMethodResult(result);
|
|
275
|
+
} catch (err) {
|
|
276
|
+
errorLog("Internal Error = ", err);
|
|
277
|
+
return new CallMethodResult({
|
|
278
|
+
statusCode: StatusCodes.BadInternalError
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
})
|
|
282
|
+
)
|
|
281
283
|
.then((callMethodResults) => {
|
|
282
|
-
callback
|
|
284
|
+
callback?.(null, isArray ? callMethodResults : callMethodResults[0]);
|
|
283
285
|
})
|
|
284
286
|
.catch((err) => {
|
|
285
|
-
callback
|
|
287
|
+
callback?.(err);
|
|
286
288
|
});
|
|
287
289
|
}
|
|
288
290
|
|
|
@@ -291,10 +293,10 @@ export class PseudoSession implements IBasicSession {
|
|
|
291
293
|
public getArgumentDefinition(methodId: MethodId, callback?: ResponseCallback<ArgumentDefinition>): any {
|
|
292
294
|
getArgumentDefinitionHelper(this, methodId)
|
|
293
295
|
.then((result) => {
|
|
294
|
-
callback
|
|
296
|
+
callback?.(null, result);
|
|
295
297
|
})
|
|
296
298
|
.catch((err: Error) => {
|
|
297
|
-
callback
|
|
299
|
+
callback?.(err);
|
|
298
300
|
});
|
|
299
301
|
}
|
|
300
302
|
|
|
@@ -310,14 +312,14 @@ export class PseudoSession implements IBasicSession {
|
|
|
310
312
|
const browsePathResults = (browsePaths as BrowsePath[]).map((browsePath: BrowsePath) => {
|
|
311
313
|
return this[$addressSpace].browsePath(browsePath);
|
|
312
314
|
});
|
|
313
|
-
callback
|
|
315
|
+
callback?.(null, isArray ? browsePathResults : browsePathResults[0]);
|
|
314
316
|
}
|
|
315
317
|
public write(nodeToWrite: WriteValueOptions, callback: ResponseCallback<StatusCode>): void;
|
|
316
318
|
public write(nodesToWrite: WriteValueOptions[], callback: ResponseCallback<StatusCode[]>): void;
|
|
317
319
|
public write(nodeToWrite: WriteValueOptions): Promise<StatusCode>;
|
|
318
320
|
public write(nodesToWrite: WriteValueOptions[]): Promise<StatusCode[]>;
|
|
319
321
|
public write(nodesToWrite: WriteValueOptions[] | WriteValueOptions, callback?: ResponseCallback<any>): any {
|
|
320
|
-
const isArray = nodesToWrite
|
|
322
|
+
const isArray = Array.isArray(nodesToWrite);
|
|
321
323
|
const _nodesToWrite: WriteValueOptions[] = !isArray ? [nodesToWrite] : nodesToWrite;
|
|
322
324
|
const context = this[$context];
|
|
323
325
|
setImmediate(() => {
|
|
@@ -332,16 +334,16 @@ export class PseudoSession implements IBasicSession {
|
|
|
332
334
|
}
|
|
333
335
|
try {
|
|
334
336
|
return promisify(obj.writeAttribute).call(obj, context, nodeToWrite);
|
|
335
|
-
} catch (
|
|
337
|
+
} catch (_err) {
|
|
336
338
|
return StatusCodes.BadInternalError;
|
|
337
339
|
}
|
|
338
340
|
});
|
|
339
341
|
Promise.all(statusCodesPromises)
|
|
340
342
|
.then((statusCodes) => {
|
|
341
|
-
callback
|
|
343
|
+
callback?.(null, isArray ? statusCodes : statusCodes[0]);
|
|
342
344
|
})
|
|
343
345
|
.catch((err) => {
|
|
344
|
-
callback
|
|
346
|
+
callback?.(err);
|
|
345
347
|
});
|
|
346
348
|
});
|
|
347
349
|
}
|
|
@@ -350,6 +352,7 @@ export class PseudoSession implements IBasicSession {
|
|
|
350
352
|
// tslint:disable:no-var-requires
|
|
351
353
|
// tslint:disable:max-line-length
|
|
352
354
|
import { withCallback } from "thenify-ex";
|
|
355
|
+
|
|
353
356
|
PseudoSession.prototype.read = withCallback(PseudoSession.prototype.read);
|
|
354
357
|
PseudoSession.prototype.write = withCallback(PseudoSession.prototype.write);
|
|
355
358
|
PseudoSession.prototype.browse = withCallback(PseudoSession.prototype.browse);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { INamespace, UAObject, UAVariable } from "node-opcua-address-space-base";
|
|
2
|
-
import { UANamespaceMetadata } from "node-opcua-nodeset-ua";
|
|
1
|
+
import type { INamespace, UAObject, UAVariable } from "node-opcua-address-space-base";
|
|
2
|
+
import type { UANamespaceMetadata } from "node-opcua-nodeset-ua";
|
|
3
3
|
import { DataType, Variant, VariantArrayType } from "node-opcua-variant";
|
|
4
4
|
|
|
5
5
|
function specialEncode(namespaceUri: string): string {
|
|
@@ -27,7 +27,7 @@ export function setNamespaceMetaData(namespace: INamespace): void {
|
|
|
27
27
|
|
|
28
28
|
/* c8 ignore next */
|
|
29
29
|
if (existingMetaData) {
|
|
30
|
-
throw new Error(
|
|
30
|
+
throw new Error(`INamespace meta data already exists for ${deriveName}`);
|
|
31
31
|
}
|
|
32
32
|
const metaData = namespaceMetadataType.instantiate({
|
|
33
33
|
browseName: deriveName,
|
package/source/ua_addin.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { INamespace, ModellingRuleType, UAObject, UAObjectType, UAVariableT } from "node-opcua-address-space-base";
|
|
1
|
+
import type { INamespace, ModellingRuleType, UAObject, UAObjectType, UAVariableT } from "node-opcua-address-space-base";
|
|
2
2
|
import { DataType } from "node-opcua-basic-types";
|
|
3
|
-
import { coerceQualifiedName, QualifiedName, QualifiedNameLike } from "node-opcua-data-model";
|
|
4
|
-
import { NodeIdLike } from "node-opcua-nodeid";
|
|
3
|
+
import { coerceQualifiedName, type QualifiedName, type QualifiedNameLike } from "node-opcua-data-model";
|
|
4
|
+
import type { NodeIdLike } from "node-opcua-nodeid";
|
|
5
5
|
|
|
6
6
|
export interface InstantiateAddInOptions {
|
|
7
7
|
defaultName?: QualifiedNameLike;
|
|
@@ -14,15 +14,14 @@ export interface InstantiateAddInOptions {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export function instantiateAddIn(objectType: UAObjectType, options: InstantiateAddInOptions): UAObject {
|
|
17
|
-
|
|
18
|
-
let defaultName = options.defaultName;
|
|
17
|
+
const defaultName = options.defaultName;
|
|
19
18
|
// check that objectType has he shape of an addInd
|
|
20
19
|
const defaultInstanceBrowseName = objectType.getPropertyByName("DefaultInstanceBrowseName");
|
|
21
20
|
if (!defaultInstanceBrowseName) {
|
|
22
21
|
throw new Error("objectType must have a DefaultInstanceBrowseName property");
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
const browseName = coerceQualifiedName(defaultName || defaultInstanceBrowseName.readValue().value.value as QualifiedName);
|
|
24
|
+
const browseName = coerceQualifiedName(defaultName || (defaultInstanceBrowseName.readValue().value.value as QualifiedName));
|
|
26
25
|
const addIn = objectType.instantiate({
|
|
27
26
|
namespace: options.namespace || objectType.namespace,
|
|
28
27
|
browseName: browseName,
|
|
@@ -34,9 +33,10 @@ export function instantiateAddIn(objectType: UAObjectType, options: InstantiateA
|
|
|
34
33
|
return addIn;
|
|
35
34
|
}
|
|
36
35
|
|
|
37
|
-
export function addDefaultInstanceBrowseName(
|
|
38
|
-
:
|
|
39
|
-
|
|
36
|
+
export function addDefaultInstanceBrowseName(
|
|
37
|
+
objectType: UAObjectType,
|
|
38
|
+
defaultBrowseName: QualifiedName | string
|
|
39
|
+
): UAVariableT<QualifiedName, DataType.QualifiedName> {
|
|
40
40
|
const namespace1 = objectType.namespace;
|
|
41
41
|
if (typeof defaultBrowseName === "string") {
|
|
42
42
|
defaultBrowseName = coerceQualifiedName({ name: defaultBrowseName, namespaceIndex: namespace1.index });
|
|
@@ -54,5 +54,4 @@ export function addDefaultInstanceBrowseName(objectType: UAObjectType, defaultBr
|
|
|
54
54
|
modellingRule: null // DefaultInstanceBrowseName must have no ModellingRule
|
|
55
55
|
});
|
|
56
56
|
return uaVaraible as UAVariableT<QualifiedName, DataType.QualifiedName>;
|
|
57
|
-
|
|
58
|
-
}
|
|
57
|
+
}
|
package/source/ua_interface.ts
CHANGED
|
@@ -3,12 +3,11 @@ import { NodeClass } from "node-opcua-types";
|
|
|
3
3
|
import { initialize_properties_and_components } from "../src/_instantiate_helpers";
|
|
4
4
|
|
|
5
5
|
export function implementInterface(
|
|
6
|
-
uaNode: UAObject | UAObjectType | UAVariable | UAVariableType,
|
|
6
|
+
uaNode: UAObject | UAObjectType | UAVariable | UAVariableType,
|
|
7
7
|
interfaceType: UAObjectType,
|
|
8
8
|
optionals?: string[],
|
|
9
9
|
isModellingType?: boolean
|
|
10
10
|
) {
|
|
11
|
-
|
|
12
11
|
optionals = optionals || [];
|
|
13
12
|
|
|
14
13
|
const addressSpace = uaNode.addressSpace;
|
|
@@ -17,15 +16,19 @@ export function implementInterface(
|
|
|
17
16
|
throw new Error("cannot find BaseInterfaceType");
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
isModellingType =
|
|
19
|
+
isModellingType =
|
|
20
|
+
isModellingType === undefined
|
|
21
|
+
? uaNode.nodeClass === NodeClass.ObjectType || uaNode.nodeClass === NodeClass.VariableType
|
|
22
|
+
: isModellingType;
|
|
21
23
|
|
|
22
24
|
const copyAlsoModellingRules = isModellingType;
|
|
23
25
|
const copyAlsoAllOptionals = isModellingType;
|
|
24
26
|
initialize_properties_and_components(
|
|
25
|
-
uaNode as UAObject | UAVariable,
|
|
26
|
-
topMost,
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
uaNode as UAObject | UAVariable,
|
|
28
|
+
topMost,
|
|
29
|
+
interfaceType,
|
|
30
|
+
copyAlsoModellingRules,
|
|
31
|
+
copyAlsoAllOptionals,
|
|
29
32
|
optionals
|
|
30
33
|
);
|
|
31
34
|
uaNode.addReference({
|
package/source/ua_root_folder.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space
|
|
3
3
|
*/
|
|
4
|
-
import { UAVariableT } from "node-opcua-address-space-base";
|
|
5
|
-
import { LocalizedText } from "node-opcua-data-model";
|
|
6
|
-
import { UAStateVariable, UATwoStateVariable_Base } from "node-opcua-nodeset-ua";
|
|
7
|
-
import { DataType } from "node-opcua-variant";
|
|
8
|
-
import { ISetStateOptions } from "./interfaces/i_set_state_options";
|
|
4
|
+
import type { UAVariableT } from "node-opcua-address-space-base";
|
|
5
|
+
import type { LocalizedText } from "node-opcua-data-model";
|
|
6
|
+
import type { UAStateVariable, UATwoStateVariable_Base } from "node-opcua-nodeset-ua";
|
|
7
|
+
import type { DataType } from "node-opcua-variant";
|
|
8
|
+
import type { ISetStateOptions } from "./interfaces/i_set_state_options";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @see https://reference.opcfoundation.org/v104/Core/docs/Part9/5.2/
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
|
-
|
|
2
|
+
import type { IAddressSpace } from "node-opcua-address-space-base";
|
|
3
3
|
import { checkDebugFlag, make_debugLog, make_errorLog } from "node-opcua-debug";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { generateAddressSpaceRaw } from "..";
|
|
7
|
-
import { NodeSetLoaderOptions } from "..";
|
|
4
|
+
import { generateAddressSpaceRaw, type NodeSetLoaderOptions } from "..";
|
|
8
5
|
|
|
9
|
-
const
|
|
6
|
+
const _doDebug = checkDebugFlag(__filename);
|
|
10
7
|
const debugLog = make_debugLog(__filename);
|
|
11
8
|
const errorLog = make_errorLog(__filename);
|
|
12
9
|
|
|
13
10
|
export async function readNodeSet2XmlFile(xmlFile: string): Promise<string> {
|
|
14
11
|
// c8 ignore next
|
|
15
12
|
if (!fs.existsSync(xmlFile)) {
|
|
16
|
-
const msg =
|
|
13
|
+
const msg = `[NODE-OPCUA-E02] generateAddressSpace : cannot find nodeset2 xml file at ${xmlFile}`;
|
|
17
14
|
errorLog(msg);
|
|
18
15
|
throw new Error(msg);
|
|
19
16
|
}
|
|
@@ -26,7 +23,6 @@ export async function generateAddressSpace(
|
|
|
26
23
|
addressSpace: IAddressSpace,
|
|
27
24
|
xmlFiles: string | string[],
|
|
28
25
|
options?: NodeSetLoaderOptions
|
|
29
|
-
): Promise<void>
|
|
30
|
-
{
|
|
26
|
+
): Promise<void> {
|
|
31
27
|
await generateAddressSpaceRaw(addressSpace, xmlFiles, readNodeSet2XmlFile, options || {});
|
|
32
28
|
}
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
type UAObject,
|
|
13
13
|
type UAObjectType,
|
|
14
14
|
type UAVariable,
|
|
15
|
-
type UAVariableType
|
|
15
|
+
type UAVariableType
|
|
16
16
|
} from "node-opcua-address-space-base";
|
|
17
|
-
import {
|
|
17
|
+
import { BrowseDirection } from "node-opcua-data-model";
|
|
18
|
+
import { checkDebugFlag, make_errorLog, make_warningLog } from "node-opcua-debug";
|
|
18
19
|
import { resolveNodeId, sameNodeId } from "node-opcua-nodeid";
|
|
19
20
|
import { makeOptionalsMap, type OptionalMap } from "../source/helpers/make_optionals_map";
|
|
20
21
|
import { MandatoryChildOrRequestedOptionalFilter } from "./_mandatory_child_or_requested_optional_filter";
|
|
21
22
|
import { _clone_hierarchical_references } from "./base_node_private";
|
|
22
|
-
import { BrowseDirection } from "node-opcua-data-model";
|
|
23
23
|
|
|
24
24
|
// const debugLog = make_debugLog("INSTANTIATE");
|
|
25
25
|
// const doDebug = checkDebugFlag("INSTANTIATE");
|
|
@@ -86,7 +86,7 @@ function _initialize_properties_and_components<B extends UAObject | UAVariable |
|
|
|
86
86
|
),
|
|
87
87
|
baseTypeDefinition ? baseTypeDefinition.browseName.toString() : "undefined"
|
|
88
88
|
);
|
|
89
|
-
|
|
89
|
+
|
|
90
90
|
// c8 ignore next
|
|
91
91
|
if (!baseTypeDefinition) {
|
|
92
92
|
throw new Error(chalk.red("Cannot find object with nodeId ") + baseTypeDefinitionNodeId);
|
|
@@ -108,10 +108,14 @@ function _initialize_properties_and_components<B extends UAObject | UAVariable |
|
|
|
108
108
|
export function initialize_properties_and_components<
|
|
109
109
|
B extends UAObject | UAVariable | UAMethod,
|
|
110
110
|
T extends UAVariableType | UAObjectType
|
|
111
|
-
>(
|
|
111
|
+
>(
|
|
112
|
+
instance: B,
|
|
113
|
+
topMostType: T,
|
|
114
|
+
nodeType: T,
|
|
112
115
|
copyAlsoModellingRules: boolean,
|
|
113
116
|
copyAlsoAllOptionals: boolean,
|
|
114
|
-
optionals?: string[]
|
|
117
|
+
optionals?: string[]
|
|
118
|
+
): void {
|
|
115
119
|
const extraInfo = new CloneHelper();
|
|
116
120
|
|
|
117
121
|
extraInfo.pushContext({
|
|
@@ -139,7 +143,15 @@ export function initialize_properties_and_components<
|
|
|
139
143
|
);
|
|
140
144
|
|
|
141
145
|
// instantiate optionals from interfaces
|
|
142
|
-
instantiate_interface_children<B>(
|
|
146
|
+
instantiate_interface_children<B>(
|
|
147
|
+
nodeType,
|
|
148
|
+
extraInfo,
|
|
149
|
+
instance,
|
|
150
|
+
copyAlsoModellingRules,
|
|
151
|
+
copyAlsoAllOptionals,
|
|
152
|
+
optionalsMap,
|
|
153
|
+
browseNameMap
|
|
154
|
+
);
|
|
143
155
|
|
|
144
156
|
reconstructFunctionalGroupType(extraInfo);
|
|
145
157
|
|
|
@@ -147,12 +159,12 @@ export function initialize_properties_and_components<
|
|
|
147
159
|
}
|
|
148
160
|
|
|
149
161
|
function instantiate_interface_children<B extends UAObject | UAVariable | UAMethod>(
|
|
150
|
-
nodeType: UAObjectType | UAVariableType,
|
|
151
|
-
extraInfo: CloneHelper,
|
|
152
|
-
instance: B,
|
|
153
|
-
copyAlsoModellingRules: boolean,
|
|
154
|
-
copyAlsoAllOptionals: boolean,
|
|
155
|
-
optionalsMap: OptionalMap,
|
|
162
|
+
nodeType: UAObjectType | UAVariableType,
|
|
163
|
+
extraInfo: CloneHelper,
|
|
164
|
+
instance: B,
|
|
165
|
+
copyAlsoModellingRules: boolean,
|
|
166
|
+
copyAlsoAllOptionals: boolean,
|
|
167
|
+
optionalsMap: OptionalMap,
|
|
156
168
|
browseNameMap: Set<string>
|
|
157
169
|
) {
|
|
158
170
|
const interfaces = nodeType.findReferencesEx(resolveNodeId("HasInterface"), BrowseDirection.Forward);
|
|
@@ -160,8 +172,7 @@ function instantiate_interface_children<B extends UAObject | UAVariable | UAMeth
|
|
|
160
172
|
return;
|
|
161
173
|
}
|
|
162
174
|
for (const reference of interfaces) {
|
|
163
|
-
const interfaceType =
|
|
164
|
-
(reference.node as UAObjectType) || nodeType.addressSpace.findObjectType(reference.nodeId);
|
|
175
|
+
const interfaceType = (reference.node as UAObjectType) || nodeType.addressSpace.findObjectType(reference.nodeId);
|
|
165
176
|
if (!interfaceType) {
|
|
166
177
|
warningLog(" cannot find node ", reference.nodeId.toString());
|
|
167
178
|
continue;
|
|
@@ -187,4 +198,3 @@ function instantiate_interface_children<B extends UAObject | UAVariable | UAMeth
|
|
|
187
198
|
);
|
|
188
199
|
}
|
|
189
200
|
}
|
|
190
|
-
|
|
@@ -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
|
|
|
@@ -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 || (
|
|
80
|
+
return this.copyAlsoAllOptionals || (node.browseName?.name || "") in this.optionalsMap;
|
|
80
81
|
case "OptionalPlaceholder":
|
|
81
82
|
return false; // ignored
|
|
82
83
|
default:
|