node-opcua-address-space 2.169.0 → 2.172.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/source/address_space_ts.d.ts +13 -13
- package/dist/source/address_space_ts.js +4 -0
- package/dist/source/address_space_ts.js.map +1 -1
- package/dist/source/continuation_points/continuation_point_manager.d.ts +6 -3
- package/dist/source/continuation_points/continuation_point_manager.js +4 -4
- package/dist/source/continuation_points/continuation_point_manager.js.map +1 -1
- package/dist/source/helpers/adjust_browse_direction.d.ts +1 -1
- package/dist/source/helpers/argument_list.d.ts +13 -11
- package/dist/source/helpers/argument_list.js +24 -15
- package/dist/source/helpers/argument_list.js.map +1 -1
- package/dist/source/helpers/call_helpers.d.ts +6 -3
- package/dist/source/helpers/call_helpers.js +5 -6
- package/dist/source/helpers/call_helpers.js.map +1 -1
- package/dist/source/helpers/coerce_enum_value.d.ts +2 -2
- package/dist/source/helpers/coerce_enum_value.js +2 -2
- package/dist/source/helpers/coerce_enum_value.js.map +1 -1
- package/dist/source/helpers/dump_tools.d.ts +3 -3
- package/dist/source/helpers/dump_tools.js +2 -2
- package/dist/source/helpers/dump_tools.js.map +1 -1
- package/dist/source/helpers/ensure_secure_access.d.ts +1 -1
- package/dist/source/helpers/ensure_secure_access.js +1 -1
- package/dist/source/helpers/ensure_secure_access.js.map +1 -1
- package/dist/source/helpers/make_optionals_map.js +0 -5
- package/dist/source/helpers/make_optionals_map.js.map +1 -1
- package/dist/source/helpers/multiform_func.d.ts +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.d.ts +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js.map +1 -1
- package/dist/source/index.d.ts +38 -38
- package/dist/source/index.js +53 -54
- package/dist/source/index.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +11 -11
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +6 -6
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +4 -4
- package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +4 -3
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +10 -13
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +11 -11
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.d.ts +11 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +5 -5
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +21 -29
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +3 -7
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +0 -23
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +3 -3
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +8 -10
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +4 -6
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +5 -5
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +3 -3
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +7 -7
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +5 -8
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +5 -5
- package/dist/source/interfaces/data_access/ua_y_array_item_ex.d.ts +3 -3
- package/dist/source/interfaces/extension_object_constructor.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +2 -2
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +3 -3
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +6 -6
- package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +7 -6
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js +4 -0
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +1 -1
- package/dist/source/interfaces/state_machine/ua_transition_ex.d.ts +2 -2
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +2 -2
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js +3 -0
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -1
- package/dist/source/loader/decode_xml_extension_object.d.ts +4 -4
- package/dist/source/loader/decode_xml_extension_object.js +3 -3
- package/dist/source/loader/decode_xml_extension_object.js.map +1 -1
- package/dist/source/loader/ensure_datatype_extracted.d.ts +2 -2
- package/dist/source/loader/ensure_datatype_extracted.js +5 -5
- package/dist/source/loader/ensure_datatype_extracted.js.map +1 -1
- package/dist/source/loader/generateAddressSpaceRaw.d.ts +3 -3
- package/dist/source/loader/generateAddressSpaceRaw.js +6 -6
- package/dist/source/loader/generateAddressSpaceRaw.js.map +1 -1
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/source/loader/make_xml_extension_object_parser.d.ts +2 -2
- package/dist/source/loader/make_xml_extension_object_parser.js +19 -19
- package/dist/source/loader/make_xml_extension_object_parser.js.map +1 -1
- package/dist/source/loader/namespace_post_step.d.ts +1 -1
- package/dist/source/loader/namespace_post_step.js.map +1 -1
- package/dist/source/loader/parsers/extension_object_parser.d.ts +4 -4
- package/dist/source/loader/parsers/extension_object_parser.js +22 -23
- package/dist/source/loader/parsers/extension_object_parser.js.map +1 -1
- package/dist/source/loader/parsers/localized_text_parser.d.ts +2 -2
- package/dist/source/loader/parsers/localized_text_parser.js.map +1 -1
- package/dist/source/loader/parsers/nodeid_parser.d.ts +1 -1
- package/dist/source/loader/parsers/nodeid_parser.js.map +1 -1
- package/dist/source/loader/parsers/qualified_name_parser.d.ts +3 -3
- package/dist/source/loader/parsers/qualified_name_parser.js.map +1 -1
- package/dist/source/loader/parsers/variant_parser.d.ts +5 -5
- package/dist/source/loader/parsers/variant_parser.js +13 -13
- package/dist/source/loader/parsers/variant_parser.js.map +1 -1
- package/dist/source/loader/register_node_promoter.d.ts +1 -1
- package/dist/source/loader/register_node_promoter.js.map +1 -1
- package/dist/source/namespace.d.ts +4 -4
- package/dist/source/namespace_alarm_and_condition.d.ts +22 -21
- package/dist/source/namespace_data_access.d.ts +11 -11
- package/dist/source/namespace_machine_state.d.ts +4 -4
- package/dist/source/pseudo_session.d.ts +8 -5
- package/dist/source/pseudo_session.js +28 -28
- package/dist/source/pseudo_session.js.map +1 -1
- package/dist/source/session_context.js +1 -1
- package/dist/source/session_context.js.map +1 -1
- package/dist/source/set_namespace_meta_data.d.ts +1 -1
- package/dist/source/set_namespace_meta_data.js +1 -1
- package/dist/source/set_namespace_meta_data.js.map +1 -1
- package/dist/source/ua_addin.d.ts +3 -3
- package/dist/source/ua_addin.js +1 -1
- package/dist/source/ua_addin.js.map +1 -1
- package/dist/source/ua_interface.d.ts +2 -3
- package/dist/source/ua_interface.js +13 -33
- package/dist/source/ua_interface.js.map +1 -1
- package/dist/source/ua_root_folder.d.ts +1 -1
- package/dist/source/ua_two_state_variable_ex.d.ts +5 -5
- package/dist/src/_instantiate_helpers.d.ts +1 -1
- package/dist/src/_instantiate_helpers.js +32 -9
- package/dist/src/_instantiate_helpers.js.map +1 -1
- package/dist/src/_mandatory_child_or_requested_optional_filter.d.ts +2 -2
- package/dist/src/_mandatory_child_or_requested_optional_filter.js +9 -10
- package/dist/src/_mandatory_child_or_requested_optional_filter.js.map +1 -1
- package/dist/src/address_space.d.ts +2 -2
- package/dist/src/address_space.js +13 -15
- package/dist/src/address_space.js.map +1 -1
- package/dist/src/address_space_change_event_tools.d.ts +3 -3
- package/dist/src/address_space_change_event_tools.js +8 -10
- package/dist/src/address_space_change_event_tools.js.map +1 -1
- package/dist/src/address_space_private.d.ts +11 -11
- package/dist/src/address_space_private.js +3 -0
- package/dist/src/address_space_private.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +6 -6
- package/dist/src/alarms_and_conditions/condition_info_impl.js +6 -15
- package/dist/src/alarms_and_conditions/condition_info_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +10 -10
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +77 -48
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +8 -5
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +15 -9
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -1
- package/dist/src/alarms_and_conditions/index.d.ts +3 -3
- package/dist/src/alarms_and_conditions/index.js +3 -3
- package/dist/src/alarms_and_conditions/index.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +21 -14
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +26 -21
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +6 -7
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +30 -28
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +9 -11
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js +10 -10
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +3 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +6 -5
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +16 -42
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +100 -82
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +12 -7
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +9 -8
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +18 -18
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +16 -18
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +4 -4
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +2 -2
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +10 -9
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +20 -19
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +2 -4
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +12 -38
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +50 -65
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +15 -17
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +15 -11
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +22 -15
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +35 -24
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +15 -16
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +19 -14
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +4 -4
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/apply_condition_refresh.d.ts +4 -4
- package/dist/src/apply_condition_refresh.js +1 -1
- package/dist/src/apply_condition_refresh.js.map +1 -1
- package/dist/src/base_node_impl.d.ts +5 -7
- package/dist/src/base_node_impl.js +3 -3
- package/dist/src/base_node_impl.js.map +1 -1
- package/dist/src/base_node_private.d.ts +10 -7
- package/dist/src/base_node_private.js +73 -50
- package/dist/src/base_node_private.js.map +1 -1
- package/dist/src/check_value_rank_compatibility.js +11 -7
- package/dist/src/check_value_rank_compatibility.js.map +1 -1
- package/dist/src/data_access/add_dataItem_stuff.d.ts +1 -1
- package/dist/src/data_access/add_dataItem_stuff.js +2 -22
- package/dist/src/data_access/add_dataItem_stuff.js.map +1 -1
- package/dist/src/data_access/adjust_datavalue_status_code.d.ts +6 -3
- package/dist/src/data_access/adjust_datavalue_status_code.js +3 -3
- package/dist/src/data_access/adjust_datavalue_status_code.js.map +1 -1
- package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +13 -11
- package/dist/src/data_access/ua_multistate_discrete_impl.js +28 -23
- package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +19 -23
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js +31 -31
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +1 -1
- package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +10 -16
- package/dist/src/data_access/ua_two_state_discrete_impl.js +18 -14
- package/dist/src/data_access/ua_two_state_discrete_impl.js.map +1 -1
- package/dist/src/event_data.d.ts +8 -21
- package/dist/src/event_data.js +24 -19
- package/dist/src/event_data.js.map +1 -1
- package/dist/src/extension_object_array_node.d.ts +5 -2
- package/dist/src/extension_object_array_node.js +21 -24
- package/dist/src/extension_object_array_node.js.map +1 -1
- package/dist/src/get_basic_datatype.d.ts +2 -2
- package/dist/src/get_basic_datatype.js.map +1 -1
- package/dist/src/historical_access/address_space_historical_data_node.d.ts +3 -3
- package/dist/src/historical_access/address_space_historical_data_node.js +24 -17
- package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -1
- package/dist/src/idx_iterator.js +1 -1
- package/dist/src/idx_iterator.js.map +1 -1
- package/dist/src/index_current.d.ts +31 -31
- package/dist/src/index_current.js +45 -45
- package/dist/src/index_current.js.map +1 -1
- package/dist/src/namespace_impl.d.ts +4 -3
- package/dist/src/namespace_impl.js +17 -14
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/namespace_private.js.map +1 -1
- package/dist/src/nodeid_manager.d.ts +3 -3
- package/dist/src/nodeid_manager.js +19 -16
- package/dist/src/nodeid_manager.js.map +1 -1
- package/dist/src/nodeset_tools/adjust_namespace_array.d.ts +1 -1
- package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +2 -2
- package/dist/src/nodeset_tools/construct_namespace_dependency.js +7 -7
- package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +1 -1
- package/dist/src/nodeset_tools/dump_to_bsd.d.ts +1 -1
- package/dist/src/nodeset_tools/dump_to_bsd.js +15 -11
- package/dist/src/nodeset_tools/dump_to_bsd.js.map +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +5 -3
- package/dist/src/nodeset_tools/nodeset_to_xml.js +64 -67
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/src/private_namespace.d.ts +2 -2
- package/dist/src/private_namespace.js.map +1 -1
- package/dist/src/reference_impl.d.ts +2 -2
- package/dist/src/reference_impl.js +9 -11
- package/dist/src/reference_impl.js.map +1 -1
- package/dist/src/role_permissions.d.ts +1 -1
- package/dist/src/role_permissions.js.map +1 -1
- package/dist/src/state_machine/finite_state_machine.d.ts +11 -14
- package/dist/src/state_machine/finite_state_machine.js +36 -30
- package/dist/src/state_machine/finite_state_machine.js.map +1 -1
- package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +8 -6
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js +16 -18
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
- package/dist/src/state_machine/ua_two_state_variable.d.ts +12 -11
- package/dist/src/state_machine/ua_two_state_variable.js +24 -29
- package/dist/src/state_machine/ua_two_state_variable.js.map +1 -1
- package/dist/src/tool_isSubtypeOf.d.ts +5 -5
- package/dist/src/tool_isSubtypeOf.js +21 -18
- package/dist/src/tool_isSubtypeOf.js.map +1 -1
- package/dist/src/ua_condition_type.d.ts +1 -1
- package/dist/src/ua_data_type_impl.js.map +1 -1
- package/dist/src/ua_method_impl.d.ts +9 -5
- package/dist/src/ua_method_impl.js +1 -1
- package/dist/src/ua_method_impl.js.map +1 -1
- package/dist/src/ua_object_impl.d.ts +10 -7
- package/dist/src/ua_object_impl.js +43 -15
- package/dist/src/ua_object_impl.js.map +1 -1
- package/dist/src/ua_object_type_impl.d.ts +7 -5
- package/dist/src/ua_object_type_impl.js +6 -7
- package/dist/src/ua_object_type_impl.js.map +1 -1
- package/dist/src/ua_reference_type_impl.d.ts +6 -8
- package/dist/src/ua_reference_type_impl.js +16 -14
- package/dist/src/ua_reference_type_impl.js.map +1 -1
- package/dist/src/ua_variable_impl.d.ts +44 -45
- package/dist/src/ua_variable_impl.js +177 -83
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/dist/src/ua_variable_impl_ext_obj.d.ts +3 -3
- package/dist/src/ua_variable_impl_ext_obj.js +37 -29
- package/dist/src/ua_variable_impl_ext_obj.js.map +1 -1
- package/dist/src/ua_variable_type_impl.d.ts +11 -11
- package/dist/src/ua_variable_type_impl.js +13 -21
- package/dist/src/ua_variable_type_impl.js.map +1 -1
- package/dist/src/ua_view_impl.d.ts +3 -4
- package/dist/src/ua_view_impl.js +5 -6
- package/dist/src/ua_view_impl.js.map +1 -1
- package/dist/src/validate_data_type_correctness.d.ts +2 -2
- package/dist/src/validate_data_type_correctness.js +12 -3
- package/dist/src/validate_data_type_correctness.js.map +1 -1
- package/dist/tsconfig_base.tsbuildinfo +1 -1
- package/distHelpers/add_event_generator_object.d.ts +5 -2
- package/distHelpers/add_event_generator_object.js +2 -2
- package/distHelpers/add_event_generator_object.js.map +1 -1
- package/distHelpers/alarms_and_conditions_demo.d.ts +1 -1
- package/distHelpers/alarms_and_conditions_demo.js +4 -6
- package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
- package/distHelpers/assertHasMatchingReference.d.ts +1 -1
- package/distHelpers/assertHasMatchingReference.js +2 -2
- package/distHelpers/assertHasMatchingReference.js.map +1 -1
- package/distHelpers/boiler_system.d.ts +6 -3
- package/distHelpers/boiler_system.js +44 -42
- package/distHelpers/boiler_system.js.map +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.d.ts +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.js +25 -27
- package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -1
- package/distHelpers/get_address_space_fixture.js +15 -15
- package/distHelpers/get_address_space_fixture.js.map +1 -1
- package/distHelpers/index.d.ts +2 -2
- package/distHelpers/index.js +2 -2
- package/distHelpers/index.js.map +1 -1
- package/distHelpers/mock_session.d.ts +7 -7
- package/distHelpers/mock_session.js +4 -4
- package/distHelpers/mock_session.js.map +1 -1
- package/distNodeJS/generate_address_space.d.ts +2 -2
- package/distNodeJS/generate_address_space.js +2 -2
- package/distNodeJS/generate_address_space.js.map +1 -1
- package/package.json +36 -36
- package/source/address_space_ts.ts +29 -30
- package/source/continuation_points/continuation_point_manager.ts +8 -7
- package/source/helpers/adjust_browse_direction.ts +1 -1
- package/source/helpers/argument_list.ts +37 -25
- package/source/helpers/call_helpers.ts +10 -15
- package/source/helpers/coerce_enum_value.ts +4 -4
- package/source/helpers/dump_tools.ts +6 -11
- package/source/helpers/ensure_secure_access.ts +2 -2
- package/source/helpers/make_optionals_map.ts +3 -10
- package/source/helpers/multiform_func.ts +1 -1
- package/source/helpers/resolve_opaque_on_address_space.ts +2 -2
- package/source/index.ts +44 -54
- package/source/interfaces/alarms_and_conditions/condition_info_i.ts +3 -4
- package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +13 -13
- package/source/interfaces/alarms_and_conditions/deviation_stuff.ts +8 -10
- package/source/interfaces/alarms_and_conditions/install_setpoint_options.ts +4 -5
- package/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +4 -6
- package/source/interfaces/alarms_and_conditions/instantiate_condition_options.ts +3 -3
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +6 -3
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +11 -11
- package/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +11 -25
- package/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +16 -13
- package/source/interfaces/alarms_and_conditions/ua_base_event_ex.ts +12 -0
- package/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +5 -5
- package/source/interfaces/alarms_and_conditions/ua_condition_ex.ts +30 -54
- package/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +3 -34
- package/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +18 -22
- package/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +8 -15
- package/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +4 -7
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +5 -6
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +3 -3
- package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +9 -16
- package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +5 -8
- package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +5 -5
- package/source/interfaces/data_access/ua_y_array_item_ex.ts +3 -3
- package/source/interfaces/extension_object_constructor.ts +3 -4
- package/source/interfaces/i_condition_variable_type_setter_options.ts +1 -3
- package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +3 -3
- package/source/interfaces/state_machine/ua_finite_state_machine_type.ts +2 -2
- package/source/interfaces/state_machine/ua_program_state_machine_type.ts +3 -3
- package/source/interfaces/state_machine/ua_shelved_state_machine_ex.ts +10 -7
- package/source/interfaces/state_machine/ua_state_machine_type.ts +11 -8
- package/source/interfaces/state_machine/ua_transition_ex.ts +2 -2
- package/source/interfaces/ua_subscription_diagnostics_variable_ex.ts +3 -2
- package/source/loader/decode_xml_extension_object.ts +7 -7
- package/source/loader/ensure_datatype_extracted.ts +14 -19
- package/source/loader/generateAddressSpaceRaw.ts +12 -13
- package/source/loader/load_nodeset2.ts +3 -3
- package/source/loader/make_xml_extension_object_parser.ts +55 -39
- package/source/loader/namespace_post_step.ts +3 -4
- package/source/loader/parsers/extension_object_parser.ts +63 -62
- package/source/loader/parsers/localized_text_parser.ts +3 -3
- package/source/loader/parsers/nodeid_parser.ts +2 -3
- package/source/loader/parsers/qualified_name_parser.ts +6 -7
- package/source/loader/parsers/variant_parser.ts +48 -55
- package/source/loader/register_node_promoter.ts +2 -2
- package/source/namespace.ts +4 -4
- package/source/namespace_alarm_and_condition.ts +22 -22
- package/source/namespace_data_access.ts +12 -13
- package/source/namespace_machine_state.ts +10 -5
- package/source/pseudo_session.ts +53 -50
- package/source/session_context.ts +1 -1
- package/source/set_namespace_meta_data.ts +3 -3
- package/source/ua_addin.ts +10 -11
- package/source/ua_interface.ts +27 -38
- package/source/ua_root_folder.ts +1 -1
- package/source/ua_two_state_variable_ex.ts +5 -5
- package/source_nodejs/generate_address_space.ts +5 -9
- package/src/_instantiate_helpers.ts +78 -25
- package/src/_mandatory_child_or_requested_optional_filter.ts +20 -19
- package/src/address_space.ts +36 -45
- package/src/address_space_change_event_tools.ts +25 -30
- package/src/address_space_private.ts +20 -21
- package/src/alarms_and_conditions/condition.ts +0 -2
- package/src/alarms_and_conditions/condition_info_impl.ts +11 -19
- package/src/alarms_and_conditions/condition_snapshot_impl.ts +109 -85
- package/src/alarms_and_conditions/deviation_alarm_helper.ts +20 -15
- package/src/alarms_and_conditions/index.ts +3 -3
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +44 -32
- package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +35 -34
- package/src/alarms_and_conditions/ua_base_event_impl.ts +15 -19
- package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +6 -2
- package/src/alarms_and_conditions/ua_condition_impl.ts +140 -130
- package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +20 -12
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +40 -43
- package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +7 -7
- package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +28 -30
- package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +3 -6
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +59 -90
- package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +31 -27
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +57 -36
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +31 -27
- package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +6 -6
- package/src/apply_condition_refresh.ts +7 -8
- package/src/base_node_impl.ts +64 -45
- package/src/base_node_private.ts +171 -139
- package/src/check_value_rank_compatibility.ts +19 -15
- package/src/data_access/add_dataItem_stuff.ts +3 -4
- package/src/data_access/adjust_datavalue_status_code.ts +7 -7
- package/src/data_access/ua_multistate_discrete_impl.ts +44 -28
- package/src/data_access/ua_multistate_value_discrete_impl.ts +77 -66
- package/src/data_access/ua_two_state_discrete_impl.ts +29 -36
- package/src/event_data.ts +29 -26
- package/src/extension_object_array_node.ts +27 -28
- package/src/get_basic_datatype.ts +4 -5
- package/src/historical_access/address_space_historical_data_node.ts +65 -50
- package/src/idx_iterator.ts +4 -12
- package/src/index_current.ts +33 -45
- package/src/namespace_impl.ts +75 -62
- package/src/namespace_private.ts +2 -8
- package/src/nodeid_manager.ts +30 -27
- package/src/nodeset_tools/adjust_namespace_array.ts +1 -1
- package/src/nodeset_tools/construct_namespace_dependency.ts +15 -16
- package/src/nodeset_tools/dump_to_bsd.ts +27 -22
- package/src/nodeset_tools/nodeset_to_xml.ts +95 -114
- package/src/private_namespace.ts +3 -6
- package/src/reference_impl.ts +11 -14
- package/src/role_permissions.ts +1 -1
- package/src/state_machine/finite_state_machine.ts +60 -61
- package/src/state_machine/ua_shelving_state_machine_ex.ts +23 -23
- package/src/state_machine/ua_two_state_variable.ts +34 -31
- package/src/tool_isSubtypeOf.ts +48 -33
- package/src/ua_condition_type.ts +1 -1
- package/src/ua_data_type_impl.ts +12 -13
- package/src/ua_method_impl.ts +17 -12
- package/src/ua_object_impl.ts +73 -39
- package/src/ua_object_type_impl.ts +25 -25
- package/src/ua_reference_type_impl.ts +19 -19
- package/src/ua_variable_impl.ts +316 -219
- package/src/ua_variable_impl_ext_obj.ts +63 -50
- package/src/ua_variable_type_impl.ts +43 -49
- package/src/ua_view_impl.ts +5 -5
- package/src/validate_data_type_correctness.ts +17 -8
|
@@ -10,7 +10,6 @@ exports._handle_delete_node_model_change_event = _handle_delete_node_model_chang
|
|
|
10
10
|
* @module node-opcua-address-space
|
|
11
11
|
*/
|
|
12
12
|
const chalk_1 = __importDefault(require("chalk"));
|
|
13
|
-
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
14
13
|
const node_opcua_data_model_1 = require("node-opcua-data-model");
|
|
15
14
|
const node_opcua_enum_1 = require("node-opcua-enum");
|
|
16
15
|
const node_opcua_types_1 = require("node-opcua-types");
|
|
@@ -34,8 +33,7 @@ const verbFlags = new node_opcua_enum_1.Enum({
|
|
|
34
33
|
});
|
|
35
34
|
function makeVerb(verbs) {
|
|
36
35
|
const e = verbFlags.get(verbs);
|
|
37
|
-
|
|
38
|
-
return e.value;
|
|
36
|
+
return e?.value || 0;
|
|
39
37
|
}
|
|
40
38
|
function _getTypeDef(node) {
|
|
41
39
|
if (node.nodeClass === node_opcua_data_model_1.NodeClass.Object || node.nodeClass === node_opcua_data_model_1.NodeClass.Variable) {
|
|
@@ -77,15 +75,15 @@ try {
|
|
|
77
75
|
return "";
|
|
78
76
|
}
|
|
79
77
|
const node = addressSpace.findNode(nodeId);
|
|
80
|
-
return
|
|
78
|
+
return `"${nodeId.toString()}"${chalk_1.default.yellow(` /* ${node ? node.browseName.toString() : "???"} */`)}`;
|
|
81
79
|
}
|
|
82
|
-
let str =
|
|
83
|
-
str +=
|
|
84
|
-
str +=
|
|
80
|
+
let str = `{ verb:${verbFlags.get(this.verb)?.key},`;
|
|
81
|
+
str += ` affected: ${n(this.affected)},`;
|
|
82
|
+
str += ` type: ${n(this.affectedType)} }`;
|
|
85
83
|
return str;
|
|
86
84
|
};
|
|
87
85
|
}
|
|
88
|
-
catch (
|
|
86
|
+
catch (_err) {
|
|
89
87
|
//
|
|
90
88
|
}
|
|
91
89
|
function _handle_model_change_event(node) {
|
|
@@ -98,7 +96,7 @@ function _handle_model_change_event(node) {
|
|
|
98
96
|
typeDefinitionNodeId = node.typeDefinitionObj.nodeId;
|
|
99
97
|
}
|
|
100
98
|
for (const parent of [...parents, ...containingFolders]) {
|
|
101
|
-
if (parent
|
|
99
|
+
if (parent?.getNodeVersion()) {
|
|
102
100
|
addressSpace.modelChangeTransaction(() => {
|
|
103
101
|
const modelChange1 = new node_opcua_types_1.ModelChangeStructureDataType({
|
|
104
102
|
affected: node.nodeId,
|
|
@@ -139,7 +137,7 @@ function _handle_delete_node_model_change_event(node) {
|
|
|
139
137
|
for (const r of references) {
|
|
140
138
|
const target = addressSpace.findNode(r.nodeId);
|
|
141
139
|
const modelChangeSrc_l = new node_opcua_types_1.ModelChangeStructureDataType({
|
|
142
|
-
affected: target
|
|
140
|
+
affected: target?.nodeId,
|
|
143
141
|
affectedType: null,
|
|
144
142
|
verb: makeVerb("ReferenceDeleted")
|
|
145
143
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address_space_change_event_tools.js","sourceRoot":"","sources":["../../src/address_space_change_event_tools.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"address_space_change_event_tools.js","sourceRoot":"","sources":["../../src/address_space_change_event_tools.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space.Private
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { NumericRange } from "node-opcua-numeric-range";
|
|
10
|
-
import { CallbackT } from "node-opcua-status-code";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { NamespacePrivate } from "./namespace_private";
|
|
4
|
+
import type { AddReferenceOpts, BaseNode, ContinuationData, IAddressSpace, ISessionContext, MethodCallInterceptor, UADataType, UAObjectType, UAReference, UAVariable, UAVariableType, UAView } from "node-opcua-address-space-base";
|
|
5
|
+
import type { ExtraDataTypeManager } from "node-opcua-client-dynamic-extension-object";
|
|
6
|
+
import type { NodeClass, QualifiedNameLike } from "node-opcua-data-model";
|
|
7
|
+
import type { ExtensionObject } from "node-opcua-extension-object";
|
|
8
|
+
import type { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
9
|
+
import type { NumericRange } from "node-opcua-numeric-range";
|
|
10
|
+
import type { CallbackT } from "node-opcua-status-code";
|
|
11
|
+
import type { HistoryReadResult, ModelChangeStructureDataType, ReadProcessedDetails } from "node-opcua-types";
|
|
12
|
+
import type { ExtensionObjectConstructorFuncWithSchema } from "../source/interfaces/extension_object_constructor";
|
|
13
|
+
import type { UARootFolder } from "../source/ua_root_folder";
|
|
14
|
+
import type { NamespacePrivate } from "./namespace_private";
|
|
15
15
|
export interface AddressSpacePrivate extends IAddressSpace {
|
|
16
16
|
rootFolder: UARootFolder;
|
|
17
17
|
isFrugal: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address_space_private.js","sourceRoot":"","sources":["../../src/address_space_private.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"address_space_private.js","sourceRoot":"","sources":["../../src/address_space_private.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"condition.js","sourceRoot":"","sources":["../../../src/alarms_and_conditions/condition.ts"],"names":[],"mappings":";AAAA;;GAEG;;
|
|
1
|
+
{"version":3,"file":"condition.js","sourceRoot":"","sources":["../../../src/alarms_and_conditions/condition.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
|
+
*/
|
|
4
|
+
import type { UInt16 } from "node-opcua-basic-types";
|
|
2
5
|
import { LocalizedText } from "node-opcua-data-model";
|
|
3
|
-
import { StatusCode } from "node-opcua-status-code";
|
|
4
|
-
import { ConditionInfo, ConditionInfoOptions } from "../../source/interfaces/alarms_and_conditions/condition_info_i";
|
|
6
|
+
import type { StatusCode } from "node-opcua-status-code";
|
|
7
|
+
import type { ConditionInfo, ConditionInfoOptions } from "../../source/interfaces/alarms_and_conditions/condition_info_i";
|
|
5
8
|
/**
|
|
6
9
|
* @private
|
|
7
10
|
*/
|
|
@@ -11,8 +14,5 @@ export declare class ConditionInfoImpl implements ConditionInfo {
|
|
|
11
14
|
severity: UInt16 | null;
|
|
12
15
|
retain: boolean | null;
|
|
13
16
|
constructor(options: ConditionInfoOptions);
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
17
|
isDifferentFrom(otherConditionInfo: ConditionInfo): boolean;
|
|
18
18
|
}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ConditionInfoImpl = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @module node-opcua-address-space.AlarmsAndConditions
|
|
6
|
-
*/
|
|
7
|
-
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
8
4
|
const node_opcua_data_model_1 = require("node-opcua-data-model");
|
|
9
5
|
/**
|
|
10
6
|
* @private
|
|
@@ -19,24 +15,19 @@ class ConditionInfoImpl {
|
|
|
19
15
|
this.quality = null;
|
|
20
16
|
this.message = null;
|
|
21
17
|
this.retain = null;
|
|
22
|
-
if (Object.
|
|
18
|
+
if (Object.hasOwn(options, "message") && options.message) {
|
|
23
19
|
this.message = node_opcua_data_model_1.LocalizedText.coerce(options.message);
|
|
24
20
|
}
|
|
25
|
-
if (Object.
|
|
21
|
+
if (Object.hasOwn(options, "quality") && options.quality) {
|
|
26
22
|
this.quality = options.quality;
|
|
27
23
|
}
|
|
28
|
-
if (Object.
|
|
29
|
-
|
|
30
|
-
this.severity = options.severity;
|
|
24
|
+
if (Object.hasOwn(options, "severity") && options.severity !== null) {
|
|
25
|
+
this.severity = options.severity || 0;
|
|
31
26
|
}
|
|
32
|
-
if (Object.
|
|
33
|
-
|
|
34
|
-
this.retain = options.retain;
|
|
27
|
+
if (Object.hasOwn(options, "retain") && options.retain !== null) {
|
|
28
|
+
this.retain = options.retain || false;
|
|
35
29
|
}
|
|
36
30
|
}
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
*/
|
|
40
31
|
isDifferentFrom(otherConditionInfo) {
|
|
41
32
|
return (this.severity !== otherConditionInfo.severity ||
|
|
42
33
|
this.quality !== otherConditionInfo.quality ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"condition_info_impl.js","sourceRoot":"","sources":["../../../src/alarms_and_conditions/condition_info_impl.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"condition_info_impl.js","sourceRoot":"","sources":["../../../src/alarms_and_conditions/condition_info_impl.ts"],"names":[],"mappings":";;;AAIA,iEAAsD;AAItD;;GAEG;AACH,MAAa,iBAAiB;IACnB,OAAO,GAAyB,IAAI,CAAC;IACrC,OAAO,GAAsB,IAAI,CAAC;IAClC,QAAQ,GAAkB,CAAC,CAAC;IAC5B,MAAM,GAAmB,KAAK,CAAC;IAEtC,YAAY,OAA6B;QACrC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QAEnB,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACvD,IAAI,CAAC,OAAO,GAAG,qCAAa,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACzD,CAAC;QACD,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACvD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QACnC,CAAC;QACD,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,OAAO,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;YAClE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC;QAC1C,CAAC;QACD,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;YAC9D,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC;QAC1C,CAAC;IACL,CAAC;IACM,eAAe,CAAC,kBAAiC;QACpD,OAAO,CACH,IAAI,CAAC,QAAQ,KAAK,kBAAkB,CAAC,QAAQ;YAC7C,IAAI,CAAC,OAAO,KAAK,kBAAkB,CAAC,OAAO;YAC3C,IAAI,CAAC,OAAO,KAAK,kBAAkB,CAAC,OAAO,CAC9C,CAAC;IACN,CAAC;CACJ;AAhCD,8CAgCC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
3
|
*/
|
|
4
|
-
import { EventEmitter } from "events";
|
|
5
|
-
import {
|
|
6
|
-
import { UInt16 } from "node-opcua-basic-types";
|
|
7
|
-
import { LocalizedText, LocalizedTextLike } from "node-opcua-data-model";
|
|
4
|
+
import { EventEmitter } from "node:events";
|
|
5
|
+
import type { BaseNode, IEventData } from "node-opcua-address-space-base";
|
|
6
|
+
import type { UInt16 } from "node-opcua-basic-types";
|
|
7
|
+
import { type LocalizedText, type LocalizedTextLike } from "node-opcua-data-model";
|
|
8
8
|
import { NodeId } from "node-opcua-nodeid";
|
|
9
|
-
import { StatusCode } from "node-opcua-status-code";
|
|
9
|
+
import { type StatusCode } from "node-opcua-status-code";
|
|
10
10
|
import { TimeZoneDataType } from "node-opcua-types";
|
|
11
|
-
import { ConditionSnapshot } from "../../source/interfaces/alarms_and_conditions/condition_snapshot";
|
|
12
|
-
import { IConditionVariableTypeSetterOptions } from "../../source/interfaces/i_condition_variable_type_setter_options";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
11
|
+
import type { ConditionSnapshot } from "../../source/interfaces/alarms_and_conditions/condition_snapshot";
|
|
12
|
+
import type { IConditionVariableTypeSetterOptions } from "../../source/interfaces/i_condition_variable_type_setter_options";
|
|
13
|
+
import type { ISetStateOptions } from "../../source/interfaces/i_set_state_options";
|
|
14
|
+
import type { UtcTime } from "../../source/interfaces/state_machine/ua_state_machine_type";
|
|
15
15
|
declare function normalizeName(str: string): string;
|
|
16
16
|
export declare class ConditionSnapshotImpl extends EventEmitter implements ConditionSnapshot {
|
|
17
17
|
#private;
|
|
@@ -264,6 +264,6 @@ export declare class ConditionSnapshotImpl extends EventEmitter implements Condi
|
|
|
264
264
|
getSilentState(): boolean;
|
|
265
265
|
setShelvingState(): void;
|
|
266
266
|
toString(): string;
|
|
267
|
-
_setAckedState(requestedAckedState: boolean,
|
|
267
|
+
_setAckedState(requestedAckedState: boolean, _conditionEventId?: Buffer, _comment?: string | LocalizedText | LocalizedTextLike, options?: ISetStateOptions): StatusCode;
|
|
268
268
|
}
|
|
269
269
|
export {};
|
|
@@ -5,7 +5,7 @@ exports.ConditionSnapshotImpl = void 0;
|
|
|
5
5
|
/**
|
|
6
6
|
* @module node-opcua-address-space.AlarmsAndConditions
|
|
7
7
|
*/
|
|
8
|
-
const
|
|
8
|
+
const node_events_1 = require("node:events");
|
|
9
9
|
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
10
10
|
const node_opcua_data_model_1 = require("node-opcua-data-model");
|
|
11
11
|
const node_opcua_debug_1 = require("node-opcua-debug");
|
|
@@ -24,7 +24,8 @@ function normalizeName(str) {
|
|
|
24
24
|
}
|
|
25
25
|
const disabledVar = new node_opcua_variant_1.Variant({
|
|
26
26
|
dataType: "StatusCode",
|
|
27
|
-
value: node_opcua_status_code_1.StatusCodes.BadConditionDisabled
|
|
27
|
+
value: node_opcua_status_code_1.StatusCodes.BadConditionDisabled,
|
|
28
|
+
// statusCode: StatusCodes.BadConditionDisabled
|
|
28
29
|
});
|
|
29
30
|
// list of Condition variables that should not be published as BadConditionDisabled when the condition
|
|
30
31
|
// is in a disabled state.
|
|
@@ -45,7 +46,7 @@ const _varTable = {
|
|
|
45
46
|
SourceNode: 1,
|
|
46
47
|
Time: 1
|
|
47
48
|
};
|
|
48
|
-
class ConditionSnapshotImpl extends
|
|
49
|
+
class ConditionSnapshotImpl extends node_events_1.EventEmitter {
|
|
49
50
|
static normalizeName = normalizeName;
|
|
50
51
|
condition;
|
|
51
52
|
eventData = null;
|
|
@@ -80,7 +81,7 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
80
81
|
debugLog("cannot node for find key", fullBrowsePath);
|
|
81
82
|
continue;
|
|
82
83
|
}
|
|
83
|
-
if (isDisabled && !Object.
|
|
84
|
+
if (isDisabled && !Object.hasOwn(_varTable, fullBrowsePath)) {
|
|
84
85
|
eventData._createValue(fullBrowsePath, node, disabledVar);
|
|
85
86
|
}
|
|
86
87
|
else {
|
|
@@ -97,7 +98,7 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
97
98
|
if (aggregate.nodeClass === node_opcua_data_model_1.NodeClass.Variable) {
|
|
98
99
|
const name = aggregate.browseName.toString();
|
|
99
100
|
const key = prefix + name;
|
|
100
|
-
const snapshot_value = this._map.get(key)
|
|
101
|
+
const snapshot_value = this._map.get(key)?.toString();
|
|
101
102
|
const aggregateVariable = aggregate;
|
|
102
103
|
const condition_value = aggregateVariable.readValue().value.toString();
|
|
103
104
|
if (snapshot_value !== condition_value) {
|
|
@@ -109,7 +110,7 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
109
110
|
condition_value);
|
|
110
111
|
}
|
|
111
112
|
this._node_index.set(key, aggregateVariable);
|
|
112
|
-
this.#_ensure_condition_values_correctness(aggregate, prefix + name
|
|
113
|
+
this.#_ensure_condition_values_correctness(aggregate, `${prefix + name}.`, error);
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
116
|
if (displayError && error.length) {
|
|
@@ -129,7 +130,7 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
129
130
|
const aggregateVariable = aggregate;
|
|
130
131
|
this._map.set(key, aggregateVariable.readValue().value);
|
|
131
132
|
this._node_index.set(key, aggregateVariable);
|
|
132
|
-
this.#_visit(aggregate, prefix + name
|
|
133
|
+
this.#_visit(aggregate, `${prefix + name}.`);
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
136
|
}
|
|
@@ -143,11 +144,14 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
143
144
|
if (doDebug) {
|
|
144
145
|
debugLog("adding key =", key);
|
|
145
146
|
}
|
|
146
|
-
aggregate.
|
|
147
|
+
if (aggregate.nodeClass !== node_opcua_data_model_1.NodeClass.Variable) {
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
aggregate.on("value_changed", (newDataValue, _indexRange) => {
|
|
147
151
|
this._map.set(key, newDataValue.value);
|
|
148
152
|
this._node_index.set(key, aggregate);
|
|
149
153
|
});
|
|
150
|
-
this.#_installOnChangeEventHandlers(aggregate, prefix + name
|
|
154
|
+
this.#_installOnChangeEventHandlers(aggregate, `${prefix + name}.`);
|
|
151
155
|
}
|
|
152
156
|
}
|
|
153
157
|
}
|
|
@@ -160,16 +164,43 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
160
164
|
/**
|
|
161
165
|
* @internal
|
|
162
166
|
*/
|
|
163
|
-
#
|
|
167
|
+
#_get_var_inner(varName) {
|
|
164
168
|
const c = this.condition;
|
|
165
|
-
if (!c.getEnabledState() && !Object.
|
|
169
|
+
if (!c.getEnabledState() && !Object.hasOwn(_varTable, varName)) {
|
|
166
170
|
// xx debuglog("ConditionSnapshot#_get_var condition enabled =", self.condition.getEnabledState());
|
|
167
171
|
return disabledVar;
|
|
168
172
|
}
|
|
169
173
|
const key = normalizeName(varName);
|
|
170
174
|
const variant = this._map.get(key);
|
|
171
175
|
if (!variant) {
|
|
172
|
-
throw new Error(
|
|
176
|
+
throw new Error(`cannot find key ${key}`);
|
|
177
|
+
}
|
|
178
|
+
return variant;
|
|
179
|
+
}
|
|
180
|
+
#_is_varValid(varName) {
|
|
181
|
+
const key = normalizeName(varName);
|
|
182
|
+
const variant = this._map.get(key);
|
|
183
|
+
return !(variant && variant.dataType === node_opcua_variant_1.DataType.StatusCode && variant.value === node_opcua_status_code_1.StatusCodes.BadConditionDisabled);
|
|
184
|
+
}
|
|
185
|
+
#_get_varTDefault(dataType, varName, defaultValue) {
|
|
186
|
+
const variant = this.#_get_var_inner(varName);
|
|
187
|
+
if (variant.dataType !== dataType) {
|
|
188
|
+
if (variant.dataType === node_opcua_variant_1.DataType.StatusCode) {
|
|
189
|
+
// Warning: we need to improve this,
|
|
190
|
+
return defaultValue;
|
|
191
|
+
}
|
|
192
|
+
throw new Error(`Expected dataType ${node_opcua_variant_1.DataType[dataType]} but got ${node_opcua_variant_1.DataType[variant.dataType]}`);
|
|
193
|
+
}
|
|
194
|
+
return variant.value;
|
|
195
|
+
}
|
|
196
|
+
#_get_varT(dataType, varName) {
|
|
197
|
+
const variant = this.#_get_var_inner(varName);
|
|
198
|
+
if (variant.dataType !== dataType) {
|
|
199
|
+
// if (variant.dataType === DataType.StatusCode) {
|
|
200
|
+
// // Warning: we need to improve this,
|
|
201
|
+
// return variant.value as T;
|
|
202
|
+
// }
|
|
203
|
+
throw new Error(`Expected dataType ${node_opcua_variant_1.DataType[dataType]} but got ${node_opcua_variant_1.DataType[variant.dataType]}`);
|
|
173
204
|
}
|
|
174
205
|
return variant.value;
|
|
175
206
|
}
|
|
@@ -182,7 +213,7 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
182
213
|
if (!this._map.has(key)) {
|
|
183
214
|
// c8 ignore next
|
|
184
215
|
if (doDebug) {
|
|
185
|
-
debugLog(
|
|
216
|
+
debugLog(` cannot find node ${varName}`);
|
|
186
217
|
debugLog(" map=", [...this._map.keys()].join(" "));
|
|
187
218
|
}
|
|
188
219
|
}
|
|
@@ -191,7 +222,7 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
191
222
|
value
|
|
192
223
|
}));
|
|
193
224
|
const sourceTimestamp = options?.sourceTimestamp || new Date();
|
|
194
|
-
const sourceTimestampKey = key
|
|
225
|
+
const sourceTimestampKey = `${key}.SourceTimestamp`;
|
|
195
226
|
if (this._map.has(sourceTimestampKey)) {
|
|
196
227
|
// from spec 1.03 : 5.3 condition variables
|
|
197
228
|
// a condition VariableType has a sourceTimeStamp exposed property
|
|
@@ -210,7 +241,7 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
210
241
|
const node = this._node_index.get(key);
|
|
211
242
|
if (!node) {
|
|
212
243
|
// for instance localTime is optional
|
|
213
|
-
debugLog(
|
|
244
|
+
debugLog(`Cannot serVar ${varName} dataType ${node_opcua_variant_1.DataType[dataType]}`);
|
|
214
245
|
return;
|
|
215
246
|
}
|
|
216
247
|
(0, node_opcua_assert_1.assert)(node.nodeClass === node_opcua_data_model_1.NodeClass.Variable);
|
|
@@ -220,26 +251,26 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
220
251
|
*
|
|
221
252
|
*/
|
|
222
253
|
getBranchId() {
|
|
223
|
-
return this.#
|
|
254
|
+
return this.#_get_varT(node_opcua_variant_1.DataType.NodeId, "BranchId");
|
|
224
255
|
}
|
|
225
256
|
/**
|
|
226
257
|
*
|
|
227
258
|
*/
|
|
228
259
|
getEventId() {
|
|
229
|
-
return this.#
|
|
260
|
+
return this.#_get_varT(node_opcua_variant_1.DataType.ByteString, "EventId");
|
|
230
261
|
}
|
|
231
262
|
/**
|
|
232
263
|
*
|
|
233
264
|
*/
|
|
234
265
|
getRetain() {
|
|
235
|
-
return this.#
|
|
266
|
+
return this.#_get_varTDefault(node_opcua_variant_1.DataType.Boolean, "Retain", false);
|
|
236
267
|
}
|
|
237
268
|
/**
|
|
238
269
|
*
|
|
239
270
|
*/
|
|
240
271
|
setRetain(retainFlag) {
|
|
241
272
|
retainFlag = !!retainFlag;
|
|
242
|
-
|
|
273
|
+
this.#_set_var("Retain", node_opcua_variant_1.DataType.Boolean, retainFlag);
|
|
243
274
|
}
|
|
244
275
|
/**
|
|
245
276
|
*
|
|
@@ -248,8 +279,7 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
248
279
|
const addressSpace = this.condition.addressSpace;
|
|
249
280
|
// create a new event Id for this new condition
|
|
250
281
|
const eventId = addressSpace.generateEventId();
|
|
251
|
-
|
|
252
|
-
return ret;
|
|
282
|
+
this.#_set_var("EventId", node_opcua_variant_1.DataType.ByteString, eventId.value);
|
|
253
283
|
}
|
|
254
284
|
/**
|
|
255
285
|
*
|
|
@@ -261,19 +291,19 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
261
291
|
*
|
|
262
292
|
*/
|
|
263
293
|
setEnabledState(value, options) {
|
|
264
|
-
|
|
294
|
+
this.#_set_twoStateVariable("EnabledState", value, options);
|
|
265
295
|
}
|
|
266
296
|
/**
|
|
267
297
|
*
|
|
268
298
|
*/
|
|
269
299
|
getEnabledStateAsString() {
|
|
270
|
-
return this.#
|
|
300
|
+
return this.#_get_varT(node_opcua_variant_1.DataType.LocalizedText, "EnabledState").text || "";
|
|
271
301
|
}
|
|
272
302
|
/**
|
|
273
303
|
*
|
|
274
304
|
*/
|
|
275
305
|
getComment() {
|
|
276
|
-
return this.#
|
|
306
|
+
return this.#_get_varT(node_opcua_variant_1.DataType.LocalizedText, "Comment");
|
|
277
307
|
}
|
|
278
308
|
/**
|
|
279
309
|
* Set condition comment
|
|
@@ -294,13 +324,13 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
294
324
|
*/
|
|
295
325
|
setMessage(txtMessage) {
|
|
296
326
|
const txtMessage1 = (0, node_opcua_data_model_1.coerceLocalizedText)(txtMessage);
|
|
297
|
-
|
|
327
|
+
this.#_set_var("Message", node_opcua_variant_1.DataType.LocalizedText, txtMessage1);
|
|
298
328
|
}
|
|
299
329
|
/**
|
|
300
330
|
*
|
|
301
331
|
*/
|
|
302
332
|
setClientUserId(userIdentity) {
|
|
303
|
-
|
|
333
|
+
this.#_set_var("ClientUserId", node_opcua_variant_1.DataType.String, userIdentity.toString());
|
|
304
334
|
}
|
|
305
335
|
/*
|
|
306
336
|
*
|
|
@@ -349,7 +379,7 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
349
379
|
*
|
|
350
380
|
*/
|
|
351
381
|
getQuality() {
|
|
352
|
-
return this.#
|
|
382
|
+
return this.#_get_varT(node_opcua_variant_1.DataType.StatusCode, "Quality");
|
|
353
383
|
}
|
|
354
384
|
/**
|
|
355
385
|
* **as per spec 1.0.3 - Part 9**
|
|
@@ -400,7 +430,6 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
400
430
|
* of 1 to 333.
|
|
401
431
|
*/
|
|
402
432
|
setSeverity(severity, options) {
|
|
403
|
-
(0, node_opcua_assert_1.assert)(isFinite(severity), "expecting a UInt16");
|
|
404
433
|
// record automatically last severity
|
|
405
434
|
const lastSeverity = this.getSeverity();
|
|
406
435
|
const sourceTimestamp = this.getSeveritySourceTimestamp();
|
|
@@ -412,7 +441,7 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
412
441
|
getSeverity() {
|
|
413
442
|
const c = this.condition;
|
|
414
443
|
(0, node_opcua_assert_1.assert)(c.getEnabledState(), "condition must be enabled");
|
|
415
|
-
const value = this.#
|
|
444
|
+
const value = this.#_get_varT(node_opcua_variant_1.DataType.UInt16, "Severity");
|
|
416
445
|
return +value;
|
|
417
446
|
}
|
|
418
447
|
getSeveritySourceTimestamp() {
|
|
@@ -432,13 +461,13 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
432
461
|
*/
|
|
433
462
|
setLastSeverity(severity, options) {
|
|
434
463
|
severity = +severity;
|
|
435
|
-
|
|
464
|
+
this.#_set_var("LastSeverity", node_opcua_variant_1.DataType.UInt16, severity, options);
|
|
436
465
|
}
|
|
437
466
|
/**
|
|
438
467
|
*
|
|
439
468
|
*/
|
|
440
469
|
getLastSeverity() {
|
|
441
|
-
const value = this.#
|
|
470
|
+
const value = this.#_get_varT(node_opcua_variant_1.DataType.UInt16, "LastSeverity");
|
|
442
471
|
return +value;
|
|
443
472
|
}
|
|
444
473
|
/**
|
|
@@ -459,7 +488,7 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
459
488
|
*
|
|
460
489
|
*/
|
|
461
490
|
setReceiveTime(time) {
|
|
462
|
-
|
|
491
|
+
this.#_set_var("ReceiveTime", node_opcua_variant_1.DataType.DateTime, time, { sourceTimestamp: time || undefined });
|
|
463
492
|
}
|
|
464
493
|
/**
|
|
465
494
|
* Time provides the time the Event occurred.
|
|
@@ -473,7 +502,7 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
473
502
|
*
|
|
474
503
|
*/
|
|
475
504
|
setTime(time) {
|
|
476
|
-
|
|
505
|
+
this.#_set_var("Time", node_opcua_variant_1.DataType.DateTime, time, { sourceTimestamp: time });
|
|
477
506
|
}
|
|
478
507
|
/**
|
|
479
508
|
* LocalTime is a structure containing the Offset and the DaylightSavingInOffset flag.
|
|
@@ -491,29 +520,29 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
491
520
|
*/
|
|
492
521
|
setLocalTime(localTime) {
|
|
493
522
|
(0, node_opcua_assert_1.assert)(localTime instanceof node_opcua_types_1.TimeZoneDataType);
|
|
494
|
-
|
|
523
|
+
this.#_set_var("LocalTime", node_opcua_variant_1.DataType.ExtensionObject, new node_opcua_types_1.TimeZoneDataType(localTime));
|
|
495
524
|
}
|
|
496
525
|
// read only !
|
|
497
526
|
getSourceName() {
|
|
498
|
-
return this.#
|
|
527
|
+
return this.#_get_varT(node_opcua_variant_1.DataType.LocalizedText, "SourceName");
|
|
499
528
|
}
|
|
500
529
|
/**
|
|
501
530
|
*
|
|
502
531
|
*/
|
|
503
532
|
getSourceNode() {
|
|
504
|
-
return this.#
|
|
533
|
+
return this.#_get_varT(node_opcua_variant_1.DataType.NodeId, "SourceNode");
|
|
505
534
|
}
|
|
506
535
|
/**
|
|
507
536
|
*
|
|
508
537
|
*/
|
|
509
538
|
getEventType() {
|
|
510
|
-
return this.#
|
|
539
|
+
return this.#_get_varT(node_opcua_variant_1.DataType.NodeId, "EventType");
|
|
511
540
|
}
|
|
512
541
|
getMessage() {
|
|
513
|
-
return this.#
|
|
542
|
+
return this.#_get_varT(node_opcua_variant_1.DataType.LocalizedText, "Message");
|
|
514
543
|
}
|
|
515
544
|
isCurrentBranch() {
|
|
516
|
-
return (0, node_opcua_nodeid_1.sameNodeId)(this.#
|
|
545
|
+
return (0, node_opcua_nodeid_1.sameNodeId)(this.#_get_varT(node_opcua_variant_1.DataType.NodeId, "BranchId"), node_opcua_nodeid_1.NodeId.nullNodeId);
|
|
517
546
|
}
|
|
518
547
|
// -- ACKNOWLEDGEABLE -------------------------------------------------------------------
|
|
519
548
|
getAckedState() {
|
|
@@ -545,12 +574,12 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
545
574
|
return;
|
|
546
575
|
}
|
|
547
576
|
// todo deal with Error code BadConditionBranchAlreadyConfirmed
|
|
548
|
-
|
|
577
|
+
this.#_set_twoStateVariable("ConfirmedState", confirmedState, options);
|
|
549
578
|
}
|
|
550
579
|
setConfirmedState(confirmedState) {
|
|
551
580
|
const acknowledgeableCondition = this.condition;
|
|
552
581
|
(0, node_opcua_assert_1.assert)(acknowledgeableCondition.confirmedState, "Must have a confirmed state. Add ConfirmedState to the optionals");
|
|
553
|
-
|
|
582
|
+
this.setConfirmedStateIfExists(confirmedState);
|
|
554
583
|
}
|
|
555
584
|
// ---- Shelving
|
|
556
585
|
getSuppressedState() {
|
|
@@ -604,7 +633,7 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
604
633
|
"condition: " +
|
|
605
634
|
(this.condition.browseName.toString() + " " + this.condition.nodeId.toString()) +
|
|
606
635
|
", type: " +
|
|
607
|
-
(t.browseName.toString()
|
|
636
|
+
(t ? `${t.browseName.toString()} ${t.nodeId.toString()}` : "<null>") +
|
|
608
637
|
", branchId: " +
|
|
609
638
|
(this.branchId ? this.branchId.toString() : "<null>") +
|
|
610
639
|
", acked: " +
|
|
@@ -624,16 +653,16 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
624
653
|
#_set_twoStateVariable(varName, value, options) {
|
|
625
654
|
value = !!value;
|
|
626
655
|
const hrKey = _a.normalizeName(varName);
|
|
627
|
-
const idKey = _a.normalizeName(varName
|
|
656
|
+
const idKey = _a.normalizeName(`${varName}.Id`);
|
|
628
657
|
const variant = new node_opcua_variant_1.Variant({ dataType: node_opcua_variant_1.DataType.Boolean, value });
|
|
629
658
|
this._map.set(idKey, variant);
|
|
630
659
|
// also change varName with human readable text
|
|
631
660
|
const twoStateNode = this._node_index.get(hrKey);
|
|
632
661
|
if (!twoStateNode) {
|
|
633
|
-
throw new Error(
|
|
662
|
+
throw new Error(`Cannot find twoState Variable with name ${varName}`);
|
|
634
663
|
}
|
|
635
664
|
if (!(twoStateNode instanceof ua_two_state_variable_1.UATwoStateVariableImpl)) {
|
|
636
|
-
throw new Error(
|
|
665
|
+
throw new Error(`Cannot find twoState Variable with name ${varName} ${twoStateNode}`);
|
|
637
666
|
}
|
|
638
667
|
const hrValue = new node_opcua_variant_1.Variant({
|
|
639
668
|
dataType: node_opcua_variant_1.DataType.LocalizedText,
|
|
@@ -650,16 +679,16 @@ class ConditionSnapshotImpl extends events_1.EventEmitter {
|
|
|
650
679
|
this.emit("valueChanged", node, variant, { sourceTimestamp });
|
|
651
680
|
}
|
|
652
681
|
#_get_twoStateVariable(varName) {
|
|
653
|
-
const key = _a.normalizeName(varName)
|
|
682
|
+
const key = `${_a.normalizeName(varName)}.Id`;
|
|
654
683
|
const variant = this._map.get(key);
|
|
655
684
|
// c8 ignore next
|
|
656
685
|
if (!variant) {
|
|
657
|
-
return
|
|
686
|
+
return false;
|
|
658
687
|
// throw new Error("Cannot find TwoStateVariable with name " + varName);
|
|
659
688
|
}
|
|
660
689
|
return variant.value;
|
|
661
690
|
}
|
|
662
|
-
_setAckedState(requestedAckedState,
|
|
691
|
+
_setAckedState(requestedAckedState, _conditionEventId, _comment, options) {
|
|
663
692
|
const ackedState = this.getAckedState();
|
|
664
693
|
if (ackedState && requestedAckedState) {
|
|
665
694
|
return node_opcua_status_code_1.StatusCodes.BadConditionBranchAlreadyAcked;
|