node-opcua-address-space 2.170.1 → 2.172.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/source/address_space_ts.d.ts +13 -13
- package/dist/source/address_space_ts.js +4 -0
- package/dist/source/address_space_ts.js.map +1 -1
- package/dist/source/continuation_points/continuation_point_manager.d.ts +6 -3
- package/dist/source/continuation_points/continuation_point_manager.js +4 -4
- package/dist/source/continuation_points/continuation_point_manager.js.map +1 -1
- package/dist/source/helpers/adjust_browse_direction.d.ts +1 -1
- package/dist/source/helpers/argument_list.d.ts +13 -11
- package/dist/source/helpers/argument_list.js +24 -15
- package/dist/source/helpers/argument_list.js.map +1 -1
- package/dist/source/helpers/call_helpers.d.ts +6 -3
- package/dist/source/helpers/call_helpers.js +5 -6
- package/dist/source/helpers/call_helpers.js.map +1 -1
- package/dist/source/helpers/coerce_enum_value.d.ts +2 -2
- package/dist/source/helpers/coerce_enum_value.js +2 -2
- package/dist/source/helpers/coerce_enum_value.js.map +1 -1
- package/dist/source/helpers/dump_tools.d.ts +3 -3
- package/dist/source/helpers/dump_tools.js +2 -2
- package/dist/source/helpers/dump_tools.js.map +1 -1
- package/dist/source/helpers/ensure_secure_access.d.ts +1 -1
- package/dist/source/helpers/ensure_secure_access.js +1 -1
- package/dist/source/helpers/ensure_secure_access.js.map +1 -1
- package/dist/source/helpers/make_optionals_map.js +0 -5
- package/dist/source/helpers/make_optionals_map.js.map +1 -1
- package/dist/source/helpers/multiform_func.d.ts +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.d.ts +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js.map +1 -1
- package/dist/source/index.d.ts +38 -38
- package/dist/source/index.js +53 -54
- package/dist/source/index.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +11 -11
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +6 -6
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +4 -4
- package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +4 -3
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +10 -13
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +11 -11
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.d.ts +11 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +5 -5
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +21 -29
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +3 -7
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +0 -23
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +8 -10
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +4 -6
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +5 -5
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +3 -3
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +7 -7
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +5 -8
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +5 -5
- package/dist/source/interfaces/data_access/ua_y_array_item_ex.d.ts +3 -3
- package/dist/source/interfaces/extension_object_constructor.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +2 -2
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +6 -6
- package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +7 -6
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js +4 -0
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +1 -1
- package/dist/source/interfaces/state_machine/ua_transition_ex.d.ts +2 -2
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +2 -2
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js +3 -0
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -1
- package/dist/source/loader/decode_xml_extension_object.d.ts +4 -4
- package/dist/source/loader/decode_xml_extension_object.js +3 -3
- package/dist/source/loader/decode_xml_extension_object.js.map +1 -1
- package/dist/source/loader/ensure_datatype_extracted.d.ts +2 -2
- package/dist/source/loader/ensure_datatype_extracted.js +5 -5
- package/dist/source/loader/ensure_datatype_extracted.js.map +1 -1
- package/dist/source/loader/generateAddressSpaceRaw.d.ts +3 -3
- package/dist/source/loader/generateAddressSpaceRaw.js +6 -6
- package/dist/source/loader/generateAddressSpaceRaw.js.map +1 -1
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/source/loader/make_xml_extension_object_parser.d.ts +2 -2
- package/dist/source/loader/make_xml_extension_object_parser.js +19 -19
- package/dist/source/loader/make_xml_extension_object_parser.js.map +1 -1
- package/dist/source/loader/namespace_post_step.d.ts +1 -1
- package/dist/source/loader/namespace_post_step.js.map +1 -1
- package/dist/source/loader/parsers/extension_object_parser.d.ts +4 -4
- package/dist/source/loader/parsers/extension_object_parser.js +22 -23
- package/dist/source/loader/parsers/extension_object_parser.js.map +1 -1
- package/dist/source/loader/parsers/localized_text_parser.d.ts +2 -2
- package/dist/source/loader/parsers/localized_text_parser.js.map +1 -1
- package/dist/source/loader/parsers/nodeid_parser.d.ts +1 -1
- package/dist/source/loader/parsers/nodeid_parser.js.map +1 -1
- package/dist/source/loader/parsers/qualified_name_parser.d.ts +3 -3
- package/dist/source/loader/parsers/qualified_name_parser.js.map +1 -1
- package/dist/source/loader/parsers/variant_parser.d.ts +5 -5
- package/dist/source/loader/parsers/variant_parser.js +13 -13
- package/dist/source/loader/parsers/variant_parser.js.map +1 -1
- package/dist/source/loader/register_node_promoter.d.ts +1 -1
- package/dist/source/loader/register_node_promoter.js.map +1 -1
- package/dist/source/namespace.d.ts +4 -4
- package/dist/source/namespace_alarm_and_condition.d.ts +22 -21
- package/dist/source/namespace_data_access.d.ts +11 -11
- package/dist/source/namespace_machine_state.d.ts +4 -4
- package/dist/source/pseudo_session.d.ts +8 -5
- package/dist/source/pseudo_session.js +28 -28
- package/dist/source/pseudo_session.js.map +1 -1
- package/dist/source/session_context.js +1 -1
- package/dist/source/session_context.js.map +1 -1
- package/dist/source/set_namespace_meta_data.d.ts +1 -1
- package/dist/source/set_namespace_meta_data.js +1 -1
- package/dist/source/set_namespace_meta_data.js.map +1 -1
- package/dist/source/ua_addin.d.ts +3 -3
- package/dist/source/ua_addin.js +1 -1
- package/dist/source/ua_addin.js.map +1 -1
- package/dist/source/ua_interface.js +4 -1
- package/dist/source/ua_interface.js.map +1 -1
- package/dist/source/ua_root_folder.d.ts +1 -1
- package/dist/source/ua_two_state_variable_ex.d.ts +5 -5
- package/dist/src/_instantiate_helpers.js +1 -1
- package/dist/src/_instantiate_helpers.js.map +1 -1
- package/dist/src/_mandatory_child_or_requested_optional_filter.d.ts +2 -2
- package/dist/src/_mandatory_child_or_requested_optional_filter.js +7 -8
- package/dist/src/_mandatory_child_or_requested_optional_filter.js.map +1 -1
- package/dist/src/address_space.js +4 -4
- package/dist/src/address_space.js.map +1 -1
- package/dist/src/address_space_change_event_tools.d.ts +3 -3
- package/dist/src/address_space_change_event_tools.js +8 -10
- package/dist/src/address_space_change_event_tools.js.map +1 -1
- package/dist/src/address_space_private.d.ts +11 -11
- package/dist/src/address_space_private.js +3 -0
- package/dist/src/address_space_private.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +6 -6
- package/dist/src/alarms_and_conditions/condition_info_impl.js +6 -15
- package/dist/src/alarms_and_conditions/condition_info_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +10 -10
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +76 -47
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +8 -5
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +15 -9
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -1
- package/dist/src/alarms_and_conditions/index.d.ts +3 -3
- package/dist/src/alarms_and_conditions/index.js +3 -3
- package/dist/src/alarms_and_conditions/index.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +21 -14
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +26 -21
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +6 -7
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +30 -28
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +9 -11
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js +10 -10
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +3 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +6 -5
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +16 -42
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +100 -82
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +12 -7
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +9 -8
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +18 -18
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +16 -18
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +4 -4
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +2 -2
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +10 -9
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +20 -19
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +2 -4
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +12 -38
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +50 -65
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +15 -17
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +15 -11
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +22 -15
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +35 -24
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +15 -16
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +19 -14
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +4 -4
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/apply_condition_refresh.d.ts +4 -4
- package/dist/src/apply_condition_refresh.js +1 -1
- package/dist/src/apply_condition_refresh.js.map +1 -1
- package/dist/src/base_node_impl.d.ts +4 -6
- package/dist/src/base_node_impl.js +3 -3
- package/dist/src/base_node_impl.js.map +1 -1
- package/dist/src/base_node_private.js +1 -2
- package/dist/src/base_node_private.js.map +1 -1
- package/dist/src/check_value_rank_compatibility.js +10 -6
- package/dist/src/check_value_rank_compatibility.js.map +1 -1
- package/dist/src/data_access/add_dataItem_stuff.d.ts +1 -1
- package/dist/src/data_access/add_dataItem_stuff.js +2 -22
- package/dist/src/data_access/add_dataItem_stuff.js.map +1 -1
- package/dist/src/data_access/adjust_datavalue_status_code.d.ts +6 -3
- package/dist/src/data_access/adjust_datavalue_status_code.js +3 -3
- package/dist/src/data_access/adjust_datavalue_status_code.js.map +1 -1
- package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +13 -11
- package/dist/src/data_access/ua_multistate_discrete_impl.js +28 -23
- package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +19 -23
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js +31 -31
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +10 -16
- package/dist/src/data_access/ua_two_state_discrete_impl.js +18 -14
- package/dist/src/data_access/ua_two_state_discrete_impl.js.map +1 -1
- package/dist/src/event_data.js.map +1 -1
- package/dist/src/extension_object_array_node.d.ts +5 -2
- package/dist/src/extension_object_array_node.js +21 -24
- package/dist/src/extension_object_array_node.js.map +1 -1
- package/dist/src/get_basic_datatype.d.ts +2 -2
- package/dist/src/get_basic_datatype.js.map +1 -1
- package/dist/src/historical_access/address_space_historical_data_node.d.ts +3 -3
- package/dist/src/historical_access/address_space_historical_data_node.js +24 -17
- package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -1
- package/dist/src/idx_iterator.js +1 -1
- package/dist/src/idx_iterator.js.map +1 -1
- package/dist/src/index_current.d.ts +31 -31
- package/dist/src/index_current.js +45 -45
- package/dist/src/index_current.js.map +1 -1
- package/dist/src/namespace_impl.d.ts +4 -3
- package/dist/src/namespace_impl.js +17 -14
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/namespace_private.js.map +1 -1
- package/dist/src/nodeid_manager.d.ts +3 -3
- package/dist/src/nodeid_manager.js +19 -16
- package/dist/src/nodeid_manager.js.map +1 -1
- package/dist/src/nodeset_tools/adjust_namespace_array.d.ts +1 -1
- package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +2 -2
- package/dist/src/nodeset_tools/construct_namespace_dependency.js +7 -7
- package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +1 -1
- package/dist/src/nodeset_tools/dump_to_bsd.d.ts +1 -1
- package/dist/src/nodeset_tools/dump_to_bsd.js +15 -11
- package/dist/src/nodeset_tools/dump_to_bsd.js.map +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +5 -3
- package/dist/src/nodeset_tools/nodeset_to_xml.js +64 -67
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/src/private_namespace.d.ts +2 -2
- package/dist/src/private_namespace.js.map +1 -1
- package/dist/src/reference_impl.d.ts +2 -2
- package/dist/src/reference_impl.js +9 -11
- package/dist/src/reference_impl.js.map +1 -1
- package/dist/src/role_permissions.d.ts +1 -1
- package/dist/src/role_permissions.js.map +1 -1
- package/dist/src/state_machine/finite_state_machine.d.ts +11 -14
- package/dist/src/state_machine/finite_state_machine.js +36 -30
- package/dist/src/state_machine/finite_state_machine.js.map +1 -1
- package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +8 -6
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js +16 -18
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
- package/dist/src/state_machine/ua_two_state_variable.d.ts +12 -11
- package/dist/src/state_machine/ua_two_state_variable.js +24 -29
- package/dist/src/state_machine/ua_two_state_variable.js.map +1 -1
- package/dist/src/tool_isSubtypeOf.d.ts +5 -5
- package/dist/src/tool_isSubtypeOf.js +21 -18
- package/dist/src/tool_isSubtypeOf.js.map +1 -1
- package/dist/src/ua_condition_type.d.ts +1 -1
- package/dist/src/ua_data_type_impl.js.map +1 -1
- package/dist/src/ua_method_impl.d.ts +9 -5
- package/dist/src/ua_method_impl.js +1 -1
- package/dist/src/ua_method_impl.js.map +1 -1
- package/dist/src/ua_object_impl.d.ts +7 -5
- package/dist/src/ua_object_impl.js +13 -11
- package/dist/src/ua_object_impl.js.map +1 -1
- package/dist/src/ua_object_type_impl.d.ts +7 -5
- package/dist/src/ua_object_type_impl.js +4 -5
- package/dist/src/ua_object_type_impl.js.map +1 -1
- package/dist/src/ua_reference_type_impl.d.ts +6 -8
- package/dist/src/ua_reference_type_impl.js +16 -14
- package/dist/src/ua_reference_type_impl.js.map +1 -1
- package/dist/src/ua_variable_impl.d.ts +43 -45
- package/dist/src/ua_variable_impl.js +99 -83
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/dist/src/ua_variable_impl_ext_obj.d.ts +3 -3
- package/dist/src/ua_variable_impl_ext_obj.js +37 -29
- package/dist/src/ua_variable_impl_ext_obj.js.map +1 -1
- package/dist/src/ua_variable_type_impl.d.ts +11 -11
- package/dist/src/ua_variable_type_impl.js +13 -21
- package/dist/src/ua_variable_type_impl.js.map +1 -1
- package/dist/src/ua_view_impl.d.ts +3 -4
- package/dist/src/ua_view_impl.js +5 -6
- package/dist/src/ua_view_impl.js.map +1 -1
- package/dist/src/validate_data_type_correctness.d.ts +2 -2
- package/dist/src/validate_data_type_correctness.js +12 -3
- package/dist/src/validate_data_type_correctness.js.map +1 -1
- package/dist/tsconfig_base.tsbuildinfo +1 -1
- package/distHelpers/add_event_generator_object.d.ts +5 -2
- package/distHelpers/add_event_generator_object.js +2 -2
- package/distHelpers/add_event_generator_object.js.map +1 -1
- package/distHelpers/alarms_and_conditions_demo.d.ts +1 -1
- package/distHelpers/alarms_and_conditions_demo.js +4 -6
- package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
- package/distHelpers/assertHasMatchingReference.d.ts +1 -1
- package/distHelpers/assertHasMatchingReference.js +2 -2
- package/distHelpers/assertHasMatchingReference.js.map +1 -1
- package/distHelpers/boiler_system.d.ts +6 -3
- package/distHelpers/boiler_system.js +44 -42
- package/distHelpers/boiler_system.js.map +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.d.ts +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.js +25 -27
- package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -1
- package/distHelpers/get_address_space_fixture.js +1 -1
- package/distHelpers/get_address_space_fixture.js.map +1 -1
- package/distHelpers/mock_session.d.ts +7 -7
- package/distHelpers/mock_session.js +4 -4
- package/distHelpers/mock_session.js.map +1 -1
- package/distNodeJS/generate_address_space.d.ts +2 -2
- package/distNodeJS/generate_address_space.js +2 -2
- package/distNodeJS/generate_address_space.js.map +1 -1
- package/package.json +36 -36
- package/source/address_space_ts.ts +29 -30
- package/source/continuation_points/continuation_point_manager.ts +8 -7
- package/source/helpers/adjust_browse_direction.ts +1 -1
- package/source/helpers/argument_list.ts +37 -25
- package/source/helpers/call_helpers.ts +10 -15
- package/source/helpers/coerce_enum_value.ts +4 -4
- package/source/helpers/dump_tools.ts +6 -11
- package/source/helpers/ensure_secure_access.ts +2 -2
- package/source/helpers/make_optionals_map.ts +3 -10
- package/source/helpers/multiform_func.ts +1 -1
- package/source/helpers/resolve_opaque_on_address_space.ts +2 -2
- package/source/index.ts +44 -54
- package/source/interfaces/alarms_and_conditions/condition_info_i.ts +3 -4
- package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +13 -13
- package/source/interfaces/alarms_and_conditions/deviation_stuff.ts +8 -10
- package/source/interfaces/alarms_and_conditions/install_setpoint_options.ts +4 -5
- package/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +4 -6
- package/source/interfaces/alarms_and_conditions/instantiate_condition_options.ts +3 -3
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +6 -3
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +11 -11
- package/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +11 -25
- package/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +16 -13
- package/source/interfaces/alarms_and_conditions/ua_base_event_ex.ts +12 -0
- package/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +5 -5
- package/source/interfaces/alarms_and_conditions/ua_condition_ex.ts +30 -54
- package/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +3 -34
- package/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +18 -22
- package/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +8 -15
- package/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +4 -7
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +5 -6
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +3 -3
- package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +9 -16
- package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +5 -8
- package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +5 -5
- package/source/interfaces/data_access/ua_y_array_item_ex.ts +3 -3
- package/source/interfaces/extension_object_constructor.ts +3 -4
- package/source/interfaces/i_condition_variable_type_setter_options.ts +1 -3
- package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +3 -3
- package/source/interfaces/state_machine/ua_finite_state_machine_type.ts +2 -2
- package/source/interfaces/state_machine/ua_program_state_machine_type.ts +3 -3
- package/source/interfaces/state_machine/ua_shelved_state_machine_ex.ts +10 -7
- package/source/interfaces/state_machine/ua_state_machine_type.ts +11 -8
- package/source/interfaces/state_machine/ua_transition_ex.ts +2 -2
- package/source/interfaces/ua_subscription_diagnostics_variable_ex.ts +3 -2
- package/source/loader/decode_xml_extension_object.ts +7 -7
- package/source/loader/ensure_datatype_extracted.ts +14 -19
- package/source/loader/generateAddressSpaceRaw.ts +12 -13
- package/source/loader/load_nodeset2.ts +3 -3
- package/source/loader/make_xml_extension_object_parser.ts +55 -39
- package/source/loader/namespace_post_step.ts +3 -4
- package/source/loader/parsers/extension_object_parser.ts +63 -62
- package/source/loader/parsers/localized_text_parser.ts +3 -3
- package/source/loader/parsers/nodeid_parser.ts +2 -3
- package/source/loader/parsers/qualified_name_parser.ts +6 -7
- package/source/loader/parsers/variant_parser.ts +48 -55
- package/source/loader/register_node_promoter.ts +2 -2
- package/source/namespace.ts +4 -4
- package/source/namespace_alarm_and_condition.ts +22 -22
- package/source/namespace_data_access.ts +12 -13
- package/source/namespace_machine_state.ts +10 -5
- package/source/pseudo_session.ts +53 -50
- package/source/session_context.ts +1 -1
- package/source/set_namespace_meta_data.ts +3 -3
- package/source/ua_addin.ts +10 -11
- package/source/ua_interface.ts +10 -7
- package/source/ua_root_folder.ts +1 -1
- package/source/ua_two_state_variable_ex.ts +5 -5
- package/source_nodejs/generate_address_space.ts +5 -9
- package/src/_instantiate_helpers.ts +26 -16
- package/src/_mandatory_child_or_requested_optional_filter.ts +16 -15
- package/src/address_space.ts +23 -31
- package/src/address_space_change_event_tools.ts +25 -30
- package/src/address_space_private.ts +20 -21
- package/src/alarms_and_conditions/condition.ts +0 -2
- package/src/alarms_and_conditions/condition_info_impl.ts +11 -19
- package/src/alarms_and_conditions/condition_snapshot_impl.ts +106 -82
- package/src/alarms_and_conditions/deviation_alarm_helper.ts +20 -15
- package/src/alarms_and_conditions/index.ts +3 -3
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +44 -32
- package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +35 -34
- package/src/alarms_and_conditions/ua_base_event_impl.ts +15 -19
- package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +6 -2
- package/src/alarms_and_conditions/ua_condition_impl.ts +140 -130
- package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +20 -12
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +40 -43
- package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +7 -7
- package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +28 -30
- package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +3 -6
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +59 -90
- package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +31 -27
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +57 -36
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +31 -27
- package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +6 -6
- package/src/apply_condition_refresh.ts +7 -8
- package/src/base_node_impl.ts +63 -44
- package/src/base_node_private.ts +12 -4
- package/src/check_value_rank_compatibility.ts +18 -14
- package/src/data_access/add_dataItem_stuff.ts +3 -4
- package/src/data_access/adjust_datavalue_status_code.ts +7 -7
- package/src/data_access/ua_multistate_discrete_impl.ts +44 -28
- package/src/data_access/ua_multistate_value_discrete_impl.ts +77 -66
- package/src/data_access/ua_two_state_discrete_impl.ts +29 -36
- package/src/event_data.ts +53 -53
- package/src/extension_object_array_node.ts +27 -28
- package/src/get_basic_datatype.ts +4 -5
- package/src/historical_access/address_space_historical_data_node.ts +65 -50
- package/src/idx_iterator.ts +4 -12
- package/src/index_current.ts +33 -45
- package/src/namespace_impl.ts +75 -62
- package/src/namespace_private.ts +2 -8
- package/src/nodeid_manager.ts +30 -27
- package/src/nodeset_tools/adjust_namespace_array.ts +1 -1
- package/src/nodeset_tools/construct_namespace_dependency.ts +15 -16
- package/src/nodeset_tools/dump_to_bsd.ts +27 -22
- package/src/nodeset_tools/nodeset_to_xml.ts +95 -114
- package/src/private_namespace.ts +3 -6
- package/src/reference_impl.ts +11 -14
- package/src/role_permissions.ts +1 -1
- package/src/state_machine/finite_state_machine.ts +60 -61
- package/src/state_machine/ua_shelving_state_machine_ex.ts +23 -23
- package/src/state_machine/ua_two_state_variable.ts +34 -31
- package/src/tool_isSubtypeOf.ts +48 -33
- package/src/ua_condition_type.ts +1 -1
- package/src/ua_data_type_impl.ts +12 -13
- package/src/ua_method_impl.ts +17 -12
- package/src/ua_object_impl.ts +38 -33
- package/src/ua_object_type_impl.ts +22 -22
- package/src/ua_reference_type_impl.ts +19 -19
- package/src/ua_variable_impl.ts +240 -220
- package/src/ua_variable_impl_ext_obj.ts +63 -50
- package/src/ua_variable_type_impl.ts +43 -49
- package/src/ua_view_impl.ts +5 -5
- package/src/validate_data_type_correctness.ts +17 -8
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import type { UAVariableT } from "node-opcua-address-space-base";
|
|
5
6
|
import { assert } from "node-opcua-assert";
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { InstantiateLimitAlarmOptions } from "../../source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options";
|
|
14
|
-
import { UANonExclusiveDeviationAlarmEx } from "../../source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex";
|
|
7
|
+
import type { DataValue } from "node-opcua-data-value";
|
|
8
|
+
import type { NodeId } from "node-opcua-nodeid";
|
|
9
|
+
import type { DataType, VariantOptions } from "node-opcua-variant";
|
|
10
|
+
import type { InstallSetPointOptions } from "../../source/interfaces/alarms_and_conditions/install_setpoint_options";
|
|
11
|
+
import type { InstantiateLimitAlarmOptions } from "../../source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options";
|
|
12
|
+
import type { UANonExclusiveDeviationAlarmEx } from "../../source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex";
|
|
13
|
+
import type { NamespacePrivate } from "../namespace_private";
|
|
15
14
|
import {
|
|
16
15
|
DeviationAlarmHelper_getSetpointNodeNode,
|
|
17
16
|
DeviationAlarmHelper_getSetpointValue,
|
|
@@ -19,20 +18,13 @@ import {
|
|
|
19
18
|
DeviationAlarmHelper_onSetpointDataValueChange
|
|
20
19
|
} from "./deviation_alarm_helper";
|
|
21
20
|
import { UALimitAlarmImpl } from "./ua_limit_alarm_impl";
|
|
22
|
-
import { UANonExclusiveLimitAlarmImpl } from "./ua_non_exclusive_limit_alarm_impl";
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
export declare interface UANonExclusiveDeviationAlarmImpl extends UANonExclusiveLimitAlarmImpl, UANonExclusiveDeviationAlarmEx {
|
|
26
|
-
on(eventName: string, eventHandler: any): this;
|
|
27
|
-
once(eventName: string, eventHandler: any): this;
|
|
28
|
-
get addressSpace(): AddressSpace;
|
|
29
|
-
}
|
|
21
|
+
import { UANonExclusiveLimitAlarmImpl, UANonExclusiveLimitAlarmImplBase } from "./ua_non_exclusive_limit_alarm_impl";
|
|
30
22
|
|
|
31
|
-
export class
|
|
23
|
+
export class UANonExclusiveDeviationAlarmImplBase extends UANonExclusiveLimitAlarmImplBase {
|
|
32
24
|
public static instantiate(
|
|
33
25
|
namespace: NamespacePrivate,
|
|
34
26
|
type: string | NodeId,
|
|
35
|
-
options: InstantiateLimitAlarmOptions,
|
|
27
|
+
options: InstantiateLimitAlarmOptions & InstallSetPointOptions,
|
|
36
28
|
data?: Record<string, VariantOptions>
|
|
37
29
|
): UANonExclusiveDeviationAlarmImpl {
|
|
38
30
|
const addressSpace = namespace.addressSpace;
|
|
@@ -44,7 +36,12 @@ export class UANonExclusiveDeviationAlarmImpl extends UANonExclusiveLimitAlarmIm
|
|
|
44
36
|
}
|
|
45
37
|
assert(type === nonExclusiveDeviationAlarmType.browseName.toString());
|
|
46
38
|
|
|
47
|
-
const alarm =
|
|
39
|
+
const alarm = UANonExclusiveLimitAlarmImplBase.instantiate(
|
|
40
|
+
namespace,
|
|
41
|
+
type,
|
|
42
|
+
options,
|
|
43
|
+
data
|
|
44
|
+
) as UANonExclusiveDeviationAlarmImpl;
|
|
48
45
|
Object.setPrototypeOf(alarm, UANonExclusiveDeviationAlarmImpl.prototype);
|
|
49
46
|
|
|
50
47
|
assert(alarm instanceof UANonExclusiveDeviationAlarmImpl);
|
|
@@ -56,29 +53,36 @@ export class UANonExclusiveDeviationAlarmImpl extends UANonExclusiveLimitAlarmIm
|
|
|
56
53
|
return alarm;
|
|
57
54
|
}
|
|
58
55
|
|
|
56
|
+
private get $13() {
|
|
57
|
+
return this as unknown as UANonExclusiveDeviationAlarmEx;
|
|
58
|
+
}
|
|
59
59
|
public _setStateBasedOnInputValue(value: number): void {
|
|
60
60
|
const setpointValue = this.getSetpointValue();
|
|
61
61
|
if (setpointValue === null) {
|
|
62
62
|
throw new Error("Cannot access setpoint Value");
|
|
63
63
|
}
|
|
64
|
-
assert(isFinite(setpointValue), "expecting a valid setpoint value");
|
|
64
|
+
assert(Number.isFinite(setpointValue), "expecting a valid setpoint value");
|
|
65
65
|
// call base class implementation
|
|
66
66
|
super._setStateBasedOnInputValue(value - setpointValue);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
public getSetpointNodeNode(): UAVariableT<number, DataType.Double> | UAVariableT<number, DataType.Float> | undefined
|
|
70
|
-
return DeviationAlarmHelper_getSetpointNodeNode.call(this);
|
|
69
|
+
public getSetpointNodeNode(): UAVariableT<number, DataType.Double> | UAVariableT<number, DataType.Float> | undefined {
|
|
70
|
+
return DeviationAlarmHelper_getSetpointNodeNode.call(this.$13);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
public getSetpointValue(): number | null {
|
|
74
|
-
return DeviationAlarmHelper_getSetpointValue.call(this);
|
|
74
|
+
return DeviationAlarmHelper_getSetpointValue.call(this.$13);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
public _onSetpointDataValueChange(dataValue: DataValue): void {
|
|
78
|
-
DeviationAlarmHelper_onSetpointDataValueChange.call(this, dataValue);
|
|
78
|
+
DeviationAlarmHelper_onSetpointDataValueChange.call(this.$13, dataValue);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
public _install_setpoint(options:
|
|
82
|
-
|
|
81
|
+
public _install_setpoint(options: InstallSetPointOptions): void {
|
|
82
|
+
DeviationAlarmHelper_install_setpoint.call(this.$13, options);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
|
|
86
|
+
export type UANonExclusiveDeviationAlarmImpl = UANonExclusiveDeviationAlarmImplBase & UANonExclusiveDeviationAlarmEx;
|
|
87
|
+
export const UANonExclusiveDeviationAlarmImpl =
|
|
88
|
+
UANonExclusiveDeviationAlarmImplBase as unknown as new () => UANonExclusiveDeviationAlarmImpl;
|
|
@@ -2,24 +2,29 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @module node-opcua-address-space.AlarmsAndConditions
|
|
4
4
|
*/
|
|
5
|
+
|
|
6
|
+
import type { BaseNode, UAEventType, UAVariable } from "node-opcua-address-space-base";
|
|
5
7
|
import { assert } from "node-opcua-assert";
|
|
6
|
-
import {
|
|
8
|
+
import { NodeClass } from "node-opcua-data-model";
|
|
9
|
+
import type { NodeId } from "node-opcua-nodeid";
|
|
7
10
|
import { StatusCodes } from "node-opcua-status-code";
|
|
8
|
-
import { VariantOptions } from "node-opcua-variant";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
+
import type { VariantOptions } from "node-opcua-variant";
|
|
12
|
+
import type { ConditionInfo } from "../../source/interfaces/alarms_and_conditions/condition_info_i";
|
|
13
|
+
import type { InstantiateLimitAlarmOptions } from "../../source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options";
|
|
14
|
+
import type { UANonExclusiveLimitAlarmEx } from "../../source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex";
|
|
15
|
+
import type { NamespacePrivate } from "../namespace_private";
|
|
11
16
|
import { _install_TwoStateVariable_machinery } from "../state_machine/ua_two_state_variable";
|
|
12
|
-
import { UANonExclusiveLimitAlarmEx } from "../../source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex";
|
|
13
|
-
import { ConditionInfo } from "../../source/interfaces/alarms_and_conditions/condition_info_i";
|
|
14
|
-
import { InstantiateLimitAlarmOptions } from "../../source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options";
|
|
15
17
|
import { ConditionInfoImpl } from "./condition_info_impl";
|
|
16
|
-
import { UALimitAlarmImpl } from "./ua_limit_alarm_impl";
|
|
18
|
+
import { UALimitAlarmImpl, UALimitAlarmImplBase } from "./ua_limit_alarm_impl";
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
interface IState {
|
|
21
|
+
highHigh: boolean | "unset";
|
|
22
|
+
high: boolean | "unset";
|
|
23
|
+
low: boolean | "unset";
|
|
24
|
+
lowLow: boolean | "unset";
|
|
21
25
|
}
|
|
22
|
-
|
|
26
|
+
|
|
27
|
+
export class UANonExclusiveLimitAlarmImplBase extends UALimitAlarmImpl implements UANonExclusiveLimitAlarmEx {
|
|
23
28
|
public static instantiate(
|
|
24
29
|
namespace: NamespacePrivate,
|
|
25
30
|
type: UAEventType | NodeId | string,
|
|
@@ -30,19 +35,19 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
30
35
|
|
|
31
36
|
options.optionals = options.optionals || [];
|
|
32
37
|
|
|
33
|
-
if (Object.
|
|
38
|
+
if (Object.hasOwn(options, "lowLowLimit")) {
|
|
34
39
|
options.optionals.push("LowLowLimit");
|
|
35
40
|
options.optionals.push("LowLowState");
|
|
36
41
|
}
|
|
37
|
-
if (Object.
|
|
42
|
+
if (Object.hasOwn(options, "lowLimit")) {
|
|
38
43
|
options.optionals.push("LowLimit");
|
|
39
44
|
options.optionals.push("LowState");
|
|
40
45
|
}
|
|
41
|
-
if (Object.
|
|
46
|
+
if (Object.hasOwn(options, "highLimit")) {
|
|
42
47
|
options.optionals.push("HighLimit");
|
|
43
48
|
options.optionals.push("HighState");
|
|
44
49
|
}
|
|
45
|
-
if (Object.
|
|
50
|
+
if (Object.hasOwn(options, "highHighLimit")) {
|
|
46
51
|
options.optionals.push("HighHighLimit");
|
|
47
52
|
options.optionals.push("HighHighState");
|
|
48
53
|
}
|
|
@@ -50,7 +55,7 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
50
55
|
|
|
51
56
|
/* c8 ignore next */
|
|
52
57
|
if (!nonExclusiveAlarmType) {
|
|
53
|
-
throw new Error(
|
|
58
|
+
throw new Error(` cannot find Alarm Condition Type for ${type}`);
|
|
54
59
|
}
|
|
55
60
|
|
|
56
61
|
const nonExclusiveLimitAlarmType = addressSpace.findEventType("NonExclusiveLimitAlarmType");
|
|
@@ -60,7 +65,7 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
60
65
|
}
|
|
61
66
|
// assert(type nonExclusiveLimitAlarmType.browseName.toString());
|
|
62
67
|
|
|
63
|
-
const alarm =
|
|
68
|
+
const alarm = UALimitAlarmImplBase.instantiate(namespace, type, options, data) as UANonExclusiveLimitAlarmImpl;
|
|
64
69
|
Object.setPrototypeOf(alarm, UANonExclusiveLimitAlarmImpl.prototype);
|
|
65
70
|
assert(alarm instanceof UALimitAlarmImpl);
|
|
66
71
|
assert(alarm instanceof UANonExclusiveLimitAlarmImpl);
|
|
@@ -72,7 +77,7 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
72
77
|
trueState: "LowLow active"
|
|
73
78
|
});
|
|
74
79
|
alarm.lowLowState.setValue(false);
|
|
75
|
-
assert(Object.
|
|
80
|
+
assert(Object.hasOwn(alarm, "lowLowLimit"));
|
|
76
81
|
}
|
|
77
82
|
if (alarm.lowState) {
|
|
78
83
|
_install_TwoStateVariable_machinery(alarm.lowState, {
|
|
@@ -80,7 +85,7 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
80
85
|
trueState: "Low active"
|
|
81
86
|
});
|
|
82
87
|
alarm.lowState.setValue(false);
|
|
83
|
-
assert(Object.
|
|
88
|
+
assert(Object.hasOwn(alarm, "lowLimit"));
|
|
84
89
|
}
|
|
85
90
|
if (alarm.highState) {
|
|
86
91
|
_install_TwoStateVariable_machinery(alarm.highState, {
|
|
@@ -88,7 +93,7 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
88
93
|
trueState: "High active"
|
|
89
94
|
});
|
|
90
95
|
alarm.highState.setValue(false);
|
|
91
|
-
assert(Object.
|
|
96
|
+
assert(Object.hasOwn(alarm, "highLimit"));
|
|
92
97
|
}
|
|
93
98
|
if (alarm.highHighState) {
|
|
94
99
|
_install_TwoStateVariable_machinery(alarm.highHighState, {
|
|
@@ -96,7 +101,7 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
96
101
|
trueState: "HighHigh active"
|
|
97
102
|
});
|
|
98
103
|
alarm.highHighState.setValue(false);
|
|
99
|
-
assert(Object.
|
|
104
|
+
assert(Object.hasOwn(alarm, "highHighLimit"));
|
|
100
105
|
}
|
|
101
106
|
|
|
102
107
|
alarm.activeState.setValue(false);
|
|
@@ -110,7 +115,7 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
110
115
|
state: string | null,
|
|
111
116
|
isActive: boolean,
|
|
112
117
|
value: string,
|
|
113
|
-
|
|
118
|
+
_oldConditionInfo: ConditionInfo
|
|
114
119
|
): ConditionInfo {
|
|
115
120
|
if (!isActive) {
|
|
116
121
|
return new ConditionInfoImpl({
|
|
@@ -121,7 +126,7 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
121
126
|
});
|
|
122
127
|
} else {
|
|
123
128
|
return new ConditionInfoImpl({
|
|
124
|
-
message:
|
|
129
|
+
message: `Condition is ${value} and state is ${state}`,
|
|
125
130
|
quality: StatusCodes.Good,
|
|
126
131
|
retain: true,
|
|
127
132
|
severity: 150
|
|
@@ -129,16 +134,26 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
129
134
|
}
|
|
130
135
|
}
|
|
131
136
|
|
|
132
|
-
public _signalNewCondition2(states:
|
|
133
|
-
const alarm = this as
|
|
137
|
+
public _signalNewCondition2(states: IState, isActive: boolean, value: string): void {
|
|
138
|
+
const alarm = this as BaseNode;
|
|
134
139
|
|
|
135
140
|
if (typeof states === "string") {
|
|
136
141
|
return;
|
|
137
142
|
}
|
|
138
143
|
|
|
139
|
-
function _install(name:
|
|
144
|
+
function _install(name: keyof IState) {
|
|
140
145
|
if (states[name] !== "unset") {
|
|
141
|
-
|
|
146
|
+
// browseName is PascalCase (e.g. HighHighState) while the IState key is camelCase
|
|
147
|
+
const browseName = `${name[0].toUpperCase()}${name.slice(1)}State`;
|
|
148
|
+
const state = alarm.getChildByName(browseName) as
|
|
149
|
+
| (UAVariable & {
|
|
150
|
+
setValue(value: boolean): void;
|
|
151
|
+
})
|
|
152
|
+
| null;
|
|
153
|
+
if (!state || state.nodeClass !== NodeClass.Variable || !state.setValue) {
|
|
154
|
+
throw new Error(`expecting a ${browseName} component`);
|
|
155
|
+
}
|
|
156
|
+
state.setValue(states[name]);
|
|
142
157
|
}
|
|
143
158
|
}
|
|
144
159
|
|
|
@@ -149,7 +164,7 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
149
164
|
|
|
150
165
|
// build-up state string
|
|
151
166
|
let state_str = Object.keys(states)
|
|
152
|
-
.map((s
|
|
167
|
+
.map((s) => (states[s as keyof IState] ? s : null))
|
|
153
168
|
.filter((a) => a !== null)
|
|
154
169
|
.join(";"); //
|
|
155
170
|
|
|
@@ -158,21 +173,24 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
158
173
|
UALimitAlarmImpl.prototype._signalNewCondition.call(this, state_str, isActive, value);
|
|
159
174
|
}
|
|
160
175
|
|
|
176
|
+
private get $12() {
|
|
177
|
+
return this as unknown as UANonExclusiveLimitAlarmEx;
|
|
178
|
+
}
|
|
161
179
|
protected _setStateBasedOnInputValue(value: number): void {
|
|
162
|
-
assert(isFinite(value), "expecting a valid value here");
|
|
180
|
+
assert(Number.isFinite(value), "expecting a valid value here");
|
|
163
181
|
|
|
164
182
|
let isActive = false;
|
|
165
183
|
|
|
166
|
-
const states:
|
|
167
|
-
highHigh: this.highHighState ? this.highHighState.getValue() : "unset",
|
|
168
|
-
high: this.highState ? this.highState.getValue() : "unset",
|
|
169
|
-
low: this.lowState ? this.lowState.getValue() : "unset",
|
|
170
|
-
lowLow: this.lowLowState ? this.lowLowState.getValue() : "unset"
|
|
184
|
+
const states: IState = {
|
|
185
|
+
highHigh: this.$12.highHighState ? this.$12.highHighState.getValue() : "unset",
|
|
186
|
+
high: this.$12.highState ? this.$12.highState.getValue() : "unset",
|
|
187
|
+
low: this.$12.lowState ? this.$12.lowState.getValue() : "unset",
|
|
188
|
+
lowLow: this.$12.lowLowState ? this.$12.lowLowState.getValue() : "unset"
|
|
171
189
|
};
|
|
172
190
|
|
|
173
191
|
let count = 0;
|
|
174
192
|
|
|
175
|
-
function ___p(stateName:
|
|
193
|
+
function ___p(stateName: keyof typeof states, func_value: () => boolean) {
|
|
176
194
|
if (states[stateName] !== "unset") {
|
|
177
195
|
const val = func_value();
|
|
178
196
|
isActive = isActive || val;
|
|
@@ -201,3 +219,6 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
201
219
|
}
|
|
202
220
|
}
|
|
203
221
|
}
|
|
222
|
+
|
|
223
|
+
export type UANonExclusiveLimitAlarmImpl = UANonExclusiveLimitAlarmImplBase & UANonExclusiveLimitAlarmEx;
|
|
224
|
+
export const UANonExclusiveLimitAlarmImpl = UANonExclusiveLimitAlarmImplBase as unknown as new () => UANonExclusiveLimitAlarmImpl;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
3
|
*/
|
|
4
|
-
import { INamespace, UAVariable, UAVariableT } from "node-opcua-address-space-base";
|
|
4
|
+
import type { INamespace, UAVariable, UAVariableT } from "node-opcua-address-space-base";
|
|
5
5
|
import { assert } from "node-opcua-assert";
|
|
6
|
-
import { DataValue } from "node-opcua-data-value";
|
|
7
|
-
import { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
6
|
+
import type { DataValue } from "node-opcua-data-value";
|
|
7
|
+
import { NodeId, type NodeIdLike } from "node-opcua-nodeid";
|
|
8
8
|
|
|
9
|
-
import { UAOffNormalAlarm_Base } from "node-opcua-nodeset-ua";
|
|
9
|
+
import type { UAOffNormalAlarm_Base } from "node-opcua-nodeset-ua";
|
|
10
10
|
import { isNullOrUndefined } from "node-opcua-utils";
|
|
11
|
-
import { DataType, VariantOptions } from "node-opcua-variant";
|
|
12
|
-
import { InstantiateOffNormalAlarmOptions } from "../../source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options";
|
|
13
|
-
import { UADiscreteAlarmEx } from "../../source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex";
|
|
14
|
-
import { AddressSpacePrivate } from "../address_space_private";
|
|
15
|
-
import {
|
|
11
|
+
import { DataType, type VariantOptions } from "node-opcua-variant";
|
|
12
|
+
import type { InstantiateOffNormalAlarmOptions } from "../../source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options";
|
|
13
|
+
import type { UADiscreteAlarmEx } from "../../source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex";
|
|
14
|
+
import type { AddressSpacePrivate } from "../address_space_private";
|
|
15
|
+
import { UADiscreteAlarmImplBase } from "./ua_discrete_alarm_impl";
|
|
16
16
|
|
|
17
|
-
function isEqual(value1:
|
|
17
|
+
function isEqual(value1: unknown, value2: unknown): boolean {
|
|
18
18
|
return value1 === value2;
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -39,22 +39,20 @@ export declare interface UAOffNormalAlarmEx
|
|
|
39
39
|
setNormalStateValue(value: NodeIdLike): void;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
once(eventName: string, eventHandler: any): this;
|
|
45
|
-
}
|
|
42
|
+
|
|
43
|
+
const $ = (instance: UAOffNormalAlarmImplBase): UAOffNormalAlarmEx => instance as unknown as UAOffNormalAlarmEx;
|
|
46
44
|
/**
|
|
47
45
|
* The OffNormalAlarmType is a specialization of the DiscreteAlarmType intended to represent a
|
|
48
46
|
* discrete Condition that is considered to be not normal.
|
|
49
47
|
* This sub type is usually used to indicate that a discrete value is in an Alarm state, it is active as
|
|
50
48
|
* long as a non-normal value is present.
|
|
51
49
|
*/
|
|
52
|
-
export class
|
|
50
|
+
export class UAOffNormalAlarmImplBase extends UADiscreteAlarmImplBase {
|
|
53
51
|
/**
|
|
54
52
|
* When the value of inputNode doesn't match the normalState node value, then the alarm is raised.
|
|
55
53
|
*
|
|
56
54
|
*/
|
|
57
|
-
public static instantiate<
|
|
55
|
+
public static instantiate<_T, _DT extends DataType>(
|
|
58
56
|
namespace: INamespace,
|
|
59
57
|
limitAlarmTypeId: string | NodeId,
|
|
60
58
|
options: InstantiateOffNormalAlarmOptions,
|
|
@@ -68,12 +66,12 @@ export class UAOffNormalAlarmImpl extends UADiscreteAlarmImpl implements UAOffNo
|
|
|
68
66
|
throw new Error("cannot find offNormalAlarmType");
|
|
69
67
|
}
|
|
70
68
|
|
|
71
|
-
assert(Object.
|
|
72
|
-
assert(Object.
|
|
69
|
+
assert(Object.hasOwn(options, "inputNode"), "must provide inputNode"); // must provide a inputNode
|
|
70
|
+
assert(Object.hasOwn(options, "normalState"), "must provide a normalState Node"); // must provide a inputNode
|
|
73
71
|
options.optionals = options.optionals || [];
|
|
74
72
|
|
|
75
|
-
assert(Object.
|
|
76
|
-
const alarmNode =
|
|
73
|
+
assert(Object.hasOwn(options, "inputNode"), "must provide inputNode"); // must provide a inputNode
|
|
74
|
+
const alarmNode = UADiscreteAlarmImplBase.instantiate(namespace, limitAlarmTypeId, options, data) as UAOffNormalAlarmImpl;
|
|
77
75
|
Object.setPrototypeOf(alarmNode, UAOffNormalAlarmImpl.prototype);
|
|
78
76
|
|
|
79
77
|
/**
|
|
@@ -107,7 +105,7 @@ export class UAOffNormalAlarmImpl extends UADiscreteAlarmImpl implements UAOffNo
|
|
|
107
105
|
const normalState = addressSpace._coerceNode(options.normalState) as UAVariable | null;
|
|
108
106
|
const normalStateNodeId = normalState ? normalState.nodeId : new NodeId();
|
|
109
107
|
alarmNode.normalState.setValueFromSource({ dataType: DataType.NodeId, value: normalStateNodeId });
|
|
110
|
-
alarmNode.normalState.on("value_changed", (
|
|
108
|
+
alarmNode.normalState.on("value_changed", (_newDataValue, _indexRange) => {
|
|
111
109
|
// The node that contains the normalState value has changed.
|
|
112
110
|
// we must remove the listener on current normalState and replace
|
|
113
111
|
// normalState with the new one and set listener again
|
|
@@ -137,8 +135,11 @@ export class UAOffNormalAlarmImpl extends UADiscreteAlarmImpl implements UAOffNo
|
|
|
137
135
|
// Property the Alarm is Active. If this Variable is not in the AddressSpace, a Null NodeId shall
|
|
138
136
|
// be provided.
|
|
139
137
|
|
|
138
|
+
private get $4(): UAOffNormalAlarmEx {
|
|
139
|
+
return this as unknown as UAOffNormalAlarmEx;
|
|
140
|
+
}
|
|
140
141
|
public getNormalStateNode(): UAVariableT<NodeId, DataType.NodeId> | null {
|
|
141
|
-
const nodeId = this.normalState.readValue().value.value;
|
|
142
|
+
const nodeId = this.$4.normalState.readValue().value.value;
|
|
142
143
|
const node = this.addressSpace.findNode(nodeId) as UAVariableT<NodeId, DataType.NodeId>;
|
|
143
144
|
if (!node) {
|
|
144
145
|
return null;
|
|
@@ -158,13 +159,13 @@ export class UAOffNormalAlarmImpl extends UADiscreteAlarmImpl implements UAOffNo
|
|
|
158
159
|
|
|
159
160
|
/**
|
|
160
161
|
*/
|
|
161
|
-
public setNormalStateValue(
|
|
162
|
-
const
|
|
162
|
+
public setNormalStateValue(_value: NodeIdLike): void {
|
|
163
|
+
const _normalStateNode = this.getNormalStateNode();
|
|
163
164
|
throw new Error("Not Implemented yet");
|
|
164
165
|
}
|
|
165
166
|
|
|
166
167
|
public updateAlarmState(isActive: boolean, message: string) {
|
|
167
|
-
if (isActive === this.activeState.getValue()) {
|
|
168
|
+
if (isActive === $(this).activeState.getValue()) {
|
|
168
169
|
// no change => ignore !
|
|
169
170
|
return;
|
|
170
171
|
}
|
|
@@ -176,9 +177,9 @@ export class UAOffNormalAlarmImpl extends UADiscreteAlarmImpl implements UAOffNo
|
|
|
176
177
|
}
|
|
177
178
|
}
|
|
178
179
|
|
|
179
|
-
|
|
180
|
+
_mayBe_updateAlarmState(normalStateValue?: NodeId | null, inputValue?: unknown): void {
|
|
180
181
|
if (isNullOrUndefined(normalStateValue) || isNullOrUndefined(inputValue)) {
|
|
181
|
-
this.activeState.setValue(false);
|
|
182
|
+
$(this).activeState.setValue(false);
|
|
182
183
|
return;
|
|
183
184
|
}
|
|
184
185
|
const isActive = !isEqual(normalStateValue, inputValue);
|
|
@@ -213,3 +214,6 @@ export class UAOffNormalAlarmImpl extends UADiscreteAlarmImpl implements UAOffNo
|
|
|
213
214
|
this._mayBe_updateAlarmState(normalStateValue, inputValue);
|
|
214
215
|
}
|
|
215
216
|
}
|
|
217
|
+
|
|
218
|
+
export type UAOffNormalAlarmImpl = UAOffNormalAlarmImplBase & UAOffNormalAlarmEx;
|
|
219
|
+
export const UAOffNormalAlarmImpl = UAOffNormalAlarmImplBase as unknown as new () => UAOffNormalAlarmImpl;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
3
|
*/
|
|
4
|
-
import { INamespace } from "node-opcua-address-space-base";
|
|
5
|
-
import { NodeId } from "node-opcua-nodeid";
|
|
6
|
-
import {
|
|
7
|
-
import { InstantiateOffNormalAlarmOptions } from "../../source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options";
|
|
8
|
-
import { UAOffNormalAlarmImpl } from "./ua_off_normal_alarm_impl";
|
|
4
|
+
import type { INamespace } from "node-opcua-address-space-base";
|
|
5
|
+
import type { NodeId } from "node-opcua-nodeid";
|
|
6
|
+
import type { VariantOptions } from "node-opcua-variant";
|
|
7
|
+
import type { InstantiateOffNormalAlarmOptions } from "../../source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options";
|
|
8
|
+
import { UAOffNormalAlarmImpl, UAOffNormalAlarmImplBase } from "./ua_off_normal_alarm_impl";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
*
|
|
@@ -21,6 +21,6 @@ export class UASystemOffNormalAlarmImpl extends UAOffNormalAlarmImpl {
|
|
|
21
21
|
options: InstantiateOffNormalAlarmOptions,
|
|
22
22
|
data?: Record<string, VariantOptions>
|
|
23
23
|
): UASystemOffNormalAlarmImpl {
|
|
24
|
-
return
|
|
24
|
+
return UAOffNormalAlarmImplBase.instantiate(namespace, limitAlarmTypeId, options, data) as UASystemOffNormalAlarmImpl;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { UAObject, UAVariable } from "../source";
|
|
2
2
|
import { UAConditionImpl } from "./alarms_and_conditions/ua_condition_impl";
|
|
3
|
-
import {
|
|
4
|
-
import { UAObjectImpl } from "./ua_object_impl";
|
|
3
|
+
import type { UAObjectImpl } from "./ua_object_impl";
|
|
5
4
|
|
|
6
|
-
export type ConditionRefreshCache = Map<string,
|
|
7
|
-
export function apply_condition_refresh(this:
|
|
5
|
+
export type ConditionRefreshCache = Map<string, UAObjectImpl>;
|
|
6
|
+
export function apply_condition_refresh(this: UAObject | UAVariable, cache?: ConditionRefreshCache): void {
|
|
8
7
|
// visit all notifiers recursively
|
|
9
8
|
cache = cache || new Map();
|
|
10
9
|
const notifiers = this.getNotifiers();
|
|
11
10
|
const eventSources = this.getEventSources();
|
|
12
|
-
|
|
11
|
+
|
|
13
12
|
const conditions = this.findReferencesAsObject("HasCondition", true);
|
|
14
13
|
for (const condition of conditions) {
|
|
15
14
|
if (condition instanceof UAConditionImpl) {
|
|
16
15
|
condition._resend_conditionEvents();
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
|
-
const arr =
|
|
18
|
+
const arr = [...notifiers, ...eventSources] as UAObjectImpl[];
|
|
20
19
|
|
|
21
20
|
for (const notifier of arr) {
|
|
22
21
|
const key = notifier.nodeId.toString();
|
|
23
22
|
if (!cache.has(key)) {
|
|
24
|
-
cache.set(key,notifier);
|
|
23
|
+
cache.set(key, notifier);
|
|
25
24
|
if (notifier._conditionRefresh) {
|
|
26
25
|
notifier._conditionRefresh(cache);
|
|
27
26
|
}
|