node-opcua-address-space 2.170.1 → 2.173.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/source/address_space_ts.d.ts +13 -13
- package/dist/source/address_space_ts.js +4 -0
- package/dist/source/address_space_ts.js.map +1 -1
- package/dist/source/continuation_points/continuation_point_manager.d.ts +6 -3
- package/dist/source/continuation_points/continuation_point_manager.js +4 -4
- package/dist/source/continuation_points/continuation_point_manager.js.map +1 -1
- package/dist/source/helpers/adjust_browse_direction.d.ts +1 -1
- package/dist/source/helpers/argument_list.d.ts +13 -11
- package/dist/source/helpers/argument_list.js +24 -15
- package/dist/source/helpers/argument_list.js.map +1 -1
- package/dist/source/helpers/call_helpers.d.ts +6 -3
- package/dist/source/helpers/call_helpers.js +5 -6
- package/dist/source/helpers/call_helpers.js.map +1 -1
- package/dist/source/helpers/coerce_enum_value.d.ts +2 -2
- package/dist/source/helpers/coerce_enum_value.js +2 -2
- package/dist/source/helpers/coerce_enum_value.js.map +1 -1
- package/dist/source/helpers/dump_tools.d.ts +3 -3
- package/dist/source/helpers/dump_tools.js +2 -2
- package/dist/source/helpers/dump_tools.js.map +1 -1
- package/dist/source/helpers/ensure_secure_access.d.ts +1 -1
- package/dist/source/helpers/ensure_secure_access.js +1 -1
- package/dist/source/helpers/ensure_secure_access.js.map +1 -1
- package/dist/source/helpers/make_optionals_map.js +0 -5
- package/dist/source/helpers/make_optionals_map.js.map +1 -1
- package/dist/source/helpers/multiform_func.d.ts +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.d.ts +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js.map +1 -1
- package/dist/source/index.d.ts +38 -38
- package/dist/source/index.js +53 -54
- package/dist/source/index.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +11 -11
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +6 -6
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +4 -4
- package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +4 -3
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +10 -13
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +11 -11
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.d.ts +11 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +5 -5
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +21 -29
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +3 -7
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +0 -23
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +8 -10
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +4 -6
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +5 -5
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +3 -3
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +7 -7
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +5 -8
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +5 -5
- package/dist/source/interfaces/data_access/ua_y_array_item_ex.d.ts +3 -3
- package/dist/source/interfaces/extension_object_constructor.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +2 -2
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +6 -6
- package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +7 -6
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js +4 -0
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +1 -1
- package/dist/source/interfaces/state_machine/ua_transition_ex.d.ts +2 -2
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +2 -2
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js +3 -0
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -1
- package/dist/source/loader/decode_xml_extension_object.d.ts +4 -4
- package/dist/source/loader/decode_xml_extension_object.js +3 -3
- package/dist/source/loader/decode_xml_extension_object.js.map +1 -1
- package/dist/source/loader/ensure_datatype_extracted.d.ts +2 -2
- package/dist/source/loader/ensure_datatype_extracted.js +5 -5
- package/dist/source/loader/ensure_datatype_extracted.js.map +1 -1
- package/dist/source/loader/generateAddressSpaceRaw.d.ts +3 -3
- package/dist/source/loader/generateAddressSpaceRaw.js +6 -6
- package/dist/source/loader/generateAddressSpaceRaw.js.map +1 -1
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/source/loader/make_xml_extension_object_parser.d.ts +2 -2
- package/dist/source/loader/make_xml_extension_object_parser.js +19 -19
- package/dist/source/loader/make_xml_extension_object_parser.js.map +1 -1
- package/dist/source/loader/namespace_post_step.d.ts +1 -1
- package/dist/source/loader/namespace_post_step.js.map +1 -1
- package/dist/source/loader/parsers/extension_object_parser.d.ts +4 -4
- package/dist/source/loader/parsers/extension_object_parser.js +22 -23
- package/dist/source/loader/parsers/extension_object_parser.js.map +1 -1
- package/dist/source/loader/parsers/localized_text_parser.d.ts +2 -2
- package/dist/source/loader/parsers/localized_text_parser.js.map +1 -1
- package/dist/source/loader/parsers/nodeid_parser.d.ts +1 -1
- package/dist/source/loader/parsers/nodeid_parser.js.map +1 -1
- package/dist/source/loader/parsers/qualified_name_parser.d.ts +3 -3
- package/dist/source/loader/parsers/qualified_name_parser.js.map +1 -1
- package/dist/source/loader/parsers/variant_parser.d.ts +5 -5
- package/dist/source/loader/parsers/variant_parser.js +13 -13
- package/dist/source/loader/parsers/variant_parser.js.map +1 -1
- package/dist/source/loader/register_node_promoter.d.ts +1 -1
- package/dist/source/loader/register_node_promoter.js.map +1 -1
- package/dist/source/namespace.d.ts +4 -4
- package/dist/source/namespace_alarm_and_condition.d.ts +22 -21
- package/dist/source/namespace_data_access.d.ts +11 -11
- package/dist/source/namespace_machine_state.d.ts +4 -4
- package/dist/source/pseudo_session.d.ts +8 -5
- package/dist/source/pseudo_session.js +28 -28
- package/dist/source/pseudo_session.js.map +1 -1
- package/dist/source/session_context.js +1 -1
- package/dist/source/session_context.js.map +1 -1
- package/dist/source/set_namespace_meta_data.d.ts +1 -1
- package/dist/source/set_namespace_meta_data.js +1 -1
- package/dist/source/set_namespace_meta_data.js.map +1 -1
- package/dist/source/ua_addin.d.ts +3 -3
- package/dist/source/ua_addin.js +1 -1
- package/dist/source/ua_addin.js.map +1 -1
- package/dist/source/ua_interface.js +4 -1
- package/dist/source/ua_interface.js.map +1 -1
- package/dist/source/ua_root_folder.d.ts +1 -1
- package/dist/source/ua_two_state_variable_ex.d.ts +5 -5
- package/dist/src/_instantiate_helpers.js +1 -1
- package/dist/src/_instantiate_helpers.js.map +1 -1
- package/dist/src/_mandatory_child_or_requested_optional_filter.d.ts +2 -2
- package/dist/src/_mandatory_child_or_requested_optional_filter.js +7 -8
- package/dist/src/_mandatory_child_or_requested_optional_filter.js.map +1 -1
- package/dist/src/address_space.js +5 -6
- package/dist/src/address_space.js.map +1 -1
- package/dist/src/address_space_change_event_tools.d.ts +3 -3
- package/dist/src/address_space_change_event_tools.js +8 -10
- package/dist/src/address_space_change_event_tools.js.map +1 -1
- package/dist/src/address_space_private.d.ts +11 -11
- package/dist/src/address_space_private.js +3 -0
- package/dist/src/address_space_private.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +6 -6
- package/dist/src/alarms_and_conditions/condition_info_impl.js +6 -15
- package/dist/src/alarms_and_conditions/condition_info_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +10 -10
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +76 -47
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +8 -5
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +15 -9
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -1
- package/dist/src/alarms_and_conditions/index.d.ts +3 -3
- package/dist/src/alarms_and_conditions/index.js +3 -3
- package/dist/src/alarms_and_conditions/index.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +21 -14
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +26 -21
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +6 -7
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +30 -28
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +9 -11
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js +10 -10
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +3 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +6 -5
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +16 -42
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +100 -82
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +12 -7
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +9 -8
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +18 -18
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +16 -18
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +4 -4
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +2 -2
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +10 -9
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +20 -19
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +2 -4
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +12 -38
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +50 -65
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +15 -17
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +15 -11
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +22 -15
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +35 -24
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +15 -16
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +19 -14
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +4 -4
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/apply_condition_refresh.d.ts +4 -4
- package/dist/src/apply_condition_refresh.js +1 -1
- package/dist/src/apply_condition_refresh.js.map +1 -1
- package/dist/src/base_node_impl.d.ts +4 -6
- package/dist/src/base_node_impl.js +3 -3
- package/dist/src/base_node_impl.js.map +1 -1
- package/dist/src/base_node_private.js +1 -2
- package/dist/src/base_node_private.js.map +1 -1
- package/dist/src/check_value_rank_compatibility.js +10 -6
- package/dist/src/check_value_rank_compatibility.js.map +1 -1
- package/dist/src/data_access/add_dataItem_stuff.d.ts +1 -1
- package/dist/src/data_access/add_dataItem_stuff.js +2 -22
- package/dist/src/data_access/add_dataItem_stuff.js.map +1 -1
- package/dist/src/data_access/adjust_datavalue_status_code.d.ts +6 -3
- package/dist/src/data_access/adjust_datavalue_status_code.js +3 -3
- package/dist/src/data_access/adjust_datavalue_status_code.js.map +1 -1
- package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +13 -11
- package/dist/src/data_access/ua_multistate_discrete_impl.js +28 -23
- package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +19 -23
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js +31 -31
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +10 -16
- package/dist/src/data_access/ua_two_state_discrete_impl.js +18 -14
- package/dist/src/data_access/ua_two_state_discrete_impl.js.map +1 -1
- package/dist/src/event_data.js.map +1 -1
- package/dist/src/extension_object_array_node.d.ts +5 -2
- package/dist/src/extension_object_array_node.js +21 -24
- package/dist/src/extension_object_array_node.js.map +1 -1
- package/dist/src/get_basic_datatype.d.ts +2 -2
- package/dist/src/get_basic_datatype.js.map +1 -1
- package/dist/src/historical_access/address_space_historical_data_node.d.ts +3 -3
- package/dist/src/historical_access/address_space_historical_data_node.js +24 -17
- package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -1
- package/dist/src/idx_iterator.js +1 -1
- package/dist/src/idx_iterator.js.map +1 -1
- package/dist/src/index_current.d.ts +31 -31
- package/dist/src/index_current.js +45 -45
- package/dist/src/index_current.js.map +1 -1
- package/dist/src/namespace_impl.d.ts +4 -3
- package/dist/src/namespace_impl.js +17 -14
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/namespace_private.js.map +1 -1
- package/dist/src/nodeid_manager.d.ts +3 -3
- package/dist/src/nodeid_manager.js +19 -16
- package/dist/src/nodeid_manager.js.map +1 -1
- package/dist/src/nodeset_tools/adjust_namespace_array.d.ts +1 -1
- package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +2 -2
- package/dist/src/nodeset_tools/construct_namespace_dependency.js +22 -9
- package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +1 -1
- package/dist/src/nodeset_tools/dump_to_bsd.d.ts +1 -1
- package/dist/src/nodeset_tools/dump_to_bsd.js +15 -11
- package/dist/src/nodeset_tools/dump_to_bsd.js.map +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +5 -3
- package/dist/src/nodeset_tools/nodeset_to_xml.js +69 -72
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/src/private_namespace.d.ts +2 -2
- package/dist/src/private_namespace.js.map +1 -1
- package/dist/src/reference_impl.d.ts +2 -2
- package/dist/src/reference_impl.js +9 -11
- package/dist/src/reference_impl.js.map +1 -1
- package/dist/src/role_permissions.d.ts +1 -1
- package/dist/src/role_permissions.js.map +1 -1
- package/dist/src/state_machine/finite_state_machine.d.ts +11 -14
- package/dist/src/state_machine/finite_state_machine.js +36 -30
- package/dist/src/state_machine/finite_state_machine.js.map +1 -1
- package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +8 -6
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js +16 -18
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
- package/dist/src/state_machine/ua_two_state_variable.d.ts +12 -11
- package/dist/src/state_machine/ua_two_state_variable.js +24 -29
- package/dist/src/state_machine/ua_two_state_variable.js.map +1 -1
- package/dist/src/tool_isSubtypeOf.d.ts +5 -5
- package/dist/src/tool_isSubtypeOf.js +21 -18
- package/dist/src/tool_isSubtypeOf.js.map +1 -1
- package/dist/src/ua_condition_type.d.ts +1 -1
- package/dist/src/ua_data_type_impl.js.map +1 -1
- package/dist/src/ua_method_impl.d.ts +9 -5
- package/dist/src/ua_method_impl.js +1 -1
- package/dist/src/ua_method_impl.js.map +1 -1
- package/dist/src/ua_object_impl.d.ts +7 -5
- package/dist/src/ua_object_impl.js +13 -11
- package/dist/src/ua_object_impl.js.map +1 -1
- package/dist/src/ua_object_type_impl.d.ts +7 -5
- package/dist/src/ua_object_type_impl.js +4 -5
- package/dist/src/ua_object_type_impl.js.map +1 -1
- package/dist/src/ua_reference_type_impl.d.ts +6 -8
- package/dist/src/ua_reference_type_impl.js +16 -14
- package/dist/src/ua_reference_type_impl.js.map +1 -1
- package/dist/src/ua_variable_impl.d.ts +43 -45
- package/dist/src/ua_variable_impl.js +99 -83
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/dist/src/ua_variable_impl_ext_obj.d.ts +3 -3
- package/dist/src/ua_variable_impl_ext_obj.js +37 -29
- package/dist/src/ua_variable_impl_ext_obj.js.map +1 -1
- package/dist/src/ua_variable_type_impl.d.ts +11 -11
- package/dist/src/ua_variable_type_impl.js +13 -21
- package/dist/src/ua_variable_type_impl.js.map +1 -1
- package/dist/src/ua_view_impl.d.ts +3 -4
- package/dist/src/ua_view_impl.js +5 -6
- package/dist/src/ua_view_impl.js.map +1 -1
- package/dist/src/validate_data_type_correctness.d.ts +2 -2
- package/dist/src/validate_data_type_correctness.js +12 -3
- package/dist/src/validate_data_type_correctness.js.map +1 -1
- package/dist/tsconfig_base.tsbuildinfo +1 -1
- package/distHelpers/add_event_generator_object.d.ts +5 -2
- package/distHelpers/add_event_generator_object.js +2 -2
- package/distHelpers/add_event_generator_object.js.map +1 -1
- package/distHelpers/alarms_and_conditions_demo.d.ts +1 -1
- package/distHelpers/alarms_and_conditions_demo.js +4 -6
- package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
- package/distHelpers/assertHasMatchingReference.d.ts +1 -1
- package/distHelpers/assertHasMatchingReference.js +2 -2
- package/distHelpers/assertHasMatchingReference.js.map +1 -1
- package/distHelpers/boiler_system.d.ts +6 -3
- package/distHelpers/boiler_system.js +44 -42
- package/distHelpers/boiler_system.js.map +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.d.ts +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.js +25 -27
- package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -1
- package/distHelpers/get_address_space_fixture.js +1 -1
- package/distHelpers/get_address_space_fixture.js.map +1 -1
- package/distHelpers/mock_session.d.ts +7 -7
- package/distHelpers/mock_session.js +4 -4
- package/distHelpers/mock_session.js.map +1 -1
- package/distNodeJS/generate_address_space.d.ts +2 -2
- package/distNodeJS/generate_address_space.js +2 -2
- package/distNodeJS/generate_address_space.js.map +1 -1
- package/package.json +36 -36
- package/source/address_space_ts.ts +29 -30
- package/source/continuation_points/continuation_point_manager.ts +8 -7
- package/source/helpers/adjust_browse_direction.ts +1 -1
- package/source/helpers/argument_list.ts +37 -25
- package/source/helpers/call_helpers.ts +10 -15
- package/source/helpers/coerce_enum_value.ts +4 -4
- package/source/helpers/dump_tools.ts +6 -11
- package/source/helpers/ensure_secure_access.ts +2 -2
- package/source/helpers/make_optionals_map.ts +3 -10
- package/source/helpers/multiform_func.ts +1 -1
- package/source/helpers/resolve_opaque_on_address_space.ts +2 -2
- package/source/index.ts +44 -54
- package/source/interfaces/alarms_and_conditions/condition_info_i.ts +3 -4
- package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +13 -13
- package/source/interfaces/alarms_and_conditions/deviation_stuff.ts +8 -10
- package/source/interfaces/alarms_and_conditions/install_setpoint_options.ts +4 -5
- package/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +4 -6
- package/source/interfaces/alarms_and_conditions/instantiate_condition_options.ts +3 -3
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +6 -3
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +11 -11
- package/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +11 -25
- package/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +16 -13
- package/source/interfaces/alarms_and_conditions/ua_base_event_ex.ts +12 -0
- package/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +5 -5
- package/source/interfaces/alarms_and_conditions/ua_condition_ex.ts +30 -54
- package/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +3 -34
- package/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +18 -22
- package/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +8 -15
- package/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +4 -7
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +5 -6
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +3 -3
- package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +9 -16
- package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +5 -8
- package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +5 -5
- package/source/interfaces/data_access/ua_y_array_item_ex.ts +3 -3
- package/source/interfaces/extension_object_constructor.ts +3 -4
- package/source/interfaces/i_condition_variable_type_setter_options.ts +1 -3
- package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +3 -3
- package/source/interfaces/state_machine/ua_finite_state_machine_type.ts +2 -2
- package/source/interfaces/state_machine/ua_program_state_machine_type.ts +3 -3
- package/source/interfaces/state_machine/ua_shelved_state_machine_ex.ts +10 -7
- package/source/interfaces/state_machine/ua_state_machine_type.ts +11 -8
- package/source/interfaces/state_machine/ua_transition_ex.ts +2 -2
- package/source/interfaces/ua_subscription_diagnostics_variable_ex.ts +3 -2
- package/source/loader/decode_xml_extension_object.ts +7 -7
- package/source/loader/ensure_datatype_extracted.ts +14 -19
- package/source/loader/generateAddressSpaceRaw.ts +12 -13
- package/source/loader/load_nodeset2.ts +3 -3
- package/source/loader/make_xml_extension_object_parser.ts +55 -39
- package/source/loader/namespace_post_step.ts +3 -4
- package/source/loader/parsers/extension_object_parser.ts +63 -62
- package/source/loader/parsers/localized_text_parser.ts +3 -3
- package/source/loader/parsers/nodeid_parser.ts +2 -3
- package/source/loader/parsers/qualified_name_parser.ts +6 -7
- package/source/loader/parsers/variant_parser.ts +48 -55
- package/source/loader/register_node_promoter.ts +2 -2
- package/source/namespace.ts +4 -4
- package/source/namespace_alarm_and_condition.ts +22 -22
- package/source/namespace_data_access.ts +12 -13
- package/source/namespace_machine_state.ts +10 -5
- package/source/pseudo_session.ts +53 -50
- package/source/session_context.ts +1 -1
- package/source/set_namespace_meta_data.ts +3 -3
- package/source/ua_addin.ts +10 -11
- package/source/ua_interface.ts +10 -7
- package/source/ua_root_folder.ts +1 -1
- package/source/ua_two_state_variable_ex.ts +5 -5
- package/source_nodejs/generate_address_space.ts +5 -9
- package/src/_instantiate_helpers.ts +26 -16
- package/src/_mandatory_child_or_requested_optional_filter.ts +16 -15
- package/src/address_space.ts +24 -33
- package/src/address_space_change_event_tools.ts +25 -30
- package/src/address_space_private.ts +20 -21
- package/src/alarms_and_conditions/condition.ts +0 -2
- package/src/alarms_and_conditions/condition_info_impl.ts +11 -19
- package/src/alarms_and_conditions/condition_snapshot_impl.ts +106 -82
- package/src/alarms_and_conditions/deviation_alarm_helper.ts +20 -15
- package/src/alarms_and_conditions/index.ts +3 -3
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +44 -32
- package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +35 -34
- package/src/alarms_and_conditions/ua_base_event_impl.ts +15 -19
- package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +6 -2
- package/src/alarms_and_conditions/ua_condition_impl.ts +140 -130
- package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +20 -12
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +40 -43
- package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +7 -7
- package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +28 -30
- package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +3 -6
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +59 -90
- package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +31 -27
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +57 -36
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +31 -27
- package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +6 -6
- package/src/apply_condition_refresh.ts +7 -8
- package/src/base_node_impl.ts +63 -44
- package/src/base_node_private.ts +12 -4
- package/src/check_value_rank_compatibility.ts +18 -14
- package/src/data_access/add_dataItem_stuff.ts +3 -4
- package/src/data_access/adjust_datavalue_status_code.ts +7 -7
- package/src/data_access/ua_multistate_discrete_impl.ts +44 -28
- package/src/data_access/ua_multistate_value_discrete_impl.ts +77 -66
- package/src/data_access/ua_two_state_discrete_impl.ts +29 -36
- package/src/event_data.ts +53 -53
- package/src/extension_object_array_node.ts +27 -28
- package/src/get_basic_datatype.ts +4 -5
- package/src/historical_access/address_space_historical_data_node.ts +65 -50
- package/src/idx_iterator.ts +4 -12
- package/src/index_current.ts +33 -45
- package/src/namespace_impl.ts +75 -62
- package/src/namespace_private.ts +2 -8
- package/src/nodeid_manager.ts +30 -27
- package/src/nodeset_tools/adjust_namespace_array.ts +1 -1
- package/src/nodeset_tools/construct_namespace_dependency.ts +30 -18
- package/src/nodeset_tools/dump_to_bsd.ts +27 -22
- package/src/nodeset_tools/nodeset_to_xml.ts +100 -119
- package/src/private_namespace.ts +3 -6
- package/src/reference_impl.ts +11 -14
- package/src/role_permissions.ts +1 -1
- package/src/state_machine/finite_state_machine.ts +60 -61
- package/src/state_machine/ua_shelving_state_machine_ex.ts +23 -23
- package/src/state_machine/ua_two_state_variable.ts +34 -31
- package/src/tool_isSubtypeOf.ts +48 -33
- package/src/ua_condition_type.ts +1 -1
- package/src/ua_data_type_impl.ts +12 -13
- package/src/ua_method_impl.ts +17 -12
- package/src/ua_object_impl.ts +38 -33
- package/src/ua_object_type_impl.ts +22 -22
- package/src/ua_reference_type_impl.ts +19 -19
- package/src/ua_variable_impl.ts +240 -220
- package/src/ua_variable_impl_ext_obj.ts +63 -50
- package/src/ua_variable_type_impl.ts +43 -49
- package/src/ua_view_impl.ts +5 -5
- package/src/validate_data_type_correctness.ts +17 -8
|
@@ -1,32 +1,31 @@
|
|
|
1
|
+
import type { BindExtensionObjectOptions, UADataType, UAVariable, UAVariableType } from "node-opcua-address-space-base";
|
|
1
2
|
import assert from "node-opcua-assert";
|
|
2
|
-
import { BindExtensionObjectOptions, UADataType, UAVariable, UAVariableType } from "node-opcua-address-space-base";
|
|
3
3
|
import { coerceQualifiedName, NodeClass } from "node-opcua-data-model";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import type { DataValue } from "node-opcua-data-value";
|
|
5
|
+
import { coerceClock, getCurrentClock, type PreciseClock } from "node-opcua-date-time";
|
|
6
|
+
import { checkDebugFlag, make_debugLog, make_errorLog, make_warningLog } from "node-opcua-debug";
|
|
7
7
|
import { ExtensionObject } from "node-opcua-extension-object";
|
|
8
8
|
import { NodeId, NodeIdType } from "node-opcua-nodeid";
|
|
9
|
+
import type { NumericRange } from "node-opcua-numeric-range";
|
|
9
10
|
import { StatusCodes } from "node-opcua-status-code";
|
|
10
|
-
import { StructureField } from "node-opcua-types";
|
|
11
|
+
import type { StructureField } from "node-opcua-types";
|
|
11
12
|
import { lowerFirstLetter } from "node-opcua-utils";
|
|
12
|
-
import { DataType,
|
|
13
|
-
import { NumericRange } from "node-opcua-numeric-range";
|
|
14
|
-
|
|
15
|
-
import { UAVariableImpl } from "./ua_variable_impl";
|
|
16
|
-
import { UADataTypeImpl } from "./ua_data_type_impl";
|
|
13
|
+
import { DataType, VariantArrayType, type VariantLike } from "node-opcua-variant";
|
|
17
14
|
import { IndexIterator } from "./idx_iterator";
|
|
15
|
+
import type { UADataTypeImpl } from "./ua_data_type_impl";
|
|
16
|
+
import { UAVariableImpl } from "./ua_variable_impl";
|
|
18
17
|
|
|
19
18
|
const doDebug = checkDebugFlag(__filename);
|
|
20
19
|
const debugLog = make_debugLog(__filename);
|
|
21
20
|
const warningLog = make_warningLog(__filename);
|
|
22
21
|
const errorLog = make_errorLog(__filename);
|
|
23
22
|
|
|
24
|
-
function
|
|
23
|
+
function _w(str: string, n: number): string {
|
|
25
24
|
return str.padEnd(n).substring(n);
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
function isProxy(ext: any) {
|
|
29
|
-
return ext.$isProxy
|
|
28
|
+
return !!ext.$isProxy;
|
|
30
29
|
}
|
|
31
30
|
function getProxyVariable(ext: any): UAVariable | null {
|
|
32
31
|
assert(isProxy(ext));
|
|
@@ -52,6 +51,16 @@ function unProxy(ext: ExtensionObject) {
|
|
|
52
51
|
return isProxy(ext) ? getProxyTarget(ext) : ext;
|
|
53
52
|
}
|
|
54
53
|
|
|
54
|
+
function getExtensionObjectArray(uaVariable: UAVariableImpl): ExtensionObject[] {
|
|
55
|
+
const arr = uaVariable.$$extensionObjectArray;
|
|
56
|
+
if (!arr) {
|
|
57
|
+
throw new Error(
|
|
58
|
+
`Internal Error: $$extensionObjectArray is not bound on UAVariable ${uaVariable.nodeId.toString()} (${uaVariable.browseName.toString()})`
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
return arr;
|
|
62
|
+
}
|
|
63
|
+
|
|
55
64
|
function _extensionObjectFieldGetter(getVariable: () => UAVariable | null, target: any, key: string /*, receiver*/) {
|
|
56
65
|
if (key === "$isProxy") {
|
|
57
66
|
return true;
|
|
@@ -81,7 +90,7 @@ function _extensionObjectFieldSetter(
|
|
|
81
90
|
const uaVariable = getVariable();
|
|
82
91
|
if (!uaVariable) return true;
|
|
83
92
|
const child = (uaVariable as any)[key] as UAVariable | null;
|
|
84
|
-
if (child
|
|
93
|
+
if (child?.touchValue) {
|
|
85
94
|
child.touchValue();
|
|
86
95
|
}
|
|
87
96
|
return true; // true means the set operation has succeeded
|
|
@@ -132,7 +141,7 @@ export function propagateTouchValueDownward(self: UAVariableImpl, now: PreciseCl
|
|
|
132
141
|
const dataTypeNode = self.getDataTypeNode();
|
|
133
142
|
const definition = dataTypeNode.getStructureDefinition();
|
|
134
143
|
for (const field of definition.fields || []) {
|
|
135
|
-
const property = self.getChildByName(field.name
|
|
144
|
+
const property = self.getChildByName(field.name || "") as UAVariableImpl;
|
|
136
145
|
|
|
137
146
|
if (property) {
|
|
138
147
|
if (cache) {
|
|
@@ -192,9 +201,12 @@ export function setExtensionObjectPartialValue(node: UAVariableImpl, partialObje
|
|
|
192
201
|
// checking the *existing* side with isProxy, not here.
|
|
193
202
|
// Instead, only recurse if it's a schema'd type AND has
|
|
194
203
|
// Extension-Object-like characteristics (constructor with schema.name)
|
|
195
|
-
if (
|
|
196
|
-
|
|
197
|
-
|
|
204
|
+
if (
|
|
205
|
+
value.schema !== undefined &&
|
|
206
|
+
value.constructor?.name !== "QualifiedName" &&
|
|
207
|
+
value.constructor?.name !== "LocalizedText" &&
|
|
208
|
+
value.constructor?.name !== "DiagnosticInfo"
|
|
209
|
+
) {
|
|
198
210
|
return true;
|
|
199
211
|
}
|
|
200
212
|
return false;
|
|
@@ -243,7 +255,7 @@ function getOrCreateProperty(
|
|
|
243
255
|
const components = variableNode.getComponents();
|
|
244
256
|
let property: UAVariableImpl;
|
|
245
257
|
const selectedComponents = components.filter(
|
|
246
|
-
(f) => f instanceof UAVariableImpl && f.browseName.name
|
|
258
|
+
(f) => f instanceof UAVariableImpl && f.browseName.name?.toString() === field.name
|
|
247
259
|
);
|
|
248
260
|
|
|
249
261
|
// c8 ignore next
|
|
@@ -256,7 +268,7 @@ function getOrCreateProperty(
|
|
|
256
268
|
property = selectedComponents[0] as UAVariableImpl;
|
|
257
269
|
/* c8 ignore next */
|
|
258
270
|
} else {
|
|
259
|
-
if (!options
|
|
271
|
+
if (!options?.createMissingProp) {
|
|
260
272
|
return null;
|
|
261
273
|
}
|
|
262
274
|
debugLog("adding missing array variable", field.name, variableNode.browseName.toString(), variableNode.nodeId.toString());
|
|
@@ -264,7 +276,7 @@ function getOrCreateProperty(
|
|
|
264
276
|
assert(selectedComponents.length === 0);
|
|
265
277
|
// create a variable (Note we may use ns=1;s=parentName/0:PropertyName)
|
|
266
278
|
property = variableNode.namespace.addVariable({
|
|
267
|
-
browseName: { namespaceIndex: structureNamespace, name: field.name
|
|
279
|
+
browseName: { namespaceIndex: structureNamespace, name: field.name?.toString() },
|
|
268
280
|
componentOf: variableNode,
|
|
269
281
|
dataType: field.dataType,
|
|
270
282
|
minimumSamplingInterval: variableNode.minimumSamplingInterval,
|
|
@@ -277,7 +289,6 @@ function getOrCreateProperty(
|
|
|
277
289
|
return property;
|
|
278
290
|
}
|
|
279
291
|
|
|
280
|
-
|
|
281
292
|
function installExt(uaVariable: UAVariableImpl, ext: ExtensionObject) {
|
|
282
293
|
ext = unProxy(ext);
|
|
283
294
|
uaVariable.$extensionObject = new Proxy(
|
|
@@ -292,7 +303,7 @@ function installExt(uaVariable: UAVariableImpl, ext: ExtensionObject) {
|
|
|
292
303
|
if (field.dataType) {
|
|
293
304
|
const dataTypeNode = addressSpace.findDataType(field.dataType);
|
|
294
305
|
// c8 ignore next
|
|
295
|
-
if (dataTypeNode
|
|
306
|
+
if (dataTypeNode?.isSubtypeOf(structure)) {
|
|
296
307
|
// sub structure .. let make an handler too
|
|
297
308
|
const camelCaseName = lowerFirstLetter(field.name!);
|
|
298
309
|
|
|
@@ -312,7 +323,10 @@ function installExt(uaVariable: UAVariableImpl, ext: ExtensionObject) {
|
|
|
312
323
|
}
|
|
313
324
|
}
|
|
314
325
|
|
|
315
|
-
export function _installExtensionObjectBindingOnProperties(
|
|
326
|
+
export function _installExtensionObjectBindingOnProperties(
|
|
327
|
+
uaVariable: UAVariableImpl,
|
|
328
|
+
_options?: BindExtensionObjectOptions
|
|
329
|
+
): void {
|
|
316
330
|
// may be extension object mechanism has alreday been install
|
|
317
331
|
// in this case we just need to rebind the properties...
|
|
318
332
|
if (uaVariable.$extensionObject) {
|
|
@@ -330,12 +344,11 @@ export function _installExtensionObjectBindingOnProperties(uaVariable: UAVariabl
|
|
|
330
344
|
const extObj = dataValue.value.value;
|
|
331
345
|
if (extObj instanceof ExtensionObject) {
|
|
332
346
|
uaVariable.bindExtensionObject(extObj, { createMissingProp: true, force: true });
|
|
333
|
-
} else if (extObj
|
|
347
|
+
} else if (Array.isArray(extObj)) {
|
|
334
348
|
if (dataValue.value.arrayType === VariantArrayType.Array || dataValue.value.arrayType === VariantArrayType.Matrix) {
|
|
335
349
|
_bindExtensionObjectArrayOrMatrix(uaVariable, extObj, { createMissingProp: true, force: true });
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
else {
|
|
350
|
+
} else {
|
|
351
|
+
/* c8 ignore next */
|
|
339
352
|
throw new Error("Internal Error, unexpected case");
|
|
340
353
|
}
|
|
341
354
|
}
|
|
@@ -382,14 +395,14 @@ function _installFields2(
|
|
|
382
395
|
propertyNode.valueRank === -1
|
|
383
396
|
? VariantArrayType.Scalar
|
|
384
397
|
: propertyNode.valueRank === 1
|
|
385
|
-
|
|
386
|
-
|
|
398
|
+
? VariantArrayType.Array
|
|
399
|
+
: VariantArrayType.Matrix;
|
|
387
400
|
propertyNode.$dataValue.value.dimensions = propertyNode.valueRank > 1 ? propertyNode.arrayDimensions : null;
|
|
388
401
|
|
|
389
402
|
const fieldName = field.name!;
|
|
390
403
|
installDataValueGetter(propertyNode, () => get(fieldName));
|
|
391
404
|
assert(propertyNode._inner_replace_dataValue);
|
|
392
|
-
propertyNode._inner_replace_dataValue = (dataValue: DataValue,
|
|
405
|
+
propertyNode._inner_replace_dataValue = (dataValue: DataValue, _indexRange?: NumericRange | null) => {
|
|
393
406
|
/** */
|
|
394
407
|
const sourceTime = coerceClock(dataValue.sourceTimestamp, dataValue.sourcePicoseconds);
|
|
395
408
|
const value = dataValue.value.value;
|
|
@@ -405,7 +418,7 @@ function _installFields2(
|
|
|
405
418
|
const mainFieldName = field.name!;
|
|
406
419
|
return get(mainFieldName)[lowerFirstLetter(fieldName)];
|
|
407
420
|
},
|
|
408
|
-
set: (fieldName: string, value: any,
|
|
421
|
+
set: (fieldName: string, value: any, _sourceTime: PreciseClock) => {
|
|
409
422
|
const mainFieldName = field.name!;
|
|
410
423
|
get(mainFieldName)[lowerFirstLetter(fieldName)] = value;
|
|
411
424
|
}
|
|
@@ -423,7 +436,7 @@ function installDataValueGetter(propertyNode: UAVariableImpl, get: () => any) {
|
|
|
423
436
|
get() {
|
|
424
437
|
return $;
|
|
425
438
|
},
|
|
426
|
-
set: (
|
|
439
|
+
set: (_value) => {
|
|
427
440
|
throw new Error("$dataValue is now frozen and should not be modified this way !\n contact sterfive.com");
|
|
428
441
|
}
|
|
429
442
|
});
|
|
@@ -504,12 +517,12 @@ export function _bindExtensionObject(
|
|
|
504
517
|
if (optionalExtensionObject && uaVariable.valueRank === 0) {
|
|
505
518
|
warningLog(
|
|
506
519
|
uaVariable.browseName.toString() +
|
|
507
|
-
|
|
520
|
+
": valueRank was zero but needed to be adjusted to -1 (Scalar) in bindExtensionObject"
|
|
508
521
|
);
|
|
509
522
|
uaVariable.valueRank = -1;
|
|
510
523
|
}
|
|
511
524
|
const addressSpace = uaVariable.addressSpace;
|
|
512
|
-
let extensionObject_;
|
|
525
|
+
let extensionObject_: ExtensionObject | undefined;
|
|
513
526
|
|
|
514
527
|
// c8 ignore next
|
|
515
528
|
if (uaVariable.valueRank !== -1 && uaVariable.valueRank !== 1) {
|
|
@@ -529,7 +542,7 @@ export function _bindExtensionObject(
|
|
|
529
542
|
const dataTypeNode = addressSpace.findNode(parentDataType) as UADataType;
|
|
530
543
|
const structure = addressSpace.findDataType("Structure")!;
|
|
531
544
|
// c8 ignore next
|
|
532
|
-
if (dataTypeNode
|
|
545
|
+
if (dataTypeNode?.isSubtypeOf(structure)) {
|
|
533
546
|
// warningLog(
|
|
534
547
|
// "Ignoring bindExtensionObject on sub extension object",
|
|
535
548
|
// "child=",
|
|
@@ -555,9 +568,9 @@ export function _bindExtensionObject(
|
|
|
555
568
|
warningLog(uaVariable.$extensionObject?.toString());
|
|
556
569
|
throw new Error(
|
|
557
570
|
"bindExtensionObject: $extensionObject is incorrect: we are expecting a " +
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
571
|
+
uaVariable.dataType.toString({ addressSpace: uaVariable.addressSpace }) +
|
|
572
|
+
" but we got a " +
|
|
573
|
+
uaVariable.$extensionObject?.schema.name
|
|
561
574
|
);
|
|
562
575
|
}
|
|
563
576
|
return uaVariable.$extensionObject;
|
|
@@ -639,7 +652,7 @@ const composeBrowseNameAndNodeId = (uaVariable: UAVariable, indexes: number[]) =
|
|
|
639
652
|
const browseName = coerceQualifiedName(iAsText);
|
|
640
653
|
let nodeId: NodeId | undefined;
|
|
641
654
|
if (uaVariable.nodeId.identifierType === NodeIdType.STRING) {
|
|
642
|
-
nodeId = new NodeId(NodeIdType.STRING,
|
|
655
|
+
nodeId = new NodeId(NodeIdType.STRING, `${uaVariable.nodeId.value as string}[${iAsText}]`, uaVariable.nodeId.namespace);
|
|
643
656
|
}
|
|
644
657
|
return { browseName, nodeId };
|
|
645
658
|
};
|
|
@@ -679,14 +692,14 @@ export function _bindExtensionObjectArrayOrMatrix(
|
|
|
679
692
|
|
|
680
693
|
/** */
|
|
681
694
|
const addressSpace = uaVariable.addressSpace;
|
|
682
|
-
if (optionalExtensionObjectArray && optionalExtensionObjectArray.length
|
|
695
|
+
if (optionalExtensionObjectArray && optionalExtensionObjectArray.length !== 0) {
|
|
683
696
|
if (optionalExtensionObjectArray.length !== totalLength) {
|
|
684
697
|
throw new Error(
|
|
685
698
|
`optionalExtensionObjectArray must have the expected number of element matching ${arrayDimensions} but was ${optionalExtensionObjectArray.length}`
|
|
686
699
|
);
|
|
687
700
|
}
|
|
688
701
|
}
|
|
689
|
-
if (!optionalExtensionObjectArray || optionalExtensionObjectArray.length
|
|
702
|
+
if (!optionalExtensionObjectArray || optionalExtensionObjectArray.length === 0) {
|
|
690
703
|
optionalExtensionObjectArray = [];
|
|
691
704
|
for (let i = 0; i < totalLength; i++) {
|
|
692
705
|
optionalExtensionObjectArray[i] = addressSpace.constructExtensionObject(uaVariable.dataType, {});
|
|
@@ -756,12 +769,13 @@ export function _bindExtensionObjectArrayOrMatrix(
|
|
|
756
769
|
_innerBindExtensionObjectScalar(
|
|
757
770
|
uaElement,
|
|
758
771
|
{
|
|
759
|
-
get: () => uaVariable
|
|
772
|
+
get: () => getExtensionObjectArray(uaVariable)[capturedIndex],
|
|
760
773
|
set: (newValue: ExtensionObject, sourceTimestamp: PreciseClock, cache: Set<UAVariableImpl>) => {
|
|
761
|
-
|
|
762
|
-
|
|
774
|
+
const extArray = getExtensionObjectArray(uaVariable);
|
|
775
|
+
assert(!isProxy(extArray[capturedIndex]));
|
|
776
|
+
extArray[capturedIndex] = newValue;
|
|
763
777
|
// c8 ignore next
|
|
764
|
-
if (
|
|
778
|
+
if (extArray !== uaVariable.$dataValue.value.value) {
|
|
765
779
|
warningLog("uaVariable", uaVariable.nodeId.toString());
|
|
766
780
|
warningLog("Houston! We have a problem ");
|
|
767
781
|
}
|
|
@@ -770,8 +784,8 @@ export function _bindExtensionObjectArrayOrMatrix(
|
|
|
770
784
|
},
|
|
771
785
|
setField: (fieldName: string, newValue: any, sourceTimestamp: PreciseClock, cache?: Set<UAVariableImpl>) => {
|
|
772
786
|
// c8 ignore next doDebug && debugLog("setField", fieldName, newValue, sourceTimestamp, cache);
|
|
773
|
-
const extObj = uaVariable
|
|
774
|
-
(
|
|
787
|
+
const extObj = getExtensionObjectArray(uaVariable)[capturedIndex];
|
|
788
|
+
unProxy(extObj)[lowerFirstLetter(fieldName)] = newValue;
|
|
775
789
|
propagateTouchValueUpward(capturedUaElement, sourceTimestamp, cache);
|
|
776
790
|
}
|
|
777
791
|
},
|
|
@@ -808,12 +822,11 @@ export function incrementElement(path: string | string[], data: any) {
|
|
|
808
822
|
setElement(path, data, value + 1);
|
|
809
823
|
}
|
|
810
824
|
export function extractPartialData(path: string | string[], extensionObject: ExtensionObject) {
|
|
811
|
-
let name;
|
|
825
|
+
let name : string;
|
|
812
826
|
if (typeof path === "string") {
|
|
813
827
|
path = path.split(".");
|
|
814
828
|
}
|
|
815
|
-
|
|
816
|
-
let i;
|
|
829
|
+
let i : number;
|
|
817
830
|
// read partial value
|
|
818
831
|
const partialData: any = {};
|
|
819
832
|
let p: any = partialData;
|
|
@@ -1,54 +1,45 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
// tslint:disable:no-console
|
|
6
|
-
|
|
7
|
-
import { assert } from "node-opcua-assert";
|
|
8
|
-
import {
|
|
9
|
-
IAddressSpace,
|
|
4
|
+
import type {
|
|
10
5
|
AddVariableOptions,
|
|
11
6
|
BaseNode,
|
|
7
|
+
BaseNodeEvents,
|
|
8
|
+
IAddressSpace,
|
|
9
|
+
INamespace,
|
|
12
10
|
InstantiateVariableOptions,
|
|
13
11
|
ModellingRuleType,
|
|
14
|
-
|
|
12
|
+
UAMethod,
|
|
13
|
+
UAObject,
|
|
14
|
+
UAObjectType,
|
|
15
15
|
UAVariable,
|
|
16
16
|
UAVariableType
|
|
17
17
|
} from "node-opcua-address-space-base";
|
|
18
|
-
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
18
|
+
import { assert } from "node-opcua-assert";
|
|
19
|
+
import type { UInt32 } from "node-opcua-basic-types";
|
|
20
|
+
import { AttributeIds, BrowseDirection, coerceQualifiedName, NodeClass, type QualifiedName } from "node-opcua-data-model";
|
|
21
|
+
import { DataValue, type DataValueLike } from "node-opcua-data-value";
|
|
22
|
+
import { make_debugLog, make_errorLog, make_warningLog } from "node-opcua-debug";
|
|
23
|
+
import { coerceNodeId, NodeId, type NodeIdLike } from "node-opcua-nodeid";
|
|
23
24
|
import { StatusCodes } from "node-opcua-status-code";
|
|
24
|
-
import { UInt32 } from "node-opcua-basic-types";
|
|
25
25
|
import { isNullOrUndefined } from "node-opcua-utils";
|
|
26
26
|
import { DataType, Variant, VariantArrayType, verifyRankAndDimensions } from "node-opcua-variant";
|
|
27
|
-
|
|
28
27
|
import { SessionContext } from "../source/session_context";
|
|
29
|
-
|
|
30
28
|
import { initialize_properties_and_components } from "./_instantiate_helpers";
|
|
31
|
-
import { AddressSpacePrivate } from "./address_space_private";
|
|
32
|
-
import { BaseNodeImpl, InternalBaseNodeOptions } from "./base_node_impl";
|
|
33
|
-
import {
|
|
34
|
-
import { construct_isSubtypeOf } from "./tool_isSubtypeOf";
|
|
35
|
-
import { get_subtypeOfObj } from "./tool_isSubtypeOf";
|
|
36
|
-
import { get_subtypeOf } from "./tool_isSubtypeOf";
|
|
29
|
+
import type { AddressSpacePrivate } from "./address_space_private";
|
|
30
|
+
import { BaseNodeImpl, type InternalBaseNodeOptions } from "./base_node_impl";
|
|
31
|
+
import { ToStringBuilder, UAVariableType_toString } from "./base_node_private";
|
|
37
32
|
import { checkValueRankCompatibility } from "./check_value_rank_compatibility";
|
|
38
33
|
import { _getBasicDataType } from "./get_basic_datatype";
|
|
34
|
+
import { construct_isSubtypeOf, get_subtypeOf, get_subtypeOfObj } from "./tool_isSubtypeOf";
|
|
39
35
|
|
|
40
36
|
const debugLog = make_debugLog(__filename);
|
|
41
|
-
const doDebug = checkDebugFlag(__filename);
|
|
42
37
|
const warningLog = make_warningLog(__filename);
|
|
43
38
|
const errorLog = make_errorLog(__filename);
|
|
44
39
|
|
|
45
|
-
// eslint-disable-next-line prefer-const
|
|
46
|
-
let doTrace = checkDebugFlag("INSTANTIATE");
|
|
47
|
-
const traceLog = errorLog;
|
|
48
|
-
|
|
49
40
|
interface InstantiateS {
|
|
50
|
-
propertyOf?:
|
|
51
|
-
componentOf?:
|
|
41
|
+
propertyOf?: NodeIdLike | UAObject | UAObjectType | UAVariable | UAVariableType | UAMethod;
|
|
42
|
+
componentOf?: NodeIdLike | BaseNode;
|
|
52
43
|
modellingRule?: ModellingRuleType;
|
|
53
44
|
copyAlsoModellingRules?: boolean;
|
|
54
45
|
copyAlsoAllOptionals?: boolean;
|
|
@@ -65,7 +56,7 @@ export function topMostParentIsObjectTypeOrVariableType(addressSpace: AddressSpa
|
|
|
65
56
|
if (!parent) {
|
|
66
57
|
return false;
|
|
67
58
|
}
|
|
68
|
-
const parentNode = addressSpace._coerceNode(parent);
|
|
59
|
+
const parentNode = addressSpace._coerceNode(parent as BaseNode | NodeIdLike);
|
|
69
60
|
if (!parentNode) {
|
|
70
61
|
return false;
|
|
71
62
|
}
|
|
@@ -99,14 +90,14 @@ export interface UAVariableTypeOptions extends InternalBaseNodeOptions {
|
|
|
99
90
|
arrayDimensions?: number[] | null;
|
|
100
91
|
historizing?: boolean;
|
|
101
92
|
isAbstract?: boolean;
|
|
102
|
-
value?:
|
|
93
|
+
value?: unknown;
|
|
103
94
|
dataType: NodeIdLike;
|
|
104
95
|
}
|
|
105
96
|
|
|
106
97
|
function deprecate<T>(func: T): T {
|
|
107
98
|
return func;
|
|
108
99
|
}
|
|
109
|
-
export class UAVariableTypeImpl extends BaseNodeImpl implements UAVariableType {
|
|
100
|
+
export class UAVariableTypeImpl extends BaseNodeImpl<BaseNodeEvents> implements UAVariableType {
|
|
110
101
|
public readonly nodeClass = NodeClass.VariableType;
|
|
111
102
|
|
|
112
103
|
public get subtypeOf(): NodeId | null {
|
|
@@ -127,7 +118,7 @@ export class UAVariableTypeImpl extends BaseNodeImpl implements UAVariableType {
|
|
|
127
118
|
public valueRank: number;
|
|
128
119
|
public arrayDimensions: UInt32[] | null;
|
|
129
120
|
public readonly minimumSamplingInterval: number;
|
|
130
|
-
public readonly value:
|
|
121
|
+
public readonly value: unknown;
|
|
131
122
|
public historizing: boolean;
|
|
132
123
|
|
|
133
124
|
constructor(options: UAVariableTypeOptions) {
|
|
@@ -157,13 +148,13 @@ export class UAVariableTypeImpl extends BaseNodeImpl implements UAVariableType {
|
|
|
157
148
|
const options: DataValueLike = {};
|
|
158
149
|
switch (attributeId) {
|
|
159
150
|
case AttributeIds.IsAbstract:
|
|
160
|
-
options.value = { dataType: DataType.Boolean, value: this.isAbstract
|
|
151
|
+
options.value = { dataType: DataType.Boolean, value: !!this.isAbstract };
|
|
161
152
|
options.statusCode = StatusCodes.Good;
|
|
162
153
|
break;
|
|
163
154
|
case AttributeIds.Value:
|
|
164
|
-
if (Object.
|
|
165
|
-
assert(this.value.schema.name === "Variant");
|
|
166
|
-
options.value = this.value;
|
|
155
|
+
if (Object.hasOwn(this, "value") && this.value !== undefined) {
|
|
156
|
+
assert((this.value as Variant).schema.name === "Variant");
|
|
157
|
+
options.value = this.value as Variant;
|
|
167
158
|
options.statusCode = StatusCodes.Good;
|
|
168
159
|
} else {
|
|
169
160
|
debugLog(" warning Value not implemented");
|
|
@@ -228,15 +219,15 @@ export class UAVariableTypeImpl extends BaseNodeImpl implements UAVariableType {
|
|
|
228
219
|
typeof options.browseName === "string" || (options.browseName !== null && typeof options.browseName === "object"),
|
|
229
220
|
"expecting a browse name"
|
|
230
221
|
);
|
|
231
|
-
assert(
|
|
232
|
-
!Object.prototype.hasOwnProperty.call(options, "propertyOf"),
|
|
233
|
-
"Use addressSpace#addVariable({ propertyOf: xxx}); to add a property"
|
|
234
|
-
);
|
|
222
|
+
assert(!Object.hasOwn(options, "propertyOf"), "Use addressSpace#addVariable({ propertyOf: xxx}); to add a property");
|
|
235
223
|
|
|
236
224
|
assertUnusedChildBrowseName(addressSpace, options);
|
|
237
225
|
|
|
238
|
-
const baseVariableType = addressSpace.findVariableType("BaseVariableType")
|
|
239
|
-
|
|
226
|
+
const baseVariableType = addressSpace.findVariableType("BaseVariableType");
|
|
227
|
+
// c8 ignore next
|
|
228
|
+
if (!baseVariableType) {
|
|
229
|
+
throw new Error("BaseVariableType must be defined in the address space");
|
|
230
|
+
}
|
|
240
231
|
|
|
241
232
|
let dataType = options.dataType !== undefined ? options.dataType : this.dataType;
|
|
242
233
|
// may be required (i.e YArrayItemType )
|
|
@@ -267,7 +258,7 @@ export class UAVariableTypeImpl extends BaseNodeImpl implements UAVariableType {
|
|
|
267
258
|
// BadAttributeIdInvalid
|
|
268
259
|
const defaultDataValue = this.readAttribute(null, AttributeIds.Value);
|
|
269
260
|
const defaultValue =
|
|
270
|
-
(defaultDataType.namespace === 0 && defaultDataType.value
|
|
261
|
+
(defaultDataType.namespace === 0 && defaultDataType.value === 0) || defaultDataValue.statusCode.isNotGood()
|
|
271
262
|
? undefined
|
|
272
263
|
: defaultDataValue.value;
|
|
273
264
|
|
|
@@ -296,10 +287,13 @@ export class UAVariableTypeImpl extends BaseNodeImpl implements UAVariableType {
|
|
|
296
287
|
const copyAlsoAllOptionals = options.copyAlsoAllOptionals || false;
|
|
297
288
|
|
|
298
289
|
initialize_properties_and_components(
|
|
299
|
-
instance,
|
|
290
|
+
instance,
|
|
291
|
+
baseVariableType,
|
|
292
|
+
this,
|
|
300
293
|
copyAlsoModellingRules,
|
|
301
294
|
copyAlsoAllOptionals,
|
|
302
|
-
options.optionals
|
|
295
|
+
options.optionals
|
|
296
|
+
);
|
|
303
297
|
|
|
304
298
|
// if VariableType is a type of Structure DataType
|
|
305
299
|
// we need to instantiate a dataValue
|
|
@@ -311,7 +305,7 @@ export class UAVariableTypeImpl extends BaseNodeImpl implements UAVariableType {
|
|
|
311
305
|
instance.install_extra_properties();
|
|
312
306
|
|
|
313
307
|
if (this._postInstantiateFunc) {
|
|
314
|
-
this._postInstantiateFunc(instance, this);
|
|
308
|
+
this._postInstantiateFunc(instance as BaseNode, this);
|
|
315
309
|
}
|
|
316
310
|
|
|
317
311
|
return instance;
|
|
@@ -364,14 +358,14 @@ export function assertUnusedChildBrowseName(addressSpace: AddressSpacePrivate, o
|
|
|
364
358
|
}
|
|
365
359
|
assert(parent !== null && typeof parent === "object");
|
|
366
360
|
if (!(parent instanceof BaseNodeImpl)) {
|
|
367
|
-
throw new Error(
|
|
361
|
+
throw new Error(`Invalid parent parent is ${parent.constructor.name}`);
|
|
368
362
|
}
|
|
369
363
|
// c8 ignore next
|
|
370
364
|
// verify that no components already exists in parent
|
|
371
|
-
if (parent && hasChildWithBrowseName(parent, coerceQualifiedName(options.browseName))) {
|
|
365
|
+
if (parent && hasChildWithBrowseName(parent as BaseNode, coerceQualifiedName(options.browseName))) {
|
|
372
366
|
throw new Error(
|
|
373
367
|
"object " +
|
|
374
|
-
parent.browseName.name
|
|
368
|
+
parent.browseName.name?.toString() +
|
|
375
369
|
" have already a child with browseName " +
|
|
376
370
|
options.browseName.toString()
|
|
377
371
|
);
|
package/src/ua_view_impl.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
|
|
5
|
+
import { EventNotifierFlags, type ISessionContext, type UAView } from "node-opcua-address-space-base";
|
|
6
|
+
import { AttributeIds, NodeClass } from "node-opcua-data-model";
|
|
7
|
+
import { DataValue, type DataValueLike } from "node-opcua-data-value";
|
|
7
8
|
import { StatusCodes } from "node-opcua-status-code";
|
|
8
9
|
import { DataType } from "node-opcua-variant";
|
|
9
|
-
import { EventNotifierFlags, ISessionContext, UAView } from "node-opcua-address-space-base";
|
|
10
10
|
|
|
11
11
|
import { SessionContext } from "../source/session_context";
|
|
12
|
-
import { BaseNodeImpl, InternalBaseNodeOptions } from "./base_node_impl";
|
|
12
|
+
import { BaseNodeImpl, type InternalBaseNodeOptions } from "./base_node_impl";
|
|
13
13
|
|
|
14
14
|
export interface InternalViewOptions extends InternalBaseNodeOptions {
|
|
15
15
|
containsNoLoops?: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
|
+
import type { IAddressSpace, UADataType } from "node-opcua-address-space-base";
|
|
2
3
|
import { assert } from "node-opcua-assert";
|
|
3
|
-
import { IAddressSpace, UADataType } from "node-opcua-address-space-base";
|
|
4
4
|
import { DataType } from "node-opcua-basic-types";
|
|
5
|
-
import {
|
|
6
|
-
import { NodeId } from "node-opcua-nodeid";
|
|
5
|
+
import { checkDebugFlag, make_debugLog } from "node-opcua-debug";
|
|
6
|
+
import type { NodeId } from "node-opcua-nodeid";
|
|
7
7
|
|
|
8
8
|
const debugLog = make_debugLog(__filename);
|
|
9
9
|
const doDebug = checkDebugFlag(__filename);
|
|
@@ -15,7 +15,7 @@ function _dataType_toUADataType(addressSpace: IAddressSpace, dataType: DataType)
|
|
|
15
15
|
const dataTypeNode = addressSpace.findDataType(DataType[dataType]);
|
|
16
16
|
/* c8 ignore next */
|
|
17
17
|
if (!dataTypeNode) {
|
|
18
|
-
throw new Error(
|
|
18
|
+
throw new Error(` Cannot find DataType ${DataType[dataType]} in address Space`);
|
|
19
19
|
}
|
|
20
20
|
return dataTypeNode as UADataType;
|
|
21
21
|
}
|
|
@@ -47,15 +47,19 @@ export function validateDataTypeCorrectness(
|
|
|
47
47
|
let builtInType: DataType;
|
|
48
48
|
let builtInUADataType: UADataType;
|
|
49
49
|
|
|
50
|
-
const destUADataType = addressSpace.findDataType(dataTypeNodeId)
|
|
50
|
+
const destUADataType = addressSpace.findDataType(dataTypeNodeId);
|
|
51
51
|
|
|
52
52
|
// c8 ignore next
|
|
53
53
|
if (!destUADataType) {
|
|
54
|
-
throw new Error(
|
|
54
|
+
throw new Error(`Cannot find UADataType ${dataTypeNodeId.toString()} in address Space`);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
if (variantDataType === DataType.ExtensionObject) {
|
|
58
|
-
const structure = addressSpace.findDataType("Structure")
|
|
58
|
+
const structure = addressSpace.findDataType("Structure");
|
|
59
|
+
// c8 ignore next
|
|
60
|
+
if (!structure) {
|
|
61
|
+
throw new Error("Cannot find Structure DataType node in standard address space");
|
|
62
|
+
}
|
|
59
63
|
if (destUADataType.isSubtypeOf(structure)) {
|
|
60
64
|
return true;
|
|
61
65
|
}
|
|
@@ -70,7 +74,12 @@ export function validateDataTypeCorrectness(
|
|
|
70
74
|
// it should have been trapped earlier
|
|
71
75
|
return false;
|
|
72
76
|
}
|
|
73
|
-
|
|
77
|
+
const foundDataType = addressSpace.findDataType(builtInType);
|
|
78
|
+
/* c8 ignore next */
|
|
79
|
+
if (!foundDataType) {
|
|
80
|
+
throw new Error(`Cannot find DataType ${DataType[builtInType]} in address Space`);
|
|
81
|
+
}
|
|
82
|
+
builtInUADataType = foundDataType;
|
|
74
83
|
}
|
|
75
84
|
|
|
76
85
|
const enumerationUADataType = addressSpace.findDataType("Enumeration");
|