node-opcua-address-space 2.169.0 → 2.172.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/source/address_space_ts.d.ts +13 -13
- package/dist/source/address_space_ts.js +4 -0
- package/dist/source/address_space_ts.js.map +1 -1
- package/dist/source/continuation_points/continuation_point_manager.d.ts +6 -3
- package/dist/source/continuation_points/continuation_point_manager.js +4 -4
- package/dist/source/continuation_points/continuation_point_manager.js.map +1 -1
- package/dist/source/helpers/adjust_browse_direction.d.ts +1 -1
- package/dist/source/helpers/argument_list.d.ts +13 -11
- package/dist/source/helpers/argument_list.js +24 -15
- package/dist/source/helpers/argument_list.js.map +1 -1
- package/dist/source/helpers/call_helpers.d.ts +6 -3
- package/dist/source/helpers/call_helpers.js +5 -6
- package/dist/source/helpers/call_helpers.js.map +1 -1
- package/dist/source/helpers/coerce_enum_value.d.ts +2 -2
- package/dist/source/helpers/coerce_enum_value.js +2 -2
- package/dist/source/helpers/coerce_enum_value.js.map +1 -1
- package/dist/source/helpers/dump_tools.d.ts +3 -3
- package/dist/source/helpers/dump_tools.js +2 -2
- package/dist/source/helpers/dump_tools.js.map +1 -1
- package/dist/source/helpers/ensure_secure_access.d.ts +1 -1
- package/dist/source/helpers/ensure_secure_access.js +1 -1
- package/dist/source/helpers/ensure_secure_access.js.map +1 -1
- package/dist/source/helpers/make_optionals_map.js +0 -5
- package/dist/source/helpers/make_optionals_map.js.map +1 -1
- package/dist/source/helpers/multiform_func.d.ts +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.d.ts +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js.map +1 -1
- package/dist/source/index.d.ts +38 -38
- package/dist/source/index.js +53 -54
- package/dist/source/index.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +11 -11
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +6 -6
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +4 -4
- package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +4 -3
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +10 -13
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +11 -11
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.d.ts +11 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +5 -5
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +21 -29
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +3 -7
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +0 -23
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +8 -10
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +4 -6
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +5 -5
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +3 -3
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +7 -7
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +5 -8
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +5 -5
- package/dist/source/interfaces/data_access/ua_y_array_item_ex.d.ts +3 -3
- package/dist/source/interfaces/extension_object_constructor.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +2 -2
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +6 -6
- package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +7 -6
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js +4 -0
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +1 -1
- package/dist/source/interfaces/state_machine/ua_transition_ex.d.ts +2 -2
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +2 -2
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js +3 -0
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -1
- package/dist/source/loader/decode_xml_extension_object.d.ts +4 -4
- package/dist/source/loader/decode_xml_extension_object.js +3 -3
- package/dist/source/loader/decode_xml_extension_object.js.map +1 -1
- package/dist/source/loader/ensure_datatype_extracted.d.ts +2 -2
- package/dist/source/loader/ensure_datatype_extracted.js +5 -5
- package/dist/source/loader/ensure_datatype_extracted.js.map +1 -1
- package/dist/source/loader/generateAddressSpaceRaw.d.ts +3 -3
- package/dist/source/loader/generateAddressSpaceRaw.js +6 -6
- package/dist/source/loader/generateAddressSpaceRaw.js.map +1 -1
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/source/loader/make_xml_extension_object_parser.d.ts +2 -2
- package/dist/source/loader/make_xml_extension_object_parser.js +19 -19
- package/dist/source/loader/make_xml_extension_object_parser.js.map +1 -1
- package/dist/source/loader/namespace_post_step.d.ts +1 -1
- package/dist/source/loader/namespace_post_step.js.map +1 -1
- package/dist/source/loader/parsers/extension_object_parser.d.ts +4 -4
- package/dist/source/loader/parsers/extension_object_parser.js +22 -23
- package/dist/source/loader/parsers/extension_object_parser.js.map +1 -1
- package/dist/source/loader/parsers/localized_text_parser.d.ts +2 -2
- package/dist/source/loader/parsers/localized_text_parser.js.map +1 -1
- package/dist/source/loader/parsers/nodeid_parser.d.ts +1 -1
- package/dist/source/loader/parsers/nodeid_parser.js.map +1 -1
- package/dist/source/loader/parsers/qualified_name_parser.d.ts +3 -3
- package/dist/source/loader/parsers/qualified_name_parser.js.map +1 -1
- package/dist/source/loader/parsers/variant_parser.d.ts +5 -5
- package/dist/source/loader/parsers/variant_parser.js +13 -13
- package/dist/source/loader/parsers/variant_parser.js.map +1 -1
- package/dist/source/loader/register_node_promoter.d.ts +1 -1
- package/dist/source/loader/register_node_promoter.js.map +1 -1
- package/dist/source/namespace.d.ts +4 -4
- package/dist/source/namespace_alarm_and_condition.d.ts +22 -21
- package/dist/source/namespace_data_access.d.ts +11 -11
- package/dist/source/namespace_machine_state.d.ts +4 -4
- package/dist/source/pseudo_session.d.ts +8 -5
- package/dist/source/pseudo_session.js +28 -28
- package/dist/source/pseudo_session.js.map +1 -1
- package/dist/source/session_context.js +1 -1
- package/dist/source/session_context.js.map +1 -1
- package/dist/source/set_namespace_meta_data.d.ts +1 -1
- package/dist/source/set_namespace_meta_data.js +1 -1
- package/dist/source/set_namespace_meta_data.js.map +1 -1
- package/dist/source/ua_addin.d.ts +3 -3
- package/dist/source/ua_addin.js +1 -1
- package/dist/source/ua_addin.js.map +1 -1
- package/dist/source/ua_interface.d.ts +2 -3
- package/dist/source/ua_interface.js +13 -33
- package/dist/source/ua_interface.js.map +1 -1
- package/dist/source/ua_root_folder.d.ts +1 -1
- package/dist/source/ua_two_state_variable_ex.d.ts +5 -5
- package/dist/src/_instantiate_helpers.d.ts +1 -1
- package/dist/src/_instantiate_helpers.js +32 -9
- package/dist/src/_instantiate_helpers.js.map +1 -1
- package/dist/src/_mandatory_child_or_requested_optional_filter.d.ts +2 -2
- package/dist/src/_mandatory_child_or_requested_optional_filter.js +9 -10
- package/dist/src/_mandatory_child_or_requested_optional_filter.js.map +1 -1
- package/dist/src/address_space.d.ts +2 -2
- package/dist/src/address_space.js +13 -15
- package/dist/src/address_space.js.map +1 -1
- package/dist/src/address_space_change_event_tools.d.ts +3 -3
- package/dist/src/address_space_change_event_tools.js +8 -10
- package/dist/src/address_space_change_event_tools.js.map +1 -1
- package/dist/src/address_space_private.d.ts +11 -11
- package/dist/src/address_space_private.js +3 -0
- package/dist/src/address_space_private.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +6 -6
- package/dist/src/alarms_and_conditions/condition_info_impl.js +6 -15
- package/dist/src/alarms_and_conditions/condition_info_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +10 -10
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +77 -48
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +8 -5
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +15 -9
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -1
- package/dist/src/alarms_and_conditions/index.d.ts +3 -3
- package/dist/src/alarms_and_conditions/index.js +3 -3
- package/dist/src/alarms_and_conditions/index.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +21 -14
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +26 -21
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +6 -7
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +30 -28
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +9 -11
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js +10 -10
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +3 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +6 -5
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +16 -42
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +100 -82
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +12 -7
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +9 -8
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +18 -18
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +16 -18
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +4 -4
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +2 -2
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +10 -9
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +20 -19
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +2 -4
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +12 -38
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +50 -65
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +15 -17
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +15 -11
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +22 -15
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +35 -24
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +15 -16
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +19 -14
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +4 -4
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/apply_condition_refresh.d.ts +4 -4
- package/dist/src/apply_condition_refresh.js +1 -1
- package/dist/src/apply_condition_refresh.js.map +1 -1
- package/dist/src/base_node_impl.d.ts +5 -7
- package/dist/src/base_node_impl.js +3 -3
- package/dist/src/base_node_impl.js.map +1 -1
- package/dist/src/base_node_private.d.ts +10 -7
- package/dist/src/base_node_private.js +73 -50
- package/dist/src/base_node_private.js.map +1 -1
- package/dist/src/check_value_rank_compatibility.js +11 -7
- package/dist/src/check_value_rank_compatibility.js.map +1 -1
- package/dist/src/data_access/add_dataItem_stuff.d.ts +1 -1
- package/dist/src/data_access/add_dataItem_stuff.js +2 -22
- package/dist/src/data_access/add_dataItem_stuff.js.map +1 -1
- package/dist/src/data_access/adjust_datavalue_status_code.d.ts +6 -3
- package/dist/src/data_access/adjust_datavalue_status_code.js +3 -3
- package/dist/src/data_access/adjust_datavalue_status_code.js.map +1 -1
- package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +13 -11
- package/dist/src/data_access/ua_multistate_discrete_impl.js +28 -23
- package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +19 -23
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js +31 -31
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +10 -16
- package/dist/src/data_access/ua_two_state_discrete_impl.js +18 -14
- package/dist/src/data_access/ua_two_state_discrete_impl.js.map +1 -1
- package/dist/src/event_data.d.ts +8 -21
- package/dist/src/event_data.js +24 -19
- package/dist/src/event_data.js.map +1 -1
- package/dist/src/extension_object_array_node.d.ts +5 -2
- package/dist/src/extension_object_array_node.js +21 -24
- package/dist/src/extension_object_array_node.js.map +1 -1
- package/dist/src/get_basic_datatype.d.ts +2 -2
- package/dist/src/get_basic_datatype.js.map +1 -1
- package/dist/src/historical_access/address_space_historical_data_node.d.ts +3 -3
- package/dist/src/historical_access/address_space_historical_data_node.js +24 -17
- package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -1
- package/dist/src/idx_iterator.js +1 -1
- package/dist/src/idx_iterator.js.map +1 -1
- package/dist/src/index_current.d.ts +31 -31
- package/dist/src/index_current.js +45 -45
- package/dist/src/index_current.js.map +1 -1
- package/dist/src/namespace_impl.d.ts +4 -3
- package/dist/src/namespace_impl.js +17 -14
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/namespace_private.js.map +1 -1
- package/dist/src/nodeid_manager.d.ts +3 -3
- package/dist/src/nodeid_manager.js +19 -16
- package/dist/src/nodeid_manager.js.map +1 -1
- package/dist/src/nodeset_tools/adjust_namespace_array.d.ts +1 -1
- package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +2 -2
- package/dist/src/nodeset_tools/construct_namespace_dependency.js +7 -7
- package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +1 -1
- package/dist/src/nodeset_tools/dump_to_bsd.d.ts +1 -1
- package/dist/src/nodeset_tools/dump_to_bsd.js +15 -11
- package/dist/src/nodeset_tools/dump_to_bsd.js.map +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +5 -3
- package/dist/src/nodeset_tools/nodeset_to_xml.js +64 -67
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/src/private_namespace.d.ts +2 -2
- package/dist/src/private_namespace.js.map +1 -1
- package/dist/src/reference_impl.d.ts +2 -2
- package/dist/src/reference_impl.js +9 -11
- package/dist/src/reference_impl.js.map +1 -1
- package/dist/src/role_permissions.d.ts +1 -1
- package/dist/src/role_permissions.js.map +1 -1
- package/dist/src/state_machine/finite_state_machine.d.ts +11 -14
- package/dist/src/state_machine/finite_state_machine.js +36 -30
- package/dist/src/state_machine/finite_state_machine.js.map +1 -1
- package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +8 -6
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js +16 -18
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
- package/dist/src/state_machine/ua_two_state_variable.d.ts +12 -11
- package/dist/src/state_machine/ua_two_state_variable.js +24 -29
- package/dist/src/state_machine/ua_two_state_variable.js.map +1 -1
- package/dist/src/tool_isSubtypeOf.d.ts +5 -5
- package/dist/src/tool_isSubtypeOf.js +21 -18
- package/dist/src/tool_isSubtypeOf.js.map +1 -1
- package/dist/src/ua_condition_type.d.ts +1 -1
- package/dist/src/ua_data_type_impl.js.map +1 -1
- package/dist/src/ua_method_impl.d.ts +9 -5
- package/dist/src/ua_method_impl.js +1 -1
- package/dist/src/ua_method_impl.js.map +1 -1
- package/dist/src/ua_object_impl.d.ts +10 -7
- package/dist/src/ua_object_impl.js +43 -15
- package/dist/src/ua_object_impl.js.map +1 -1
- package/dist/src/ua_object_type_impl.d.ts +7 -5
- package/dist/src/ua_object_type_impl.js +6 -7
- package/dist/src/ua_object_type_impl.js.map +1 -1
- package/dist/src/ua_reference_type_impl.d.ts +6 -8
- package/dist/src/ua_reference_type_impl.js +16 -14
- package/dist/src/ua_reference_type_impl.js.map +1 -1
- package/dist/src/ua_variable_impl.d.ts +44 -45
- package/dist/src/ua_variable_impl.js +177 -83
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/dist/src/ua_variable_impl_ext_obj.d.ts +3 -3
- package/dist/src/ua_variable_impl_ext_obj.js +37 -29
- package/dist/src/ua_variable_impl_ext_obj.js.map +1 -1
- package/dist/src/ua_variable_type_impl.d.ts +11 -11
- package/dist/src/ua_variable_type_impl.js +13 -21
- package/dist/src/ua_variable_type_impl.js.map +1 -1
- package/dist/src/ua_view_impl.d.ts +3 -4
- package/dist/src/ua_view_impl.js +5 -6
- package/dist/src/ua_view_impl.js.map +1 -1
- package/dist/src/validate_data_type_correctness.d.ts +2 -2
- package/dist/src/validate_data_type_correctness.js +12 -3
- package/dist/src/validate_data_type_correctness.js.map +1 -1
- package/dist/tsconfig_base.tsbuildinfo +1 -1
- package/distHelpers/add_event_generator_object.d.ts +5 -2
- package/distHelpers/add_event_generator_object.js +2 -2
- package/distHelpers/add_event_generator_object.js.map +1 -1
- package/distHelpers/alarms_and_conditions_demo.d.ts +1 -1
- package/distHelpers/alarms_and_conditions_demo.js +4 -6
- package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
- package/distHelpers/assertHasMatchingReference.d.ts +1 -1
- package/distHelpers/assertHasMatchingReference.js +2 -2
- package/distHelpers/assertHasMatchingReference.js.map +1 -1
- package/distHelpers/boiler_system.d.ts +6 -3
- package/distHelpers/boiler_system.js +44 -42
- package/distHelpers/boiler_system.js.map +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.d.ts +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.js +25 -27
- package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -1
- package/distHelpers/get_address_space_fixture.js +15 -15
- package/distHelpers/get_address_space_fixture.js.map +1 -1
- package/distHelpers/index.d.ts +2 -2
- package/distHelpers/index.js +2 -2
- package/distHelpers/index.js.map +1 -1
- package/distHelpers/mock_session.d.ts +7 -7
- package/distHelpers/mock_session.js +4 -4
- package/distHelpers/mock_session.js.map +1 -1
- package/distNodeJS/generate_address_space.d.ts +2 -2
- package/distNodeJS/generate_address_space.js +2 -2
- package/distNodeJS/generate_address_space.js.map +1 -1
- package/package.json +36 -36
- package/source/address_space_ts.ts +29 -30
- package/source/continuation_points/continuation_point_manager.ts +8 -7
- package/source/helpers/adjust_browse_direction.ts +1 -1
- package/source/helpers/argument_list.ts +37 -25
- package/source/helpers/call_helpers.ts +10 -15
- package/source/helpers/coerce_enum_value.ts +4 -4
- package/source/helpers/dump_tools.ts +6 -11
- package/source/helpers/ensure_secure_access.ts +2 -2
- package/source/helpers/make_optionals_map.ts +3 -10
- package/source/helpers/multiform_func.ts +1 -1
- package/source/helpers/resolve_opaque_on_address_space.ts +2 -2
- package/source/index.ts +44 -54
- package/source/interfaces/alarms_and_conditions/condition_info_i.ts +3 -4
- package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +13 -13
- package/source/interfaces/alarms_and_conditions/deviation_stuff.ts +8 -10
- package/source/interfaces/alarms_and_conditions/install_setpoint_options.ts +4 -5
- package/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +4 -6
- package/source/interfaces/alarms_and_conditions/instantiate_condition_options.ts +3 -3
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +6 -3
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +11 -11
- package/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +11 -25
- package/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +16 -13
- package/source/interfaces/alarms_and_conditions/ua_base_event_ex.ts +12 -0
- package/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +5 -5
- package/source/interfaces/alarms_and_conditions/ua_condition_ex.ts +30 -54
- package/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +3 -34
- package/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +18 -22
- package/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +8 -15
- package/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +4 -7
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +5 -6
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +3 -3
- package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +9 -16
- package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +5 -8
- package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +5 -5
- package/source/interfaces/data_access/ua_y_array_item_ex.ts +3 -3
- package/source/interfaces/extension_object_constructor.ts +3 -4
- package/source/interfaces/i_condition_variable_type_setter_options.ts +1 -3
- package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +3 -3
- package/source/interfaces/state_machine/ua_finite_state_machine_type.ts +2 -2
- package/source/interfaces/state_machine/ua_program_state_machine_type.ts +3 -3
- package/source/interfaces/state_machine/ua_shelved_state_machine_ex.ts +10 -7
- package/source/interfaces/state_machine/ua_state_machine_type.ts +11 -8
- package/source/interfaces/state_machine/ua_transition_ex.ts +2 -2
- package/source/interfaces/ua_subscription_diagnostics_variable_ex.ts +3 -2
- package/source/loader/decode_xml_extension_object.ts +7 -7
- package/source/loader/ensure_datatype_extracted.ts +14 -19
- package/source/loader/generateAddressSpaceRaw.ts +12 -13
- package/source/loader/load_nodeset2.ts +3 -3
- package/source/loader/make_xml_extension_object_parser.ts +55 -39
- package/source/loader/namespace_post_step.ts +3 -4
- package/source/loader/parsers/extension_object_parser.ts +63 -62
- package/source/loader/parsers/localized_text_parser.ts +3 -3
- package/source/loader/parsers/nodeid_parser.ts +2 -3
- package/source/loader/parsers/qualified_name_parser.ts +6 -7
- package/source/loader/parsers/variant_parser.ts +48 -55
- package/source/loader/register_node_promoter.ts +2 -2
- package/source/namespace.ts +4 -4
- package/source/namespace_alarm_and_condition.ts +22 -22
- package/source/namespace_data_access.ts +12 -13
- package/source/namespace_machine_state.ts +10 -5
- package/source/pseudo_session.ts +53 -50
- package/source/session_context.ts +1 -1
- package/source/set_namespace_meta_data.ts +3 -3
- package/source/ua_addin.ts +10 -11
- package/source/ua_interface.ts +27 -38
- package/source/ua_root_folder.ts +1 -1
- package/source/ua_two_state_variable_ex.ts +5 -5
- package/source_nodejs/generate_address_space.ts +5 -9
- package/src/_instantiate_helpers.ts +78 -25
- package/src/_mandatory_child_or_requested_optional_filter.ts +20 -19
- package/src/address_space.ts +36 -45
- package/src/address_space_change_event_tools.ts +25 -30
- package/src/address_space_private.ts +20 -21
- package/src/alarms_and_conditions/condition.ts +0 -2
- package/src/alarms_and_conditions/condition_info_impl.ts +11 -19
- package/src/alarms_and_conditions/condition_snapshot_impl.ts +109 -85
- package/src/alarms_and_conditions/deviation_alarm_helper.ts +20 -15
- package/src/alarms_and_conditions/index.ts +3 -3
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +44 -32
- package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +35 -34
- package/src/alarms_and_conditions/ua_base_event_impl.ts +15 -19
- package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +6 -2
- package/src/alarms_and_conditions/ua_condition_impl.ts +140 -130
- package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +20 -12
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +40 -43
- package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +7 -7
- package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +28 -30
- package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +3 -6
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +59 -90
- package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +31 -27
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +57 -36
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +31 -27
- package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +6 -6
- package/src/apply_condition_refresh.ts +7 -8
- package/src/base_node_impl.ts +64 -45
- package/src/base_node_private.ts +171 -139
- package/src/check_value_rank_compatibility.ts +19 -15
- package/src/data_access/add_dataItem_stuff.ts +3 -4
- package/src/data_access/adjust_datavalue_status_code.ts +7 -7
- package/src/data_access/ua_multistate_discrete_impl.ts +44 -28
- package/src/data_access/ua_multistate_value_discrete_impl.ts +77 -66
- package/src/data_access/ua_two_state_discrete_impl.ts +29 -36
- package/src/event_data.ts +29 -26
- package/src/extension_object_array_node.ts +27 -28
- package/src/get_basic_datatype.ts +4 -5
- package/src/historical_access/address_space_historical_data_node.ts +65 -50
- package/src/idx_iterator.ts +4 -12
- package/src/index_current.ts +33 -45
- package/src/namespace_impl.ts +75 -62
- package/src/namespace_private.ts +2 -8
- package/src/nodeid_manager.ts +30 -27
- package/src/nodeset_tools/adjust_namespace_array.ts +1 -1
- package/src/nodeset_tools/construct_namespace_dependency.ts +15 -16
- package/src/nodeset_tools/dump_to_bsd.ts +27 -22
- package/src/nodeset_tools/nodeset_to_xml.ts +95 -114
- package/src/private_namespace.ts +3 -6
- package/src/reference_impl.ts +11 -14
- package/src/role_permissions.ts +1 -1
- package/src/state_machine/finite_state_machine.ts +60 -61
- package/src/state_machine/ua_shelving_state_machine_ex.ts +23 -23
- package/src/state_machine/ua_two_state_variable.ts +34 -31
- package/src/tool_isSubtypeOf.ts +48 -33
- package/src/ua_condition_type.ts +1 -1
- package/src/ua_data_type_impl.ts +12 -13
- package/src/ua_method_impl.ts +17 -12
- package/src/ua_object_impl.ts +73 -39
- package/src/ua_object_type_impl.ts +25 -25
- package/src/ua_reference_type_impl.ts +19 -19
- package/src/ua_variable_impl.ts +316 -219
- package/src/ua_variable_impl_ext_obj.ts +63 -50
- package/src/ua_variable_type_impl.ts +43 -49
- package/src/ua_view_impl.ts +5 -5
- package/src/validate_data_type_correctness.ts +17 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAddressSpace, INamespace, UADataType } from "node-opcua-address-space-base";
|
|
1
|
+
import type { IAddressSpace, INamespace, UADataType } from "node-opcua-address-space-base";
|
|
2
2
|
import {
|
|
3
3
|
convertStructureTypeSchemaToStructureDefinition,
|
|
4
4
|
DataTypeExtractStrategy,
|
|
@@ -7,11 +7,14 @@ import {
|
|
|
7
7
|
} from "node-opcua-client-dynamic-extension-object";
|
|
8
8
|
import { checkDebugFlag, make_debugLog } from "node-opcua-debug";
|
|
9
9
|
import { DataTypeFactory, getStandardDataTypeFactory } from "node-opcua-factory";
|
|
10
|
-
import { CallbackT } from "node-opcua-status-code";
|
|
11
|
-
import { StructureField } from "node-opcua-types";
|
|
12
|
-
import { AddressSpacePrivate } from "../../src/address_space_private";
|
|
10
|
+
import type { CallbackT } from "node-opcua-status-code";
|
|
11
|
+
import type { StructureField } from "node-opcua-types";
|
|
12
|
+
import type { AddressSpacePrivate } from "../../src/address_space_private";
|
|
13
|
+
import {
|
|
14
|
+
constructNamespaceDependency,
|
|
15
|
+
constructNamespacePriorityTable
|
|
16
|
+
} from "../../src/nodeset_tools/construct_namespace_dependency";
|
|
13
17
|
import { PseudoSession } from "../pseudo_session";
|
|
14
|
-
import { constructNamespaceDependency, constructNamespacePriorityTable } from "../../src/nodeset_tools/construct_namespace_dependency";
|
|
15
18
|
|
|
16
19
|
const debugLog = make_debugLog(__filename);
|
|
17
20
|
const doDebug = checkDebugFlag(__filename);
|
|
@@ -20,11 +23,7 @@ interface UADataTypePriv extends UADataType {
|
|
|
20
23
|
$partialDefinition?: StructureField[];
|
|
21
24
|
}
|
|
22
25
|
|
|
23
|
-
function fixDefinition103(
|
|
24
|
-
addressSpace: IAddressSpace,
|
|
25
|
-
namespaceArray: string[],
|
|
26
|
-
dataTypeManager: ExtraDataTypeManager
|
|
27
|
-
): void {
|
|
26
|
+
function fixDefinition103(addressSpace: IAddressSpace, namespaceArray: string[], dataTypeManager: ExtraDataTypeManager): void {
|
|
28
27
|
// fix datatype _getDefinition();
|
|
29
28
|
for (let namespaceIndex = 1; namespaceIndex < namespaceArray.length; namespaceIndex++) {
|
|
30
29
|
const df = dataTypeManager.getDataTypeFactory(namespaceIndex);
|
|
@@ -36,11 +35,11 @@ function fixDefinition103(
|
|
|
36
35
|
if (!dataType) {
|
|
37
36
|
continue;
|
|
38
37
|
}
|
|
39
|
-
if (dataType.$partialDefinition
|
|
38
|
+
if (dataType.$partialDefinition?.length) {
|
|
40
39
|
continue;
|
|
41
40
|
}
|
|
42
41
|
// debugLog(" Exploration", dataType.browseName.toString());
|
|
43
|
-
if (!dataType.$partialDefinition || (dataType.$partialDefinition.length === 0 && s.schema.fields
|
|
42
|
+
if (!dataType.$partialDefinition || (dataType.$partialDefinition.length === 0 && s.schema.fields?.length > 0)) {
|
|
44
43
|
const sd = convertStructureTypeSchemaToStructureDefinition(s.schema);
|
|
45
44
|
dataType.$partialDefinition = sd.fields || undefined;
|
|
46
45
|
}
|
|
@@ -48,10 +47,7 @@ function fixDefinition103(
|
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
export async function ensureDatatypeExtracted(
|
|
52
|
-
addressSpace: IAddressSpace
|
|
53
|
-
): Promise<ExtraDataTypeManager> {
|
|
54
|
-
|
|
50
|
+
export async function ensureDatatypeExtracted(addressSpace: IAddressSpace): Promise<ExtraDataTypeManager> {
|
|
55
51
|
const addressSpacePriv: any = addressSpace as AddressSpacePrivate;
|
|
56
52
|
|
|
57
53
|
if (!addressSpacePriv.$$extraDataTypeManager) {
|
|
@@ -70,7 +66,6 @@ export async function ensureDatatypeExtracted(
|
|
|
70
66
|
const priorityTable = constructNamespacePriorityTable(addressSpace).priorityTable;
|
|
71
67
|
|
|
72
68
|
for (let namespaceIndex = 1; namespaceIndex < namespaceArray.length; namespaceIndex++) {
|
|
73
|
-
|
|
74
69
|
const namespace = addressSpace.getNamespace(namespaceIndex);
|
|
75
70
|
|
|
76
71
|
if (doDebug) {
|
|
@@ -88,13 +83,13 @@ export async function ensureDatatypeExtracted(
|
|
|
88
83
|
debugLog("namespace = ", namespace.namespaceUri);
|
|
89
84
|
debugLog("priorityTable", priorityTable);
|
|
90
85
|
debugLog(dependency.map((ns) => `${ns.index} ${ns.namespaceUri}`).join("\n"));
|
|
91
|
-
throw new Error(
|
|
86
|
+
throw new Error(`Cannot find factory for namespace ${ns.namespaceUri}`);
|
|
92
87
|
}
|
|
93
88
|
return df;
|
|
94
89
|
});
|
|
95
90
|
// getStandardDataTypeFactory()
|
|
96
91
|
|
|
97
|
-
const
|
|
92
|
+
const _dataTypeFactory1 = new DataTypeFactory(dependFactories);
|
|
98
93
|
}
|
|
99
94
|
const dataTypeFactory1 = new DataTypeFactory([...factories]);
|
|
100
95
|
dataTypeFactory1.targetNamespace = namespace.namespaceUri;
|
|
@@ -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);
|