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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ua_certificate_expiration_alarm_impl.js","sourceRoot":"","sources":["../../../src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAwBH,sFAMC;AAsMD,kFAQC;AAzOD,mEAAgG;AAChG,+DAAqD;AACrD,+CAAiG;AACjG,iEAA8D;AAC9D,uDAAmD;AAEnD,2DAA8C;AAG9C,uFAAkF;AAClF,uFAA+E;AAE/E,MAAM,UAAU,GAAG,IAAA,kCAAe,EAAC,qBAAqB,CAAC,CAAC;AAE1D,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,IAAI,GAAG,CAAC,EAAE,EAAE;IACxC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACzB,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC;AAC7G,CAAC,CAAC;AACF,MAAM,CAAC,GAAG,CAAC,CAAO,EAAE,EAAE;IAClB,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;AAC3B,CAAC,CAAC;AACF,SAAgB,qCAAqC,CACjD,SAAqB,EACrB,SAA2C,EAC3C,OAAyC;IAEzC,OAAO,
|
|
1
|
+
{"version":3,"file":"ua_certificate_expiration_alarm_impl.js","sourceRoot":"","sources":["../../../src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAwBH,sFAMC;AAsMD,kFAQC;AAzOD,mEAAgG;AAChG,+DAAqD;AACrD,+CAAiG;AACjG,iEAA8D;AAC9D,uDAAmD;AAEnD,2DAA8C;AAG9C,uFAAkF;AAClF,uFAA+E;AAE/E,MAAM,UAAU,GAAG,IAAA,kCAAe,EAAC,qBAAqB,CAAC,CAAC;AAE1D,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,IAAI,GAAG,CAAC,EAAE,EAAE;IACxC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACzB,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC;AAC7G,CAAC,CAAC;AACF,MAAM,CAAC,GAAG,CAAC,CAAO,EAAE,EAAE;IAClB,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;AAC3B,CAAC,CAAC;AACF,SAAgB,qCAAqC,CACjD,SAAqB,EACrB,SAA2C,EAC3C,OAAyC;IAEzC,OAAO,oCAAoC,CAAC,WAAW,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AAC3F,CAAC;AAED,8IAA8I;AAC9I,kGAAkG;AACrF,QAAA,cAAc,GAAG,IAAI,GAAG,EAAE,G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AI,CAAC,CAAC,mBAAmB;IACpC,CAAC;IACD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,wCAAgC,CAAC,SAAS,CAAC,CAAC;IACxE,MAAM,KAAK,GAAG,IAAmD,CAAC;IAClE,KAAK,CAAC,gBAAgB,EAAE,CAAC;IACzB,OAAO,KAAK,CAAC;AACjB,CAAC;AACD,IAAA,6CAAoB,EAAC,oCAAa,CAAC,8BAA8B,EAAE,mCAAmC,EAAE,IAAI,CAAC,CAAC;AAGjG,QAAA,gCAAgC,GACzC,oCAA2C,CAAC"}
|
|
@@ -1,50 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type INamespace, type ISessionContext, type ListenerSignature, type UAEventType, type UAObject, type UAVariable } from "node-opcua-address-space-base";
|
|
2
|
+
import { type ByteString } from "node-opcua-basic-types";
|
|
3
|
+
import { LocalizedText, type LocalizedTextLike } from "node-opcua-data-model";
|
|
3
4
|
import { NodeId } from "node-opcua-nodeid";
|
|
4
5
|
import { StatusCode } from "node-opcua-status-code";
|
|
5
6
|
import { TimeZoneDataType } from "node-opcua-types";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { ISetStateOptions } from "../../source/interfaces/i_set_state_options";
|
|
12
|
-
import { AddressSpacePrivate } from "../address_space_private";
|
|
13
|
-
import {
|
|
14
|
-
export declare
|
|
15
|
-
on(eventName: string, eventHandler: any): this;
|
|
16
|
-
once(eventName: string, eventHandler: any): this;
|
|
17
|
-
conditionClassId: UAProperty<NodeId, /*c*/ DataType.NodeId>;
|
|
18
|
-
conditionClassName: UAProperty<LocalizedText, /*c*/ DataType.LocalizedText>;
|
|
19
|
-
conditionSubClassId?: UAProperty<NodeId[], DataType.NodeId>;
|
|
20
|
-
conditionSubClassName?: UAProperty<LocalizedText[], DataType.LocalizedText>;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* └─ ConditionType
|
|
25
|
-
* ├─ DialogConditionType
|
|
26
|
-
* └─ AcknowledgeableConditionType
|
|
27
|
-
* └─ AlarmConditionType
|
|
28
|
-
* ├─ LimitAlarmType
|
|
29
|
-
* │ ├─ ExclusiveLimitAlarmType
|
|
30
|
-
* │ │ ├─ ExclusiveLevelAlarmType
|
|
31
|
-
* │ │ ├─ ExclusiveDeviationAlarmType
|
|
32
|
-
* │ │ └─ ExclusiveRateOfChangeAlarmType
|
|
33
|
-
* │ └─ NonExclusiveLimitAlarmType
|
|
34
|
-
* │ ├─ NonExclusiveLevelAlarmType
|
|
35
|
-
* │ ├─ NonExclusiveDeviationAlarmType
|
|
36
|
-
* │ └─ NonExclusiveRateOfChangeAlarmType
|
|
37
|
-
* └─ DiscreteAlarmType
|
|
38
|
-
* ├─ OffNormalAlarmType
|
|
39
|
-
* │ ├─ SystemOffNormalAlarmType
|
|
40
|
-
* │ │ └─ CertificateExpirationAlarmType
|
|
41
|
-
* │ └─ TripAlarmType
|
|
42
|
-
*
|
|
43
|
-
*/
|
|
44
|
-
export declare class UAConditionImpl extends UABaseEventImpl implements UAConditionEx {
|
|
7
|
+
import { type VariantLike, type VariantOptions } from "node-opcua-variant";
|
|
8
|
+
import type { ConditionInfoOptions } from "../../source/interfaces/alarms_and_conditions/condition_info_i";
|
|
9
|
+
import type { ConditionSnapshot } from "../../source/interfaces/alarms_and_conditions/condition_snapshot";
|
|
10
|
+
import type { InstantiateConditionOptions } from "../../source/interfaces/alarms_and_conditions/instantiate_condition_options";
|
|
11
|
+
import type { UAConditionEvents, UAConditionEx } from "../../source/interfaces/alarms_and_conditions/ua_condition_ex";
|
|
12
|
+
import type { ISetStateOptions } from "../../source/interfaces/i_set_state_options";
|
|
13
|
+
import type { AddressSpacePrivate } from "../address_space_private";
|
|
14
|
+
import { UABaseEventImplBase } from "./ua_base_event_impl";
|
|
15
|
+
export declare class UAConditionImplBase<T extends UAConditionEvents & ListenerSignature<T> = UAConditionEvents> extends UABaseEventImplBase<T> {
|
|
45
16
|
static defaultSeverity: number;
|
|
46
17
|
static typeDefinition: NodeId;
|
|
47
|
-
static instantiate(namespace: INamespace, conditionTypeId: NodeId | string | UAEventType, options:
|
|
18
|
+
static instantiate(namespace: INamespace, conditionTypeId: NodeId | string | UAEventType, options: InstantiateConditionOptions, data?: Record<string, VariantOptions>): UAConditionImpl;
|
|
48
19
|
static install_condition_refresh_handle(addressSpace: AddressSpacePrivate): void;
|
|
49
20
|
/**
|
|
50
21
|
*
|
|
@@ -74,6 +45,7 @@ export declare class UAConditionImpl extends UABaseEventImpl implements UACondit
|
|
|
74
45
|
/**
|
|
75
46
|
*/
|
|
76
47
|
deleteBranch(branch: ConditionSnapshot): void;
|
|
48
|
+
private get $();
|
|
77
49
|
/**
|
|
78
50
|
*/
|
|
79
51
|
getEnabledState(): boolean;
|
|
@@ -128,3 +100,5 @@ export declare class UAConditionImpl extends UABaseEventImpl implements UACondit
|
|
|
128
100
|
findBranchForEventId(eventId: Buffer | null): ConditionSnapshot | null;
|
|
129
101
|
protected evaluateConditionsAfterEnabled(): void;
|
|
130
102
|
}
|
|
103
|
+
export type UAConditionImpl = UAConditionImplBase & UAConditionEx;
|
|
104
|
+
export declare const UAConditionImpl: new () => UAConditionImpl;
|
|
@@ -3,27 +3,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.UAConditionImpl = void 0;
|
|
6
|
+
exports.UAConditionImpl = exports.UAConditionImplBase = void 0;
|
|
7
7
|
/* eslint-disable complexity */
|
|
8
8
|
/**
|
|
9
9
|
* @module node-opcua-address-space.AlarmsAndConditions
|
|
10
10
|
*/
|
|
11
11
|
const chalk_1 = __importDefault(require("chalk"));
|
|
12
|
+
const node_opcua_address_space_base_1 = require("node-opcua-address-space-base");
|
|
12
13
|
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
13
14
|
const node_opcua_basic_types_1 = require("node-opcua-basic-types");
|
|
14
|
-
const node_opcua_basic_types_2 = require("node-opcua-basic-types");
|
|
15
15
|
const node_opcua_data_model_1 = require("node-opcua-data-model");
|
|
16
16
|
const node_opcua_debug_1 = require("node-opcua-debug");
|
|
17
|
-
const node_opcua_basic_types_3 = require("node-opcua-basic-types");
|
|
18
17
|
const node_opcua_nodeid_1 = require("node-opcua-nodeid");
|
|
19
18
|
const node_opcua_status_code_1 = require("node-opcua-status-code");
|
|
20
19
|
const node_opcua_types_1 = require("node-opcua-types");
|
|
21
20
|
const node_opcua_variant_1 = require("node-opcua-variant");
|
|
22
|
-
const node_opcua_address_space_base_1 = require("node-opcua-address-space-base");
|
|
23
21
|
const ua_two_state_variable_1 = require("../state_machine/ua_two_state_variable");
|
|
24
22
|
const ua_object_impl_1 = require("../ua_object_impl");
|
|
25
|
-
const ua_base_event_impl_1 = require("./ua_base_event_impl");
|
|
26
23
|
const condition_snapshot_impl_1 = require("./condition_snapshot_impl");
|
|
24
|
+
const ua_base_event_impl_1 = require("./ua_base_event_impl");
|
|
27
25
|
const debugLog = (0, node_opcua_debug_1.make_debugLog)(__filename);
|
|
28
26
|
const errorLog = (0, node_opcua_debug_1.make_errorLog)(__filename);
|
|
29
27
|
const doDebug = (0, node_opcua_debug_1.checkDebugFlag)(__filename);
|
|
@@ -50,7 +48,8 @@ const warningLog = (0, node_opcua_debug_1.make_warningLog)(__filename);
|
|
|
50
48
|
* │ └─ TripAlarmType
|
|
51
49
|
*
|
|
52
50
|
*/
|
|
53
|
-
|
|
51
|
+
const $ = (a) => a;
|
|
52
|
+
class UAConditionImplBase extends ua_base_event_impl_1.UABaseEventImplBase {
|
|
54
53
|
static defaultSeverity = 250;
|
|
55
54
|
static typeDefinition = (0, node_opcua_nodeid_1.resolveNodeId)("ConditionType");
|
|
56
55
|
static instantiate(namespace, conditionTypeId, options, data) {
|
|
@@ -87,7 +86,7 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
|
|
|
87
86
|
*/
|
|
88
87
|
static with_condition_method(inputArguments, context, callback, inner_func) {
|
|
89
88
|
const conditionNode = context.object;
|
|
90
|
-
if (!(conditionNode instanceof UAConditionImpl)) {
|
|
89
|
+
if (!(conditionNode instanceof exports.UAConditionImpl)) {
|
|
91
90
|
callback(null, {
|
|
92
91
|
statusCode: node_opcua_status_code_1.StatusCodes.BadNodeIdInvalid
|
|
93
92
|
});
|
|
@@ -175,27 +174,30 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
|
|
|
175
174
|
this._branches.delete(key);
|
|
176
175
|
this.emit("branch_deleted", key);
|
|
177
176
|
}
|
|
177
|
+
get $() {
|
|
178
|
+
return this;
|
|
179
|
+
}
|
|
178
180
|
/**
|
|
179
181
|
*/
|
|
180
182
|
getEnabledState() {
|
|
181
|
-
if (!this
|
|
183
|
+
if (!this.$.enabledState) {
|
|
182
184
|
// ua variable is missing
|
|
183
185
|
return false;
|
|
184
186
|
}
|
|
185
|
-
if (typeof this
|
|
187
|
+
if (typeof this.$.enabledState.getValue !== "function") {
|
|
186
188
|
// the enabledState is not initialized yet, probably because the addressSpace is not fully initialized
|
|
187
189
|
// try the id that contains the flag status as a boolean DataValue
|
|
188
|
-
if (!this
|
|
190
|
+
if (!this.$.enabledState.id) {
|
|
189
191
|
return false;
|
|
190
192
|
}
|
|
191
|
-
return this
|
|
193
|
+
return this.$.enabledState.id.readValue().value.value;
|
|
192
194
|
}
|
|
193
|
-
return this
|
|
195
|
+
return this.$.enabledState.getValue();
|
|
194
196
|
}
|
|
195
197
|
/**
|
|
196
198
|
*/
|
|
197
199
|
getEnabledStateAsString() {
|
|
198
|
-
return this
|
|
200
|
+
return this.$.enabledState.getValueAsString();
|
|
199
201
|
}
|
|
200
202
|
/**
|
|
201
203
|
* returns {StatusCode} StatusCodes.Good if successful or BadConditionAlreadyEnabled/BadConditionAlreadyDisabled
|
|
@@ -210,6 +212,11 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
|
|
|
210
212
|
if (!enabledState && !requestedEnabledState) {
|
|
211
213
|
return node_opcua_status_code_1.StatusCodes.BadConditionAlreadyDisabled;
|
|
212
214
|
}
|
|
215
|
+
let _previousRetainFlag = false;
|
|
216
|
+
if (enabledState) {
|
|
217
|
+
// record previousRetain flag before disabling the condition (so it can be restored on re-enable)
|
|
218
|
+
_previousRetainFlag = this.currentBranch().getRetain();
|
|
219
|
+
}
|
|
213
220
|
this._branch0.setEnabledState(requestedEnabledState, options);
|
|
214
221
|
// conditionNode.enabledState.setValue(requestedEnabledState);
|
|
215
222
|
// xx assert(conditionNode.enabledState.id.readValue().value.value === requestedEnabledState,"sanity check 1");
|
|
@@ -221,11 +228,11 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
|
|
|
221
228
|
// Condition instance is currently not of interest to Clients.
|
|
222
229
|
// TODO : shall we really set retain to false or artificially expose the retain false as false
|
|
223
230
|
// whist enabled state is false ?
|
|
224
|
-
this._previousRetainFlag =
|
|
231
|
+
this._previousRetainFlag = _previousRetainFlag;
|
|
225
232
|
this.currentBranch().setRetain(false);
|
|
226
233
|
// todo: install the mechanism by which all condition values will be return
|
|
227
234
|
// as Null | BadConditionDisabled;
|
|
228
|
-
const
|
|
235
|
+
const _statusCode = node_opcua_status_code_1.StatusCodes.BadConditionDisabled;
|
|
229
236
|
// a notification must be send
|
|
230
237
|
this.raiseConditionEvent(this.currentBranch(), true);
|
|
231
238
|
}
|
|
@@ -238,7 +245,7 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
|
|
|
238
245
|
// todo evaluate branches
|
|
239
246
|
// conditionNode.evaluateBranches();
|
|
240
247
|
// restore retain flag
|
|
241
|
-
if (Object.
|
|
248
|
+
if (Object.hasOwn(this, "_previousRetainFlag")) {
|
|
242
249
|
this.currentBranch().setRetain(this._previousRetainFlag);
|
|
243
250
|
}
|
|
244
251
|
// todo send notification for branches with retain = true
|
|
@@ -263,30 +270,30 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
|
|
|
263
270
|
/**
|
|
264
271
|
*/
|
|
265
272
|
setReceiveTime(time) {
|
|
266
|
-
|
|
273
|
+
this._branch0.setReceiveTime(time);
|
|
267
274
|
}
|
|
268
275
|
/**
|
|
269
276
|
*/
|
|
270
277
|
setLocalTime(time) {
|
|
271
|
-
|
|
278
|
+
this._branch0.setLocalTime(time);
|
|
272
279
|
}
|
|
273
280
|
/**
|
|
274
281
|
*/
|
|
275
282
|
setTime(time) {
|
|
276
|
-
|
|
283
|
+
this._branch0.setTime(time);
|
|
277
284
|
}
|
|
278
285
|
_assert_valid() {
|
|
279
|
-
(0, node_opcua_assert_1.assert)(this.receiveTime.readValue().value.dataType === node_opcua_variant_1.DataType.DateTime);
|
|
280
|
-
(0, node_opcua_assert_1.assert)(this.receiveTime.readValue().value.value instanceof Date);
|
|
281
|
-
(0, node_opcua_assert_1.assert)(this.message.readValue().value.dataType === node_opcua_variant_1.DataType.LocalizedText);
|
|
282
|
-
(0, node_opcua_assert_1.assert)(this.severity.readValue().value.dataType === node_opcua_variant_1.DataType.UInt16);
|
|
283
|
-
(0, node_opcua_assert_1.assert)(this.time.readValue().value.dataType === node_opcua_variant_1.DataType.DateTime);
|
|
284
|
-
(0, node_opcua_assert_1.assert)(this.time.readValue().value.value instanceof Date);
|
|
285
|
-
(0, node_opcua_assert_1.assert)(this.quality.readValue().value.dataType === node_opcua_variant_1.DataType.StatusCode);
|
|
286
|
-
(0, node_opcua_assert_1.assert)(this.enabledState.readValue().value.dataType === node_opcua_variant_1.DataType.LocalizedText);
|
|
287
|
-
(0, node_opcua_assert_1.assert)(this.branchId.readValue().value.dataType === node_opcua_variant_1.DataType.NodeId);
|
|
286
|
+
(0, node_opcua_assert_1.assert)($(this).receiveTime.readValue().value.dataType === node_opcua_variant_1.DataType.DateTime);
|
|
287
|
+
(0, node_opcua_assert_1.assert)($(this).receiveTime.readValue().value.value instanceof Date);
|
|
288
|
+
(0, node_opcua_assert_1.assert)($(this).message.readValue().value.dataType === node_opcua_variant_1.DataType.LocalizedText);
|
|
289
|
+
(0, node_opcua_assert_1.assert)($(this).severity.readValue().value.dataType === node_opcua_variant_1.DataType.UInt16);
|
|
290
|
+
(0, node_opcua_assert_1.assert)($(this).time.readValue().value.dataType === node_opcua_variant_1.DataType.DateTime);
|
|
291
|
+
(0, node_opcua_assert_1.assert)($(this).time.readValue().value.value instanceof Date);
|
|
292
|
+
(0, node_opcua_assert_1.assert)($(this).quality.readValue().value.dataType === node_opcua_variant_1.DataType.StatusCode);
|
|
293
|
+
(0, node_opcua_assert_1.assert)($(this).enabledState.readValue().value.dataType === node_opcua_variant_1.DataType.LocalizedText);
|
|
294
|
+
(0, node_opcua_assert_1.assert)($(this).branchId.readValue().value.dataType === node_opcua_variant_1.DataType.NodeId);
|
|
288
295
|
// note localTime has been made optional in 1.04
|
|
289
|
-
(0, node_opcua_assert_1.assert)(
|
|
296
|
+
(0, node_opcua_assert_1.assert)(!$(this).localTime || $(this).localTime?.readValue().value.dataType === node_opcua_variant_1.DataType.ExtensionObject);
|
|
290
297
|
}
|
|
291
298
|
/**
|
|
292
299
|
*/
|
|
@@ -308,7 +315,6 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
|
|
|
308
315
|
* @param renewEventId true if event Id of the condition branch should be renewed
|
|
309
316
|
*/
|
|
310
317
|
raiseConditionEvent(branch, renewEventId) {
|
|
311
|
-
(0, node_opcua_assert_1.assert)(arguments.length === 2, "expecting 2 arguments");
|
|
312
318
|
if (renewEventId) {
|
|
313
319
|
branch.renewEventId();
|
|
314
320
|
}
|
|
@@ -349,16 +355,18 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
|
|
|
349
355
|
if (!this.getEnabledState()) {
|
|
350
356
|
throw new Error("UACondition#raiseNewCondition Condition is not enabled");
|
|
351
357
|
}
|
|
352
|
-
conditionInfo = conditionInfo || { severity:
|
|
353
|
-
conditionInfo.severity = Object.
|
|
358
|
+
conditionInfo = conditionInfo || { severity: UAConditionImplBase.defaultSeverity };
|
|
359
|
+
conditionInfo.severity = Object.hasOwn(conditionInfo, "severity")
|
|
354
360
|
? conditionInfo.severity
|
|
355
|
-
:
|
|
361
|
+
: UAConditionImplBase.defaultSeverity;
|
|
356
362
|
// only valid for ConditionObjects
|
|
357
363
|
// todo check that object is of type ConditionType
|
|
358
364
|
const addressSpace = this.addressSpace;
|
|
359
365
|
const selfConditionType = this.typeDefinitionObj;
|
|
360
366
|
const conditionType = addressSpace.findObjectType("ConditionType");
|
|
361
|
-
(
|
|
367
|
+
if (!conditionType || !selfConditionType.isSubtypeOf(conditionType)) {
|
|
368
|
+
throw new Error("UACondition#raiseNewCondition ConditionType not found or invalid");
|
|
369
|
+
}
|
|
362
370
|
const branch = this.currentBranch();
|
|
363
371
|
if (!branch) {
|
|
364
372
|
warningLog("UACondition#raiseNewCondition currentBranch is not defined for node ", (0, node_opcua_address_space_base_1.fullPath2)(this));
|
|
@@ -372,28 +380,28 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
|
|
|
372
380
|
branch.setTime(time || node_opcua_basic_types_1.minDate);
|
|
373
381
|
branch.setReceiveTime(receiveTime);
|
|
374
382
|
// note : in 1.04 LocalTime property is optional
|
|
375
|
-
if (Object.
|
|
383
|
+
if (Object.hasOwn(this, "localTime")) {
|
|
376
384
|
branch.setLocalTime(new node_opcua_types_1.TimeZoneDataType({
|
|
377
385
|
daylightSavingInOffset: false,
|
|
378
386
|
offset: 0
|
|
379
387
|
}));
|
|
380
388
|
}
|
|
381
|
-
if (Object.
|
|
389
|
+
if (Object.hasOwn(conditionInfo, "message") && conditionInfo.message) {
|
|
382
390
|
branch.setMessage(conditionInfo.message);
|
|
383
391
|
}
|
|
384
392
|
// todo receive time : when the server received the event from the underlying system.
|
|
385
393
|
// self.receiveTime.setValueFromSource();
|
|
386
|
-
if (Object.
|
|
387
|
-
(0, node_opcua_assert_1.assert)(isFinite(conditionInfo.severity));
|
|
388
|
-
branch.setSeverity(conditionInfo.severity, { sourceTimestamp: time });
|
|
394
|
+
if (Object.hasOwn(conditionInfo, "severity") && conditionInfo.severity !== null) {
|
|
395
|
+
(0, node_opcua_assert_1.assert)(Number.isFinite(conditionInfo.severity));
|
|
396
|
+
branch.setSeverity(conditionInfo.severity || 0, { sourceTimestamp: time });
|
|
389
397
|
}
|
|
390
|
-
if (Object.
|
|
398
|
+
if (Object.hasOwn(conditionInfo, "quality") && conditionInfo.quality !== null) {
|
|
391
399
|
(0, node_opcua_assert_1.assert)(conditionInfo.quality instanceof node_opcua_status_code_1.StatusCode);
|
|
392
|
-
branch.setQuality(conditionInfo.quality, { sourceTimestamp: time });
|
|
400
|
+
branch.setQuality(conditionInfo.quality || node_opcua_status_code_1.StatusCodes.Good, { sourceTimestamp: time });
|
|
393
401
|
}
|
|
394
|
-
if (Object.
|
|
402
|
+
if (Object.hasOwn(conditionInfo, "retain") && conditionInfo.retain !== null) {
|
|
395
403
|
(0, node_opcua_assert_1.assert)(typeof conditionInfo.retain === "boolean");
|
|
396
|
-
branch.setRetain(!!conditionInfo.retain);
|
|
404
|
+
branch.setRetain(!!conditionInfo.retain || false);
|
|
397
405
|
}
|
|
398
406
|
this.raiseConditionEvent(branch, true);
|
|
399
407
|
}
|
|
@@ -413,7 +421,7 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
|
|
|
413
421
|
// for the time being , only current branch
|
|
414
422
|
const currentBranch = this.currentBranch();
|
|
415
423
|
if (currentBranch.getRetain()) {
|
|
416
|
-
debugLog(
|
|
424
|
+
debugLog(` resending condition event for ${this.browseName.toString()}`);
|
|
417
425
|
this.raiseConditionEvent(currentBranch, false);
|
|
418
426
|
return 1;
|
|
419
427
|
}
|
|
@@ -482,11 +490,10 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
|
|
|
482
490
|
// xx }
|
|
483
491
|
}
|
|
484
492
|
findBranchForEventId(eventId) {
|
|
485
|
-
if (sameBuffer(this.eventId
|
|
493
|
+
if (sameBuffer($(this).eventId?.readValue().value.value, eventId)) {
|
|
486
494
|
return this.currentBranch();
|
|
487
495
|
}
|
|
488
|
-
const e = [...this._branches.values()]
|
|
489
|
-
.filter((branch) => sameBuffer(branch.getEventId(), eventId));
|
|
496
|
+
const e = [...this._branches.values()].filter((branch) => sameBuffer(branch.getEventId(), eventId));
|
|
490
497
|
if (e.length === 1) {
|
|
491
498
|
return e[0];
|
|
492
499
|
}
|
|
@@ -498,8 +505,9 @@ class UAConditionImpl extends ua_base_event_impl_1.UABaseEventImpl {
|
|
|
498
505
|
throw new Error("Unimplemented , please override");
|
|
499
506
|
}
|
|
500
507
|
}
|
|
501
|
-
exports.
|
|
502
|
-
|
|
508
|
+
exports.UAConditionImplBase = UAConditionImplBase;
|
|
509
|
+
exports.UAConditionImpl = UAConditionImplBase;
|
|
510
|
+
/**²
|
|
503
511
|
* instantiate a Condition.
|
|
504
512
|
* this will create the unique EventId and will set eventType
|
|
505
513
|
* @param namespace {INamespace}
|
|
@@ -530,7 +538,7 @@ function UACondition_instantiate(namespace, conditionTypeId, options, data) {
|
|
|
530
538
|
const conditionType = addressSpace.findEventType(conditionTypeId);
|
|
531
539
|
/* c8 ignore next */
|
|
532
540
|
if (!conditionType) {
|
|
533
|
-
throw new Error(
|
|
541
|
+
throw new Error(` cannot find Condition Type for ${conditionTypeId}`);
|
|
534
542
|
}
|
|
535
543
|
// reminder : abstract event type cannot be instantiated directly !
|
|
536
544
|
(0, node_opcua_assert_1.assert)(!conditionType.isAbstract, "Cannot instantiate abstract conditionType");
|
|
@@ -555,24 +563,27 @@ function UACondition_instantiate(namespace, conditionTypeId, options, data) {
|
|
|
555
563
|
options.optionals.push("EnabledState.TransitionTime");
|
|
556
564
|
options.optionals.push("EnabledState.EffectiveTransitionTime");
|
|
557
565
|
options.optionals.push("EnabledState.EffectiveDisplayName");
|
|
558
|
-
const
|
|
559
|
-
|
|
566
|
+
const options2 = {
|
|
567
|
+
...options,
|
|
568
|
+
namespace: options.namespace || namespace
|
|
569
|
+
};
|
|
570
|
+
const conditionNode = conditionType.instantiate(options2);
|
|
571
|
+
Object.setPrototypeOf(conditionNode, exports.UAConditionImpl.prototype);
|
|
560
572
|
conditionNode.initialize();
|
|
561
|
-
(0, node_opcua_assert_1.assert)(Object.
|
|
573
|
+
(0, node_opcua_assert_1.assert)(Object.hasOwn(options, "conditionSource"), "must specify a condition source either as null or as a UAObject");
|
|
562
574
|
if (!options.conditionOf) {
|
|
563
575
|
options.conditionOf = options.conditionSource;
|
|
564
576
|
}
|
|
565
577
|
if (options.conditionOf) {
|
|
566
|
-
(0, node_opcua_assert_1.assert)(Object.
|
|
578
|
+
(0, node_opcua_assert_1.assert)(Object.hasOwn(options, "conditionOf")); // must provide a conditionOf
|
|
567
579
|
options.conditionOf = addressSpace._coerceNode(options.conditionOf);
|
|
568
580
|
// HasCondition References can be used in the Type definition of an Object or a Variable.
|
|
569
|
-
(0, node_opcua_assert_1.assert)(options.conditionOf
|
|
581
|
+
(0, node_opcua_assert_1.assert)(options.conditionOf?.nodeClass === node_opcua_data_model_1.NodeClass.Object || options.conditionOf?.nodeClass === node_opcua_data_model_1.NodeClass.Variable);
|
|
570
582
|
conditionNode.addReference({
|
|
571
583
|
isForward: false,
|
|
572
|
-
nodeId: options.conditionOf,
|
|
584
|
+
nodeId: options.conditionOf || node_opcua_nodeid_1.NodeId.nullNodeId,
|
|
573
585
|
referenceType: "HasCondition"
|
|
574
586
|
});
|
|
575
|
-
(0, node_opcua_assert_1.assert)(conditionNode.conditionOfNode().nodeId === options.conditionOf.nodeId);
|
|
576
587
|
}
|
|
577
588
|
// the constant property of this condition
|
|
578
589
|
conditionNode.eventType.setValueFromSource({
|
|
@@ -614,7 +625,7 @@ function UACondition_instantiate(namespace, conditionTypeId, options, data) {
|
|
|
614
625
|
// installing sourceName and sourceNode
|
|
615
626
|
conditionNode.enabledState.setValue(true);
|
|
616
627
|
// set properties to in initial values
|
|
617
|
-
Object.entries(data).forEach(([key, value]) => {
|
|
628
|
+
Object.entries(data || {}).forEach(([key, value]) => {
|
|
618
629
|
const varNode = _getCompositeKey(conditionNode, key);
|
|
619
630
|
(0, node_opcua_assert_1.assert)(varNode.nodeClass === node_opcua_data_model_1.NodeClass.Variable);
|
|
620
631
|
const variant = new node_opcua_variant_1.Variant(value);
|
|
@@ -622,7 +633,7 @@ function UACondition_instantiate(namespace, conditionTypeId, options, data) {
|
|
|
622
633
|
// xx var nodeDataType = addressSpace.findNode(varNode.dataType).browseName;
|
|
623
634
|
/* c8 ignore next */
|
|
624
635
|
if (!varNode._validate_DataType(variant.dataType)) {
|
|
625
|
-
throw new Error(
|
|
636
|
+
throw new Error(` Invalid variant dataType ${variant} ${varNode.browseName.toString()}`);
|
|
626
637
|
}
|
|
627
638
|
varNode.setValueFromSource(variant);
|
|
628
639
|
});
|
|
@@ -643,7 +654,7 @@ function UACondition_instantiate(namespace, conditionTypeId, options, data) {
|
|
|
643
654
|
* @type {UAMethod}
|
|
644
655
|
*/
|
|
645
656
|
conditionNode.addComment.bindMethod(_add_comment_method);
|
|
646
|
-
(0, node_opcua_assert_1.assert)(conditionNode instanceof UAConditionImpl);
|
|
657
|
+
(0, node_opcua_assert_1.assert)(conditionNode instanceof exports.UAConditionImpl);
|
|
647
658
|
// ConditionSource => cf SourceNode
|
|
648
659
|
// As per spec OPCUA 1.03 part 9 page 54:
|
|
649
660
|
// The ConditionType inherits all Properties of the BaseEventType. Their semantic is defined in
|
|
@@ -657,7 +668,8 @@ function UACondition_instantiate(namespace, conditionTypeId, options, data) {
|
|
|
657
668
|
// with the motor.
|
|
658
669
|
if (options.conditionSource) {
|
|
659
670
|
options.conditionSource = addressSpace._coerceNode(options.conditionSource);
|
|
660
|
-
if (options.conditionSource
|
|
671
|
+
if (!options.conditionSource ||
|
|
672
|
+
(options.conditionSource.nodeClass !== node_opcua_data_model_1.NodeClass.Object && options.conditionSource.nodeClass !== node_opcua_data_model_1.NodeClass.Variable)) {
|
|
661
673
|
debugLog(options.conditionSource);
|
|
662
674
|
throw new Error("Expecting condition source to be NodeClass.Object or Variable");
|
|
663
675
|
}
|
|
@@ -728,12 +740,12 @@ function UACondition_instantiate(namespace, conditionTypeId, options, data) {
|
|
|
728
740
|
if (typeof options.conditionClass === "string") {
|
|
729
741
|
options.conditionClass = addressSpace.findObjectType(options.conditionClass);
|
|
730
742
|
if (!options.conditionClass) {
|
|
731
|
-
throw new Error(
|
|
743
|
+
throw new Error(`cannot find condition class ${options.conditionClass}`);
|
|
732
744
|
}
|
|
733
745
|
}
|
|
734
746
|
const conditionClassNode = addressSpace._coerceNode(options.conditionClass);
|
|
735
747
|
if (!conditionClassNode) {
|
|
736
|
-
throw new Error(
|
|
748
|
+
throw new Error(`cannot find condition class ${options.conditionClass.toString()}`);
|
|
737
749
|
}
|
|
738
750
|
conditionClassId = conditionClassNode.nodeId;
|
|
739
751
|
conditionClassName = conditionClassNode.displayName[0];
|
|
@@ -785,8 +797,8 @@ function UACondition_instantiate(namespace, conditionTypeId, options, data) {
|
|
|
785
797
|
offset: 0
|
|
786
798
|
}));
|
|
787
799
|
branch0.setMessage("");
|
|
788
|
-
branch0.setReceiveTime((0,
|
|
789
|
-
branch0.setTime((0,
|
|
800
|
+
branch0.setReceiveTime((0, node_opcua_basic_types_1.getMinOPCUADate)());
|
|
801
|
+
branch0.setTime((0, node_opcua_basic_types_1.getMinOPCUADate)());
|
|
790
802
|
return conditionNode;
|
|
791
803
|
}
|
|
792
804
|
function _disable_method(inputArguments, context, callback) {
|
|
@@ -794,7 +806,7 @@ function _disable_method(inputArguments, context, callback) {
|
|
|
794
806
|
const conditionNode = context.object;
|
|
795
807
|
(0, node_opcua_assert_1.assert)(conditionNode);
|
|
796
808
|
// c8 ignore next
|
|
797
|
-
if (!(conditionNode instanceof UAConditionImpl)) {
|
|
809
|
+
if (!(conditionNode instanceof exports.UAConditionImpl)) {
|
|
798
810
|
debugLog("conditionNode is not a UACondition ", conditionNode?.toString());
|
|
799
811
|
return callback(null, {
|
|
800
812
|
statusCode: node_opcua_status_code_1.StatusCodes.BadNodeIdInvalid
|
|
@@ -809,7 +821,7 @@ function _enable_method(inputArguments, context, callback) {
|
|
|
809
821
|
(0, node_opcua_assert_1.assert)(inputArguments.length === 0);
|
|
810
822
|
const conditionNode = context.object;
|
|
811
823
|
(0, node_opcua_assert_1.assert)(conditionNode);
|
|
812
|
-
if (!(conditionNode instanceof UAConditionImpl)) {
|
|
824
|
+
if (!(conditionNode instanceof exports.UAConditionImpl)) {
|
|
813
825
|
return callback(null, {
|
|
814
826
|
statusCode: node_opcua_status_code_1.StatusCodes.BadNodeIdInvalid
|
|
815
827
|
});
|
|
@@ -822,7 +834,7 @@ function _enable_method(inputArguments, context, callback) {
|
|
|
822
834
|
function _condition_refresh_method(inputArguments, context, callback) {
|
|
823
835
|
// arguments : IntegerId SubscriptionId
|
|
824
836
|
(0, node_opcua_assert_1.assert)(inputArguments.length === 1);
|
|
825
|
-
const addressSpace = context.object
|
|
837
|
+
const addressSpace = context.object?.addressSpace;
|
|
826
838
|
// c8 ignore next
|
|
827
839
|
if (doDebug) {
|
|
828
840
|
debugLog(chalk_1.default.red(" ConditionType.ConditionRefresh ! subscriptionId ="), inputArguments[0].toString());
|
|
@@ -837,7 +849,7 @@ function _condition_refresh_method(inputArguments, context, callback) {
|
|
|
837
849
|
statusCode
|
|
838
850
|
});
|
|
839
851
|
}
|
|
840
|
-
function _perform_condition_refresh(addressSpace,
|
|
852
|
+
function _perform_condition_refresh(addressSpace, _inputArguments, context) {
|
|
841
853
|
// --- possible StatusCodes:
|
|
842
854
|
//
|
|
843
855
|
// Bad_SubscriptionIdInvalid See Part 4 for the description of this result code
|
|
@@ -851,16 +863,22 @@ function _perform_condition_refresh(addressSpace, inputArguments, context) {
|
|
|
851
863
|
return node_opcua_status_code_1.StatusCodes.BadRefreshInProgress;
|
|
852
864
|
}
|
|
853
865
|
addressSpace._condition_refresh_in_progress = true;
|
|
854
|
-
const server = context.object
|
|
866
|
+
const server = context.object?.addressSpace.rootFolder.objects.server;
|
|
855
867
|
const refreshStartEventType = addressSpace.findEventType("RefreshStartEventType");
|
|
868
|
+
if (!refreshStartEventType) {
|
|
869
|
+
throw new Error("cannot find RefreshStartEventType");
|
|
870
|
+
}
|
|
856
871
|
const refreshEndEventType = addressSpace.findEventType("RefreshEndEventType");
|
|
857
|
-
|
|
872
|
+
if (!refreshEndEventType) {
|
|
873
|
+
throw new Error("cannot find RefreshEndEventType");
|
|
874
|
+
}
|
|
875
|
+
server?.raiseEvent(refreshStartEventType, {});
|
|
858
876
|
// todo : resend retained conditions
|
|
859
877
|
const _server = server;
|
|
860
878
|
// starting from server object ..
|
|
861
879
|
// evaluated all --> hasNotifier/hasEventSource -> node
|
|
862
880
|
_server._conditionRefresh();
|
|
863
|
-
server
|
|
881
|
+
server?.raiseEvent(refreshEndEventType, {});
|
|
864
882
|
addressSpace._condition_refresh_in_progress = false;
|
|
865
883
|
return node_opcua_status_code_1.StatusCodes.Good;
|
|
866
884
|
}
|
|
@@ -898,9 +916,9 @@ function _add_comment_method(inputArguments, context, callback) {
|
|
|
898
916
|
//
|
|
899
917
|
// AlwaysGeneratesEvent AuditConditionCommentEventType
|
|
900
918
|
//
|
|
901
|
-
|
|
902
|
-
(0, node_opcua_assert_1.assert)(inputArguments
|
|
903
|
-
(0, node_opcua_assert_1.assert)(conditionEventId
|
|
919
|
+
UAConditionImplBase.with_condition_method(inputArguments, context, callback, (conditionEventId, comment, branch, conditionNode) => {
|
|
920
|
+
(0, node_opcua_assert_1.assert)(Array.isArray(inputArguments));
|
|
921
|
+
(0, node_opcua_assert_1.assert)(Buffer.isBuffer(conditionEventId) || conditionEventId === null);
|
|
904
922
|
(0, node_opcua_assert_1.assert)(branch instanceof condition_snapshot_impl_1.ConditionSnapshotImpl);
|
|
905
923
|
branch.setComment(comment);
|
|
906
924
|
const sourceName = "Method/AddComment";
|
|
@@ -930,7 +948,7 @@ function sameBuffer(b1, b2) {
|
|
|
930
948
|
}
|
|
931
949
|
(0, node_opcua_assert_1.assert)(b1 instanceof Buffer);
|
|
932
950
|
(0, node_opcua_assert_1.assert)(b2 instanceof Buffer);
|
|
933
|
-
if (b1
|
|
951
|
+
if (b1?.length !== b2?.length) {
|
|
934
952
|
return false;
|
|
935
953
|
}
|
|
936
954
|
/*
|
|
@@ -938,16 +956,16 @@ function sameBuffer(b1, b2) {
|
|
|
938
956
|
var bb2 = (Buffer.from(b2)).toString("hex");
|
|
939
957
|
return bb1 === bb2;
|
|
940
958
|
*/
|
|
941
|
-
const n = b1
|
|
959
|
+
const n = b1?.length || 0;
|
|
942
960
|
for (let i = 0; i < n; i++) {
|
|
943
|
-
if (b1[i] !== b2[i]) {
|
|
961
|
+
if (b1?.[i] !== b2?.[i]) {
|
|
944
962
|
return false;
|
|
945
963
|
}
|
|
946
964
|
}
|
|
947
965
|
return true;
|
|
948
966
|
}
|
|
949
967
|
function _create_new_branch_id() {
|
|
950
|
-
return (0, node_opcua_nodeid_1.makeNodeId)((0,
|
|
968
|
+
return (0, node_opcua_nodeid_1.makeNodeId)((0, node_opcua_basic_types_1.randomGuid)(), 1);
|
|
951
969
|
}
|
|
952
970
|
// tslint:disable:no-console
|
|
953
971
|
function _install_condition_variable_type(node) {
|
|
@@ -978,8 +996,8 @@ function _getCompositeKey(node, key) {
|
|
|
978
996
|
const elements = key.split(".");
|
|
979
997
|
for (const e of elements) {
|
|
980
998
|
// c8 ignore next
|
|
981
|
-
if (!Object.
|
|
982
|
-
throw new Error(
|
|
999
|
+
if (!Object.hasOwn(cur, e)) {
|
|
1000
|
+
throw new Error(` cannot extract '${key}' from ${node.browseName.toString()}`);
|
|
983
1001
|
}
|
|
984
1002
|
cur = cur[e];
|
|
985
1003
|
}
|
|
@@ -991,7 +1009,7 @@ function _getCompositeKey(node, key) {
|
|
|
991
1009
|
* @param context {Object}
|
|
992
1010
|
* @private
|
|
993
1011
|
*/
|
|
994
|
-
function _check_subscription_id_is_valid(
|
|
1012
|
+
function _check_subscription_id_is_valid(_subscriptionId, _context) {
|
|
995
1013
|
/// todo: return StatusCodes.BadSubscriptionIdInvalid; if subscriptionId doesn't belong to session...
|
|
996
1014
|
return node_opcua_status_code_1.StatusCodes.Good;
|
|
997
1015
|
}
|