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
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CallbackT } from "node-opcua-status-code";
|
|
3
|
-
import { IAddressSpace, RequiredModel } from "node-opcua-address-space-base";
|
|
4
|
-
import { ReaderStateParser, ReaderStateParserLike, Xml2Json } from "node-opcua-xml2json";
|
|
1
|
+
import type { IAddressSpace, RequiredModel } from "node-opcua-address-space-base";
|
|
5
2
|
import { getMinOPCUADate } from "node-opcua-date-time";
|
|
3
|
+
import { checkDebugFlag, make_debugLog, make_errorLog } from "node-opcua-debug";
|
|
4
|
+
import type { CallbackT } from "node-opcua-status-code";
|
|
5
|
+
import { type ReaderStateParser, type ReaderStateParserLike, Xml2Json } from "node-opcua-xml2json";
|
|
6
|
+
import type { NamespacePrivate } from "../../src/namespace_private";
|
|
6
7
|
import { adjustNamespaceArray } from "../../src/nodeset_tools/adjust_namespace_array";
|
|
7
|
-
import { NodeSetLoaderOptions } from "../interfaces/nodeset_loader_options";
|
|
8
|
-
import { NamespacePrivate } from "../../src/namespace_private";
|
|
8
|
+
import type { NodeSetLoaderOptions } from "../interfaces/nodeset_loader_options";
|
|
9
9
|
import { NodeSetLoader } from "./load_nodeset2";
|
|
10
10
|
|
|
11
11
|
const doDebug = checkDebugFlag(__filename);
|
|
@@ -24,7 +24,7 @@ async function parseDependencies(xmlData: string): Promise<NodesetInfo> {
|
|
|
24
24
|
const namespaceUris: string[] = [];
|
|
25
25
|
|
|
26
26
|
const models: Model[] = [];
|
|
27
|
-
let currentModel: Model | undefined
|
|
27
|
+
let currentModel: Model | undefined;
|
|
28
28
|
const state0: ReaderStateParser = {
|
|
29
29
|
parser: {
|
|
30
30
|
UANodeSet: {
|
|
@@ -32,7 +32,7 @@ async function parseDependencies(xmlData: string): Promise<NodesetInfo> {
|
|
|
32
32
|
NamespaceUris: {
|
|
33
33
|
parser: {
|
|
34
34
|
Uri: <ReaderStateParserLike & { text: string }>{
|
|
35
|
-
finish(this: ReaderStateParserLike & {text: string}) {
|
|
35
|
+
finish(this: ReaderStateParserLike & { text: string }) {
|
|
36
36
|
namespaceUris.push(this.text);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -41,7 +41,7 @@ async function parseDependencies(xmlData: string): Promise<NodesetInfo> {
|
|
|
41
41
|
Models: {
|
|
42
42
|
parser: {
|
|
43
43
|
Model: {
|
|
44
|
-
init(
|
|
44
|
+
init(_elementName: string, attrs: any) {
|
|
45
45
|
const modelUri = attrs.ModelUri;
|
|
46
46
|
const version = attrs.Version;
|
|
47
47
|
const publicationDate = new Date(Date.parse(attrs.PublicationDate));
|
|
@@ -56,7 +56,7 @@ async function parseDependencies(xmlData: string): Promise<NodesetInfo> {
|
|
|
56
56
|
},
|
|
57
57
|
parser: {
|
|
58
58
|
RequiredModel: {
|
|
59
|
-
init(
|
|
59
|
+
init(_elementName: string, attrs: any) {
|
|
60
60
|
const modelUri = attrs.ModelUri;
|
|
61
61
|
const version = attrs.Version;
|
|
62
62
|
const publicationDate = new Date(Date.parse(attrs.PublicationDate));
|
|
@@ -146,7 +146,7 @@ export function findOrder(nodesetDescs: NodesetDesc[]): number[] {
|
|
|
146
146
|
for (const requiredModel of model.requiredModel) {
|
|
147
147
|
const requiredModelIndex = findNodesetIndex(requiredModel.modelUri);
|
|
148
148
|
if (requiredModelIndex === -1) {
|
|
149
|
-
throw new Error(
|
|
149
|
+
throw new Error(`Cannot find namespace for ${requiredModel.modelUri}`);
|
|
150
150
|
}
|
|
151
151
|
const nd = nodesetDescs[requiredModelIndex];
|
|
152
152
|
for (const n of nd.namespaceModel.models) {
|
|
@@ -154,7 +154,7 @@ export function findOrder(nodesetDescs: NodesetDesc[]): number[] {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
const nodesetIndex = findNodesetIndex(model.modelUri);
|
|
157
|
-
const alreadyIn = order.
|
|
157
|
+
const alreadyIn = order.indexOf(nodesetIndex) !== -1;
|
|
158
158
|
if (!alreadyIn) order.push(nodesetIndex);
|
|
159
159
|
};
|
|
160
160
|
const visit2 = (nodesetDesc: NodesetDesc) => {
|
|
@@ -197,7 +197,6 @@ export async function generateAddressSpaceRaw(
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
|
|
201
200
|
for (let index = 0; index < order.length; index++) {
|
|
202
201
|
const nodesetIndex = order[index];
|
|
203
202
|
const nodeset = nodesetDesc[nodesetIndex];
|
|
@@ -221,8 +221,8 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
221
221
|
if (!namespace) {
|
|
222
222
|
throw new Error(
|
|
223
223
|
"cannot find namespace for " +
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
namespaceUri +
|
|
225
|
+
"\nplease make sure to initialize your address space with the corresponding nodeset files"
|
|
226
226
|
);
|
|
227
227
|
}
|
|
228
228
|
foundNamespaceMap.set(namespaceUri, namespace);
|
|
@@ -1038,7 +1038,7 @@ function makeNodeSetParserEngine(addressSpace: IAddressSpace, options: NodeSetLo
|
|
|
1038
1038
|
doDebug &&
|
|
1039
1039
|
debugLog(
|
|
1040
1040
|
chalk.bgGreenBright("Performing post loading tasks -------------------------------------------") +
|
|
1041
|
-
|
|
1041
|
+
chalk.green("DONE")
|
|
1042
1042
|
);
|
|
1043
1043
|
|
|
1044
1044
|
async function performPostLoadingTasks(tasks: Task[]): Promise<void> {
|
|
@@ -1,11 +1,29 @@
|
|
|
1
|
-
import { IAddressSpace } from "node-opcua-address-space-base";
|
|
2
|
-
import {
|
|
1
|
+
import type { IAddressSpace } from "node-opcua-address-space-base";
|
|
2
|
+
import {
|
|
3
|
+
type Byte,
|
|
4
|
+
coerceInt64,
|
|
5
|
+
coerceUInt64,
|
|
6
|
+
type Int16,
|
|
7
|
+
type Int32,
|
|
8
|
+
type Int64,
|
|
9
|
+
type SByte,
|
|
10
|
+
type UInt16,
|
|
11
|
+
type UInt32,
|
|
12
|
+
type UInt64
|
|
13
|
+
} from "node-opcua-basic-types";
|
|
3
14
|
import { make_debugLog, make_warningLog } from "node-opcua-debug";
|
|
4
|
-
import { coerceNodeId, INodeId, NodeId, NodeIdType } from "node-opcua-nodeid";
|
|
15
|
+
import { coerceNodeId, type INodeId, type NodeId, NodeIdType } from "node-opcua-nodeid";
|
|
5
16
|
import { EnumDefinition, StructureDefinition } from "node-opcua-types";
|
|
6
17
|
import { lowerFirstLetter } from "node-opcua-utils";
|
|
7
|
-
import { DataType,
|
|
8
|
-
import {
|
|
18
|
+
import { DataType, Variant, type VariantOptions } from "node-opcua-variant";
|
|
19
|
+
import {
|
|
20
|
+
type IReaderState,
|
|
21
|
+
ReaderState,
|
|
22
|
+
type ReaderStateParser,
|
|
23
|
+
type ReaderStateParserLike,
|
|
24
|
+
type Xml2Json,
|
|
25
|
+
type XmlAttributes
|
|
26
|
+
} from "node-opcua-xml2json";
|
|
9
27
|
import { localizedText_parser } from "./parsers/localized_text_parser";
|
|
10
28
|
import { makeQualifiedNameParser } from "./parsers/qualified_name_parser";
|
|
11
29
|
import { makeVariantReader } from "./parsers/variant_parser";
|
|
@@ -50,12 +68,12 @@ const partials = {
|
|
|
50
68
|
|
|
51
69
|
Boolean: <Parser<boolean>>{
|
|
52
70
|
finish(this: Parser<boolean>) {
|
|
53
|
-
this.value = this.text.toLowerCase() === "true"
|
|
71
|
+
this.value = this.text.toLowerCase() === "true";
|
|
54
72
|
}
|
|
55
73
|
},
|
|
56
74
|
|
|
57
75
|
ByteString: <Parser<Buffer>>{
|
|
58
|
-
init(this: Parser<Buffer>,
|
|
76
|
+
init(this: Parser<Buffer>, _name: string, _attrs: XmlAttributes, _parent: IReaderState, _engine: Xml2Json) {
|
|
59
77
|
this.value = null;
|
|
60
78
|
},
|
|
61
79
|
finish(this: Parser<Buffer>) {
|
|
@@ -65,56 +83,56 @@ const partials = {
|
|
|
65
83
|
}
|
|
66
84
|
},
|
|
67
85
|
|
|
68
|
-
Float: <Parser<number>>
|
|
86
|
+
Float: <Parser<number>>{
|
|
69
87
|
finish(this: Parser<number>) {
|
|
70
88
|
this.value = parseFloat(this.text);
|
|
71
89
|
}
|
|
72
90
|
},
|
|
73
91
|
|
|
74
|
-
Double: <Parser<number>>
|
|
92
|
+
Double: <Parser<number>>{
|
|
75
93
|
finish(this: Parser<number>) {
|
|
76
94
|
this.value = parseFloat(this.text);
|
|
77
95
|
}
|
|
78
96
|
},
|
|
79
|
-
Byte: <Parser<Byte>>
|
|
97
|
+
Byte: <Parser<Byte>>{
|
|
80
98
|
finish(this: Parser<Byte>) {
|
|
81
99
|
this.value = clamp(parseInt(this.text, 10), 0, 255);
|
|
82
100
|
}
|
|
83
101
|
},
|
|
84
|
-
SByte: <Parser<SByte>>
|
|
102
|
+
SByte: <Parser<SByte>>{
|
|
85
103
|
finish(this: Parser<SByte>) {
|
|
86
104
|
this.value = clamp(parseInt(this.text, 10), -128, 127);
|
|
87
105
|
}
|
|
88
106
|
},
|
|
89
|
-
Int8: <Parser<SByte>>
|
|
107
|
+
Int8: <Parser<SByte>>{
|
|
90
108
|
finish(this: Parser<SByte>) {
|
|
91
109
|
this.value = clamp(parseInt(this.text, 10), -128, 127);
|
|
92
110
|
}
|
|
93
111
|
},
|
|
94
112
|
|
|
95
|
-
Int16: <Parser<Int16>>
|
|
113
|
+
Int16: <Parser<Int16>>{
|
|
96
114
|
finish(this: Parser<Int16>) {
|
|
97
115
|
this.value = clamp(parseInt(this.text, 10), -32768, 32767);
|
|
98
116
|
}
|
|
99
117
|
},
|
|
100
|
-
Int32: <Parser<Int32>>
|
|
118
|
+
Int32: <Parser<Int32>>{
|
|
101
119
|
finish(this: Parser<Int32>) {
|
|
102
120
|
this.value = clamp(parseInt(this.text, 10), -2147483648, 2147483647);
|
|
103
121
|
}
|
|
104
122
|
},
|
|
105
|
-
Int64: <Parser<Int64>>
|
|
123
|
+
Int64: <Parser<Int64>>{
|
|
106
124
|
finish(this: Parser<Int64>) {
|
|
107
125
|
this.value = coerceInt64(parseInt(this.text, 10));
|
|
108
126
|
}
|
|
109
127
|
},
|
|
110
128
|
|
|
111
|
-
UInt8: <Parser<Byte>>
|
|
129
|
+
UInt8: <Parser<Byte>>{
|
|
112
130
|
finish(this: Parser<Byte>) {
|
|
113
131
|
this.value = clamp(parseInt(this.text, 10), 0, 255);
|
|
114
132
|
}
|
|
115
133
|
},
|
|
116
134
|
|
|
117
|
-
UInt16: <Parser<UInt16>>
|
|
135
|
+
UInt16: <Parser<UInt16>>{
|
|
118
136
|
finish(this: Parser<UInt16>) {
|
|
119
137
|
this.value = clamp(parseInt(this.text, 10), 0, 65535);
|
|
120
138
|
}
|
|
@@ -146,7 +164,7 @@ const partials = {
|
|
|
146
164
|
}
|
|
147
165
|
},
|
|
148
166
|
|
|
149
|
-
NodeId: <Parser<NodeId>>
|
|
167
|
+
NodeId: <Parser<NodeId>>{
|
|
150
168
|
finish(this: Parser<NodeId>) {
|
|
151
169
|
// to do check Local or GMT
|
|
152
170
|
this.value = coerceNodeId(this.text);
|
|
@@ -176,13 +194,13 @@ function _clone(a: any): any {
|
|
|
176
194
|
if (typeof a === "string" || typeof a === "number" || typeof a === "boolean") {
|
|
177
195
|
return a;
|
|
178
196
|
}
|
|
179
|
-
if (a
|
|
197
|
+
if (Buffer.isBuffer(a)) {
|
|
180
198
|
return Buffer.from(a);
|
|
181
199
|
}
|
|
182
200
|
if (a instanceof Date) {
|
|
183
201
|
return new Date(a);
|
|
184
202
|
}
|
|
185
|
-
if (a
|
|
203
|
+
if (Array.isArray(a)) {
|
|
186
204
|
return a.map((x) => _clone(x));
|
|
187
205
|
}
|
|
188
206
|
return { ...a };
|
|
@@ -197,14 +215,10 @@ function _makeTypeReader(
|
|
|
197
215
|
const n = dataTypeNodeId1 as INodeId;
|
|
198
216
|
if (n.identifierType === NodeIdType.NUMERIC && n.namespace === 0 && n.value === 0) {
|
|
199
217
|
// a generic Extension Object
|
|
200
|
-
return { name: "Variant", reader: partials
|
|
218
|
+
return { name: "Variant", reader: partials.Variant };
|
|
201
219
|
}
|
|
202
220
|
|
|
203
|
-
if (
|
|
204
|
-
n.namespace === 0 &&
|
|
205
|
-
n.identifierType === NodeIdType.NUMERIC &&
|
|
206
|
-
n.value < DataType.ExtensionObject
|
|
207
|
-
) {
|
|
221
|
+
if (n.namespace === 0 && n.identifierType === NodeIdType.NUMERIC && n.value < DataType.ExtensionObject) {
|
|
208
222
|
const name = DataType[n.value as number] as string;
|
|
209
223
|
const reader = partials[name as keyof typeof partials] as ReaderStateParser;
|
|
210
224
|
return { name, reader };
|
|
@@ -236,14 +250,14 @@ function _makeTypeReader(
|
|
|
236
250
|
const fieldTypename = typeReader.name;
|
|
237
251
|
// c8 ignore next
|
|
238
252
|
if (!fieldParser) {
|
|
239
|
-
throw new Error(
|
|
253
|
+
throw new Error(` Cannot find reader for dataType ${field.dataType} fieldTypename=${fieldTypename}`);
|
|
240
254
|
}
|
|
241
255
|
|
|
242
256
|
if (field.valueRank === undefined || field.valueRank === -1) {
|
|
243
257
|
// scalar
|
|
244
258
|
const parser = fieldParser;
|
|
245
259
|
if (!parser) {
|
|
246
|
-
throw new Error(
|
|
260
|
+
throw new Error(`??? ${field.dataType} ${field.name}`);
|
|
247
261
|
}
|
|
248
262
|
|
|
249
263
|
reader.parser![field.name!] = {
|
|
@@ -254,7 +268,7 @@ function _makeTypeReader(
|
|
|
254
268
|
if (fieldParser.finish) {
|
|
255
269
|
fieldParser.finish.call(this);
|
|
256
270
|
} else {
|
|
257
|
-
debugLog(
|
|
271
|
+
debugLog(`xxx check ${fieldTypename}`);
|
|
258
272
|
}
|
|
259
273
|
this.parent.value = this.parent.value || Object.create(null);
|
|
260
274
|
this.parent.value[elName] = _clone(this.value);
|
|
@@ -265,14 +279,16 @@ function _makeTypeReader(
|
|
|
265
279
|
init(this: any) {
|
|
266
280
|
this.value = [];
|
|
267
281
|
},
|
|
268
|
-
parser: {
|
|
282
|
+
parser: {
|
|
283
|
+
/** empty */
|
|
284
|
+
},
|
|
269
285
|
finish(this: any) {
|
|
270
286
|
const elName = lowerFirstLetter(this.name);
|
|
271
287
|
this.parent.value = this.parent.value || Object.create(null);
|
|
272
288
|
this.parent.value[elName] = this.value;
|
|
273
289
|
this.value = undefined;
|
|
274
290
|
},
|
|
275
|
-
startElement(
|
|
291
|
+
startElement(_name: string, _attrs: XmlAttributes) {
|
|
276
292
|
// empty
|
|
277
293
|
},
|
|
278
294
|
endElement(element: string) {
|
|
@@ -285,7 +301,7 @@ function _makeTypeReader(
|
|
|
285
301
|
throw new Error("Unsupported ValueRank !");
|
|
286
302
|
}
|
|
287
303
|
}
|
|
288
|
-
readerMap.set(dataTypeName,reader);
|
|
304
|
+
readerMap.set(dataTypeName, reader);
|
|
289
305
|
return { name, reader };
|
|
290
306
|
} else if (definition instanceof EnumDefinition) {
|
|
291
307
|
const turnToInt = (value: any) => {
|
|
@@ -300,26 +316,26 @@ function _makeTypeReader(
|
|
|
300
316
|
}
|
|
301
317
|
}
|
|
302
318
|
};
|
|
303
|
-
} else if (definition?.dataType
|
|
319
|
+
} else if (definition?.dataType === DataType.Variant) {
|
|
304
320
|
// <Value><String>Foo</String></Value>
|
|
305
321
|
type Task = (addressSpace: any) => Promise<void>;
|
|
306
322
|
|
|
307
323
|
let variantOptions: VariantOptions = Object.create(null);
|
|
308
324
|
|
|
309
325
|
const variantReader = makeVariantReader(
|
|
310
|
-
(
|
|
311
|
-
/*setDeferredValue: */(
|
|
326
|
+
(_self, data: VariantOptions) => (variantOptions = data),
|
|
327
|
+
/*setDeferredValue: */ (_self, _data, _deferedTask) => {
|
|
312
328
|
// to do
|
|
313
329
|
},
|
|
314
|
-
/* postExtensionObjectDecoding:*/(
|
|
330
|
+
/* postExtensionObjectDecoding:*/ (_task: (addressSpace: IAddressSpace) => Promise<void>) => {
|
|
315
331
|
// to do
|
|
316
332
|
},
|
|
317
|
-
translateNodeId
|
|
333
|
+
translateNodeId
|
|
318
334
|
);
|
|
319
335
|
return {
|
|
320
336
|
name,
|
|
321
337
|
reader: {
|
|
322
|
-
init(this: any
|
|
338
|
+
init(this: any, _name: string, _attrs: XmlAttributes, _parent: IReaderState, _engine: Xml2Json) {
|
|
323
339
|
this.obj = {};
|
|
324
340
|
},
|
|
325
341
|
...variantReader,
|
|
@@ -334,7 +350,7 @@ function _makeTypeReader(
|
|
|
334
350
|
const reader = partials[typeName as keyof typeof partials] as ReaderStateParser;
|
|
335
351
|
// c8 ignore next
|
|
336
352
|
if (!reader) {
|
|
337
|
-
throw new Error(
|
|
353
|
+
throw new Error(`missing parse for ${typeName}`);
|
|
338
354
|
}
|
|
339
355
|
return { name, reader };
|
|
340
356
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import type { IAddressSpace, INamespace, UAObject, UAVariable } from "node-opcua-address-space-base";
|
|
1
2
|
import { NodeClass } from "node-opcua-data-model";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { UAObject, UAVariable, IAddressSpace, INamespace, UAVariableType } from "node-opcua-address-space-base";
|
|
5
|
-
import { NamespacePrivate } from "../../src/namespace_private";
|
|
3
|
+
import { checkDebugFlag, make_debugLog } from "node-opcua-debug";
|
|
4
|
+
import type { NamespacePrivate } from "../../src/namespace_private";
|
|
6
5
|
|
|
7
6
|
const debugLog = make_debugLog(__filename);
|
|
8
7
|
const doDebug = checkDebugFlag(__filename);
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import assert from "assert";
|
|
2
|
-
import { IAddressSpace } from "node-opcua-address-space-base";
|
|
1
|
+
import assert from "node:assert";
|
|
2
|
+
import type { IAddressSpace } from "node-opcua-address-space-base";
|
|
3
|
+
import { coerceInt64 } from "node-opcua-basic-types";
|
|
4
|
+
import { Range } from "node-opcua-data-access";
|
|
5
|
+
import { coerceLocalizedText, LocalizedText, type LocalizedTextOptions } from "node-opcua-data-model";
|
|
6
|
+
import { make_debugLog } from "node-opcua-debug";
|
|
3
7
|
import { ExtensionObject } from "node-opcua-extension-object";
|
|
4
8
|
import { NodeId, resolveNodeId } from "node-opcua-nodeid";
|
|
5
|
-
import {
|
|
9
|
+
import { Argument, EnumValueType, EUInformation, type EUInformationOptions } from "node-opcua-types";
|
|
10
|
+
import { InternalFragmentClonerReaderState, type ParserLike, type ReaderStateParserLike } from "node-opcua-xml2json";
|
|
6
11
|
import { decodeXmlExtensionObject } from "../decode_xml_extension_object";
|
|
7
|
-
import { coerceLocalizedText, LocalizedText, LocalizedTextOptions } from "node-opcua-data-model";
|
|
8
|
-
import { Argument, EnumValueType, EUInformation, EUInformationOptions } from "node-opcua-types";
|
|
9
12
|
import { localizedText_parser } from "./localized_text_parser";
|
|
10
|
-
import { coerceInt64 } from "node-opcua-basic-types";
|
|
11
|
-
import { make_debugLog } from "node-opcua-debug";
|
|
12
|
-
import { Range } from "node-opcua-data-access";
|
|
13
|
-
|
|
14
13
|
|
|
15
14
|
const debugLog = make_debugLog("ExtensionObjectParser");
|
|
16
15
|
const errorLog = make_debugLog("ExtensionObjectParser");
|
|
17
|
-
const
|
|
16
|
+
const _doDebug = false;
|
|
18
17
|
export type Task = (addressSpace: IAddressSpace) => Promise<void>;
|
|
19
18
|
|
|
20
19
|
interface PostExtensionObjectData {
|
|
@@ -75,7 +74,7 @@ const makeArgumentParser = (_translateNodeId: (nodeId: string) => NodeId) => ({
|
|
|
75
74
|
|
|
76
75
|
// #region Range parser
|
|
77
76
|
type RangeParser = ParserLike & { range: Range };
|
|
78
|
-
type RangeParserL2 = ParserLike & { parent: RangeParser
|
|
77
|
+
type RangeParserL2 = ParserLike & { parent: RangeParser; text: string };
|
|
79
78
|
|
|
80
79
|
const Range_parser = {
|
|
81
80
|
Range: {
|
|
@@ -103,14 +102,14 @@ const Range_parser = {
|
|
|
103
102
|
|
|
104
103
|
type EUInformationParser = ReaderStateParserLike & {
|
|
105
104
|
euInformation: EUInformationOptions;
|
|
106
|
-
parser: any
|
|
105
|
+
parser: any;
|
|
107
106
|
};
|
|
108
107
|
type EUInformationParserLevel2 = { parent: EUInformationParser } & { text: string };
|
|
109
108
|
type EUInformationParserLevel2L = { parent: EUInformationParser } & { localizedText: LocalizedTextOptions };
|
|
110
109
|
|
|
111
110
|
const EUInformation_parser: ParserLike = {
|
|
112
111
|
EUInformation: <EUInformationParser>{
|
|
113
|
-
init(this: EUInformationParser,
|
|
112
|
+
init(this: EUInformationParser, _name, _attrs, _parent, _engine) {
|
|
114
113
|
this.euInformation = new EUInformation({});
|
|
115
114
|
},
|
|
116
115
|
parser: {
|
|
@@ -150,17 +149,17 @@ const EUInformation_parser: ParserLike = {
|
|
|
150
149
|
type EnumValueParser = ReaderStateParserLike & {
|
|
151
150
|
enumValueType: EnumValueType;
|
|
152
151
|
parser: {
|
|
153
|
-
Value: ReaderStateParserLike
|
|
154
|
-
DisplayName: ReaderStateParserLike
|
|
155
|
-
Description: ReaderStateParserLike
|
|
156
|
-
}
|
|
152
|
+
Value: ReaderStateParserLike;
|
|
153
|
+
DisplayName: ReaderStateParserLike;
|
|
154
|
+
Description: ReaderStateParserLike;
|
|
155
|
+
};
|
|
157
156
|
};
|
|
158
157
|
type EnumValueParserL2 = ReaderStateParserLike & { parent: EnumValueParser } & { text: string };
|
|
159
158
|
type EnumValueParserL2L = { parent: EnumValueParser } & { localizedText: LocalizedTextOptions };
|
|
160
159
|
|
|
161
160
|
const enumValueType_parser = {
|
|
162
161
|
EnumValueType: {
|
|
163
|
-
init(this: EnumValueParser) {
|
|
162
|
+
init(this: EnumValueParser) {
|
|
164
163
|
this.enumValueType = new EnumValueType({
|
|
165
164
|
description: undefined,
|
|
166
165
|
displayName: undefined,
|
|
@@ -179,14 +178,14 @@ const enumValueType_parser = {
|
|
|
179
178
|
DisplayName: {
|
|
180
179
|
...localizedText_parser.LocalizedText,
|
|
181
180
|
finish(this: EnumValueParserL2L) {
|
|
182
|
-
this.parent.enumValueType.displayName = new LocalizedText({...this.localizedText});
|
|
181
|
+
this.parent.enumValueType.displayName = new LocalizedText({ ...this.localizedText });
|
|
183
182
|
}
|
|
184
183
|
},
|
|
185
184
|
|
|
186
185
|
Description: {
|
|
187
186
|
...localizedText_parser.LocalizedText,
|
|
188
187
|
finish(this: EnumValueParserL2L) {
|
|
189
|
-
this.parent.enumValueType.description = new LocalizedText({...this.localizedText});
|
|
188
|
+
this.parent.enumValueType.description = new LocalizedText({ ...this.localizedText });
|
|
190
189
|
}
|
|
191
190
|
}
|
|
192
191
|
},
|
|
@@ -197,8 +196,6 @@ const enumValueType_parser = {
|
|
|
197
196
|
};
|
|
198
197
|
// #endregion
|
|
199
198
|
|
|
200
|
-
|
|
201
|
-
|
|
202
199
|
export interface ExtensionObjectTypeIdParser {
|
|
203
200
|
parent: ExtensionObjectParser;
|
|
204
201
|
}
|
|
@@ -213,31 +210,30 @@ export interface ExtensionObjectParserInner {
|
|
|
213
210
|
}
|
|
214
211
|
type ExtensionObjectParser = ExtensionObjectParserInner & any;
|
|
215
212
|
export interface ExtensionObjectBodyParser {
|
|
216
|
-
|
|
217
213
|
parent: ExtensionObjectParser;
|
|
218
214
|
_cloneFragment: InternalFragmentClonerReaderState;
|
|
219
215
|
engine: any;
|
|
220
216
|
parser: {
|
|
221
|
-
Argument: ArgumentParser
|
|
222
|
-
EUInformation: EUInformationParser
|
|
223
|
-
EnumValueType: EnumValueParser
|
|
224
|
-
Range: RangeParser
|
|
217
|
+
Argument: ArgumentParser;
|
|
218
|
+
EUInformation: EUInformationParser;
|
|
219
|
+
EnumValueType: EnumValueParser;
|
|
220
|
+
Range: RangeParser;
|
|
225
221
|
};
|
|
226
222
|
}
|
|
227
223
|
|
|
228
224
|
export function makeExtensionObjectInnerParser<T>(
|
|
229
225
|
translateNodeId: (nodeId: string) => NodeId,
|
|
230
226
|
setExtensionObject: (extensionObject: ExtensionObject) => void,
|
|
231
|
-
setExtensionObjectPojo: (typeDefinition: NodeId, xmlData: string, data: T) => void
|
|
227
|
+
setExtensionObjectPojo: (typeDefinition: NodeId, xmlData: string, data: T) => void
|
|
232
228
|
): ReaderStateParserLike {
|
|
233
229
|
const a = makeExtensionObjectParser(translateNodeId, setExtensionObject, setExtensionObjectPojo);
|
|
234
230
|
return a.ExtensionObject;
|
|
235
|
-
}
|
|
231
|
+
}
|
|
236
232
|
|
|
237
233
|
export function makeExtensionObjectParser<T>(
|
|
238
234
|
translateNodeId: (nodeId: string) => NodeId,
|
|
239
235
|
setExtensionObject: (extensionObject: ExtensionObject, data: T) => void,
|
|
240
|
-
setExtensionObjectPojo: (typeDefinition: NodeId, xmlData: string, data: T) => void
|
|
236
|
+
setExtensionObjectPojo: (typeDefinition: NodeId, xmlData: string, data: T) => void
|
|
241
237
|
): ParserLike {
|
|
242
238
|
return {
|
|
243
239
|
ExtensionObject: <ExtensionObjectParser>{
|
|
@@ -266,47 +262,53 @@ export function makeExtensionObjectParser<T>(
|
|
|
266
262
|
Range: Range_parser.Range
|
|
267
263
|
},
|
|
268
264
|
startElement(this: ExtensionObjectBodyParser, elementName: string, attrs: any) {
|
|
269
|
-
if (!Object.
|
|
265
|
+
if (!Object.hasOwn(this.parser, elementName)) {
|
|
270
266
|
// treat it as a opaque XML bloc for the time being
|
|
271
267
|
// until we find the definition of this object, so we know how to interpret the fields
|
|
272
268
|
this._cloneFragment = new InternalFragmentClonerReaderState();
|
|
273
|
-
this.engine
|
|
269
|
+
this.engine?._promote(this._cloneFragment, this.engine?.currentLevel, elementName, attrs);
|
|
274
270
|
}
|
|
275
271
|
},
|
|
276
272
|
finish(this: ExtensionObjectBodyParser) {
|
|
277
|
-
|
|
278
273
|
const data = this.parent.parent as T;
|
|
279
274
|
const typeDefinitionId = this.parent.typeDefinitionId;
|
|
280
275
|
// typeDefinitionId is also the "Default XML" encoding nodeId !
|
|
281
276
|
switch (typeDefinitionId.toString()) {
|
|
282
277
|
case "i=7616": // EnumValueType
|
|
283
|
-
case "ns=0;i=7616":
|
|
278
|
+
case "ns=0;i=7616": {
|
|
284
279
|
const extensionObject = this.parser.EnumValueType.enumValueType;
|
|
285
280
|
assert(extensionObject !== null && typeof extensionObject === "object");
|
|
286
281
|
assert(extensionObject instanceof ExtensionObject);
|
|
287
282
|
setExtensionObject(extensionObject, data);
|
|
288
283
|
break;
|
|
284
|
+
}
|
|
289
285
|
case "i=297": // Arguments
|
|
290
|
-
case "ns=0;i=297":
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
286
|
+
case "ns=0;i=297":
|
|
287
|
+
{
|
|
288
|
+
const extensionObject = this.parser.Argument.argument;
|
|
289
|
+
assert(extensionObject !== null && typeof extensionObject === "object");
|
|
290
|
+
assert(extensionObject instanceof ExtensionObject);
|
|
291
|
+
setExtensionObject(extensionObject, data);
|
|
292
|
+
}
|
|
293
|
+
break;
|
|
294
|
+
case "i=888": // EUInformation
|
|
295
|
+
case "ns=0;i=888":
|
|
296
|
+
{
|
|
297
|
+
const extensionObject = this.parser.EUInformation.euInformation;
|
|
298
|
+
assert(extensionObject !== null && typeof extensionObject === "object");
|
|
299
|
+
assert(extensionObject instanceof ExtensionObject);
|
|
300
|
+
setExtensionObject(extensionObject, data);
|
|
301
|
+
}
|
|
302
|
+
break;
|
|
303
303
|
case "i=885": // Range
|
|
304
|
-
case "ns=0;i=885":
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
304
|
+
case "ns=0;i=885":
|
|
305
|
+
{
|
|
306
|
+
const extensionObject = this.parser.Range.range;
|
|
307
|
+
assert(extensionObject !== null && typeof extensionObject === "object");
|
|
308
|
+
assert(extensionObject instanceof ExtensionObject);
|
|
309
|
+
setExtensionObject(extensionObject, data);
|
|
310
|
+
}
|
|
311
|
+
break;
|
|
310
312
|
default: {
|
|
311
313
|
// c8 ignore next
|
|
312
314
|
if (!this._cloneFragment) {
|
|
@@ -319,13 +321,13 @@ export function makeExtensionObjectParser<T>(
|
|
|
319
321
|
);
|
|
320
322
|
break;
|
|
321
323
|
}
|
|
322
|
-
const bodyXML = this._cloneFragment
|
|
324
|
+
const bodyXML = this._cloneFragment?.value;
|
|
323
325
|
this._cloneFragment!.value = null;
|
|
324
326
|
|
|
325
327
|
// the "Default Xml" encoding nodeId
|
|
326
328
|
const xmlEncodingNodeId = typeDefinitionId;
|
|
327
329
|
if (typeDefinitionId.isEmpty()) {
|
|
328
|
-
debugLog(
|
|
330
|
+
debugLog(`xmlEncodingNodeId is empty for ${typeDefinitionId.toString()}`);
|
|
329
331
|
break;
|
|
330
332
|
}
|
|
331
333
|
setExtensionObjectPojo(xmlEncodingNodeId, bodyXML, data);
|
|
@@ -339,16 +341,15 @@ export function makeExtensionObjectParser<T>(
|
|
|
339
341
|
/* empty */
|
|
340
342
|
}
|
|
341
343
|
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
|
|
344
|
+
};
|
|
345
|
+
}
|
|
345
346
|
|
|
346
347
|
export function createXMLExtensionObjectDecodingTask(
|
|
347
|
-
translateNodeId: (nodeId:string) => NodeId,
|
|
348
|
-
xmlEncodingNodeId: NodeId,
|
|
349
|
-
|
|
348
|
+
translateNodeId: (nodeId: string) => NodeId,
|
|
349
|
+
xmlEncodingNodeId: NodeId,
|
|
350
|
+
bodyXML: string,
|
|
351
|
+
withDecoded: (extensionObject: ExtensionObject) => void
|
|
350
352
|
) {
|
|
351
|
-
|
|
352
353
|
const capturedXmlBody = bodyXML;
|
|
353
354
|
|
|
354
355
|
const task = async (addressSpace2: IAddressSpace) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { coerceLocalizedText,
|
|
2
|
-
import { ReaderStateParserLike } from "node-opcua-xml2json";
|
|
1
|
+
import { coerceLocalizedText, type LocalizedText, type LocalizedTextOptions } from "node-opcua-data-model";
|
|
2
|
+
import type { ReaderStateParserLike } from "node-opcua-xml2json";
|
|
3
3
|
|
|
4
4
|
type LocalizedTextParserLikeL1 = ReaderStateParserLike & {
|
|
5
5
|
localizedText: LocalizedTextOptions;
|
|
@@ -16,7 +16,7 @@ export const localizedText_parser = {
|
|
|
16
16
|
parser: {
|
|
17
17
|
Locale: {
|
|
18
18
|
finish(this: LocalizedTextParserLikeL2) {
|
|
19
|
-
this.parent.localizedText = this.parent.localizedText || { text: undefined};
|
|
19
|
+
this.parent.localizedText = this.parent.localizedText || { text: undefined };
|
|
20
20
|
this.parent.localizedText.locale = this.text.trim();
|
|
21
21
|
}
|
|
22
22
|
},
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { type NodeId, resolveNodeId } from "node-opcua-nodeid";
|
|
3
2
|
|
|
4
3
|
export const makeNodeIdParser = (_translateNodeId: (nodeId: string) => NodeId) => ({
|
|
5
4
|
NodeId: {
|
|
@@ -14,4 +13,4 @@ export const makeNodeIdParser = (_translateNodeId: (nodeId: string) => NodeId) =
|
|
|
14
13
|
}
|
|
15
14
|
}
|
|
16
15
|
}
|
|
17
|
-
});
|
|
16
|
+
});
|