node-opcua-address-space 2.170.1 → 2.172.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/source/address_space_ts.d.ts +13 -13
- package/dist/source/address_space_ts.js +4 -0
- package/dist/source/address_space_ts.js.map +1 -1
- package/dist/source/continuation_points/continuation_point_manager.d.ts +6 -3
- package/dist/source/continuation_points/continuation_point_manager.js +4 -4
- package/dist/source/continuation_points/continuation_point_manager.js.map +1 -1
- package/dist/source/helpers/adjust_browse_direction.d.ts +1 -1
- package/dist/source/helpers/argument_list.d.ts +13 -11
- package/dist/source/helpers/argument_list.js +24 -15
- package/dist/source/helpers/argument_list.js.map +1 -1
- package/dist/source/helpers/call_helpers.d.ts +6 -3
- package/dist/source/helpers/call_helpers.js +5 -6
- package/dist/source/helpers/call_helpers.js.map +1 -1
- package/dist/source/helpers/coerce_enum_value.d.ts +2 -2
- package/dist/source/helpers/coerce_enum_value.js +2 -2
- package/dist/source/helpers/coerce_enum_value.js.map +1 -1
- package/dist/source/helpers/dump_tools.d.ts +3 -3
- package/dist/source/helpers/dump_tools.js +2 -2
- package/dist/source/helpers/dump_tools.js.map +1 -1
- package/dist/source/helpers/ensure_secure_access.d.ts +1 -1
- package/dist/source/helpers/ensure_secure_access.js +1 -1
- package/dist/source/helpers/ensure_secure_access.js.map +1 -1
- package/dist/source/helpers/make_optionals_map.js +0 -5
- package/dist/source/helpers/make_optionals_map.js.map +1 -1
- package/dist/source/helpers/multiform_func.d.ts +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.d.ts +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js.map +1 -1
- package/dist/source/index.d.ts +38 -38
- package/dist/source/index.js +53 -54
- package/dist/source/index.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +11 -11
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +6 -6
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +4 -4
- package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +4 -3
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +10 -13
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +11 -11
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.d.ts +11 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +5 -5
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +21 -29
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +3 -7
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +0 -23
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +8 -10
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +4 -6
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +5 -5
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +3 -3
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +7 -7
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +5 -8
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +5 -5
- package/dist/source/interfaces/data_access/ua_y_array_item_ex.d.ts +3 -3
- package/dist/source/interfaces/extension_object_constructor.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +2 -2
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +6 -6
- package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +7 -6
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js +4 -0
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +1 -1
- package/dist/source/interfaces/state_machine/ua_transition_ex.d.ts +2 -2
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +2 -2
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js +3 -0
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -1
- package/dist/source/loader/decode_xml_extension_object.d.ts +4 -4
- package/dist/source/loader/decode_xml_extension_object.js +3 -3
- package/dist/source/loader/decode_xml_extension_object.js.map +1 -1
- package/dist/source/loader/ensure_datatype_extracted.d.ts +2 -2
- package/dist/source/loader/ensure_datatype_extracted.js +5 -5
- package/dist/source/loader/ensure_datatype_extracted.js.map +1 -1
- package/dist/source/loader/generateAddressSpaceRaw.d.ts +3 -3
- package/dist/source/loader/generateAddressSpaceRaw.js +6 -6
- package/dist/source/loader/generateAddressSpaceRaw.js.map +1 -1
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/source/loader/make_xml_extension_object_parser.d.ts +2 -2
- package/dist/source/loader/make_xml_extension_object_parser.js +19 -19
- package/dist/source/loader/make_xml_extension_object_parser.js.map +1 -1
- package/dist/source/loader/namespace_post_step.d.ts +1 -1
- package/dist/source/loader/namespace_post_step.js.map +1 -1
- package/dist/source/loader/parsers/extension_object_parser.d.ts +4 -4
- package/dist/source/loader/parsers/extension_object_parser.js +22 -23
- package/dist/source/loader/parsers/extension_object_parser.js.map +1 -1
- package/dist/source/loader/parsers/localized_text_parser.d.ts +2 -2
- package/dist/source/loader/parsers/localized_text_parser.js.map +1 -1
- package/dist/source/loader/parsers/nodeid_parser.d.ts +1 -1
- package/dist/source/loader/parsers/nodeid_parser.js.map +1 -1
- package/dist/source/loader/parsers/qualified_name_parser.d.ts +3 -3
- package/dist/source/loader/parsers/qualified_name_parser.js.map +1 -1
- package/dist/source/loader/parsers/variant_parser.d.ts +5 -5
- package/dist/source/loader/parsers/variant_parser.js +13 -13
- package/dist/source/loader/parsers/variant_parser.js.map +1 -1
- package/dist/source/loader/register_node_promoter.d.ts +1 -1
- package/dist/source/loader/register_node_promoter.js.map +1 -1
- package/dist/source/namespace.d.ts +4 -4
- package/dist/source/namespace_alarm_and_condition.d.ts +22 -21
- package/dist/source/namespace_data_access.d.ts +11 -11
- package/dist/source/namespace_machine_state.d.ts +4 -4
- package/dist/source/pseudo_session.d.ts +8 -5
- package/dist/source/pseudo_session.js +28 -28
- package/dist/source/pseudo_session.js.map +1 -1
- package/dist/source/session_context.js +1 -1
- package/dist/source/session_context.js.map +1 -1
- package/dist/source/set_namespace_meta_data.d.ts +1 -1
- package/dist/source/set_namespace_meta_data.js +1 -1
- package/dist/source/set_namespace_meta_data.js.map +1 -1
- package/dist/source/ua_addin.d.ts +3 -3
- package/dist/source/ua_addin.js +1 -1
- package/dist/source/ua_addin.js.map +1 -1
- package/dist/source/ua_interface.js +4 -1
- package/dist/source/ua_interface.js.map +1 -1
- package/dist/source/ua_root_folder.d.ts +1 -1
- package/dist/source/ua_two_state_variable_ex.d.ts +5 -5
- package/dist/src/_instantiate_helpers.js +1 -1
- package/dist/src/_instantiate_helpers.js.map +1 -1
- package/dist/src/_mandatory_child_or_requested_optional_filter.d.ts +2 -2
- package/dist/src/_mandatory_child_or_requested_optional_filter.js +7 -8
- package/dist/src/_mandatory_child_or_requested_optional_filter.js.map +1 -1
- package/dist/src/address_space.js +4 -4
- package/dist/src/address_space.js.map +1 -1
- package/dist/src/address_space_change_event_tools.d.ts +3 -3
- package/dist/src/address_space_change_event_tools.js +8 -10
- package/dist/src/address_space_change_event_tools.js.map +1 -1
- package/dist/src/address_space_private.d.ts +11 -11
- package/dist/src/address_space_private.js +3 -0
- package/dist/src/address_space_private.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +6 -6
- package/dist/src/alarms_and_conditions/condition_info_impl.js +6 -15
- package/dist/src/alarms_and_conditions/condition_info_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +10 -10
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +76 -47
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +8 -5
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +15 -9
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -1
- package/dist/src/alarms_and_conditions/index.d.ts +3 -3
- package/dist/src/alarms_and_conditions/index.js +3 -3
- package/dist/src/alarms_and_conditions/index.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +21 -14
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +26 -21
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +6 -7
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +30 -28
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +9 -11
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js +10 -10
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +3 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +6 -5
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +16 -42
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +100 -82
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +12 -7
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +9 -8
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +18 -18
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +16 -18
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +4 -4
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +2 -2
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +10 -9
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +20 -19
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +2 -4
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +12 -38
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +50 -65
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +15 -17
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +15 -11
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +22 -15
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +35 -24
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +15 -16
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +19 -14
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +4 -4
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/apply_condition_refresh.d.ts +4 -4
- package/dist/src/apply_condition_refresh.js +1 -1
- package/dist/src/apply_condition_refresh.js.map +1 -1
- package/dist/src/base_node_impl.d.ts +4 -6
- package/dist/src/base_node_impl.js +3 -3
- package/dist/src/base_node_impl.js.map +1 -1
- package/dist/src/base_node_private.js +1 -2
- package/dist/src/base_node_private.js.map +1 -1
- package/dist/src/check_value_rank_compatibility.js +10 -6
- package/dist/src/check_value_rank_compatibility.js.map +1 -1
- package/dist/src/data_access/add_dataItem_stuff.d.ts +1 -1
- package/dist/src/data_access/add_dataItem_stuff.js +2 -22
- package/dist/src/data_access/add_dataItem_stuff.js.map +1 -1
- package/dist/src/data_access/adjust_datavalue_status_code.d.ts +6 -3
- package/dist/src/data_access/adjust_datavalue_status_code.js +3 -3
- package/dist/src/data_access/adjust_datavalue_status_code.js.map +1 -1
- package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +13 -11
- package/dist/src/data_access/ua_multistate_discrete_impl.js +28 -23
- package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +19 -23
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js +31 -31
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +10 -16
- package/dist/src/data_access/ua_two_state_discrete_impl.js +18 -14
- package/dist/src/data_access/ua_two_state_discrete_impl.js.map +1 -1
- package/dist/src/event_data.js.map +1 -1
- package/dist/src/extension_object_array_node.d.ts +5 -2
- package/dist/src/extension_object_array_node.js +21 -24
- package/dist/src/extension_object_array_node.js.map +1 -1
- package/dist/src/get_basic_datatype.d.ts +2 -2
- package/dist/src/get_basic_datatype.js.map +1 -1
- package/dist/src/historical_access/address_space_historical_data_node.d.ts +3 -3
- package/dist/src/historical_access/address_space_historical_data_node.js +24 -17
- package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -1
- package/dist/src/idx_iterator.js +1 -1
- package/dist/src/idx_iterator.js.map +1 -1
- package/dist/src/index_current.d.ts +31 -31
- package/dist/src/index_current.js +45 -45
- package/dist/src/index_current.js.map +1 -1
- package/dist/src/namespace_impl.d.ts +4 -3
- package/dist/src/namespace_impl.js +17 -14
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/namespace_private.js.map +1 -1
- package/dist/src/nodeid_manager.d.ts +3 -3
- package/dist/src/nodeid_manager.js +19 -16
- package/dist/src/nodeid_manager.js.map +1 -1
- package/dist/src/nodeset_tools/adjust_namespace_array.d.ts +1 -1
- package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +2 -2
- package/dist/src/nodeset_tools/construct_namespace_dependency.js +7 -7
- package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +1 -1
- package/dist/src/nodeset_tools/dump_to_bsd.d.ts +1 -1
- package/dist/src/nodeset_tools/dump_to_bsd.js +15 -11
- package/dist/src/nodeset_tools/dump_to_bsd.js.map +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +5 -3
- package/dist/src/nodeset_tools/nodeset_to_xml.js +64 -67
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/src/private_namespace.d.ts +2 -2
- package/dist/src/private_namespace.js.map +1 -1
- package/dist/src/reference_impl.d.ts +2 -2
- package/dist/src/reference_impl.js +9 -11
- package/dist/src/reference_impl.js.map +1 -1
- package/dist/src/role_permissions.d.ts +1 -1
- package/dist/src/role_permissions.js.map +1 -1
- package/dist/src/state_machine/finite_state_machine.d.ts +11 -14
- package/dist/src/state_machine/finite_state_machine.js +36 -30
- package/dist/src/state_machine/finite_state_machine.js.map +1 -1
- package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +8 -6
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js +16 -18
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
- package/dist/src/state_machine/ua_two_state_variable.d.ts +12 -11
- package/dist/src/state_machine/ua_two_state_variable.js +24 -29
- package/dist/src/state_machine/ua_two_state_variable.js.map +1 -1
- package/dist/src/tool_isSubtypeOf.d.ts +5 -5
- package/dist/src/tool_isSubtypeOf.js +21 -18
- package/dist/src/tool_isSubtypeOf.js.map +1 -1
- package/dist/src/ua_condition_type.d.ts +1 -1
- package/dist/src/ua_data_type_impl.js.map +1 -1
- package/dist/src/ua_method_impl.d.ts +9 -5
- package/dist/src/ua_method_impl.js +1 -1
- package/dist/src/ua_method_impl.js.map +1 -1
- package/dist/src/ua_object_impl.d.ts +7 -5
- package/dist/src/ua_object_impl.js +13 -11
- package/dist/src/ua_object_impl.js.map +1 -1
- package/dist/src/ua_object_type_impl.d.ts +7 -5
- package/dist/src/ua_object_type_impl.js +4 -5
- package/dist/src/ua_object_type_impl.js.map +1 -1
- package/dist/src/ua_reference_type_impl.d.ts +6 -8
- package/dist/src/ua_reference_type_impl.js +16 -14
- package/dist/src/ua_reference_type_impl.js.map +1 -1
- package/dist/src/ua_variable_impl.d.ts +43 -45
- package/dist/src/ua_variable_impl.js +99 -83
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/dist/src/ua_variable_impl_ext_obj.d.ts +3 -3
- package/dist/src/ua_variable_impl_ext_obj.js +37 -29
- package/dist/src/ua_variable_impl_ext_obj.js.map +1 -1
- package/dist/src/ua_variable_type_impl.d.ts +11 -11
- package/dist/src/ua_variable_type_impl.js +13 -21
- package/dist/src/ua_variable_type_impl.js.map +1 -1
- package/dist/src/ua_view_impl.d.ts +3 -4
- package/dist/src/ua_view_impl.js +5 -6
- package/dist/src/ua_view_impl.js.map +1 -1
- package/dist/src/validate_data_type_correctness.d.ts +2 -2
- package/dist/src/validate_data_type_correctness.js +12 -3
- package/dist/src/validate_data_type_correctness.js.map +1 -1
- package/dist/tsconfig_base.tsbuildinfo +1 -1
- package/distHelpers/add_event_generator_object.d.ts +5 -2
- package/distHelpers/add_event_generator_object.js +2 -2
- package/distHelpers/add_event_generator_object.js.map +1 -1
- package/distHelpers/alarms_and_conditions_demo.d.ts +1 -1
- package/distHelpers/alarms_and_conditions_demo.js +4 -6
- package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
- package/distHelpers/assertHasMatchingReference.d.ts +1 -1
- package/distHelpers/assertHasMatchingReference.js +2 -2
- package/distHelpers/assertHasMatchingReference.js.map +1 -1
- package/distHelpers/boiler_system.d.ts +6 -3
- package/distHelpers/boiler_system.js +44 -42
- package/distHelpers/boiler_system.js.map +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.d.ts +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.js +25 -27
- package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -1
- package/distHelpers/get_address_space_fixture.js +1 -1
- package/distHelpers/get_address_space_fixture.js.map +1 -1
- package/distHelpers/mock_session.d.ts +7 -7
- package/distHelpers/mock_session.js +4 -4
- package/distHelpers/mock_session.js.map +1 -1
- package/distNodeJS/generate_address_space.d.ts +2 -2
- package/distNodeJS/generate_address_space.js +2 -2
- package/distNodeJS/generate_address_space.js.map +1 -1
- package/package.json +36 -36
- package/source/address_space_ts.ts +29 -30
- package/source/continuation_points/continuation_point_manager.ts +8 -7
- package/source/helpers/adjust_browse_direction.ts +1 -1
- package/source/helpers/argument_list.ts +37 -25
- package/source/helpers/call_helpers.ts +10 -15
- package/source/helpers/coerce_enum_value.ts +4 -4
- package/source/helpers/dump_tools.ts +6 -11
- package/source/helpers/ensure_secure_access.ts +2 -2
- package/source/helpers/make_optionals_map.ts +3 -10
- package/source/helpers/multiform_func.ts +1 -1
- package/source/helpers/resolve_opaque_on_address_space.ts +2 -2
- package/source/index.ts +44 -54
- package/source/interfaces/alarms_and_conditions/condition_info_i.ts +3 -4
- package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +13 -13
- package/source/interfaces/alarms_and_conditions/deviation_stuff.ts +8 -10
- package/source/interfaces/alarms_and_conditions/install_setpoint_options.ts +4 -5
- package/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +4 -6
- package/source/interfaces/alarms_and_conditions/instantiate_condition_options.ts +3 -3
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +6 -3
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +11 -11
- package/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +11 -25
- package/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +16 -13
- package/source/interfaces/alarms_and_conditions/ua_base_event_ex.ts +12 -0
- package/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +5 -5
- package/source/interfaces/alarms_and_conditions/ua_condition_ex.ts +30 -54
- package/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +3 -34
- package/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +18 -22
- package/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +8 -15
- package/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +4 -7
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +5 -6
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +3 -3
- package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +9 -16
- package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +5 -8
- package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +5 -5
- package/source/interfaces/data_access/ua_y_array_item_ex.ts +3 -3
- package/source/interfaces/extension_object_constructor.ts +3 -4
- package/source/interfaces/i_condition_variable_type_setter_options.ts +1 -3
- package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +3 -3
- package/source/interfaces/state_machine/ua_finite_state_machine_type.ts +2 -2
- package/source/interfaces/state_machine/ua_program_state_machine_type.ts +3 -3
- package/source/interfaces/state_machine/ua_shelved_state_machine_ex.ts +10 -7
- package/source/interfaces/state_machine/ua_state_machine_type.ts +11 -8
- package/source/interfaces/state_machine/ua_transition_ex.ts +2 -2
- package/source/interfaces/ua_subscription_diagnostics_variable_ex.ts +3 -2
- package/source/loader/decode_xml_extension_object.ts +7 -7
- package/source/loader/ensure_datatype_extracted.ts +14 -19
- package/source/loader/generateAddressSpaceRaw.ts +12 -13
- package/source/loader/load_nodeset2.ts +3 -3
- package/source/loader/make_xml_extension_object_parser.ts +55 -39
- package/source/loader/namespace_post_step.ts +3 -4
- package/source/loader/parsers/extension_object_parser.ts +63 -62
- package/source/loader/parsers/localized_text_parser.ts +3 -3
- package/source/loader/parsers/nodeid_parser.ts +2 -3
- package/source/loader/parsers/qualified_name_parser.ts +6 -7
- package/source/loader/parsers/variant_parser.ts +48 -55
- package/source/loader/register_node_promoter.ts +2 -2
- package/source/namespace.ts +4 -4
- package/source/namespace_alarm_and_condition.ts +22 -22
- package/source/namespace_data_access.ts +12 -13
- package/source/namespace_machine_state.ts +10 -5
- package/source/pseudo_session.ts +53 -50
- package/source/session_context.ts +1 -1
- package/source/set_namespace_meta_data.ts +3 -3
- package/source/ua_addin.ts +10 -11
- package/source/ua_interface.ts +10 -7
- package/source/ua_root_folder.ts +1 -1
- package/source/ua_two_state_variable_ex.ts +5 -5
- package/source_nodejs/generate_address_space.ts +5 -9
- package/src/_instantiate_helpers.ts +26 -16
- package/src/_mandatory_child_or_requested_optional_filter.ts +16 -15
- package/src/address_space.ts +23 -31
- package/src/address_space_change_event_tools.ts +25 -30
- package/src/address_space_private.ts +20 -21
- package/src/alarms_and_conditions/condition.ts +0 -2
- package/src/alarms_and_conditions/condition_info_impl.ts +11 -19
- package/src/alarms_and_conditions/condition_snapshot_impl.ts +106 -82
- package/src/alarms_and_conditions/deviation_alarm_helper.ts +20 -15
- package/src/alarms_and_conditions/index.ts +3 -3
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +44 -32
- package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +35 -34
- package/src/alarms_and_conditions/ua_base_event_impl.ts +15 -19
- package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +6 -2
- package/src/alarms_and_conditions/ua_condition_impl.ts +140 -130
- package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +20 -12
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +40 -43
- package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +7 -7
- package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +28 -30
- package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +3 -6
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +59 -90
- package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +31 -27
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +57 -36
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +31 -27
- package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +6 -6
- package/src/apply_condition_refresh.ts +7 -8
- package/src/base_node_impl.ts +63 -44
- package/src/base_node_private.ts +12 -4
- package/src/check_value_rank_compatibility.ts +18 -14
- package/src/data_access/add_dataItem_stuff.ts +3 -4
- package/src/data_access/adjust_datavalue_status_code.ts +7 -7
- package/src/data_access/ua_multistate_discrete_impl.ts +44 -28
- package/src/data_access/ua_multistate_value_discrete_impl.ts +77 -66
- package/src/data_access/ua_two_state_discrete_impl.ts +29 -36
- package/src/event_data.ts +53 -53
- package/src/extension_object_array_node.ts +27 -28
- package/src/get_basic_datatype.ts +4 -5
- package/src/historical_access/address_space_historical_data_node.ts +65 -50
- package/src/idx_iterator.ts +4 -12
- package/src/index_current.ts +33 -45
- package/src/namespace_impl.ts +75 -62
- package/src/namespace_private.ts +2 -8
- package/src/nodeid_manager.ts +30 -27
- package/src/nodeset_tools/adjust_namespace_array.ts +1 -1
- package/src/nodeset_tools/construct_namespace_dependency.ts +15 -16
- package/src/nodeset_tools/dump_to_bsd.ts +27 -22
- package/src/nodeset_tools/nodeset_to_xml.ts +95 -114
- package/src/private_namespace.ts +3 -6
- package/src/reference_impl.ts +11 -14
- package/src/role_permissions.ts +1 -1
- package/src/state_machine/finite_state_machine.ts +60 -61
- package/src/state_machine/ua_shelving_state_machine_ex.ts +23 -23
- package/src/state_machine/ua_two_state_variable.ts +34 -31
- package/src/tool_isSubtypeOf.ts +48 -33
- package/src/ua_condition_type.ts +1 -1
- package/src/ua_data_type_impl.ts +12 -13
- package/src/ua_method_impl.ts +17 -12
- package/src/ua_object_impl.ts +38 -33
- package/src/ua_object_type_impl.ts +22 -22
- package/src/ua_reference_type_impl.ts +19 -19
- package/src/ua_variable_impl.ts +240 -220
- package/src/ua_variable_impl_ext_obj.ts +63 -50
- package/src/ua_variable_type_impl.ts +43 -49
- package/src/ua_view_impl.ts +5 -5
- package/src/validate_data_type_correctness.ts +17 -8
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
3
|
*/
|
|
4
|
-
import { EventEmitter } from "events";
|
|
5
|
-
|
|
6
|
-
import { IEventData, UAVariable, BaseNode, UAObject } from "node-opcua-address-space-base";
|
|
4
|
+
import { EventEmitter } from "node:events";
|
|
5
|
+
import type { BaseNode, IEventData, UAObject, UAVariable, UAVariableEvents } from "node-opcua-address-space-base";
|
|
7
6
|
import { assert } from "node-opcua-assert";
|
|
8
|
-
import { UInt16 } from "node-opcua-basic-types";
|
|
9
|
-
import { coerceLocalizedText, LocalizedText, LocalizedTextLike, NodeClass } from "node-opcua-data-model";
|
|
10
|
-
import { DataValue } from "node-opcua-data-value";
|
|
7
|
+
import type { UInt16 } from "node-opcua-basic-types";
|
|
8
|
+
import { coerceLocalizedText, type LocalizedText, type LocalizedTextLike, NodeClass } from "node-opcua-data-model";
|
|
11
9
|
import { checkDebugFlag, make_debugLog } from "node-opcua-debug";
|
|
12
10
|
import { NodeId, sameNodeId } from "node-opcua-nodeid";
|
|
13
|
-
import { UAAcknowledgeableCondition } from "node-opcua-nodeset-ua";
|
|
14
|
-
import { StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
11
|
+
import type { UAAcknowledgeableCondition } from "node-opcua-nodeset-ua";
|
|
12
|
+
import { type StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
15
13
|
import { TimeZoneDataType } from "node-opcua-types";
|
|
16
14
|
import { DataType, Variant } from "node-opcua-variant";
|
|
17
|
-
|
|
18
|
-
import { ConditionSnapshot } from "../../source/interfaces/alarms_and_conditions/condition_snapshot";
|
|
19
|
-
import { IConditionVariableTypeSetterOptions } from "../../source/interfaces/i_condition_variable_type_setter_options";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
15
|
+
import type { UAConditionEx } from "../../source";
|
|
16
|
+
import type { ConditionSnapshot } from "../../source/interfaces/alarms_and_conditions/condition_snapshot";
|
|
17
|
+
import type { IConditionVariableTypeSetterOptions } from "../../source/interfaces/i_condition_variable_type_setter_options";
|
|
18
|
+
import type { ISetStateOptions } from "../../source/interfaces/i_set_state_options";
|
|
19
|
+
import type { UtcTime } from "../../source/interfaces/state_machine/ua_state_machine_type";
|
|
22
20
|
import { EventData } from "../event_data";
|
|
23
21
|
import { UATwoStateVariableImpl } from "../state_machine/ua_two_state_variable";
|
|
24
22
|
import { UAConditionImpl } from "./ua_condition_impl";
|
|
@@ -33,7 +31,8 @@ function normalizeName(str: string): string {
|
|
|
33
31
|
|
|
34
32
|
const disabledVar = new Variant({
|
|
35
33
|
dataType: "StatusCode",
|
|
36
|
-
value: StatusCodes.BadConditionDisabled
|
|
34
|
+
value: StatusCodes.BadConditionDisabled,
|
|
35
|
+
// statusCode: StatusCodes.BadConditionDisabled
|
|
37
36
|
});
|
|
38
37
|
|
|
39
38
|
// list of Condition variables that should not be published as BadConditionDisabled when the condition
|
|
@@ -86,9 +85,9 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
86
85
|
|
|
87
86
|
public _constructEventData(): IEventData {
|
|
88
87
|
if (this.branchId && sameNodeId(this.branchId, NodeId.nullNodeId)) {
|
|
89
|
-
this.#_ensure_condition_values_correctness(this.condition
|
|
88
|
+
this.#_ensure_condition_values_correctness(this.condition, "", []);
|
|
90
89
|
}
|
|
91
|
-
const c = this.condition as
|
|
90
|
+
const c = this.condition as unknown as UAConditionEx;
|
|
92
91
|
const isDisabled = !c.getEnabledState();
|
|
93
92
|
const eventData = new EventData(this.condition);
|
|
94
93
|
|
|
@@ -118,7 +117,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
118
117
|
|
|
119
118
|
const key = prefix + name;
|
|
120
119
|
|
|
121
|
-
const snapshot_value = this._map.get(key)
|
|
120
|
+
const snapshot_value = this._map.get(key)?.toString();
|
|
122
121
|
|
|
123
122
|
const aggregateVariable = aggregate as UAVariable;
|
|
124
123
|
const condition_value = aggregateVariable.readValue().value.toString();
|
|
@@ -126,16 +125,16 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
126
125
|
if (snapshot_value !== condition_value) {
|
|
127
126
|
error.push(
|
|
128
127
|
" Condition Branch0 is not in sync with node values for " +
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
128
|
+
key +
|
|
129
|
+
"\n v1= " +
|
|
130
|
+
snapshot_value +
|
|
131
|
+
"\n v2= " +
|
|
132
|
+
condition_value
|
|
134
133
|
);
|
|
135
134
|
}
|
|
136
135
|
|
|
137
136
|
this._node_index.set(key, aggregateVariable);
|
|
138
|
-
this.#_ensure_condition_values_correctness(aggregate, prefix + name
|
|
137
|
+
this.#_ensure_condition_values_correctness(aggregate, `${prefix + name}.`, error);
|
|
139
138
|
}
|
|
140
139
|
}
|
|
141
140
|
|
|
@@ -159,7 +158,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
159
158
|
this._map.set(key, aggregateVariable.readValue().value);
|
|
160
159
|
this._node_index.set(key, aggregateVariable);
|
|
161
160
|
|
|
162
|
-
this.#_visit(aggregate, prefix + name
|
|
161
|
+
this.#_visit(aggregate, `${prefix + name}.`);
|
|
163
162
|
}
|
|
164
163
|
}
|
|
165
164
|
}
|
|
@@ -175,17 +174,19 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
175
174
|
if (doDebug) {
|
|
176
175
|
debugLog("adding key =", key);
|
|
177
176
|
}
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
if (aggregate.nodeClass !== NodeClass.Variable) {
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
(aggregate as UAVariable<UAVariableEvents>).on("value_changed", (newDataValue, _indexRange) => {
|
|
180
181
|
this._map.set(key, newDataValue.value);
|
|
181
182
|
this._node_index.set(key, aggregate as UAVariable);
|
|
182
183
|
});
|
|
183
184
|
|
|
184
|
-
this.#_installOnChangeEventHandlers(aggregate, prefix + name
|
|
185
|
+
this.#_installOnChangeEventHandlers(aggregate, `${prefix + name}.`);
|
|
185
186
|
}
|
|
186
187
|
}
|
|
187
188
|
}
|
|
188
|
-
#_record_condition_state(condition:
|
|
189
|
+
#_record_condition_state(condition: BaseNode) {
|
|
189
190
|
this._map.clear();
|
|
190
191
|
this._node_index.clear();
|
|
191
192
|
assert(condition instanceof UAConditionImpl);
|
|
@@ -195,9 +196,9 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
195
196
|
/**
|
|
196
197
|
* @internal
|
|
197
198
|
*/
|
|
198
|
-
#
|
|
199
|
-
const c = this.condition as
|
|
200
|
-
if (!c.getEnabledState() && !Object.
|
|
199
|
+
#_get_var_inner(varName: string): Variant {
|
|
200
|
+
const c = this.condition as unknown as UAConditionEx;
|
|
201
|
+
if (!c.getEnabledState() && !Object.hasOwn(_varTable, varName)) {
|
|
201
202
|
// xx debuglog("ConditionSnapshot#_get_var condition enabled =", self.condition.getEnabledState());
|
|
202
203
|
return disabledVar;
|
|
203
204
|
}
|
|
@@ -205,9 +206,37 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
205
206
|
const key = normalizeName(varName);
|
|
206
207
|
const variant = this._map.get(key);
|
|
207
208
|
if (!variant) {
|
|
208
|
-
throw new Error(
|
|
209
|
+
throw new Error(`cannot find key ${key}`);
|
|
209
210
|
}
|
|
210
|
-
return variant
|
|
211
|
+
return variant;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
#_is_varValid(varName: string) {
|
|
215
|
+
const key = normalizeName(varName);
|
|
216
|
+
const variant = this._map.get(key);
|
|
217
|
+
return !(variant && variant.dataType === DataType.StatusCode && variant.value === StatusCodes.BadConditionDisabled);
|
|
218
|
+
}
|
|
219
|
+
#_get_varTDefault<T>(dataType: DataType, varName: string, defaultValue: T): T {
|
|
220
|
+
const variant = this.#_get_var_inner(varName);
|
|
221
|
+
if (variant.dataType !== dataType) {
|
|
222
|
+
if (variant.dataType === DataType.StatusCode) {
|
|
223
|
+
// Warning: we need to improve this,
|
|
224
|
+
return defaultValue;
|
|
225
|
+
}
|
|
226
|
+
throw new Error(`Expected dataType ${DataType[dataType]} but got ${DataType[variant.dataType]}`);
|
|
227
|
+
}
|
|
228
|
+
return variant.value as T;
|
|
229
|
+
}
|
|
230
|
+
#_get_varT<T>(dataType: DataType, varName: string): T {
|
|
231
|
+
const variant = this.#_get_var_inner(varName);
|
|
232
|
+
if (variant.dataType !== dataType) {
|
|
233
|
+
// if (variant.dataType === DataType.StatusCode) {
|
|
234
|
+
// // Warning: we need to improve this,
|
|
235
|
+
// return variant.value as T;
|
|
236
|
+
// }
|
|
237
|
+
throw new Error(`Expected dataType ${DataType[dataType]} but got ${DataType[variant.dataType]}`);
|
|
238
|
+
}
|
|
239
|
+
return variant.value as T;
|
|
211
240
|
}
|
|
212
241
|
|
|
213
242
|
/**
|
|
@@ -219,7 +248,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
219
248
|
if (!this._map.has(key)) {
|
|
220
249
|
// c8 ignore next
|
|
221
250
|
if (doDebug) {
|
|
222
|
-
debugLog(
|
|
251
|
+
debugLog(` cannot find node ${varName}`);
|
|
223
252
|
debugLog(" map=", [...this._map.keys()].join(" "));
|
|
224
253
|
}
|
|
225
254
|
}
|
|
@@ -232,7 +261,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
232
261
|
);
|
|
233
262
|
|
|
234
263
|
const sourceTimestamp = options?.sourceTimestamp || new Date();
|
|
235
|
-
const sourceTimestampKey = key
|
|
264
|
+
const sourceTimestampKey = `${key}.SourceTimestamp`;
|
|
236
265
|
if (this._map.has(sourceTimestampKey)) {
|
|
237
266
|
// from spec 1.03 : 5.3 condition variables
|
|
238
267
|
// a condition VariableType has a sourceTimeStamp exposed property
|
|
@@ -252,7 +281,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
252
281
|
const node = this._node_index.get(key);
|
|
253
282
|
if (!node) {
|
|
254
283
|
// for instance localTime is optional
|
|
255
|
-
debugLog(
|
|
284
|
+
debugLog(`Cannot serVar ${varName} dataType ${DataType[dataType]}`);
|
|
256
285
|
return;
|
|
257
286
|
}
|
|
258
287
|
assert(node.nodeClass === NodeClass.Variable);
|
|
@@ -263,21 +292,21 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
263
292
|
*
|
|
264
293
|
*/
|
|
265
294
|
public getBranchId(): NodeId {
|
|
266
|
-
return this.#
|
|
295
|
+
return this.#_get_varT<NodeId>(DataType.NodeId, "BranchId");
|
|
267
296
|
}
|
|
268
297
|
|
|
269
298
|
/**
|
|
270
299
|
*
|
|
271
300
|
*/
|
|
272
301
|
public getEventId(): Buffer {
|
|
273
|
-
return this.#
|
|
302
|
+
return this.#_get_varT<Buffer>(DataType.ByteString, "EventId");
|
|
274
303
|
}
|
|
275
304
|
|
|
276
305
|
/**
|
|
277
306
|
*
|
|
278
307
|
*/
|
|
279
308
|
public getRetain(): boolean {
|
|
280
|
-
return this.#
|
|
309
|
+
return this.#_get_varTDefault<boolean>(DataType.Boolean, "Retain", false);
|
|
281
310
|
}
|
|
282
311
|
|
|
283
312
|
/**
|
|
@@ -285,7 +314,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
285
314
|
*/
|
|
286
315
|
public setRetain(retainFlag: boolean): void {
|
|
287
316
|
retainFlag = !!retainFlag;
|
|
288
|
-
|
|
317
|
+
this.#_set_var("Retain", DataType.Boolean, retainFlag);
|
|
289
318
|
}
|
|
290
319
|
|
|
291
320
|
/**
|
|
@@ -295,9 +324,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
295
324
|
const addressSpace = this.condition.addressSpace;
|
|
296
325
|
// create a new event Id for this new condition
|
|
297
326
|
const eventId = addressSpace.generateEventId();
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
return ret;
|
|
327
|
+
this.#_set_var("EventId", DataType.ByteString, eventId.value);
|
|
301
328
|
}
|
|
302
329
|
|
|
303
330
|
/**
|
|
@@ -311,21 +338,21 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
311
338
|
*
|
|
312
339
|
*/
|
|
313
340
|
public setEnabledState(value: boolean, options?: ISetStateOptions): void {
|
|
314
|
-
|
|
341
|
+
this.#_set_twoStateVariable("EnabledState", value, options);
|
|
315
342
|
}
|
|
316
343
|
|
|
317
344
|
/**
|
|
318
345
|
*
|
|
319
346
|
*/
|
|
320
347
|
public getEnabledStateAsString(): string {
|
|
321
|
-
return this.#
|
|
348
|
+
return this.#_get_varT<LocalizedText>(DataType.LocalizedText, "EnabledState").text || "";
|
|
322
349
|
}
|
|
323
350
|
|
|
324
351
|
/**
|
|
325
352
|
*
|
|
326
353
|
*/
|
|
327
354
|
public getComment(): LocalizedText {
|
|
328
|
-
return this.#
|
|
355
|
+
return this.#_get_varT<LocalizedText>(DataType.LocalizedText, "Comment");
|
|
329
356
|
}
|
|
330
357
|
|
|
331
358
|
/**
|
|
@@ -348,14 +375,14 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
348
375
|
*/
|
|
349
376
|
public setMessage(txtMessage: LocalizedTextLike | LocalizedText): void {
|
|
350
377
|
const txtMessage1 = coerceLocalizedText(txtMessage);
|
|
351
|
-
|
|
378
|
+
this.#_set_var("Message", DataType.LocalizedText, txtMessage1);
|
|
352
379
|
}
|
|
353
380
|
|
|
354
381
|
/**
|
|
355
382
|
*
|
|
356
383
|
*/
|
|
357
384
|
public setClientUserId(userIdentity: string): void {
|
|
358
|
-
|
|
385
|
+
this.#_set_var("ClientUserId", DataType.String, userIdentity.toString());
|
|
359
386
|
}
|
|
360
387
|
|
|
361
388
|
/*
|
|
@@ -407,7 +434,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
407
434
|
*
|
|
408
435
|
*/
|
|
409
436
|
public getQuality(): StatusCode {
|
|
410
|
-
return this.#
|
|
437
|
+
return this.#_get_varT<StatusCode>(DataType.StatusCode, "Quality");
|
|
411
438
|
}
|
|
412
439
|
|
|
413
440
|
/**
|
|
@@ -459,8 +486,6 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
459
486
|
* of 1 to 333.
|
|
460
487
|
*/
|
|
461
488
|
public setSeverity(severity: UInt16, options?: IConditionVariableTypeSetterOptions): void {
|
|
462
|
-
assert(isFinite(severity), "expecting a UInt16");
|
|
463
|
-
|
|
464
489
|
// record automatically last severity
|
|
465
490
|
const lastSeverity = this.getSeverity();
|
|
466
491
|
const sourceTimestamp = this.getSeveritySourceTimestamp();
|
|
@@ -472,13 +497,13 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
472
497
|
/**
|
|
473
498
|
*/
|
|
474
499
|
public getSeverity(): UInt16 {
|
|
475
|
-
const c = this.condition as
|
|
500
|
+
const c = this.condition as unknown as UAConditionEx;
|
|
476
501
|
assert(c.getEnabledState(), "condition must be enabled");
|
|
477
|
-
const value = this.#
|
|
502
|
+
const value = this.#_get_varT<UInt16>(DataType.UInt16, "Severity");
|
|
478
503
|
return +value;
|
|
479
504
|
}
|
|
480
505
|
public getSeveritySourceTimestamp(): Date {
|
|
481
|
-
const c = this.condition as
|
|
506
|
+
const c = this.condition as unknown as UAConditionEx;
|
|
482
507
|
return c.severity.readValue().sourceTimestamp || new Date();
|
|
483
508
|
}
|
|
484
509
|
|
|
@@ -495,14 +520,14 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
495
520
|
*/
|
|
496
521
|
public setLastSeverity(severity: UInt16, options?: IConditionVariableTypeSetterOptions): void {
|
|
497
522
|
severity = +severity;
|
|
498
|
-
|
|
523
|
+
this.#_set_var("LastSeverity", DataType.UInt16, severity, options);
|
|
499
524
|
}
|
|
500
525
|
|
|
501
526
|
/**
|
|
502
527
|
*
|
|
503
528
|
*/
|
|
504
529
|
public getLastSeverity(): UInt16 {
|
|
505
|
-
const value = this.#
|
|
530
|
+
const value = this.#_get_varT<UInt16>(DataType.UInt16, "LastSeverity");
|
|
506
531
|
return +value;
|
|
507
532
|
}
|
|
508
533
|
|
|
@@ -524,7 +549,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
524
549
|
*
|
|
525
550
|
*/
|
|
526
551
|
public setReceiveTime(time: UtcTime): void {
|
|
527
|
-
|
|
552
|
+
this.#_set_var("ReceiveTime", DataType.DateTime, time, { sourceTimestamp: time || undefined });
|
|
528
553
|
}
|
|
529
554
|
|
|
530
555
|
/**
|
|
@@ -539,7 +564,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
539
564
|
*
|
|
540
565
|
*/
|
|
541
566
|
public setTime(time: Date): void {
|
|
542
|
-
|
|
567
|
+
this.#_set_var("Time", DataType.DateTime, time, { sourceTimestamp: time });
|
|
543
568
|
}
|
|
544
569
|
|
|
545
570
|
/**
|
|
@@ -558,34 +583,34 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
558
583
|
*/
|
|
559
584
|
public setLocalTime(localTime: TimeZoneDataType): void {
|
|
560
585
|
assert(localTime instanceof TimeZoneDataType);
|
|
561
|
-
|
|
586
|
+
this.#_set_var("LocalTime", DataType.ExtensionObject, new TimeZoneDataType(localTime));
|
|
562
587
|
}
|
|
563
588
|
|
|
564
589
|
// read only !
|
|
565
590
|
public getSourceName(): LocalizedText {
|
|
566
|
-
return this.#
|
|
591
|
+
return this.#_get_varT<LocalizedText>(DataType.LocalizedText, "SourceName");
|
|
567
592
|
}
|
|
568
593
|
|
|
569
594
|
/**
|
|
570
595
|
*
|
|
571
596
|
*/
|
|
572
597
|
public getSourceNode(): NodeId {
|
|
573
|
-
return this.#
|
|
598
|
+
return this.#_get_varT<NodeId>(DataType.NodeId, "SourceNode");
|
|
574
599
|
}
|
|
575
600
|
|
|
576
601
|
/**
|
|
577
602
|
*
|
|
578
603
|
*/
|
|
579
604
|
public getEventType(): NodeId {
|
|
580
|
-
return this.#
|
|
605
|
+
return this.#_get_varT<NodeId>(DataType.NodeId, "EventType");
|
|
581
606
|
}
|
|
582
607
|
|
|
583
608
|
public getMessage(): LocalizedText {
|
|
584
|
-
return this.#
|
|
609
|
+
return this.#_get_varT<LocalizedText>(DataType.LocalizedText, "Message");
|
|
585
610
|
}
|
|
586
611
|
|
|
587
612
|
public isCurrentBranch(): boolean {
|
|
588
|
-
return sameNodeId(this.#
|
|
613
|
+
return sameNodeId(this.#_get_varT<NodeId>(DataType.NodeId, "BranchId"), NodeId.nullNodeId);
|
|
589
614
|
}
|
|
590
615
|
|
|
591
616
|
// -- ACKNOWLEDGEABLE -------------------------------------------------------------------
|
|
@@ -595,10 +620,10 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
595
620
|
if (!acknowledgeableCondition.ackedState) {
|
|
596
621
|
throw new Error(
|
|
597
622
|
"Node " +
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
623
|
+
acknowledgeableCondition.browseName.toString() +
|
|
624
|
+
" of type " +
|
|
625
|
+
acknowledgeableCondition.typeDefinitionObj.browseName.toString() +
|
|
626
|
+
" has no AckedState"
|
|
602
627
|
);
|
|
603
628
|
}
|
|
604
629
|
return this.#_get_twoStateVariable("AckedState");
|
|
@@ -624,13 +649,13 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
624
649
|
return;
|
|
625
650
|
}
|
|
626
651
|
// todo deal with Error code BadConditionBranchAlreadyConfirmed
|
|
627
|
-
|
|
652
|
+
this.#_set_twoStateVariable("ConfirmedState", confirmedState, options);
|
|
628
653
|
}
|
|
629
654
|
|
|
630
655
|
public setConfirmedState(confirmedState: boolean): void {
|
|
631
656
|
const acknowledgeableCondition = this.condition as UAAcknowledgeableCondition;
|
|
632
657
|
assert(acknowledgeableCondition.confirmedState, "Must have a confirmed state. Add ConfirmedState to the optionals");
|
|
633
|
-
|
|
658
|
+
this.setConfirmedStateIfExists(confirmedState);
|
|
634
659
|
}
|
|
635
660
|
|
|
636
661
|
// ---- Shelving
|
|
@@ -684,13 +709,13 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
684
709
|
// public condition: any = null;
|
|
685
710
|
// public eventData: any = null;
|
|
686
711
|
// public branchId: NodeId | null = null;
|
|
687
|
-
const t = this.condition.addressSpace.findNode((this.condition as UAObject).typeDefinition)
|
|
712
|
+
const t = this.condition.addressSpace.findNode((this.condition as UAObject).typeDefinition);
|
|
688
713
|
return (
|
|
689
714
|
"" +
|
|
690
715
|
"condition: " +
|
|
691
716
|
(this.condition.browseName.toString() + " " + this.condition.nodeId.toString()) +
|
|
692
717
|
", type: " +
|
|
693
|
-
(t.browseName.toString()
|
|
718
|
+
(t ? `${t.browseName.toString()} ${t.nodeId.toString()}` : "<null>") +
|
|
694
719
|
", branchId: " +
|
|
695
720
|
(this.branchId ? this.branchId.toString() : "<null>") +
|
|
696
721
|
", acked: " +
|
|
@@ -712,7 +737,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
712
737
|
value = !!value;
|
|
713
738
|
|
|
714
739
|
const hrKey = ConditionSnapshotImpl.normalizeName(varName);
|
|
715
|
-
const idKey = ConditionSnapshotImpl.normalizeName(varName
|
|
740
|
+
const idKey = ConditionSnapshotImpl.normalizeName(`${varName}.Id`);
|
|
716
741
|
|
|
717
742
|
const variant = new Variant({ dataType: DataType.Boolean, value });
|
|
718
743
|
this._map.set(idKey, variant);
|
|
@@ -720,10 +745,10 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
720
745
|
// also change varName with human readable text
|
|
721
746
|
const twoStateNode = this._node_index.get(hrKey);
|
|
722
747
|
if (!twoStateNode) {
|
|
723
|
-
throw new Error(
|
|
748
|
+
throw new Error(`Cannot find twoState Variable with name ${varName}`);
|
|
724
749
|
}
|
|
725
750
|
if (!(twoStateNode instanceof UATwoStateVariableImpl)) {
|
|
726
|
-
throw new Error(
|
|
751
|
+
throw new Error(`Cannot find twoState Variable with name ${varName} ${twoStateNode}`);
|
|
727
752
|
}
|
|
728
753
|
|
|
729
754
|
const hrValue = new Variant({
|
|
@@ -737,19 +762,18 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
737
762
|
// also change ConditionNode if we are on currentBranch
|
|
738
763
|
if (this.isCurrentBranch()) {
|
|
739
764
|
assert(twoStateNode instanceof UATwoStateVariableImpl);
|
|
740
|
-
twoStateNode.setValue(value
|
|
765
|
+
twoStateNode.setValue(value, options);
|
|
741
766
|
}
|
|
742
767
|
const sourceTimestamp = options?.effectiveTransitionTime || new Date();
|
|
743
768
|
this.emit("valueChanged", node, variant, { sourceTimestamp });
|
|
744
769
|
}
|
|
745
770
|
|
|
746
|
-
#_get_twoStateVariable(varName: string):
|
|
747
|
-
const key = ConditionSnapshotImpl.normalizeName(varName)
|
|
771
|
+
#_get_twoStateVariable(varName: string): boolean {
|
|
772
|
+
const key = `${ConditionSnapshotImpl.normalizeName(varName)}.Id`;
|
|
748
773
|
const variant = this._map.get(key);
|
|
749
|
-
|
|
750
774
|
// c8 ignore next
|
|
751
775
|
if (!variant) {
|
|
752
|
-
return
|
|
776
|
+
return false;
|
|
753
777
|
// throw new Error("Cannot find TwoStateVariable with name " + varName);
|
|
754
778
|
}
|
|
755
779
|
return variant.value;
|
|
@@ -757,8 +781,8 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
757
781
|
|
|
758
782
|
_setAckedState(
|
|
759
783
|
requestedAckedState: boolean,
|
|
760
|
-
|
|
761
|
-
|
|
784
|
+
_conditionEventId?: Buffer,
|
|
785
|
+
_comment?: string | LocalizedText | LocalizedTextLike,
|
|
762
786
|
options?: ISetStateOptions
|
|
763
787
|
): StatusCode {
|
|
764
788
|
const ackedState = this.getAckedState();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
3
|
*/
|
|
4
|
+
|
|
5
|
+
import type { UAVariableT } from "node-opcua-address-space-base";
|
|
4
6
|
import { assert } from "node-opcua-assert";
|
|
5
|
-
import { DataValue } from "node-opcua-data-value";
|
|
6
|
-
import { DataType } from "node-opcua-variant";
|
|
7
|
-
import { UAVariableT } from "node-opcua-address-space-base";
|
|
7
|
+
import type { DataValue } from "node-opcua-data-value";
|
|
8
8
|
import { NodeId } from "node-opcua-nodeid";
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
9
|
+
import { DataType } from "node-opcua-variant";
|
|
10
|
+
import type { DeviationStuff } from "../../source/interfaces/alarms_and_conditions/deviation_stuff";
|
|
11
|
+
import type { InstallSetPointOptions } from "../../source/interfaces/alarms_and_conditions/install_setpoint_options";
|
|
12
|
+
import type { AddressSpacePrivate } from "../address_space_private";
|
|
13
13
|
|
|
14
14
|
export function DeviationAlarmHelper_getSetpointNodeNode(
|
|
15
15
|
this: DeviationStuff
|
|
@@ -26,9 +26,9 @@ export function DeviationAlarmHelper_getSetpointNodeNode(
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export function DeviationAlarmHelper_getSetpointValue(this: DeviationStuff): number | null {
|
|
29
|
-
assert(Object.
|
|
30
|
-
assert(Object.
|
|
31
|
-
if (!
|
|
29
|
+
assert(Object.hasOwn(this, "setpointNode"));
|
|
30
|
+
assert(Object.hasOwn(this, "setpointNodeNode"));
|
|
31
|
+
if (!this.setpointNodeNode) {
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
34
34
|
const setpointDataValue = this.setpointNodeNode.readValue();
|
|
@@ -42,12 +42,11 @@ export function DeviationAlarmHelper_getSetpointValue(this: DeviationStuff): num
|
|
|
42
42
|
return node.readValue().value.value;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export function DeviationAlarmHelper_onSetpointDataValueChange(this: DeviationStuff,
|
|
45
|
+
export function DeviationAlarmHelper_onSetpointDataValueChange(this: DeviationStuff, _dataValue: DataValue): void {
|
|
46
46
|
this._setStateBasedOnInputValue(this.getInputNodeValue());
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export function DeviationAlarmHelper_install_setpoint(this: DeviationStuff, options: InstallSetPointOptions): void {
|
|
50
|
-
|
|
51
50
|
assert(this.setpointNode.browseName.toString() === "SetpointNode");
|
|
52
51
|
|
|
53
52
|
const addressSpace = this.addressSpace as AddressSpacePrivate;
|
|
@@ -55,14 +54,20 @@ export function DeviationAlarmHelper_install_setpoint(this: DeviationStuff, opti
|
|
|
55
54
|
if (options.setpointNode) {
|
|
56
55
|
const setpointNodeNode = addressSpace._coerceNode(options.setpointNode);
|
|
57
56
|
assert(setpointNodeNode, "Expecting a valid setpoint node");
|
|
58
|
-
this.setpointNodeNode = addressSpace._coerceNode(options.setpointNode)
|
|
59
|
-
this.setpointNode.setValueFromSource({
|
|
57
|
+
this.setpointNodeNode = addressSpace._coerceNode(options.setpointNode) as UAVariableT<number, DataType.Double>;
|
|
58
|
+
this.setpointNode.setValueFromSource({
|
|
59
|
+
dataType: "NodeId",
|
|
60
|
+
value: this.setpointNodeNode.nodeId
|
|
61
|
+
});
|
|
60
62
|
// install inputNode monitoring for change
|
|
61
63
|
this.setpointNodeNode.on("value_changed", (newDataValue: DataValue) => {
|
|
62
64
|
this._onSetpointDataValueChange(newDataValue);
|
|
63
65
|
});
|
|
64
66
|
} else {
|
|
65
67
|
this.setpointNodeNode = undefined;
|
|
66
|
-
this.setpointNode.setValueFromSource({
|
|
68
|
+
this.setpointNode.setValueFromSource({
|
|
69
|
+
dataType: "NodeId",
|
|
70
|
+
value: NodeId.nullNodeId
|
|
71
|
+
});
|
|
67
72
|
}
|
|
68
73
|
}
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export * from "./condition_info_impl";
|
|
5
5
|
export * from "./condition_snapshot_impl";
|
|
6
|
-
export * from "./ua_condition_impl";
|
|
7
6
|
export * from "./ua_acknowledgeable_condition_impl";
|
|
7
|
+
export * from "./ua_alarm_condition_impl";
|
|
8
|
+
export * from "./ua_certificate_expiration_alarm_impl";
|
|
9
|
+
export * from "./ua_condition_impl";
|
|
8
10
|
export * from "./ua_discrete_alarm_impl";
|
|
9
11
|
export * from "./ua_exclusive_deviation_alarm_impl";
|
|
10
12
|
export * from "./ua_exclusive_level_alarm_impl";
|
|
@@ -12,5 +14,3 @@ export * from "./ua_exclusive_limit_alarm_impl";
|
|
|
12
14
|
export * from "./ua_limit_alarm_impl";
|
|
13
15
|
export * from "./ua_non_exclusive_deviation_alarm_impl";
|
|
14
16
|
export * from "./ua_non_exclusive_limit_alarm_impl";
|
|
15
|
-
export * from "./ua_alarm_condition_impl";
|
|
16
|
-
export * from "./ua_certificate_expiration_alarm_impl";
|