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
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
1
|
/**
|
|
5
2
|
* This valueRank indicates whether the Value attribute of the Variable is an array and how many dimensions the array has.
|
|
6
3
|
* It may have the following values:
|
|
@@ -13,7 +10,10 @@
|
|
|
13
10
|
* * All DataTypes are considered to be scalar, even if they have array-like semantics like ByteString and String.
|
|
14
11
|
*/
|
|
15
12
|
|
|
16
|
-
export function checkValueRankCompatibility(
|
|
13
|
+
export function checkValueRankCompatibility(
|
|
14
|
+
actualValueRank: number,
|
|
15
|
+
baseTypeValueRank: number
|
|
16
|
+
): { result: boolean; errorMessage?: string } {
|
|
17
17
|
const ScalarOrOneDimension = -3;
|
|
18
18
|
const OneOrMoreDimensions = 0;
|
|
19
19
|
const AnyDimension = -2;
|
|
@@ -21,17 +21,22 @@ export function checkValueRankCompatibility(actualValueRank: number, baseTypeVal
|
|
|
21
21
|
const Scalar = -1;
|
|
22
22
|
const t = (valueRank: number): string => {
|
|
23
23
|
switch (valueRank) {
|
|
24
|
-
case ScalarOrOneDimension:
|
|
25
|
-
|
|
26
|
-
case
|
|
27
|
-
|
|
28
|
-
case
|
|
24
|
+
case ScalarOrOneDimension:
|
|
25
|
+
return `ScalarOrOneDimension(${valueRank})`;
|
|
26
|
+
case OneOrMoreDimensions:
|
|
27
|
+
return `OneOrMoreDimensions(${valueRank})`;
|
|
28
|
+
case AnyDimension:
|
|
29
|
+
return `AnyDimension(${valueRank})`;
|
|
30
|
+
case OneDimension:
|
|
31
|
+
return `OneDimension(${valueRank})`;
|
|
32
|
+
case Scalar:
|
|
33
|
+
return `Scalar(${valueRank})`;
|
|
29
34
|
}
|
|
30
35
|
if (valueRank < 0) {
|
|
31
36
|
return `InvalidValueRank(${valueRank})`;
|
|
32
37
|
}
|
|
33
|
-
return
|
|
34
|
-
}
|
|
38
|
+
return `${valueRank}`;
|
|
39
|
+
};
|
|
35
40
|
if (actualValueRank < 0) {
|
|
36
41
|
if (actualValueRank !== Scalar && actualValueRank !== AnyDimension && actualValueRank !== ScalarOrOneDimension) {
|
|
37
42
|
return {
|
|
@@ -46,7 +51,7 @@ export function checkValueRankCompatibility(actualValueRank: number, baseTypeVal
|
|
|
46
51
|
if (baseTypeValueRank === OneDimension || baseTypeValueRank > 1) {
|
|
47
52
|
if (actualValueRank === baseTypeValueRank) {
|
|
48
53
|
return { result: true };
|
|
49
|
-
}
|
|
54
|
+
}
|
|
50
55
|
return {
|
|
51
56
|
result: false,
|
|
52
57
|
errorMessage: `Invalid valueRank: ${t(actualValueRank)}: valueRank can only be identical to base type ${t(baseTypeValueRank)}`
|
|
@@ -67,7 +72,8 @@ export function checkValueRankCompatibility(actualValueRank: number, baseTypeVal
|
|
|
67
72
|
};
|
|
68
73
|
}
|
|
69
74
|
if (baseTypeValueRank === ScalarOrOneDimension) {
|
|
70
|
-
if (actualValueRank === OneDimension || actualValueRank === Scalar || actualValueRank === ScalarOrOneDimension)
|
|
75
|
+
if (actualValueRank === OneDimension || actualValueRank === Scalar || actualValueRank === ScalarOrOneDimension)
|
|
76
|
+
return { result: true };
|
|
71
77
|
return {
|
|
72
78
|
result: false,
|
|
73
79
|
errorMessage: `Invalid valueRank: ${t(actualValueRank)}: valueRank can only be identical to base type ${t(ScalarOrOneDimension)} , ${t(Scalar)} or ${t(OneDimension)}.`
|
|
@@ -75,5 +81,3 @@ export function checkValueRankCompatibility(actualValueRank: number, baseTypeVal
|
|
|
75
81
|
}
|
|
76
82
|
return { result: false };
|
|
77
83
|
}
|
|
78
|
-
|
|
79
|
-
|
|
@@ -27,11 +27,10 @@
|
|
|
27
27
|
// a Client may encounter cases where the value read back from a Server differs from the value that it
|
|
28
28
|
// wrote to the Server. This difference shall be no more than the difference suggested by this Property
|
|
29
29
|
|
|
30
|
+
import type { ModellingRuleType, UAVariable } from "node-opcua-address-space-base";
|
|
30
31
|
import { assert } from "node-opcua-assert";
|
|
31
32
|
import { DataType, Variant } from "node-opcua-variant";
|
|
32
33
|
|
|
33
|
-
import { UAVariable, ModellingRuleType } from "node-opcua-address-space-base";
|
|
34
|
-
|
|
35
34
|
const definition_Description =
|
|
36
35
|
"Definition is a vendor - specific," + " human readable string that specifies how the value of this DataItem is calculated.";
|
|
37
36
|
const valuePrecision_Description = "";
|
|
@@ -45,7 +44,7 @@ export function add_dataItem_stuff(variable: UAVariable, options: add_dataItem_s
|
|
|
45
44
|
const addressSpace = variable.addressSpace;
|
|
46
45
|
const namespace = addressSpace.getNamespace(variable.nodeId.namespace);
|
|
47
46
|
|
|
48
|
-
if (Object.
|
|
47
|
+
if (Object.hasOwn(options, "definition") && options.definition !== undefined) {
|
|
49
48
|
namespace.addVariable({
|
|
50
49
|
browseName: { name: "Definition", namespaceIndex: 0 },
|
|
51
50
|
dataType: "String",
|
|
@@ -58,7 +57,7 @@ export function add_dataItem_stuff(variable: UAVariable, options: add_dataItem_s
|
|
|
58
57
|
});
|
|
59
58
|
}
|
|
60
59
|
|
|
61
|
-
if (Object.
|
|
60
|
+
if (Object.hasOwn(options, "valuePrecision") && options.valuePrecision !== undefined) {
|
|
62
61
|
assert(typeof options.valuePrecision === "number");
|
|
63
62
|
|
|
64
63
|
namespace.addVariable({
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space.DataAccess
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import { Range } from "node-opcua-types";
|
|
7
|
-
import { UAVariable } from "node-opcua-address-space-base";
|
|
4
|
+
|
|
5
|
+
import type { UAVariable } from "node-opcua-address-space-base";
|
|
8
6
|
import { NodeClass } from "node-opcua-data-model";
|
|
9
|
-
import { DataValue } from "node-opcua-data-value";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import type { DataValue } from "node-opcua-data-value";
|
|
8
|
+
import { type StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
9
|
+
import type { Range } from "node-opcua-types";
|
|
10
|
+
import type { Variant } from "node-opcua-variant";
|
|
11
|
+
import type { UAVariableImpl } from "../ua_variable_impl";
|
|
12
12
|
|
|
13
13
|
function validate_value_range(range: Range, variant: Variant) {
|
|
14
14
|
if (variant.value < range.low || variant.value > range.high) {
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space.DataAccess
|
|
3
3
|
*/
|
|
4
|
+
|
|
5
|
+
import type {
|
|
6
|
+
BindVariableOptions,
|
|
7
|
+
CloneExtraInfo,
|
|
8
|
+
CloneFilter,
|
|
9
|
+
CloneOptions,
|
|
10
|
+
INamespace,
|
|
11
|
+
UAVariable
|
|
12
|
+
} from "node-opcua-address-space-base";
|
|
4
13
|
import { assert } from "node-opcua-assert";
|
|
5
14
|
import { VariableTypeIds } from "node-opcua-constants";
|
|
6
|
-
import { coerceLocalizedText, LocalizedText } from "node-opcua-data-model";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
import {
|
|
15
|
+
import { coerceLocalizedText, type LocalizedText } from "node-opcua-data-model";
|
|
16
|
+
import type { UAMultiStateDiscrete_Base } from "node-opcua-nodeset-ua";
|
|
17
|
+
import { type StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
18
|
+
import { DataType, Variant, VariantArrayType } from "node-opcua-variant";
|
|
19
|
+
import type { AddMultiStateDiscreteOptions } from "../../source/address_space_ts";
|
|
20
|
+
import type { ISetStateOptions } from "../../source/interfaces/i_set_state_options";
|
|
12
21
|
import { registerNodePromoter } from "../../source/loader/register_node_promoter";
|
|
13
22
|
import { UAVariableImpl } from "../ua_variable_impl";
|
|
14
|
-
import { ISetStateOptions } from "../../source/interfaces/i_set_state_options";
|
|
15
|
-
|
|
16
|
-
import { AddMultiStateDiscreteOptions } from "../../source/address_space_ts";
|
|
17
23
|
import { add_dataItem_stuff } from "./add_dataItem_stuff";
|
|
18
24
|
|
|
19
25
|
export { UAMultiStateDiscrete } from "node-opcua-nodeset-ua";
|
|
@@ -27,26 +33,26 @@ export interface UAMultiStateDiscreteEx<T, DT extends DataType> extends UAMultiS
|
|
|
27
33
|
checkVariantCompatibility(value: Variant): StatusCode;
|
|
28
34
|
}
|
|
29
35
|
|
|
30
|
-
export interface UAMultiStateDiscreteImpl<T, DT extends DataType> {
|
|
31
|
-
enumStrings: UAProperty<LocalizedText[], DataType.LocalizedText>;
|
|
32
|
-
}
|
|
33
36
|
/**
|
|
34
37
|
* @class UAMultiStateDiscrete
|
|
35
38
|
*/
|
|
36
|
-
export class
|
|
39
|
+
export class UAMultiStateDiscreteImplBase<T, DT extends DataType> extends UAVariableImpl {
|
|
40
|
+
private get $7(): UAMultiStateDiscreteEx<T, DT> {
|
|
41
|
+
return this as unknown as UAMultiStateDiscreteEx<T, DT>;
|
|
42
|
+
}
|
|
37
43
|
public getValue(): number {
|
|
38
44
|
return this.readValue().value.value;
|
|
39
45
|
}
|
|
40
46
|
|
|
41
47
|
public getValueAsString(): string {
|
|
42
48
|
const index = this.getValue();
|
|
43
|
-
const arr = this.enumStrings.readValue().value.value;
|
|
49
|
+
const arr = this.$7.enumStrings.readValue().value.value;
|
|
44
50
|
assert(Array.isArray(arr));
|
|
45
|
-
return arr[index].text ? arr[index].text
|
|
51
|
+
return arr[index].text ? arr[index].text?.toString() : "????";
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
public getIndex(value: string): number {
|
|
49
|
-
const arr = this.enumStrings.readValue().value.value;
|
|
55
|
+
const arr = this.$7.enumStrings.readValue().value.value;
|
|
50
56
|
assert(Array.isArray(arr));
|
|
51
57
|
const index = arr.findIndex((a: LocalizedText) => a.text === value);
|
|
52
58
|
return index;
|
|
@@ -56,24 +62,25 @@ export class UAMultiStateDiscreteImpl<T, DT extends DataType> extends UAVariable
|
|
|
56
62
|
if (typeof value === "string") {
|
|
57
63
|
const index = this.getIndex(value);
|
|
58
64
|
if (index < 0) {
|
|
59
|
-
throw new Error(
|
|
65
|
+
throw new Error(`UAMultiStateDiscrete#setValue invalid multi state value provided : ${value}`);
|
|
60
66
|
}
|
|
61
|
-
|
|
67
|
+
this.setValue(index, options);
|
|
68
|
+
return;
|
|
62
69
|
}
|
|
63
|
-
const arrayEnumStrings = this.enumStrings.readValue().value.value;
|
|
70
|
+
const arrayEnumStrings = this.$7.enumStrings.readValue().value.value;
|
|
64
71
|
if (value >= arrayEnumStrings.length) {
|
|
65
|
-
throw new Error(
|
|
72
|
+
throw new Error(`UAMultiStateDiscrete#setValue BadOutOfRange ${value}`);
|
|
66
73
|
}
|
|
67
|
-
assert(isFinite(value));
|
|
68
|
-
|
|
74
|
+
assert(Number.isFinite(value));
|
|
75
|
+
this.setValueFromSource(new Variant({ dataType: DataType.UInt32, value }));
|
|
69
76
|
}
|
|
70
77
|
|
|
71
78
|
public checkVariantCompatibility(value: Variant): StatusCode {
|
|
72
79
|
if (!this._validate_DataType(value.dataType)) {
|
|
73
80
|
return StatusCodes.BadTypeMismatch;
|
|
74
81
|
}
|
|
75
|
-
if (this.enumStrings) {
|
|
76
|
-
const arrayEnumStrings = this.enumStrings.readValue().value.value;
|
|
82
|
+
if (this.$7.enumStrings) {
|
|
83
|
+
const arrayEnumStrings = this.$7.enumStrings.readValue().value.value;
|
|
77
84
|
// MultiStateDiscreteType
|
|
78
85
|
assert(value.dataType === DataType.UInt32);
|
|
79
86
|
if (value.value >= arrayEnumStrings.length) {
|
|
@@ -87,11 +94,20 @@ export class UAMultiStateDiscreteImpl<T, DT extends DataType> extends UAVariable
|
|
|
87
94
|
/* empty */
|
|
88
95
|
}
|
|
89
96
|
|
|
90
|
-
public clone
|
|
97
|
+
public clone(
|
|
98
|
+
options1: CloneOptions,
|
|
99
|
+
optionalFilter?: CloneFilter,
|
|
100
|
+
extraInfo?: CloneExtraInfo
|
|
101
|
+
): UAMultiStateDiscreteImpl<T, DT> {
|
|
91
102
|
const variable1 = UAVariableImpl.prototype.clone.call(this, options1, optionalFilter, extraInfo);
|
|
92
103
|
return promoteToMultiStateDiscrete(variable1);
|
|
93
104
|
}
|
|
94
105
|
}
|
|
106
|
+
export type UAMultiStateDiscreteImpl<T, DT extends DataType> = UAMultiStateDiscreteImplBase<T, DT> & UAMultiStateDiscreteEx<T, DT>;
|
|
107
|
+
export const UAMultiStateDiscreteImpl = UAMultiStateDiscreteImplBase as unknown as new <
|
|
108
|
+
T,
|
|
109
|
+
DT extends DataType
|
|
110
|
+
>() => UAMultiStateDiscreteImpl<T, DT>;
|
|
95
111
|
|
|
96
112
|
export function promoteToMultiStateDiscrete<T, DT extends DataType>(node: UAVariable): UAMultiStateDiscreteImpl<T, DT> {
|
|
97
113
|
if (node instanceof UAMultiStateDiscreteImpl) {
|
|
@@ -116,8 +132,8 @@ export function _addMultiStateDiscrete<T, DT extends DataType>(
|
|
|
116
132
|
options: AddMultiStateDiscreteOptions
|
|
117
133
|
): UAMultiStateDiscreteImpl<T, DT> {
|
|
118
134
|
const addressSpace = namespace.addressSpace;
|
|
119
|
-
assert(Object.
|
|
120
|
-
assert(!Object.
|
|
135
|
+
assert(Object.hasOwn(options, "enumStrings"));
|
|
136
|
+
assert(!Object.hasOwn(options, "ValuePrecision"));
|
|
121
137
|
|
|
122
138
|
const multiStateDiscreteType = addressSpace.findVariableType("MultiStateDiscreteType");
|
|
123
139
|
if (!multiStateDiscreteType) {
|
|
@@ -153,7 +169,7 @@ export function _addMultiStateDiscrete<T, DT extends DataType>(
|
|
|
153
169
|
return coerceLocalizedText(value);
|
|
154
170
|
});
|
|
155
171
|
|
|
156
|
-
const
|
|
172
|
+
const _enumStringsNode = namespace.addVariable({
|
|
157
173
|
accessLevel: "CurrentRead", // | CurrentWrite",
|
|
158
174
|
browseName: { name: "EnumStrings", namespaceIndex: 0 },
|
|
159
175
|
dataType: "LocalizedText",
|
|
@@ -1,29 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type {
|
|
2
|
+
BindVariableOptions,
|
|
3
|
+
CloneExtraInfo,
|
|
4
|
+
CloneFilter,
|
|
5
|
+
CloneOptions,
|
|
6
|
+
INamespace,
|
|
7
|
+
UAVariable
|
|
8
|
+
} from "node-opcua-address-space-base";
|
|
4
9
|
import { assert } from "node-opcua-assert";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
import {
|
|
11
|
+
coerceInt32,
|
|
12
|
+
coerceInt64toInt32,
|
|
13
|
+
coerceUInt64,
|
|
14
|
+
coerceUInt64toInt32,
|
|
15
|
+
type Int32,
|
|
16
|
+
type Int64,
|
|
17
|
+
isValidInt64,
|
|
18
|
+
isValidUInt64,
|
|
19
|
+
type UInt64
|
|
20
|
+
} from "node-opcua-basic-types";
|
|
14
21
|
import { VariableTypeIds } from "node-opcua-constants";
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
import {
|
|
22
|
+
import { coerceLocalizedText } from "node-opcua-data-model";
|
|
23
|
+
import type { DataValue } from "node-opcua-data-value";
|
|
24
|
+
import type { DTEnumValue } from "node-opcua-nodeset-ua";
|
|
25
|
+
import { type StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
26
|
+
import { DataType, Variant, VariantArrayType } from "node-opcua-variant";
|
|
27
|
+
import type { AddMultiStateValueDiscreteOptions } from "../../source/address_space_ts";
|
|
18
28
|
import { coerceEnumValues } from "../../source/helpers/coerce_enum_value";
|
|
19
|
-
import { UAMultiStateValueDiscreteEx } from "../../source/interfaces/data_access/ua_multistate_value_discrete_ex";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
29
|
+
import type { UAMultiStateValueDiscreteEx } from "../../source/interfaces/data_access/ua_multistate_value_discrete_ex";
|
|
30
|
+
import type { ISetStateOptions } from "../../source/interfaces/i_set_state_options";
|
|
31
|
+
import { registerNodePromoter } from "../../source/loader/register_node_promoter";
|
|
32
|
+
import { _getBasicDataTypeFromDataTypeNodeId } from "../get_basic_datatype";
|
|
22
33
|
import { UAVariableImpl } from "../ua_variable_impl";
|
|
23
|
-
|
|
24
34
|
import { add_dataItem_stuff } from "./add_dataItem_stuff";
|
|
25
35
|
|
|
26
|
-
function convertToArray<T>(array:
|
|
36
|
+
function convertToArray<T>(array: ArrayLike<T> | T[]): T[] {
|
|
27
37
|
if (Array.isArray(array)) return array;
|
|
28
38
|
const result: T[] = [];
|
|
29
39
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -42,18 +52,19 @@ const getCoerceToInt32 = (dataType: DataType) => {
|
|
|
42
52
|
}
|
|
43
53
|
};
|
|
44
54
|
|
|
45
|
-
|
|
46
|
-
|
|
55
|
+
type Number = number | Int64 | UInt64;
|
|
56
|
+
|
|
57
|
+
function install_synchronization<T extends Number, DT extends DataType>(
|
|
58
|
+
_variable: UAVariableImpl & UAMultiStateValueDiscreteEx<T, DT>
|
|
47
59
|
) {
|
|
48
|
-
const _variable = variable as UAMultiStateValueDiscreteEx<T, DT>;
|
|
49
60
|
_variable.on("value_changed", (dataValue: DataValue) => {
|
|
50
|
-
const valueAsTextNode =
|
|
61
|
+
const valueAsTextNode = _variable.valueAsText || (_variable.getComponentByName("ValueAsText") as UAVariable);
|
|
51
62
|
if (!valueAsTextNode) {
|
|
52
63
|
return;
|
|
53
64
|
}
|
|
54
65
|
if (dataValue.value.arrayType === VariantArrayType.Array || dataValue.value.arrayType === VariantArrayType.Matrix) {
|
|
55
66
|
//
|
|
56
|
-
const
|
|
67
|
+
const _coerce = getCoerceToInt32(_variable.getBasicDataType());
|
|
57
68
|
|
|
58
69
|
const values: number[] = convertToArray<Int32>(dataValue.value.value).map((a) => coerceInt32(a));
|
|
59
70
|
const variantArray: Variant[] = values.map((a) => _variable.findValueAsText(a));
|
|
@@ -76,50 +87,38 @@ function install_synchronization<T extends number | Int64 | Int64, DT extends Da
|
|
|
76
87
|
_variable.emit("value_changed", dataValue);
|
|
77
88
|
}
|
|
78
89
|
|
|
79
|
-
export
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
readValue(
|
|
84
|
-
context?: ISessionContext | null,
|
|
85
|
-
indexRange?: NumericRange,
|
|
86
|
-
dataEncoding?: QualifiedNameLike | null
|
|
87
|
-
): DataValueT<T, DT>;
|
|
88
|
-
|
|
89
|
-
readValueAsync(context: ISessionContext | null, callback?: any): any;
|
|
90
|
-
}
|
|
91
|
-
export class UAMultiStateValueDiscreteImpl<T, DT extends DataType>
|
|
92
|
-
extends UAVariableImpl
|
|
93
|
-
implements UAMultiStateValueDiscreteEx<T, DT>
|
|
94
|
-
{
|
|
90
|
+
export class UAMultiStateValueDiscreteImplBase<T extends Number, DT extends DataType> extends UAVariableImpl {
|
|
91
|
+
private get $6(): UAMultiStateValueDiscreteEx<T, DT> {
|
|
92
|
+
return this as unknown as UAMultiStateValueDiscreteEx<T, DT>;
|
|
93
|
+
}
|
|
95
94
|
public setValue(value: string | number | Int64, options?: ISetStateOptions): void {
|
|
96
95
|
if (typeof value === "string") {
|
|
97
|
-
const enumValues = this.enumValues.readValue().value.value;
|
|
98
|
-
const selected = enumValues.filter((a
|
|
96
|
+
const enumValues = this.$6.enumValues.readValue().value.value;
|
|
97
|
+
const selected = enumValues.filter((a) => a.displayName.text === value)[0];
|
|
99
98
|
if (selected) {
|
|
100
99
|
this._setValue(selected.value);
|
|
101
100
|
} else {
|
|
102
|
-
throw new Error(
|
|
101
|
+
throw new Error(`cannot find enum string ${value} in ${enumValues.toString()}`);
|
|
103
102
|
}
|
|
104
103
|
} else {
|
|
105
104
|
this._setValue(coerceUInt64(value), options);
|
|
106
105
|
}
|
|
107
106
|
}
|
|
108
107
|
|
|
109
|
-
public getValueAsString():
|
|
110
|
-
const v = this.valueAsText.readValue().value.value;
|
|
108
|
+
public getValueAsString(): string | string[] {
|
|
109
|
+
const v = this.$6.valueAsText.readValue().value.value;
|
|
111
110
|
if (Array.isArray(v)) {
|
|
112
111
|
return v.map((a) => a.text);
|
|
113
112
|
}
|
|
114
113
|
return v.text || "";
|
|
115
114
|
}
|
|
116
115
|
|
|
117
|
-
public getValueAsNumber():
|
|
116
|
+
public getValueAsNumber(): number {
|
|
118
117
|
return this.readValue().value.value;
|
|
119
118
|
}
|
|
120
119
|
|
|
121
120
|
public checkVariantCompatibility(value: Variant): StatusCode {
|
|
122
|
-
if (this.enumValues) {
|
|
121
|
+
if (this.$6.enumValues) {
|
|
123
122
|
if (!this._isValueInRange(coerceInt32(value.value))) {
|
|
124
123
|
return StatusCodes.BadOutOfRange;
|
|
125
124
|
}
|
|
@@ -127,7 +126,11 @@ export class UAMultiStateValueDiscreteImpl<T, DT extends DataType>
|
|
|
127
126
|
return StatusCodes.Good;
|
|
128
127
|
}
|
|
129
128
|
|
|
130
|
-
public clone
|
|
129
|
+
public clone(
|
|
130
|
+
options1: CloneOptions,
|
|
131
|
+
optionalFilter?: CloneFilter,
|
|
132
|
+
extraInfo?: CloneExtraInfo
|
|
133
|
+
): UAMultiStateValueDiscreteImpl<T, DT> {
|
|
131
134
|
const variable1 = UAVariableImpl.prototype.clone.call(this, options1, optionalFilter, extraInfo);
|
|
132
135
|
return promoteToMultiStateValueDiscrete(variable1);
|
|
133
136
|
}
|
|
@@ -137,7 +140,7 @@ export class UAMultiStateValueDiscreteImpl<T, DT extends DataType>
|
|
|
137
140
|
*/
|
|
138
141
|
public _isValueInRange(value: number): boolean {
|
|
139
142
|
// MultiStateValueDiscreteType
|
|
140
|
-
const enumValues = this.enumValues.readValue().value.value as DTEnumValue[];
|
|
143
|
+
const enumValues = this.$6.enumValues.readValue().value.value as DTEnumValue[];
|
|
141
144
|
const e = enumValues.findIndex((x: DTEnumValue) => coerceInt64toInt32(x.value) === value);
|
|
142
145
|
return !(e === -1);
|
|
143
146
|
}
|
|
@@ -147,9 +150,9 @@ export class UAMultiStateValueDiscreteImpl<T, DT extends DataType>
|
|
|
147
150
|
*/
|
|
148
151
|
public _enumValueIndex(): Record<Int32, DTEnumValue> {
|
|
149
152
|
// construct an index to quickly find a EnumValue from a value
|
|
150
|
-
const enumValues: DTEnumValue[] = this.enumValues.readValue().value.value;
|
|
153
|
+
const enumValues: DTEnumValue[] = this.$6.enumValues.readValue().value.value;
|
|
151
154
|
const enumValueIndex: Record<Int32, DTEnumValue> = Object.create(null);
|
|
152
|
-
if (!enumValues
|
|
155
|
+
if (!enumValues?.forEach) {
|
|
153
156
|
return enumValueIndex;
|
|
154
157
|
}
|
|
155
158
|
enumValues.forEach((e: DTEnumValue) => {
|
|
@@ -163,11 +166,11 @@ export class UAMultiStateValueDiscreteImpl<T, DT extends DataType>
|
|
|
163
166
|
*
|
|
164
167
|
* @private
|
|
165
168
|
*/
|
|
166
|
-
public _setValue(value: Int64,
|
|
169
|
+
public _setValue(value: Int64, _options?: ISetStateOptions): void {
|
|
167
170
|
const int32Value = coerceInt64toInt32(value);
|
|
168
171
|
// check that value is in bound
|
|
169
172
|
if (!this._isValueInRange(int32Value)) {
|
|
170
|
-
throw new Error(
|
|
173
|
+
throw new Error(`UAMultiStateValueDiscrete#_setValue out of range ${value}`);
|
|
171
174
|
}
|
|
172
175
|
|
|
173
176
|
const dataType = this._getDataType();
|
|
@@ -205,7 +208,7 @@ export class UAMultiStateValueDiscreteImpl<T, DT extends DataType>
|
|
|
205
208
|
return DataType.UInt32;
|
|
206
209
|
}
|
|
207
210
|
const dataTypeStr = DataType[this.dataType.value as number] as string;
|
|
208
|
-
return
|
|
211
|
+
return DataType[dataTypeStr as keyof typeof DataType];
|
|
209
212
|
}
|
|
210
213
|
|
|
211
214
|
/**
|
|
@@ -220,11 +223,19 @@ export class UAMultiStateValueDiscreteImpl<T, DT extends DataType>
|
|
|
220
223
|
validateIsNumericDataType(this.dataType.value);
|
|
221
224
|
|
|
222
225
|
// find the enum value type
|
|
223
|
-
install_synchronization(this);
|
|
226
|
+
install_synchronization(this as unknown as UAVariableImpl & UAMultiStateValueDiscreteEx<T, DT>);
|
|
224
227
|
}
|
|
225
228
|
}
|
|
226
|
-
|
|
227
|
-
|
|
229
|
+
export type UAMultiStateValueDiscreteImpl<T extends Number, DT extends DataType> = UAMultiStateValueDiscreteImplBase<T, DT> &
|
|
230
|
+
UAMultiStateValueDiscreteEx<T, DT>;
|
|
231
|
+
export const UAMultiStateValueDiscreteImpl = UAMultiStateValueDiscreteImplBase as unknown as new <
|
|
232
|
+
T extends Number,
|
|
233
|
+
DT extends DataType
|
|
234
|
+
>() => UAMultiStateValueDiscreteImpl<T, DT>;
|
|
235
|
+
|
|
236
|
+
export function promoteToMultiStateValueDiscrete<T extends Number, DT extends DataType>(
|
|
237
|
+
node: UAVariable
|
|
238
|
+
): UAMultiStateValueDiscreteImpl<T, DT> {
|
|
228
239
|
if (node instanceof UAMultiStateValueDiscreteImpl) {
|
|
229
240
|
return node; // already promoted
|
|
230
241
|
}
|
|
@@ -240,8 +251,8 @@ export function _addMultiStateValueDiscrete<T, DT extends DataType>(
|
|
|
240
251
|
namespace: INamespace,
|
|
241
252
|
options: AddMultiStateValueDiscreteOptions
|
|
242
253
|
): UAMultiStateValueDiscreteEx<T, DT> {
|
|
243
|
-
assert(Object.
|
|
244
|
-
assert(!Object.
|
|
254
|
+
assert(Object.hasOwn(options, "enumValues"));
|
|
255
|
+
assert(!Object.hasOwn(options, "ValuePrecision"));
|
|
245
256
|
|
|
246
257
|
const addressSpace = namespace.addressSpace;
|
|
247
258
|
|
|
@@ -275,7 +286,7 @@ export function _addMultiStateValueDiscrete<T, DT extends DataType>(
|
|
|
275
286
|
value: options.value
|
|
276
287
|
});
|
|
277
288
|
} else {
|
|
278
|
-
value = options.value as
|
|
289
|
+
value = options.value as BindVariableOptions;
|
|
279
290
|
}
|
|
280
291
|
|
|
281
292
|
const cloned_options = {
|
|
@@ -344,13 +355,13 @@ const validBasicNumericDataTypes = [
|
|
|
344
355
|
DataType.Byte,
|
|
345
356
|
DataType.Byte,
|
|
346
357
|
DataType.SByte,
|
|
347
|
-
26
|
|
348
|
-
27
|
|
349
|
-
28
|
|
358
|
+
26 /* Number (abstract)*/,
|
|
359
|
+
27 /* Integer (abstract)*/,
|
|
360
|
+
28 /* UInteger (abstract)*/
|
|
350
361
|
];
|
|
351
|
-
export function validateIsNumericDataType(dataTypeValue:
|
|
362
|
+
export function validateIsNumericDataType(dataTypeValue: unknown): void {
|
|
352
363
|
if (typeof dataTypeValue !== "number" || validBasicNumericDataTypes.indexOf(dataTypeValue) < 0) {
|
|
353
|
-
throw new Error(`Invalid DataType in UAMultiStateValueDiscrete => ${dataTypeValue
|
|
364
|
+
throw new Error(`Invalid DataType in UAMultiStateValueDiscrete => ${dataTypeValue}`);
|
|
354
365
|
}
|
|
355
366
|
}
|
|
356
367
|
|
|
@@ -1,33 +1,26 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
BindVariableOptions,
|
|
3
|
+
CloneExtraInfo,
|
|
4
|
+
CloneFilter,
|
|
5
|
+
CloneOptions,
|
|
6
|
+
INamespace,
|
|
7
|
+
UAVariable
|
|
8
|
+
} from "node-opcua-address-space-base";
|
|
1
9
|
import assert from "node-opcua-assert";
|
|
2
|
-
import { coerceLocalizedText, LocalizedText, LocalizedTextLike, QualifiedNameLike } from "node-opcua-data-model";
|
|
3
|
-
import { DataType, Variant, VariantLike } from "node-opcua-variant";
|
|
4
10
|
import { VariableTypeIds } from "node-opcua-constants";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import {
|
|
11
|
+
import { coerceLocalizedText, type LocalizedText, type LocalizedTextLike } from "node-opcua-data-model";
|
|
12
|
+
import { DataType, Variant } from "node-opcua-variant";
|
|
13
|
+
import type { AddTwoStateDiscreteOptions } from "../../source/address_space_ts";
|
|
14
|
+
import type { UATwoStateDiscreteEx } from "../../source/interfaces/data_access/ua_two_state_discrete_ex";
|
|
15
|
+
import type { ISetStateOptions } from "../../source/interfaces/i_set_state_options";
|
|
10
16
|
import { registerNodePromoter } from "../../source/loader/register_node_promoter";
|
|
11
|
-
import {
|
|
12
|
-
import { UATwoStateDiscreteEx } from "../../source/interfaces/data_access/ua_two_state_discrete_ex";
|
|
13
|
-
import { ISetStateOptions } from "../../source/interfaces/i_set_state_options";
|
|
14
|
-
|
|
17
|
+
import { UAVariableImpl } from "../ua_variable_impl";
|
|
15
18
|
import { add_dataItem_stuff } from "./add_dataItem_stuff";
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
readValue(
|
|
23
|
-
context?: ISessionContext | null,
|
|
24
|
-
indexRange?: NumericRange,
|
|
25
|
-
dataEncoding?: QualifiedNameLike | null
|
|
26
|
-
): DataValueT<boolean, DataType.Boolean>;
|
|
27
|
-
|
|
28
|
-
readValueAsync(context: ISessionContext | null, callback?: any): any;
|
|
29
|
-
}
|
|
30
|
-
export class UATwoStateDiscreteImpl extends UAVariableImpl implements UATwoStateDiscreteEx {
|
|
20
|
+
export class UATwoStateDiscreteImplBase extends UAVariableImpl {
|
|
21
|
+
private get $5(): UATwoStateDiscreteEx {
|
|
22
|
+
return this as unknown as UATwoStateDiscreteEx;
|
|
23
|
+
}
|
|
31
24
|
/*
|
|
32
25
|
* @private
|
|
33
26
|
*/
|
|
@@ -40,9 +33,8 @@ export class UATwoStateDiscreteImpl extends UAVariableImpl implements UATwoState
|
|
|
40
33
|
const falseState = this.getPropertyByName("FalseState");
|
|
41
34
|
if (falseState) {
|
|
42
35
|
falseState.on("value_changed", handler);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
else {
|
|
36
|
+
} else {
|
|
37
|
+
/* c8 ignore next */
|
|
46
38
|
console.warn(
|
|
47
39
|
"warning: UATwoStateDiscrete -> a FalseState property is mandatory ",
|
|
48
40
|
this.browseName.toString(),
|
|
@@ -52,9 +44,8 @@ export class UATwoStateDiscreteImpl extends UAVariableImpl implements UATwoState
|
|
|
52
44
|
const trueState = this.getPropertyByName("TrueState");
|
|
53
45
|
if (trueState) {
|
|
54
46
|
trueState.on("value_changed", handler);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
else {
|
|
47
|
+
} else {
|
|
48
|
+
/* c8 ignore next */
|
|
58
49
|
console.warn(
|
|
59
50
|
"waring: UATwoStateDiscrete -> a TrueState property is mandatory",
|
|
60
51
|
this.browseName.toString(),
|
|
@@ -72,7 +63,7 @@ export class UATwoStateDiscreteImpl extends UAVariableImpl implements UATwoState
|
|
|
72
63
|
} else if (text === this.getFalseStateAsString()) {
|
|
73
64
|
this.setValue(false, options);
|
|
74
65
|
} else {
|
|
75
|
-
throw new Error(
|
|
66
|
+
throw new Error(`setValue invalid value ${value}`);
|
|
76
67
|
}
|
|
77
68
|
}
|
|
78
69
|
}
|
|
@@ -87,18 +78,20 @@ export class UATwoStateDiscreteImpl extends UAVariableImpl implements UATwoState
|
|
|
87
78
|
}
|
|
88
79
|
}
|
|
89
80
|
getTrueStateAsString(): string {
|
|
90
|
-
return (this.trueState.readValue().value.value as LocalizedText).text || "";
|
|
81
|
+
return (this.$5.trueState.readValue().value.value as LocalizedText).text || "";
|
|
91
82
|
}
|
|
92
83
|
getFalseStateAsString(): string {
|
|
93
|
-
return (this.falseState.readValue().value.value as LocalizedText).text || "";
|
|
84
|
+
return (this.$5.falseState.readValue().value.value as LocalizedText).text || "";
|
|
94
85
|
}
|
|
95
86
|
|
|
96
|
-
public clone(options1:
|
|
87
|
+
public clone(options1: CloneOptions, optionalFilter?: CloneFilter, extraInfo?: CloneExtraInfo): UAVariable {
|
|
97
88
|
const variable1 = UAVariableImpl.prototype.clone.call(this, options1, optionalFilter, extraInfo);
|
|
98
89
|
promoteToTwoStateDiscrete(variable1);
|
|
99
90
|
return variable1;
|
|
100
91
|
}
|
|
101
92
|
}
|
|
93
|
+
export type UATwoStateDiscreteImpl = UATwoStateDiscreteImplBase & UATwoStateDiscreteEx;
|
|
94
|
+
export const UATwoStateDiscreteImpl = UATwoStateDiscreteImplBase as unknown as new () => UATwoStateDiscreteImpl;
|
|
102
95
|
|
|
103
96
|
export function promoteToTwoStateDiscrete(node: UAVariable): UATwoStateDiscreteEx {
|
|
104
97
|
if (node instanceof UATwoStateDiscreteImpl) {
|
|
@@ -115,7 +108,7 @@ registerNodePromoter(VariableTypeIds.TwoStateDiscreteType, promoteToTwoStateDisc
|
|
|
115
108
|
export function _addTwoStateDiscrete(namespace: INamespace, options: AddTwoStateDiscreteOptions): UATwoStateDiscreteEx {
|
|
116
109
|
const addressSpace = namespace.addressSpace;
|
|
117
110
|
|
|
118
|
-
assert(!Object.
|
|
111
|
+
assert(!Object.hasOwn(options, "ValuePrecision"));
|
|
119
112
|
|
|
120
113
|
const twoStateDiscreteType = addressSpace.findVariableType("TwoStateDiscreteType");
|
|
121
114
|
if (!twoStateDiscreteType) {
|