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
|
@@ -7,34 +7,34 @@ exports.getAddressSpaceFixture = getAddressSpaceFixture;
|
|
|
7
7
|
/**
|
|
8
8
|
* @module node-opcua-address-space
|
|
9
9
|
*/
|
|
10
|
-
const
|
|
11
|
-
const
|
|
10
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
11
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
12
12
|
function getAddressSpaceFixture(pathname) {
|
|
13
13
|
// find in nodesets folder in the first place
|
|
14
|
-
const folder1 =
|
|
15
|
-
if (
|
|
16
|
-
const filename =
|
|
17
|
-
if (
|
|
14
|
+
const folder1 = node_path_1.default.join(__dirname, "../nodesets");
|
|
15
|
+
if (node_fs_1.default.existsSync(folder1)) {
|
|
16
|
+
const filename = node_path_1.default.join(folder1, pathname);
|
|
17
|
+
if (node_fs_1.default.existsSync(filename)) {
|
|
18
18
|
return filename;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
// find in test_fixtures seconds
|
|
22
|
-
let folder =
|
|
23
|
-
if (!
|
|
24
|
-
folder =
|
|
25
|
-
if (!
|
|
26
|
-
folder =
|
|
22
|
+
let folder = node_path_1.default.join(__dirname, "./test_fixtures");
|
|
23
|
+
if (!node_fs_1.default.existsSync(folder)) {
|
|
24
|
+
folder = node_path_1.default.join(__dirname, "../test_helpers/test_fixtures");
|
|
25
|
+
if (!node_fs_1.default.existsSync(folder)) {
|
|
26
|
+
folder = node_path_1.default.join(__dirname, "../../test_helpers/test_fixtures");
|
|
27
27
|
// c8 ignore next
|
|
28
|
-
if (!
|
|
28
|
+
if (!node_fs_1.default.existsSync(folder)) {
|
|
29
29
|
// tslint:disable:no-console
|
|
30
30
|
console.log(" cannot find test_fixtures folder ");
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
const filename =
|
|
34
|
+
const filename = node_path_1.default.join(folder, pathname);
|
|
35
35
|
// c8 ignore next
|
|
36
|
-
if (!
|
|
37
|
-
throw new Error(
|
|
36
|
+
if (!node_fs_1.default.existsSync(filename)) {
|
|
37
|
+
throw new Error(` cannot find fixture with name ${pathname}`);
|
|
38
38
|
}
|
|
39
39
|
return filename;
|
|
40
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_address_space_fixture.js","sourceRoot":"","sources":["../test_helpers/get_address_space_fixture.ts"],"names":[],"mappings":";;;;;AAMA,
|
|
1
|
+
{"version":3,"file":"get_address_space_fixture.js","sourceRoot":"","sources":["../test_helpers/get_address_space_fixture.ts"],"names":[],"mappings":";;;;;AAMA,wDA+BC;AArCD;;GAEG;AACH,sDAAyB;AACzB,0DAA6B;AAE7B,SAAgB,sBAAsB,CAAC,QAAgB;IACnD,6CAA6C;IAC7C,MAAM,OAAO,GAAG,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IACpD,IAAI,iBAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACzB,MAAM,QAAQ,GAAG,mBAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC9C,IAAI,iBAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC1B,OAAO,QAAQ,CAAC;QACpB,CAAC;IACL,CAAC;IAED,iCAAiC;IACjC,IAAI,MAAM,GAAG,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;IACrD,IAAI,CAAC,iBAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,MAAM,GAAG,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,+BAA+B,CAAC,CAAC;QAC/D,IAAI,CAAC,iBAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,MAAM,GAAG,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,kCAAkC,CAAC,CAAC;YAElE,iBAAiB;YACjB,IAAI,CAAC,iBAAE,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;gBACzB,4BAA4B;gBAC5B,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;YACtD,CAAC;QACL,CAAC;IACL,CAAC;IACD,MAAM,QAAQ,GAAG,mBAAI,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAE7C,iBAAiB;IACjB,IAAI,CAAC,iBAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,kCAAkC,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC"}
|
package/distHelpers/index.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
export * from "./add_event_generator_object";
|
|
5
5
|
export * from "./alarms_and_conditions_demo";
|
|
6
6
|
export * from "./assertHasMatchingReference";
|
|
7
|
+
export * from "./boiler_system";
|
|
7
8
|
export * from "./create_minimalist_address_space_nodeset";
|
|
9
|
+
export * from "./date_utils";
|
|
8
10
|
export * from "./get_address_space_fixture";
|
|
9
11
|
export * from "./get_mini_address_space";
|
|
10
|
-
export * from "./boiler_system";
|
|
11
12
|
export * from "./mock_session";
|
|
12
|
-
export * from "./date_utils";
|
package/distHelpers/index.js
CHANGED
|
@@ -20,10 +20,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
20
20
|
__exportStar(require("./add_event_generator_object"), exports);
|
|
21
21
|
__exportStar(require("./alarms_and_conditions_demo"), exports);
|
|
22
22
|
__exportStar(require("./assertHasMatchingReference"), exports);
|
|
23
|
+
__exportStar(require("./boiler_system"), exports);
|
|
23
24
|
__exportStar(require("./create_minimalist_address_space_nodeset"), exports);
|
|
25
|
+
__exportStar(require("./date_utils"), exports);
|
|
24
26
|
__exportStar(require("./get_address_space_fixture"), exports);
|
|
25
27
|
__exportStar(require("./get_mini_address_space"), exports);
|
|
26
|
-
__exportStar(require("./boiler_system"), exports);
|
|
27
28
|
__exportStar(require("./mock_session"), exports);
|
|
28
|
-
__exportStar(require("./date_utils"), exports);
|
|
29
29
|
//# sourceMappingURL=index.js.map
|
package/distHelpers/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../test_helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,+DAA6C;AAC7C,+DAA6C;AAC7C,+DAA6C;AAC7C,4EAA0D;AAC1D,8DAA4C;AAC5C,2DAAyC;AACzC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../test_helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,+DAA6C;AAC7C,+DAA6C;AAC7C,+DAA6C;AAC7C,kDAAgC;AAChC,4EAA0D;AAC1D,+CAA6B;AAC7B,8DAA4C;AAC5C,2DAAyC;AACzC,iDAA+B"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ContinuationData, IContinuationPointInfo, IContinuationPointManager, ISessionBase } from "node-opcua-address-space-base";
|
|
2
|
-
import { DataValue } from "node-opcua-data-value";
|
|
3
|
-
import { ReferenceDescription } from "node-opcua-service-browse";
|
|
1
|
+
import type { ContinuationData, IContinuationPointInfo, IContinuationPointManager, ISessionBase } from "node-opcua-address-space-base";
|
|
2
|
+
import type { DataValue } from "node-opcua-data-value";
|
|
3
|
+
import type { ReferenceDescription } from "node-opcua-service-browse";
|
|
4
4
|
export declare class MockContinuationPointManager implements IContinuationPointManager {
|
|
5
|
-
registerHistoryReadRaw(
|
|
6
|
-
getNextHistoryReadRaw(
|
|
7
|
-
registerReferences(
|
|
8
|
-
getNextReferences(
|
|
5
|
+
registerHistoryReadRaw(_maxElements: number, _dataValues: DataValue[], _cnt: ContinuationData): IContinuationPointInfo<DataValue>;
|
|
6
|
+
getNextHistoryReadRaw(_numValues: number, _cnt: ContinuationData): IContinuationPointInfo<DataValue>;
|
|
7
|
+
registerReferences(_maxElements: number, _values: ReferenceDescription[], _cnt: ContinuationData): IContinuationPointInfo<ReferenceDescription>;
|
|
8
|
+
getNextReferences(_numValue: number, _cnt: ContinuationData): IContinuationPointInfo<ReferenceDescription>;
|
|
9
9
|
dispose(): void;
|
|
10
10
|
}
|
|
11
11
|
export declare const mockSession: ISessionBase;
|
|
@@ -3,16 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.mockSession = exports.MockContinuationPointManager = void 0;
|
|
4
4
|
const node_opcua_nodeid_1 = require("node-opcua-nodeid");
|
|
5
5
|
class MockContinuationPointManager {
|
|
6
|
-
registerHistoryReadRaw(
|
|
6
|
+
registerHistoryReadRaw(_maxElements, _dataValues, _cnt) {
|
|
7
7
|
throw new Error("Method not implemented.");
|
|
8
8
|
}
|
|
9
|
-
getNextHistoryReadRaw(
|
|
9
|
+
getNextHistoryReadRaw(_numValues, _cnt) {
|
|
10
10
|
throw new Error("Method not implemented.");
|
|
11
11
|
}
|
|
12
|
-
registerReferences(
|
|
12
|
+
registerReferences(_maxElements, _values, _cnt) {
|
|
13
13
|
throw new Error("Method not implemented.");
|
|
14
14
|
}
|
|
15
|
-
getNextReferences(
|
|
15
|
+
getNextReferences(_numValue, _cnt) {
|
|
16
16
|
throw new Error("Method not implemented.");
|
|
17
17
|
}
|
|
18
18
|
dispose() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock_session.js","sourceRoot":"","sources":["../test_helpers/mock_session.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"mock_session.js","sourceRoot":"","sources":["../test_helpers/mock_session.ts"],"names":[],"mappings":";;;AAOA,yDAA2C;AAG3C,MAAa,4BAA4B;IAC9B,sBAAsB,CACzB,YAAoB,EACpB,WAAwB,EACxB,IAAsB;QAEtB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IACM,qBAAqB,CAAC,UAAkB,EAAE,IAAsB;QACnE,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IACM,kBAAkB,CACrB,YAAoB,EACpB,OAA+B,EAC/B,IAAsB;QAEtB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IACM,iBAAiB,CAAC,SAAiB,EAAE,IAAsB;QAC9D,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IACM,OAAO;QACV,aAAa;IACjB,CAAC;CACJ;AAxBD,oEAwBC;AAEY,QAAA,WAAW,GAAiB;IACrC,YAAY;QACR,OAAO,IAAI,0BAAM,EAAE,CAAC;IACxB,CAAC;IACD,wBAAwB,EAAE,IAAI,4BAA4B,EAAE;CAC/D,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAddressSpace } from "node-opcua-address-space-base";
|
|
2
|
-
import { NodeSetLoaderOptions } from "..";
|
|
1
|
+
import type { IAddressSpace } from "node-opcua-address-space-base";
|
|
2
|
+
import { type NodeSetLoaderOptions } from "..";
|
|
3
3
|
export declare function readNodeSet2XmlFile(xmlFile: string): Promise<string>;
|
|
4
4
|
export declare function generateAddressSpace(addressSpace: IAddressSpace, xmlFiles: string | string[], options?: NodeSetLoaderOptions): Promise<void>;
|
|
@@ -8,13 +8,13 @@ exports.generateAddressSpace = generateAddressSpace;
|
|
|
8
8
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
9
|
const node_opcua_debug_1 = require("node-opcua-debug");
|
|
10
10
|
const __1 = require("..");
|
|
11
|
-
const
|
|
11
|
+
const _doDebug = (0, node_opcua_debug_1.checkDebugFlag)(__filename);
|
|
12
12
|
const debugLog = (0, node_opcua_debug_1.make_debugLog)(__filename);
|
|
13
13
|
const errorLog = (0, node_opcua_debug_1.make_errorLog)(__filename);
|
|
14
14
|
async function readNodeSet2XmlFile(xmlFile) {
|
|
15
15
|
// c8 ignore next
|
|
16
16
|
if (!node_fs_1.default.existsSync(xmlFile)) {
|
|
17
|
-
const msg =
|
|
17
|
+
const msg = `[NODE-OPCUA-E02] generateAddressSpace : cannot find nodeset2 xml file at ${xmlFile}`;
|
|
18
18
|
errorLog(msg);
|
|
19
19
|
throw new Error(msg);
|
|
20
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate_address_space.js","sourceRoot":"","sources":["../source_nodejs/generate_address_space.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"generate_address_space.js","sourceRoot":"","sources":["../source_nodejs/generate_address_space.ts"],"names":[],"mappings":";;;;;AASA,kDAUC;AAED,oDAMC;AA3BD,sDAAyB;AAEzB,uDAAgF;AAChF,0BAAwE;AAExE,MAAM,QAAQ,GAAG,IAAA,iCAAc,EAAC,UAAU,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,IAAA,gCAAa,EAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,QAAQ,GAAG,IAAA,gCAAa,EAAC,UAAU,CAAC,CAAC;AAEpC,KAAK,UAAU,mBAAmB,CAAC,OAAe;IACrD,iBAAiB;IACjB,IAAI,CAAC,iBAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,MAAM,GAAG,GAAG,4EAA4E,OAAO,EAAE,CAAC;QAClG,QAAQ,CAAC,GAAG,CAAC,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IACD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,OAAO,GAAG,MAAM,iBAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC7D,OAAO,OAAO,CAAC;AACnB,CAAC;AAEM,KAAK,UAAU,oBAAoB,CACtC,YAA2B,EAC3B,QAA2B,EAC3B,OAA8B;IAE9B,MAAM,IAAA,2BAAuB,EAAC,YAAY,EAAE,QAAQ,EAAE,mBAAmB,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;AAC9F,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-address-space",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.172.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module address-space",
|
|
5
5
|
"main": "./dist/src/index_current.js",
|
|
6
6
|
"types": "./dist/source/index.d.ts",
|
|
@@ -21,48 +21,48 @@
|
|
|
21
21
|
"@types/semver": "7.7.1",
|
|
22
22
|
"chalk": "4.1.2",
|
|
23
23
|
"dequeue": "^1.0.5",
|
|
24
|
-
"node-opcua-address-space-base": "2.
|
|
24
|
+
"node-opcua-address-space-base": "2.172.0",
|
|
25
25
|
"node-opcua-assert": "2.164.0",
|
|
26
|
-
"node-opcua-basic-types": "2.
|
|
27
|
-
"node-opcua-binary-stream": "2.
|
|
28
|
-
"node-opcua-client-dynamic-extension-object": "2.
|
|
26
|
+
"node-opcua-basic-types": "2.172.0",
|
|
27
|
+
"node-opcua-binary-stream": "2.172.0",
|
|
28
|
+
"node-opcua-client-dynamic-extension-object": "2.172.0",
|
|
29
29
|
"node-opcua-constants": "2.157.0",
|
|
30
|
-
"node-opcua-crypto": "5.3.
|
|
31
|
-
"node-opcua-data-access": "2.
|
|
32
|
-
"node-opcua-data-model": "2.
|
|
33
|
-
"node-opcua-data-value": "2.
|
|
34
|
-
"node-opcua-date-time": "2.
|
|
35
|
-
"node-opcua-debug": "2.
|
|
36
|
-
"node-opcua-enum": "2.
|
|
37
|
-
"node-opcua-extension-object": "2.
|
|
38
|
-
"node-opcua-factory": "2.
|
|
39
|
-
"node-opcua-nodeid": "2.
|
|
40
|
-
"node-opcua-nodeset-ua": "2.
|
|
41
|
-
"node-opcua-numeric-range": "2.
|
|
42
|
-
"node-opcua-object-registry": "2.
|
|
43
|
-
"node-opcua-pseudo-session": "2.
|
|
44
|
-
"node-opcua-service-browse": "2.
|
|
45
|
-
"node-opcua-service-call": "2.
|
|
46
|
-
"node-opcua-service-history": "2.
|
|
47
|
-
"node-opcua-service-translate-browse-path": "2.
|
|
48
|
-
"node-opcua-service-write": "2.
|
|
49
|
-
"node-opcua-status-code": "2.
|
|
50
|
-
"node-opcua-types": "2.
|
|
51
|
-
"node-opcua-utils": "2.
|
|
52
|
-
"node-opcua-variant": "2.
|
|
53
|
-
"node-opcua-xml2json": "2.
|
|
54
|
-
"semver": "^7.
|
|
30
|
+
"node-opcua-crypto": "5.3.6",
|
|
31
|
+
"node-opcua-data-access": "2.172.0",
|
|
32
|
+
"node-opcua-data-model": "2.172.0",
|
|
33
|
+
"node-opcua-data-value": "2.172.0",
|
|
34
|
+
"node-opcua-date-time": "2.172.0",
|
|
35
|
+
"node-opcua-debug": "2.172.0",
|
|
36
|
+
"node-opcua-enum": "2.172.0",
|
|
37
|
+
"node-opcua-extension-object": "2.172.0",
|
|
38
|
+
"node-opcua-factory": "2.172.0",
|
|
39
|
+
"node-opcua-nodeid": "2.172.0",
|
|
40
|
+
"node-opcua-nodeset-ua": "2.172.0",
|
|
41
|
+
"node-opcua-numeric-range": "2.172.0",
|
|
42
|
+
"node-opcua-object-registry": "2.172.0",
|
|
43
|
+
"node-opcua-pseudo-session": "2.172.0",
|
|
44
|
+
"node-opcua-service-browse": "2.172.0",
|
|
45
|
+
"node-opcua-service-call": "2.172.0",
|
|
46
|
+
"node-opcua-service-history": "2.172.0",
|
|
47
|
+
"node-opcua-service-translate-browse-path": "2.172.0",
|
|
48
|
+
"node-opcua-service-write": "2.172.0",
|
|
49
|
+
"node-opcua-status-code": "2.172.0",
|
|
50
|
+
"node-opcua-types": "2.172.0",
|
|
51
|
+
"node-opcua-utils": "2.172.0",
|
|
52
|
+
"node-opcua-variant": "2.172.0",
|
|
53
|
+
"node-opcua-xml2json": "2.172.0",
|
|
54
|
+
"semver": "^7.8.0",
|
|
55
55
|
"thenify-ex": "4.4.0",
|
|
56
56
|
"xml-writer": "^1.7.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"humanize": "0.0.9",
|
|
60
|
-
"node-opcua-benchmarker": "2.
|
|
61
|
-
"node-opcua-leak-detector": "2.
|
|
60
|
+
"node-opcua-benchmarker": "2.172.0",
|
|
61
|
+
"node-opcua-leak-detector": "2.172.0",
|
|
62
62
|
"node-opcua-nodesets": "2.163.1",
|
|
63
|
-
"node-opcua-packet-analyzer": "2.
|
|
64
|
-
"node-opcua-schemas": "2.
|
|
65
|
-
"node-opcua-service-filter": "2.
|
|
63
|
+
"node-opcua-packet-analyzer": "2.172.0",
|
|
64
|
+
"node-opcua-schemas": "2.172.0",
|
|
65
|
+
"node-opcua-service-filter": "2.172.0",
|
|
66
66
|
"node-opcua-test-fixtures": "2.157.0"
|
|
67
67
|
},
|
|
68
68
|
"author": "Etienne Rossignon",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"internet of things"
|
|
81
81
|
],
|
|
82
82
|
"homepage": "http://node-opcua.github.io/",
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "dfe9993a93b5c3897825e898b5f07b25952c7f45",
|
|
84
84
|
"files": [
|
|
85
85
|
"dist",
|
|
86
86
|
"distHelpers",
|
|
@@ -2,46 +2,45 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @module node-opcua-address-space
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { DataValue } from "node-opcua-data-value";
|
|
9
|
-
import { ExtensionObject } from "node-opcua-extension-object";
|
|
10
|
-
import { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
11
|
-
import { ReadRawModifiedDetails } from "node-opcua-service-history";
|
|
12
|
-
import { DataType } from "node-opcua-variant";
|
|
13
|
-
import {
|
|
14
|
-
BaseNode,
|
|
15
|
-
IAddressSpace,
|
|
5
|
+
|
|
6
|
+
import type {
|
|
7
|
+
AddBaseNodeOptions,
|
|
16
8
|
AddVariableOptionsWithoutValue,
|
|
9
|
+
AttributeEventName,
|
|
10
|
+
BaseNode,
|
|
17
11
|
BindVariableOptions,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
UAReference,
|
|
21
|
-
AddBaseNodeOptions,
|
|
22
|
-
VariableStuff,
|
|
23
|
-
UAVariableType,
|
|
24
|
-
UAVariable,
|
|
25
|
-
UAObject,
|
|
26
|
-
IVariableHistorianOptions,
|
|
12
|
+
IAddressSpace,
|
|
13
|
+
INamespace,
|
|
27
14
|
IVariableHistorian,
|
|
28
|
-
|
|
15
|
+
IVariableHistorianOptions,
|
|
29
16
|
UADynamicVariableArray,
|
|
17
|
+
UAMethod,
|
|
18
|
+
UAObject,
|
|
19
|
+
UAReference,
|
|
30
20
|
UAReferenceType,
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
UAVariable,
|
|
22
|
+
UAVariableT,
|
|
23
|
+
UAVariableType,
|
|
24
|
+
VariableStuff
|
|
33
25
|
} from "node-opcua-address-space-base";
|
|
34
|
-
import {
|
|
35
|
-
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
26
|
+
import type { Int64, UAString, UInt32 } from "node-opcua-basic-types";
|
|
27
|
+
import type { AttributeIds, LocalizedText, LocalizedTextLike } from "node-opcua-data-model";
|
|
28
|
+
import type { DataValue } from "node-opcua-data-value";
|
|
29
|
+
import type { ExtensionObject } from "node-opcua-extension-object";
|
|
30
|
+
import type { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
31
|
+
import type { UAFolder } from "node-opcua-nodeset-ua";
|
|
32
|
+
import type { ReadRawModifiedDetails } from "node-opcua-service-history";
|
|
33
|
+
import type { DataType } from "node-opcua-variant";
|
|
34
|
+
|
|
35
|
+
import type { MinimalistAddressSpace } from "../src/reference_impl";
|
|
36
|
+
import type { Namespace } from "./namespace";
|
|
37
|
+
import type { UARootFolder } from "./ua_root_folder";
|
|
39
38
|
|
|
40
39
|
export declare function resolveReferenceType(addressSpace: MinimalistAddressSpace, reference: UAReference): UAReferenceType;
|
|
41
40
|
|
|
42
41
|
export declare function resolveReferenceNode(addressSpace: MinimalistAddressSpace, reference: UAReference): BaseNode;
|
|
43
42
|
|
|
44
|
-
export declare function makeAttributeEventName(attributeId: AttributeIds):
|
|
43
|
+
export declare function makeAttributeEventName(attributeId: AttributeIds): AttributeEventName;
|
|
45
44
|
|
|
46
45
|
export interface EnumValueTypeOptionsLike {
|
|
47
46
|
value?: Int64 | UInt32;
|
|
@@ -201,7 +200,7 @@ export declare function addElement<T extends ExtensionObject>(
|
|
|
201
200
|
|
|
202
201
|
export declare function removeElement<T extends ExtensionObject>(
|
|
203
202
|
uaArrayVariableNode: UADynamicVariableArray<T>,
|
|
204
|
-
element: number | UAVariable | ((a: T)=>boolean
|
|
203
|
+
element: number | UAVariable | ((a: T) => boolean)
|
|
205
204
|
): void;
|
|
206
205
|
|
|
207
206
|
// }}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-server
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
|
|
4
|
+
|
|
5
|
+
import type {
|
|
6
|
+
ContinuationData,
|
|
7
7
|
ContinuationPoint,
|
|
8
|
-
IContinuationPointManager,
|
|
9
8
|
IContinuationPointInfo,
|
|
10
|
-
|
|
9
|
+
IContinuationPointManager
|
|
11
10
|
} from "node-opcua-address-space-base";
|
|
12
|
-
import { DataValue } from "node-opcua-data-value";
|
|
11
|
+
import type { DataValue } from "node-opcua-data-value";
|
|
13
12
|
import { make_warningLog } from "node-opcua-debug";
|
|
13
|
+
import { StatusCodes } from "node-opcua-status-code";
|
|
14
|
+
import type { ReferenceDescription } from "node-opcua-types";
|
|
14
15
|
|
|
15
|
-
const
|
|
16
|
+
const _warningLog = make_warningLog(__filename);
|
|
16
17
|
|
|
17
18
|
let counter = 0;
|
|
18
19
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space
|
|
3
3
|
*/
|
|
4
|
-
import { BrowseDirection } from "node-opcua-data-model";
|
|
4
|
+
import type { BrowseDirection } from "node-opcua-data-model";
|
|
5
5
|
|
|
6
6
|
export function adjustBrowseDirection(
|
|
7
7
|
browseDirection: BrowseDirection | null | undefined,
|
|
@@ -2,33 +2,32 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @module node-opcua-address-space
|
|
4
4
|
*/
|
|
5
|
+
|
|
6
|
+
import type { IAddressSpace, UAMethod, UAObject } from "node-opcua-address-space-base";
|
|
5
7
|
import { assert } from "node-opcua-assert";
|
|
6
8
|
import { decodeArray, encodeArray } from "node-opcua-basic-types";
|
|
7
|
-
import { BinaryStream, BinaryStreamSizeCalculator, OutputBinaryStream } from "node-opcua-binary-stream";
|
|
8
|
-
import { checkDebugFlag, make_debugLog, make_warningLog } from "node-opcua-debug";
|
|
9
|
-
import { findBuiltInType } from "node-opcua-factory";
|
|
10
|
-
import { coerceNodeId, NodeId, resolveNodeId } from "node-opcua-nodeid";
|
|
11
|
-
import { Argument } from "node-opcua-service-call";
|
|
12
|
-
import { StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
13
|
-
import { Variant } from "node-opcua-variant";
|
|
14
|
-
import { DataType } from "node-opcua-variant";
|
|
15
|
-
import { VariantArrayType } from "node-opcua-variant";
|
|
9
|
+
import { type BinaryStream, BinaryStreamSizeCalculator, type OutputBinaryStream } from "node-opcua-binary-stream";
|
|
16
10
|
import { DataTypeIds } from "node-opcua-constants";
|
|
17
11
|
import { NodeClass } from "node-opcua-data-model";
|
|
18
|
-
import {
|
|
12
|
+
import { checkDebugFlag, make_debugLog, make_warningLog } from "node-opcua-debug";
|
|
13
|
+
import { type BasicTypeDefinition, findBuiltInType } from "node-opcua-factory";
|
|
14
|
+
import { coerceNodeId, type NodeId, resolveNodeId } from "node-opcua-nodeid";
|
|
15
|
+
import type { Argument } from "node-opcua-service-call";
|
|
16
|
+
import { type StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
17
|
+
import { DataType, type Variant, VariantArrayType } from "node-opcua-variant";
|
|
19
18
|
|
|
20
19
|
const debugLog = make_debugLog(__filename);
|
|
21
20
|
const warningLog = make_warningLog(__filename);
|
|
22
21
|
const doDebug = checkDebugFlag(__filename);
|
|
23
22
|
|
|
24
|
-
function myfindBuiltInType(dataType: DataType):
|
|
23
|
+
function myfindBuiltInType(dataType: DataType): BasicTypeDefinition {
|
|
25
24
|
return findBuiltInType(DataType[dataType]);
|
|
26
25
|
}
|
|
27
26
|
export interface ArgumentDef {
|
|
28
27
|
dataType: DataType;
|
|
29
28
|
valueRank?: undefined | number;
|
|
30
29
|
}
|
|
31
|
-
export function encode_ArgumentList(definition: ArgumentDef[], args:
|
|
30
|
+
export function encode_ArgumentList(definition: ArgumentDef[], args: unknown[], stream: OutputBinaryStream): void {
|
|
32
31
|
assert(definition.length === args.length);
|
|
33
32
|
|
|
34
33
|
assert(Array.isArray(definition));
|
|
@@ -43,20 +42,26 @@ export function encode_ArgumentList(definition: ArgumentDef[], args: any[], stre
|
|
|
43
42
|
const value = args[i];
|
|
44
43
|
|
|
45
44
|
const encodeFunc = myfindBuiltInType(def.dataType).encode;
|
|
45
|
+
if (!encodeFunc) {
|
|
46
|
+
throw new Error(
|
|
47
|
+
"This BaseDataType cannot be encoded because it has no definition.\n" +
|
|
48
|
+
"Please construct a BaseDataType({definition : [{dataType: DataType.UInt32 }]});"
|
|
49
|
+
);
|
|
50
|
+
}
|
|
46
51
|
// assert((def.valueRank === -1) || (def.valueRank === 0));
|
|
47
52
|
|
|
48
53
|
// todo : handle -3 -2
|
|
49
54
|
const isArray = def.valueRank && (def.valueRank === 1 || def.valueRank !== -1);
|
|
50
55
|
|
|
51
56
|
if (isArray) {
|
|
52
|
-
encodeArray(value, stream, encodeFunc);
|
|
57
|
+
encodeArray(value as unknown[], stream, encodeFunc);
|
|
53
58
|
} else {
|
|
54
59
|
encodeFunc(value, stream);
|
|
55
60
|
}
|
|
56
61
|
}
|
|
57
62
|
}
|
|
58
63
|
|
|
59
|
-
export function decode_ArgumentList(definition: ArgumentDef[], stream: BinaryStream):
|
|
64
|
+
export function decode_ArgumentList(definition: ArgumentDef[], stream: BinaryStream): unknown[] {
|
|
60
65
|
// c8 ignore next
|
|
61
66
|
if (!Array.isArray(definition)) {
|
|
62
67
|
throw new Error(
|
|
@@ -65,12 +70,19 @@ export function decode_ArgumentList(definition: ArgumentDef[], stream: BinaryStr
|
|
|
65
70
|
);
|
|
66
71
|
}
|
|
67
72
|
|
|
68
|
-
const args:
|
|
69
|
-
let value;
|
|
73
|
+
const args: unknown[] = [];
|
|
74
|
+
let value: unknown;
|
|
70
75
|
|
|
71
76
|
for (const def of definition) {
|
|
72
77
|
const decodeFunc = myfindBuiltInType(def.dataType).decode;
|
|
73
|
-
|
|
78
|
+
if (!decodeFunc) {
|
|
79
|
+
throw new Error(
|
|
80
|
+
"This BaseDataType cannot be decoded because it has no definition.\n" +
|
|
81
|
+
"Please construct a BaseDataType({definition : [{dataType: DataType.UInt32 }]});"
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
// assert(def.valueRank === -1 || def.valueRank==0);
|
|
85
|
+
// todo : handle -3 -2
|
|
74
86
|
// xx assert(def.valueRank === -1 || def.valueRank==0);
|
|
75
87
|
const isArray = def.valueRank === 1 || def.valueRank === -1;
|
|
76
88
|
|
|
@@ -84,7 +96,7 @@ export function decode_ArgumentList(definition: ArgumentDef[], stream: BinaryStr
|
|
|
84
96
|
return args;
|
|
85
97
|
}
|
|
86
98
|
|
|
87
|
-
export function binaryStoreSize_ArgumentList(description: ArgumentDef[], args:
|
|
99
|
+
export function binaryStoreSize_ArgumentList(description: ArgumentDef[], args: unknown[]): number {
|
|
88
100
|
assert(Array.isArray(description));
|
|
89
101
|
assert(Array.isArray(args));
|
|
90
102
|
assert(args.length === description.length);
|
|
@@ -169,8 +181,8 @@ function checkValueRank(argDefinition: Argument, arg: Variant) {
|
|
|
169
181
|
* @private
|
|
170
182
|
*/
|
|
171
183
|
export function isArgumentValid(addressSpace: IAddressSpace, argDefinition: Argument, arg: Variant): boolean {
|
|
172
|
-
assert(Object.
|
|
173
|
-
assert(Object.
|
|
184
|
+
assert(Object.hasOwn(argDefinition, "dataType"));
|
|
185
|
+
assert(Object.hasOwn(argDefinition, "valueRank"));
|
|
174
186
|
|
|
175
187
|
const argDefDataType = addressSpace.findDataType(argDefinition.dataType);
|
|
176
188
|
const argDataType = addressSpace.findDataType(resolveNodeId(arg.dataType));
|
|
@@ -204,7 +216,7 @@ export function isArgumentValid(addressSpace: IAddressSpace, argDefinition: Argu
|
|
|
204
216
|
doDebug && debugLog(" checking argDataType ", argDataType.toString());
|
|
205
217
|
}
|
|
206
218
|
|
|
207
|
-
if (argDataType.nodeId.value === argDefDataType
|
|
219
|
+
if (argDataType.nodeId.value === argDefDataType?.nodeId.value) {
|
|
208
220
|
return true;
|
|
209
221
|
}
|
|
210
222
|
|
|
@@ -220,8 +232,8 @@ export function isArgumentValid(addressSpace: IAddressSpace, argDefinition: Argu
|
|
|
220
232
|
|
|
221
233
|
// special case for Enumeration
|
|
222
234
|
if (arg.dataType === DataType.Int32) {
|
|
223
|
-
const enumDataType = addressSpace.findDataType(coerceNodeId(DataTypeIds.Enumeration))
|
|
224
|
-
if (argDefDataType.isSubtypeOf(enumDataType)) {
|
|
235
|
+
const enumDataType = addressSpace.findDataType(coerceNodeId(DataTypeIds.Enumeration));
|
|
236
|
+
if (enumDataType && argDefDataType.isSubtypeOf(enumDataType)) {
|
|
225
237
|
return true;
|
|
226
238
|
}
|
|
227
239
|
}
|
|
@@ -229,7 +241,7 @@ export function isArgumentValid(addressSpace: IAddressSpace, argDefinition: Argu
|
|
|
229
241
|
}
|
|
230
242
|
|
|
231
243
|
/**
|
|
232
|
-
*/
|
|
244
|
+
*/
|
|
233
245
|
export function verifyArguments_ArgumentList(
|
|
234
246
|
addressSpace: IAddressSpace,
|
|
235
247
|
methodInputArguments: Argument[],
|
|
@@ -239,7 +251,7 @@ export function verifyArguments_ArgumentList(
|
|
|
239
251
|
statusCode: StatusCode;
|
|
240
252
|
} {
|
|
241
253
|
const inputArgumentResults: StatusCode[] = methodInputArguments.map((methodInputArgument, index) => {
|
|
242
|
-
const argument = inputArguments
|
|
254
|
+
const argument = inputArguments?.[index];
|
|
243
255
|
if (!argument) {
|
|
244
256
|
return StatusCodes.BadNoData;
|
|
245
257
|
} else if (!isArgumentValid(addressSpace, methodInputArgument, argument)) {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space
|
|
3
3
|
*/
|
|
4
|
+
|
|
5
|
+
import type { IAddressSpace, ISessionContext, UAMethod, UAObject } from "node-opcua-address-space-base";
|
|
4
6
|
import { assert } from "node-opcua-assert";
|
|
5
7
|
import { NodeClass } from "node-opcua-data-model";
|
|
6
8
|
import { NodeId } from "node-opcua-nodeid";
|
|
7
|
-
import { CallMethodRequest } from "node-opcua-service-call";
|
|
8
|
-
import {
|
|
9
|
-
import { CallMethodResultOptions } from "node-opcua-types";
|
|
10
|
-
import { Variant } from "node-opcua-variant";
|
|
11
|
-
import { ISessionContext, IAddressSpace, UAMethod, UAObject } from "node-opcua-address-space-base";
|
|
9
|
+
import type { CallMethodRequest } from "node-opcua-service-call";
|
|
10
|
+
import { StatusCodes } from "node-opcua-status-code";
|
|
11
|
+
import type { CallMethodResultOptions } from "node-opcua-types";
|
|
12
|
+
import type { Variant } from "node-opcua-variant";
|
|
12
13
|
|
|
13
14
|
import { getMethodDeclaration_ArgumentList, verifyArguments_ArgumentList } from "./argument_list";
|
|
14
15
|
import { resolveOpaqueOnAddressSpace } from "./resolve_opaque_on_address_space";
|
|
@@ -72,16 +73,11 @@ export async function callMethodHelper(
|
|
|
72
73
|
return response;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
|
|
76
76
|
try {
|
|
77
77
|
await resolveOpaqueOnAddressSpace(addressSpace, inputArguments);
|
|
78
78
|
|
|
79
|
-
const callMethodResponse = await methodObj.execute(
|
|
80
|
-
|
|
81
|
-
inputArguments,
|
|
82
|
-
context);
|
|
83
|
-
callMethodResponse.inputArgumentResults =
|
|
84
|
-
callMethodResponse.inputArgumentResults || response.inputArgumentResults || [];
|
|
79
|
+
const callMethodResponse = await methodObj.execute(object, inputArguments, context);
|
|
80
|
+
callMethodResponse.inputArgumentResults = callMethodResponse.inputArgumentResults || response.inputArgumentResults || [];
|
|
85
81
|
assert(callMethodResponse.statusCode);
|
|
86
82
|
|
|
87
83
|
if (callMethodResponse.statusCode?.isGood()) {
|
|
@@ -89,14 +85,13 @@ export async function callMethodHelper(
|
|
|
89
85
|
}
|
|
90
86
|
|
|
91
87
|
assert(Array.isArray(callMethodResponse.inputArgumentResults));
|
|
92
|
-
assert(callMethodResponse.inputArgumentResults
|
|
88
|
+
assert(callMethodResponse.inputArgumentResults?.length === methodInputArguments.length);
|
|
93
89
|
|
|
94
90
|
const outputArguments = callMethodResponse.outputArguments || [];
|
|
95
91
|
await resolveOpaqueOnAddressSpace(addressSpace, outputArguments as Variant[]);
|
|
96
92
|
|
|
97
93
|
return callMethodResponse;
|
|
98
|
-
} catch (
|
|
94
|
+
} catch (_err) {
|
|
99
95
|
return { statusCode: StatusCodes.BadInternalError };
|
|
100
96
|
}
|
|
101
|
-
|
|
102
97
|
}
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
* @module node-opcua-address-space
|
|
3
3
|
*/
|
|
4
4
|
import { assert } from "node-opcua-assert";
|
|
5
|
-
import {
|
|
5
|
+
import { coerceInt64, type Int64 } from "node-opcua-basic-types";
|
|
6
6
|
import { coerceLocalizedText } from "node-opcua-data-model";
|
|
7
7
|
import { EnumValueType } from "node-opcua-types";
|
|
8
|
-
import { EnumValueTypeOptionsLike } from "../address_space_ts";
|
|
8
|
+
import type { EnumValueTypeOptionsLike } from "../address_space_ts";
|
|
9
9
|
|
|
10
10
|
export function coerceEnumValues(enumValues: EnumValueTypeOptionsLike[] | { [key: string]: number | Int64 }): EnumValueType[] {
|
|
11
11
|
if (Array.isArray(enumValues)) {
|
|
12
12
|
//
|
|
13
13
|
return enumValues.map((en) => {
|
|
14
|
-
assert(Object.
|
|
15
|
-
assert(Object.
|
|
14
|
+
assert(Object.hasOwn(en, "value"));
|
|
15
|
+
assert(Object.hasOwn(en, "displayName"));
|
|
16
16
|
return new EnumValueType({
|
|
17
17
|
displayName: coerceLocalizedText(en.displayName),
|
|
18
18
|
value: coerceInt64(en.value || 0)
|