node-opcua-address-space 2.180.0 → 2.181.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/api/address_space_public.ts +63 -0
- package/api/address_space_ts.ts +129 -0
- package/api/continuation_points/continuation_point_manager.ts +271 -0
- package/api/helpers/argument_list.ts +310 -0
- package/api/helpers/call_helpers.ts +100 -0
- package/api/helpers/coerce_enum_value.ts +33 -0
- package/api/helpers/dump_tools.ts +90 -0
- package/api/helpers/ensure_secure_access.ts +78 -0
- package/api/helpers/multiform_func.ts +78 -0
- package/api/helpers/resolve_opaque_on_address_space.ts +26 -0
- package/api/index.ts +210 -0
- package/api/interfaces/alarms_and_conditions/condition_info_i.ts +60 -0
- package/api/interfaces/alarms_and_conditions/condition_snapshot.ts +236 -0
- package/api/interfaces/alarms_and_conditions/deviation_stuff.ts +16 -0
- package/api/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +8 -0
- package/api/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +6 -0
- package/api/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +6 -0
- package/api/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +13 -0
- package/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +6 -0
- package/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +6 -0
- package/api/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +21 -0
- package/api/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +28 -0
- package/api/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +72 -0
- package/api/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +36 -0
- package/api/interfaces/alarms_and_conditions/ua_condition_ex.ts +55 -0
- package/api/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +17 -0
- package/api/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +21 -0
- package/api/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +21 -0
- package/api/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +26 -0
- package/api/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +29 -0
- package/api/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +25 -0
- package/api/interfaces/data_access/ua_multistate_discrete_ex.ts +57 -0
- package/api/interfaces/data_access/ua_multistate_value_discrete_ex.ts +31 -0
- package/api/interfaces/data_access/ua_two_state_discrete_ex.ts +15 -0
- package/api/interfaces/nodeset_loader_options.ts +58 -0
- package/api/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +20 -0
- package/api/interfaces/state_machine/ua_finite_state_machine_type.ts +50 -0
- package/api/interfaces/state_machine/ua_program_state_machine_type.ts +14 -0
- package/api/interfaces/state_machine/ua_shelved_state_machine_ex.ts +35 -0
- package/api/interfaces/state_machine/ua_state_machine_type.ts +288 -0
- package/api/loader/decode_xml_extension_object.ts +80 -0
- package/api/loader/ensure_datatype_extracted.ts +122 -0
- package/api/loader/generateAddressSpaceRaw.ts +470 -0
- package/api/loader/load_nodeset2.ts +278 -0
- package/api/loader/make_xml_extension_object_parser.ts +518 -0
- package/api/loader/namespace_post_step.ts +68 -0
- package/api/loader/nodeset_image.ts +451 -0
- package/api/loader/nodeset_image_codec.ts +576 -0
- package/api/loader/nodeset_image_store.ts +78 -0
- package/api/loader/nodeset_record.ts +141 -0
- package/api/loader/nodeset_record_applier.ts +889 -0
- package/api/loader/nodeset_source.ts +367 -0
- package/api/loader/nodeset_source_helpers.ts +50 -0
- package/api/loader/nodeset_to_image.ts +29 -0
- package/api/loader/nodeset_xml_producer.ts +383 -0
- package/api/loader/parsers/extension_object_parser.ts +374 -0
- package/api/loader/parsers/variant_parser.ts +363 -0
- package/api/loader/register_node_promoter.ts +6 -0
- package/api/namespace.ts +25 -0
- package/api/namespace_alarm_and_condition.ts +78 -0
- package/api/namespace_data_access.ts +92 -0
- package/api/namespace_machine_state.ts +20 -0
- package/api/pseudo_session.ts +415 -0
- package/api/session_context.ts +729 -0
- package/api/ua_interface.ts +38 -0
- package/api/ua_two_state_variable_ex.ts +36 -0
- package/bin/opcua-nodeset-image.js +192 -0
- package/dist/api/address_space_public.d.ts +57 -0
- package/dist/api/address_space_public.js +19 -0
- package/dist/api/address_space_public.js.map +1 -0
- package/dist/api/address_space_ts.d.ts +79 -0
- package/dist/api/address_space_ts.js +13 -0
- package/dist/api/address_space_ts.js.map +1 -0
- package/dist/api/continuation_points/continuation_point_manager.js +230 -0
- package/dist/api/continuation_points/continuation_point_manager.js.map +1 -0
- package/dist/api/helpers/adjust_browse_direction.js.map +1 -0
- package/dist/api/helpers/argument_list.js +263 -0
- package/dist/api/helpers/argument_list.js.map +1 -0
- package/dist/api/helpers/call_helpers.js +80 -0
- package/dist/api/helpers/call_helpers.js.map +1 -0
- package/dist/api/helpers/coerce_enum_value.d.ts +6 -0
- package/dist/api/helpers/coerce_enum_value.js.map +1 -0
- package/dist/api/helpers/dump_tools.js +81 -0
- package/dist/api/helpers/dump_tools.js.map +1 -0
- package/dist/api/helpers/ensure_secure_access.d.ts +19 -0
- package/dist/api/helpers/ensure_secure_access.js +67 -0
- package/dist/api/helpers/ensure_secure_access.js.map +1 -0
- package/dist/api/helpers/make_optionals_map.js.map +1 -0
- package/dist/api/helpers/multiform_func.js +75 -0
- package/dist/api/helpers/multiform_func.js.map +1 -0
- package/dist/api/helpers/resolve_opaque_on_address_space.js +25 -0
- package/dist/api/helpers/resolve_opaque_on_address_space.js.map +1 -0
- package/dist/api/index.d.ts +113 -0
- package/dist/api/index.js +234 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/condition_info_i.d.ts +54 -0
- package/dist/api/interfaces/alarms_and_conditions/condition_info_i.js +28 -0
- package/dist/api/interfaces/alarms_and_conditions/condition_info_i.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/condition_snapshot.d.ts +151 -0
- package/dist/api/interfaces/alarms_and_conditions/condition_snapshot.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/deviation_stuff.d.ts +12 -0
- package/dist/api/interfaces/alarms_and_conditions/deviation_stuff.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/install_setpoint_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +7 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_condition_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +4 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +4 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +10 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +4 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +4 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +20 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +21 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +56 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_base_event_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +19 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +44 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_condition_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +4 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +5 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +19 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +25 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +8 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +10 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js.map +1 -0
- package/dist/api/interfaces/data_access/ua_multistate_discrete_ex.d.ts +44 -0
- package/dist/api/interfaces/data_access/ua_multistate_discrete_ex.js.map +1 -0
- package/dist/api/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +22 -0
- package/dist/api/interfaces/data_access/ua_multistate_value_discrete_ex.js.map +1 -0
- package/dist/api/interfaces/data_access/ua_two_state_discrete_ex.d.ts +13 -0
- package/dist/api/interfaces/data_access/ua_two_state_discrete_ex.js.map +1 -0
- package/dist/api/interfaces/data_access/ua_y_array_item_ex.js.map +1 -0
- package/dist/api/interfaces/extension_object_constructor.js.map +1 -0
- package/dist/api/interfaces/i_condition_variable_type_setter_options.js.map +1 -0
- package/dist/api/interfaces/i_set_state_options.js.map +1 -0
- package/dist/api/interfaces/nodeset_loader_options.d.ts +56 -0
- package/dist/api/interfaces/nodeset_loader_options.js.map +1 -0
- package/dist/api/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +12 -0
- package/dist/api/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js.map +1 -0
- package/dist/api/interfaces/state_machine/ua_finite_state_machine_type.d.ts +49 -0
- package/dist/api/interfaces/state_machine/ua_finite_state_machine_type.js.map +1 -0
- package/dist/api/interfaces/state_machine/ua_program_state_machine_type.d.ts +11 -0
- package/dist/api/interfaces/state_machine/ua_program_state_machine_type.js.map +1 -0
- package/dist/api/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +29 -0
- package/dist/api/interfaces/state_machine/ua_shelved_state_machine_ex.js.map +1 -0
- package/dist/api/interfaces/state_machine/ua_state_machine_type.d.ts +236 -0
- package/dist/api/interfaces/state_machine/ua_state_machine_type.js.map +1 -0
- package/dist/api/interfaces/state_machine/ua_transition_ex.js.map +1 -0
- package/dist/api/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -0
- package/dist/api/loader/decode_xml_extension_object.d.ts +6 -0
- package/dist/api/loader/decode_xml_extension_object.js +69 -0
- package/dist/api/loader/decode_xml_extension_object.js.map +1 -0
- package/dist/api/loader/ensure_datatype_extracted.js +88 -0
- package/dist/api/loader/ensure_datatype_extracted.js.map +1 -0
- package/dist/api/loader/generateAddressSpaceRaw.d.ts +64 -0
- package/dist/api/loader/generateAddressSpaceRaw.js +379 -0
- package/dist/api/loader/generateAddressSpaceRaw.js.map +1 -0
- package/dist/api/loader/load_nodeset2.d.ts +38 -0
- package/dist/api/loader/load_nodeset2.js +245 -0
- package/dist/api/loader/load_nodeset2.js.map +1 -0
- package/dist/api/loader/make_semver_compatible.js.map +1 -0
- package/dist/api/loader/make_xml_extension_object_parser.js +417 -0
- package/dist/api/loader/make_xml_extension_object_parser.js.map +1 -0
- package/dist/api/loader/namespace_post_step.js +57 -0
- package/dist/api/loader/namespace_post_step.js.map +1 -0
- package/dist/api/loader/nodeset_image.d.ts +94 -0
- package/dist/api/loader/nodeset_image.js +406 -0
- package/dist/api/loader/nodeset_image.js.map +1 -0
- package/dist/api/loader/nodeset_image_codec.d.ts +104 -0
- package/dist/api/loader/nodeset_image_codec.js +489 -0
- package/dist/api/loader/nodeset_image_codec.js.map +1 -0
- package/dist/api/loader/nodeset_image_store.d.ts +27 -0
- package/dist/api/loader/nodeset_image_store.js +72 -0
- package/dist/api/loader/nodeset_image_store.js.map +1 -0
- package/dist/api/loader/nodeset_record.d.ts +125 -0
- package/dist/api/loader/nodeset_record.js +26 -0
- package/dist/api/loader/nodeset_record.js.map +1 -0
- package/dist/api/loader/nodeset_record_applier.d.ts +106 -0
- package/dist/api/loader/nodeset_record_applier.js +731 -0
- package/dist/api/loader/nodeset_record_applier.js.map +1 -0
- package/dist/api/loader/nodeset_source.d.ts +124 -0
- package/dist/api/loader/nodeset_source.js +307 -0
- package/dist/api/loader/nodeset_source.js.map +1 -0
- package/dist/api/loader/nodeset_source_helpers.d.ts +27 -0
- package/dist/api/loader/nodeset_source_helpers.js +30 -0
- package/dist/api/loader/nodeset_source_helpers.js.map +1 -0
- package/dist/api/loader/nodeset_to_image.d.ts +13 -0
- package/dist/api/loader/nodeset_to_image.js +30 -0
- package/dist/api/loader/nodeset_to_image.js.map +1 -0
- package/dist/api/loader/nodeset_xml_producer.d.ts +16 -0
- package/dist/api/loader/nodeset_xml_producer.js +349 -0
- package/dist/api/loader/nodeset_xml_producer.js.map +1 -0
- package/dist/api/loader/parsers/extension_object_parser.js +274 -0
- package/dist/api/loader/parsers/extension_object_parser.js.map +1 -0
- package/dist/api/loader/parsers/localized_text_parser.js.map +1 -0
- package/dist/api/loader/parsers/nodeid_parser.js.map +1 -0
- package/dist/api/loader/parsers/qualified_name_parser.js.map +1 -0
- package/dist/api/loader/parsers/variant_parser.d.ts +42 -0
- package/dist/api/loader/parsers/variant_parser.js +294 -0
- package/dist/api/loader/parsers/variant_parser.js.map +1 -0
- package/dist/api/loader/register_node_promoter.d.ts +2 -0
- package/dist/api/loader/register_node_promoter.js +9 -0
- package/dist/api/loader/register_node_promoter.js.map +1 -0
- package/dist/api/namespace.d.ts +18 -0
- package/dist/api/namespace.js.map +1 -0
- package/dist/api/namespace_alarm_and_condition.d.ts +33 -0
- package/dist/api/namespace_alarm_and_condition.js.map +1 -0
- package/dist/api/namespace_data_access.d.ts +67 -0
- package/dist/api/namespace_data_access.js.map +1 -0
- package/dist/api/namespace_machine_state.d.ts +8 -0
- package/dist/api/namespace_machine_state.js.map +1 -0
- package/dist/api/pseudo_session.d.ts +74 -0
- package/dist/api/pseudo_session.js +308 -0
- package/dist/api/pseudo_session.js.map +1 -0
- package/dist/api/session_context.d.ts +242 -0
- package/dist/api/session_context.js.map +1 -0
- package/dist/api/set_namespace_meta_data.js.map +1 -0
- package/dist/api/ua_addin.js.map +1 -0
- package/dist/api/ua_interface.js +25 -0
- package/dist/api/ua_interface.js.map +1 -0
- package/dist/api/ua_root_folder.js.map +1 -0
- package/dist/api/ua_two_state_variable_ex.d.ts +24 -0
- package/dist/api/ua_two_state_variable_ex.js.map +1 -0
- package/dist/api/xml_writer.js.map +1 -0
- package/dist/impl/_instantiate_helpers.js +99 -0
- package/dist/impl/_instantiate_helpers.js.map +1 -0
- package/dist/impl/_mandatory_child_or_requested_optional_filter.js +82 -0
- package/dist/impl/_mandatory_child_or_requested_optional_filter.js.map +1 -0
- package/dist/impl/address_space.d.ts +379 -0
- package/dist/impl/address_space.js +1383 -0
- package/dist/impl/address_space.js.map +1 -0
- package/dist/impl/address_space_change_event_tools.d.ts +6 -0
- package/dist/impl/address_space_change_event_tools.js.map +1 -0
- package/dist/impl/address_space_private.d.ts +48 -0
- package/dist/impl/address_space_private.js.map +1 -0
- package/dist/impl/alarms_and_conditions/condition.js.map +1 -0
- package/dist/impl/alarms_and_conditions/condition_info_impl.d.ts +19 -0
- package/dist/impl/alarms_and_conditions/condition_info_impl.js +39 -0
- package/dist/impl/alarms_and_conditions/condition_info_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/condition_snapshot_impl.d.ts +271 -0
- package/dist/impl/alarms_and_conditions/condition_snapshot_impl.js +700 -0
- package/dist/impl/alarms_and_conditions/condition_snapshot_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/deviation_alarm_helper.d.ts +12 -0
- package/dist/impl/alarms_and_conditions/deviation_alarm_helper.js +66 -0
- package/dist/impl/alarms_and_conditions/deviation_alarm_helper.js.map +1 -0
- package/dist/impl/alarms_and_conditions/index.d.ts +16 -0
- package/dist/impl/alarms_and_conditions/index.js +33 -0
- package/dist/impl/alarms_and_conditions/index.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +54 -0
- package/dist/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +244 -0
- package/dist/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_alarm_condition_impl.d.ts +105 -0
- package/dist/impl/alarms_and_conditions/ua_alarm_condition_impl.js +428 -0
- package/dist/impl/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_base_event_impl.d.ts +36 -0
- package/dist/impl/alarms_and_conditions/ua_base_event_impl.js +32 -0
- package/dist/impl/alarms_and_conditions/ua_base_event_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +47 -0
- package/dist/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +204 -0
- package/dist/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_condition_impl.d.ts +152 -0
- package/dist/impl/alarms_and_conditions/ua_condition_impl.js +1016 -0
- package/dist/impl/alarms_and_conditions/ua_condition_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +22 -0
- package/dist/impl/alarms_and_conditions/ua_discrete_alarm_impl.js +41 -0
- package/dist/impl/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +30 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +54 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +12 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +13 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +28 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +86 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +10 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js +8 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_limit_alarm_impl.d.ts +49 -0
- package/dist/impl/alarms_and_conditions/ua_limit_alarm_impl.js +207 -0
- package/dist/impl/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +28 -0
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +54 -0
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +38 -0
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +172 -0
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +44 -0
- package/dist/impl/alarms_and_conditions/ua_off_normal_alarm_impl.js +164 -0
- package/dist/impl/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +18 -0
- package/dist/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +18 -0
- package/dist/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -0
- package/dist/impl/apply_condition_refresh.d.ts +4 -0
- package/dist/impl/apply_condition_refresh.js +29 -0
- package/dist/impl/apply_condition_refresh.js.map +1 -0
- package/dist/impl/base_node_impl.d.ts +347 -0
- package/dist/impl/base_node_impl.js +1768 -0
- package/dist/impl/base_node_impl.js.map +1 -0
- package/dist/impl/base_node_private.d.ts +138 -0
- package/dist/impl/base_node_private.js +1028 -0
- package/dist/impl/base_node_private.js.map +1 -0
- package/dist/impl/check_value_rank_compatibility.js.map +1 -0
- package/dist/impl/child_accessors.d.ts +43 -0
- package/dist/impl/child_accessors.js +222 -0
- package/dist/impl/child_accessors.js.map +1 -0
- package/dist/impl/data_access/add_dataItem_stuff.js.map +1 -0
- package/dist/impl/data_access/adjust_datavalue_status_code.d.ts +7 -0
- package/dist/impl/data_access/adjust_datavalue_status_code.js.map +1 -0
- package/dist/impl/data_access/ua_multistate_discrete_impl.d.ts +38 -0
- package/dist/impl/data_access/ua_multistate_discrete_impl.js +143 -0
- package/dist/impl/data_access/ua_multistate_discrete_impl.js.map +1 -0
- package/dist/impl/data_access/ua_multistate_value_discrete_impl.d.ts +61 -0
- package/dist/impl/data_access/ua_multistate_value_discrete_impl.js +303 -0
- package/dist/impl/data_access/ua_multistate_value_discrete_impl.js.map +1 -0
- package/dist/impl/data_access/ua_two_state_discrete_impl.d.ts +30 -0
- package/dist/impl/data_access/ua_two_state_discrete_impl.js +164 -0
- package/dist/impl/data_access/ua_two_state_discrete_impl.js.map +1 -0
- package/dist/impl/event_data.d.ts +27 -0
- package/dist/impl/event_data.js +73 -0
- package/dist/impl/event_data.js.map +1 -0
- package/dist/impl/event_layout.d.ts +40 -0
- package/dist/impl/event_layout.js +103 -0
- package/dist/impl/event_layout.js.map +1 -0
- package/dist/impl/extension_object_array_node.d.ts +41 -0
- package/dist/impl/extension_object_array_node.js +274 -0
- package/dist/impl/extension_object_array_node.js.map +1 -0
- package/dist/impl/get_basic_datatype.js.map +1 -0
- package/dist/impl/handle_hierarchy_parent.d.ts +33 -0
- package/dist/impl/handle_hierarchy_parent.js +103 -0
- package/dist/impl/handle_hierarchy_parent.js.map +1 -0
- package/dist/impl/historical_access/address_space_historical_data_node.d.ts +21 -0
- package/dist/impl/historical_access/address_space_historical_data_node.js +658 -0
- package/dist/impl/historical_access/address_space_historical_data_node.js.map +1 -0
- package/dist/impl/historizer_factory.d.ts +18 -0
- package/dist/impl/historizer_factory.js +16 -0
- package/dist/impl/historizer_factory.js.map +1 -0
- package/dist/impl/idx_iterator.js.map +1 -0
- package/dist/impl/namespace_impl.d.ts +469 -0
- package/dist/impl/namespace_impl.js +1845 -0
- package/dist/impl/namespace_impl.js.map +1 -0
- package/dist/impl/namespace_private.d.ts +25 -0
- package/dist/impl/namespace_private.js.map +1 -0
- package/dist/impl/nodeid_manager.js +249 -0
- package/dist/impl/nodeid_manager.js.map +1 -0
- package/dist/impl/nodeset_tools/adjust_namespace_array.js.map +1 -0
- package/dist/impl/nodeset_tools/construct_namespace_dependency.d.ts +37 -0
- package/dist/impl/nodeset_tools/construct_namespace_dependency.js +352 -0
- package/dist/impl/nodeset_tools/construct_namespace_dependency.js.map +1 -0
- package/dist/impl/nodeset_tools/dump_to_bsd.d.ts +10 -0
- package/dist/impl/nodeset_tools/dump_to_bsd.js +176 -0
- package/dist/impl/nodeset_tools/dump_to_bsd.js.map +1 -0
- package/dist/impl/nodeset_tools/nodeset_to_records.d.ts +67 -0
- package/dist/impl/nodeset_tools/nodeset_to_records.js +773 -0
- package/dist/impl/nodeset_tools/nodeset_to_records.js.map +1 -0
- package/dist/impl/nodeset_tools/nodeset_to_xml.d.ts +28 -0
- package/dist/impl/nodeset_tools/nodeset_to_xml.js +1132 -0
- package/dist/impl/nodeset_tools/nodeset_to_xml.js.map +1 -0
- package/dist/impl/private_namespace.d.ts +5 -0
- package/dist/impl/private_namespace.js.map +1 -0
- package/dist/impl/reference_impl.d.ts +82 -0
- package/dist/impl/reference_impl.js +207 -0
- package/dist/impl/reference_impl.js.map +1 -0
- package/dist/impl/reference_type_version.d.ts +22 -0
- package/dist/impl/reference_type_version.js +22 -0
- package/dist/impl/reference_type_version.js.map +1 -0
- package/dist/impl/role_permissions.js.map +1 -0
- package/dist/impl/state_machine/finite_state_machine.d.ts +81 -0
- package/dist/impl/state_machine/finite_state_machine.js +573 -0
- package/dist/impl/state_machine/finite_state_machine.js.map +1 -0
- package/dist/impl/state_machine/ua_shelving_state_machine_ex.d.ts +64 -0
- package/dist/impl/state_machine/ua_shelving_state_machine_ex.js +249 -0
- package/dist/impl/state_machine/ua_shelving_state_machine_ex.js.map +1 -0
- package/dist/impl/state_machine/ua_two_state_variable.d.ts +55 -0
- package/dist/impl/state_machine/ua_two_state_variable.js +323 -0
- package/dist/impl/state_machine/ua_two_state_variable.js.map +1 -0
- package/dist/impl/tool_isSubtypeOf.d.ts +18 -0
- package/dist/impl/tool_isSubtypeOf.js +138 -0
- package/dist/impl/tool_isSubtypeOf.js.map +1 -0
- package/dist/impl/ua_condition_type.js.map +1 -0
- package/dist/impl/ua_data_type_impl.d.ts +87 -0
- package/dist/impl/ua_data_type_impl.js +391 -0
- package/dist/impl/ua_data_type_impl.js.map +1 -0
- package/dist/impl/ua_method_impl.d.ts +48 -0
- package/dist/impl/ua_method_impl.js +281 -0
- package/dist/impl/ua_method_impl.js.map +1 -0
- package/dist/impl/ua_object_impl.d.ts +38 -0
- package/dist/impl/ua_object_impl.js +214 -0
- package/dist/impl/ua_object_impl.js.map +1 -0
- package/dist/impl/ua_object_type_impl.d.ts +55 -0
- package/dist/impl/ua_object_type_impl.js +131 -0
- package/dist/impl/ua_object_type_impl.js.map +1 -0
- package/dist/impl/ua_reference_type_impl.d.ts +42 -0
- package/dist/impl/ua_reference_type_impl.js +157 -0
- package/dist/impl/ua_reference_type_impl.js.map +1 -0
- package/dist/impl/ua_variable_impl.d.ts +391 -0
- package/dist/impl/ua_variable_impl.js +2001 -0
- package/dist/impl/ua_variable_impl.js.map +1 -0
- package/dist/impl/ua_variable_impl_ext_obj.d.ts +23 -0
- package/dist/impl/ua_variable_impl_ext_obj.js +753 -0
- package/dist/impl/ua_variable_impl_ext_obj.js.map +1 -0
- package/dist/impl/ua_variable_type_impl.d.ts +79 -0
- package/dist/impl/ua_variable_type_impl.js +279 -0
- package/dist/impl/ua_variable_type_impl.js.map +1 -0
- package/dist/impl/ua_view_impl.d.ts +18 -0
- package/dist/impl/ua_view_impl.js +45 -0
- package/dist/impl/ua_view_impl.js.map +1 -0
- package/dist/impl/validate_data_type_correctness.d.ts +6 -0
- package/dist/impl/validate_data_type_correctness.js +123 -0
- package/dist/impl/validate_data_type_correctness.js.map +1 -0
- package/dist/tsconfig_base.tsbuildinfo +1 -1
- package/distHelpers/address_space_digest.d.ts +4 -0
- package/distHelpers/address_space_digest.js +9 -0
- package/distHelpers/address_space_digest.js.map +1 -0
- package/distHelpers/alarms_and_conditions_demo.d.ts +1 -1
- package/distHelpers/assertHasMatchingReference.d.ts +1 -1
- package/distHelpers/boiler_system.d.ts +1 -1
- package/distHelpers/boiler_system.js +3 -3
- package/distHelpers/boiler_system.js.map +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.d.ts +1 -1
- package/distHelpers/get_address_space_fixture.js +38 -22
- package/distHelpers/get_address_space_fixture.js.map +1 -1
- package/distHelpers/get_mini_address_space.d.ts +1 -1
- package/distHelpers/get_mini_address_space.js +7 -7
- package/distHelpers/get_mini_address_space.js.map +1 -1
- package/distHelpers/index.d.ts +9 -9
- package/distHelpers/index.js +9 -9
- package/distHelpers/index.js.map +1 -1
- package/distHelpers/mock_session.d.ts +1 -1
- package/distHelpers/mock_session.js +2 -2
- package/distHelpers/mock_session.js.map +1 -1
- package/distNodeJS/address_space_digest.d.ts +13 -0
- package/distNodeJS/address_space_digest.js +31 -0
- package/distNodeJS/address_space_digest.js.map +1 -0
- package/distNodeJS/generate_address_space.d.ts +35 -2
- package/distNodeJS/generate_address_space.js +201 -7
- package/distNodeJS/generate_address_space.js.map +1 -1
- package/distNodeJS/index.d.ts +3 -1
- package/distNodeJS/index.js +3 -1
- package/distNodeJS/index.js.map +1 -1
- package/distNodeJS/nodeset_image_file_store.d.ts +29 -0
- package/distNodeJS/nodeset_image_file_store.js +120 -0
- package/distNodeJS/nodeset_image_file_store.js.map +1 -0
- package/impl/_instantiate_helpers.ts +197 -0
- package/impl/_mandatory_child_or_requested_optional_filter.ts +100 -0
- package/impl/address_space.ts +1572 -0
- package/impl/address_space_change_event_tools.ts +177 -0
- package/impl/address_space_private.ts +100 -0
- package/impl/alarms_and_conditions/condition_info_impl.ts +45 -0
- package/impl/alarms_and_conditions/condition_snapshot_impl.ts +793 -0
- package/impl/alarms_and_conditions/deviation_alarm_helper.ts +73 -0
- package/impl/alarms_and_conditions/index.ts +16 -0
- package/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +351 -0
- package/impl/alarms_and_conditions/ua_alarm_condition_impl.ts +515 -0
- package/impl/alarms_and_conditions/ua_base_event_impl.ts +61 -0
- package/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +246 -0
- package/impl/alarms_and_conditions/ua_condition_impl.ts +1286 -0
- package/impl/alarms_and_conditions/ua_discrete_alarm_impl.ts +60 -0
- package/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +95 -0
- package/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +21 -0
- package/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +112 -0
- package/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +25 -0
- package/impl/alarms_and_conditions/ua_limit_alarm_impl.ts +265 -0
- package/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +94 -0
- package/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +232 -0
- package/impl/alarms_and_conditions/ua_off_normal_alarm_impl.ts +216 -0
- package/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +26 -0
- package/impl/apply_condition_refresh.ts +56 -0
- package/impl/base_node_impl.ts +2165 -0
- package/impl/base_node_private.ts +1420 -0
- package/impl/child_accessors.ts +239 -0
- package/impl/data_access/adjust_datavalue_status_code.ts +36 -0
- package/impl/data_access/ua_multistate_discrete_impl.ts +198 -0
- package/impl/data_access/ua_multistate_value_discrete_impl.ts +384 -0
- package/impl/data_access/ua_two_state_discrete_impl.ts +195 -0
- package/impl/event_data.ts +80 -0
- package/impl/event_layout.ts +141 -0
- package/impl/extension_object_array_node.ts +343 -0
- package/impl/handle_hierarchy_parent.ts +133 -0
- package/impl/historical_access/address_space_historical_data_node.ts +849 -0
- package/impl/historizer_factory.ts +17 -0
- package/impl/namespace_impl.ts +2323 -0
- package/impl/namespace_private.ts +68 -0
- package/impl/nodeid_manager.ts +293 -0
- package/impl/nodeset_tools/construct_namespace_dependency.ts +381 -0
- package/impl/nodeset_tools/dump_to_bsd.ts +210 -0
- package/impl/nodeset_tools/nodeset_to_records.ts +846 -0
- package/impl/nodeset_tools/nodeset_to_xml.ts +1326 -0
- package/impl/private_namespace.ts +21 -0
- package/impl/reference_impl.ts +244 -0
- package/impl/reference_type_version.ts +19 -0
- package/impl/state_machine/finite_state_machine.ts +676 -0
- package/impl/state_machine/ua_shelving_state_machine_ex.ts +356 -0
- package/impl/state_machine/ua_two_state_variable.ts +421 -0
- package/impl/tool_isSubtypeOf.ts +168 -0
- package/impl/ua_data_type_impl.ts +486 -0
- package/impl/ua_method_impl.ts +364 -0
- package/impl/ua_object_impl.ts +278 -0
- package/impl/ua_object_type_impl.ts +179 -0
- package/impl/ua_reference_type_impl.ts +179 -0
- package/impl/ua_variable_impl.ts +2559 -0
- package/impl/ua_variable_impl_ext_obj.ts +904 -0
- package/impl/ua_variable_type_impl.ts +390 -0
- package/impl/ua_view_impl.ts +53 -0
- package/impl/validate_data_type_correctness.ts +142 -0
- package/package.json +49 -44
- package/source_nodejs/address_space_digest.ts +35 -0
- package/source_nodejs/generate_address_space.ts +181 -8
- package/source_nodejs/index.ts +3 -1
- package/source_nodejs/nodeset_image_file_store.ts +127 -0
- package/dist/source/address_space_ts.d.ts +0 -128
- package/dist/source/address_space_ts.js +0 -23
- package/dist/source/address_space_ts.js.map +0 -1
- package/dist/source/continuation_points/continuation_point_manager.js +0 -230
- package/dist/source/continuation_points/continuation_point_manager.js.map +0 -1
- package/dist/source/helpers/adjust_browse_direction.js.map +0 -1
- package/dist/source/helpers/argument_list.js +0 -263
- package/dist/source/helpers/argument_list.js.map +0 -1
- package/dist/source/helpers/call_helpers.js +0 -80
- package/dist/source/helpers/call_helpers.js.map +0 -1
- package/dist/source/helpers/coerce_enum_value.d.ts +0 -6
- package/dist/source/helpers/coerce_enum_value.js.map +0 -1
- package/dist/source/helpers/dump_tools.js +0 -81
- package/dist/source/helpers/dump_tools.js.map +0 -1
- package/dist/source/helpers/ensure_secure_access.d.ts +0 -9
- package/dist/source/helpers/ensure_secure_access.js +0 -58
- package/dist/source/helpers/ensure_secure_access.js.map +0 -1
- package/dist/source/helpers/make_optionals_map.js.map +0 -1
- package/dist/source/helpers/multiform_func.js +0 -75
- package/dist/source/helpers/multiform_func.js.map +0 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js +0 -25
- package/dist/source/helpers/resolve_opaque_on_address_space.js.map +0 -1
- package/dist/source/index.d.ts +0 -66
- package/dist/source/index.js +0 -97
- package/dist/source/index.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +0 -21
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js +0 -3
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +0 -150
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +0 -12
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +0 -7
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +0 -4
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +0 -4
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +0 -10
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +0 -4
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +0 -4
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +0 -20
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +0 -21
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +0 -33
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +0 -19
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +0 -44
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +0 -4
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +0 -5
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +0 -19
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +0 -25
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +0 -8
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +0 -10
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +0 -44
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +0 -22
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +0 -13
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_y_array_item_ex.js.map +0 -1
- package/dist/source/interfaces/extension_object_constructor.js.map +0 -1
- package/dist/source/interfaces/i_condition_variable_type_setter_options.js.map +0 -1
- package/dist/source/interfaces/i_set_state_options.js.map +0 -1
- package/dist/source/interfaces/nodeset_loader_options.d.ts +0 -37
- package/dist/source/interfaces/nodeset_loader_options.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +0 -12
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +0 -49
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +0 -11
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +0 -29
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +0 -236
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_transition_ex.js.map +0 -1
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +0 -1
- package/dist/source/loader/decode_xml_extension_object.d.ts +0 -6
- package/dist/source/loader/decode_xml_extension_object.js +0 -69
- package/dist/source/loader/decode_xml_extension_object.js.map +0 -1
- package/dist/source/loader/ensure_datatype_extracted.js +0 -88
- package/dist/source/loader/ensure_datatype_extracted.js.map +0 -1
- package/dist/source/loader/generateAddressSpaceRaw.d.ts +0 -29
- package/dist/source/loader/generateAddressSpaceRaw.js +0 -188
- package/dist/source/loader/generateAddressSpaceRaw.js.map +0 -1
- package/dist/source/loader/load_nodeset2.d.ts +0 -15
- package/dist/source/loader/load_nodeset2.js +0 -1047
- package/dist/source/loader/load_nodeset2.js.map +0 -1
- package/dist/source/loader/make_semver_compatible.js.map +0 -1
- package/dist/source/loader/make_xml_extension_object_parser.js +0 -422
- package/dist/source/loader/make_xml_extension_object_parser.js.map +0 -1
- package/dist/source/loader/namespace_post_step.js +0 -57
- package/dist/source/loader/namespace_post_step.js.map +0 -1
- package/dist/source/loader/parsers/extension_object_parser.js +0 -274
- package/dist/source/loader/parsers/extension_object_parser.js.map +0 -1
- package/dist/source/loader/parsers/localized_text_parser.js.map +0 -1
- package/dist/source/loader/parsers/nodeid_parser.js.map +0 -1
- package/dist/source/loader/parsers/qualified_name_parser.js.map +0 -1
- package/dist/source/loader/parsers/variant_parser.d.ts +0 -35
- package/dist/source/loader/parsers/variant_parser.js +0 -331
- package/dist/source/loader/parsers/variant_parser.js.map +0 -1
- package/dist/source/loader/register_node_promoter.d.ts +0 -2
- package/dist/source/loader/register_node_promoter.js +0 -9
- package/dist/source/loader/register_node_promoter.js.map +0 -1
- package/dist/source/namespace.d.ts +0 -6
- package/dist/source/namespace.js.map +0 -1
- package/dist/source/namespace_alarm_and_condition.d.ts +0 -33
- package/dist/source/namespace_alarm_and_condition.js.map +0 -1
- package/dist/source/namespace_data_access.d.ts +0 -67
- package/dist/source/namespace_data_access.js.map +0 -1
- package/dist/source/namespace_machine_state.d.ts +0 -8
- package/dist/source/namespace_machine_state.js.map +0 -1
- package/dist/source/pseudo_session.d.ts +0 -74
- package/dist/source/pseudo_session.js +0 -308
- package/dist/source/pseudo_session.js.map +0 -1
- package/dist/source/session_context.d.ts +0 -241
- package/dist/source/session_context.js.map +0 -1
- package/dist/source/set_namespace_meta_data.js.map +0 -1
- package/dist/source/ua_addin.js.map +0 -1
- package/dist/source/ua_interface.js +0 -25
- package/dist/source/ua_interface.js.map +0 -1
- package/dist/source/ua_root_folder.js.map +0 -1
- package/dist/source/ua_two_state_variable_ex.d.ts +0 -24
- package/dist/source/ua_two_state_variable_ex.js.map +0 -1
- package/dist/source/xml_writer.js.map +0 -1
- package/dist/src/_instantiate_helpers.js +0 -99
- package/dist/src/_instantiate_helpers.js.map +0 -1
- package/dist/src/_mandatory_child_or_requested_optional_filter.js +0 -82
- package/dist/src/_mandatory_child_or_requested_optional_filter.js.map +0 -1
- package/dist/src/address_space.d.ts +0 -369
- package/dist/src/address_space.js +0 -1416
- package/dist/src/address_space.js.map +0 -1
- package/dist/src/address_space_change_event_tools.d.ts +0 -6
- package/dist/src/address_space_change_event_tools.js.map +0 -1
- package/dist/src/address_space_private.d.ts +0 -45
- package/dist/src/address_space_private.js.map +0 -1
- package/dist/src/alarms_and_conditions/condition.js.map +0 -1
- package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +0 -18
- package/dist/src/alarms_and_conditions/condition_info_impl.js +0 -38
- package/dist/src/alarms_and_conditions/condition_info_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +0 -269
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +0 -699
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +0 -12
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +0 -66
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +0 -1
- package/dist/src/alarms_and_conditions/index.d.ts +0 -16
- package/dist/src/alarms_and_conditions/index.js +0 -33
- package/dist/src/alarms_and_conditions/index.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +0 -42
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +0 -243
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +0 -80
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +0 -415
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +0 -18
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js +0 -33
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +0 -44
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +0 -203
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +0 -104
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +0 -1017
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +0 -19
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +0 -39
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +0 -25
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +0 -55
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +0 -11
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +0 -12
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +0 -23
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +0 -87
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +0 -10
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js +0 -8
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +0 -26
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +0 -208
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +0 -23
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +0 -55
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +0 -27
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +0 -173
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +0 -43
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +0 -168
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +0 -18
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +0 -18
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +0 -1
- package/dist/src/apply_condition_refresh.d.ts +0 -4
- package/dist/src/apply_condition_refresh.js +0 -27
- package/dist/src/apply_condition_refresh.js.map +0 -1
- package/dist/src/base_node_impl.d.ts +0 -287
- package/dist/src/base_node_impl.js +0 -1538
- package/dist/src/base_node_impl.js.map +0 -1
- package/dist/src/base_node_private.d.ts +0 -87
- package/dist/src/base_node_private.js +0 -925
- package/dist/src/base_node_private.js.map +0 -1
- package/dist/src/check_value_rank_compatibility.js.map +0 -1
- package/dist/src/data_access/add_dataItem_stuff.js.map +0 -1
- package/dist/src/data_access/adjust_datavalue_status_code.d.ts +0 -7
- package/dist/src/data_access/adjust_datavalue_status_code.js.map +0 -1
- package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +0 -35
- package/dist/src/data_access/ua_multistate_discrete_impl.js +0 -142
- package/dist/src/data_access/ua_multistate_discrete_impl.js.map +0 -1
- package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +0 -51
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js +0 -302
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +0 -1
- package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +0 -20
- package/dist/src/data_access/ua_two_state_discrete_impl.js +0 -163
- package/dist/src/data_access/ua_two_state_discrete_impl.js.map +0 -1
- package/dist/src/event_data.d.ts +0 -18
- package/dist/src/event_data.js +0 -70
- package/dist/src/event_data.js.map +0 -1
- package/dist/src/extension_object_array_node.d.ts +0 -34
- package/dist/src/extension_object_array_node.js +0 -262
- package/dist/src/extension_object_array_node.js.map +0 -1
- package/dist/src/get_basic_datatype.js.map +0 -1
- package/dist/src/historical_access/address_space_historical_data_node.d.ts +0 -21
- package/dist/src/historical_access/address_space_historical_data_node.js +0 -654
- package/dist/src/historical_access/address_space_historical_data_node.js.map +0 -1
- package/dist/src/idx_iterator.js.map +0 -1
- package/dist/src/index_current.d.ts +0 -50
- package/dist/src/index_current.js +0 -82
- package/dist/src/index_current.js.map +0 -1
- package/dist/src/namespace_impl.d.ts +0 -450
- package/dist/src/namespace_impl.js +0 -1876
- package/dist/src/namespace_impl.js.map +0 -1
- package/dist/src/namespace_private.d.ts +0 -31
- package/dist/src/namespace_private.js.map +0 -1
- package/dist/src/nodeid_manager.js +0 -249
- package/dist/src/nodeid_manager.js.map +0 -1
- package/dist/src/nodeset_tools/adjust_namespace_array.js.map +0 -1
- package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +0 -33
- package/dist/src/nodeset_tools/construct_namespace_dependency.js +0 -347
- package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +0 -1
- package/dist/src/nodeset_tools/dump_to_bsd.d.ts +0 -2
- package/dist/src/nodeset_tools/dump_to_bsd.js +0 -164
- package/dist/src/nodeset_tools/dump_to_bsd.js.map +0 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +0 -12
- package/dist/src/nodeset_tools/nodeset_to_xml.js +0 -1381
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +0 -1
- package/dist/src/private_namespace.d.ts +0 -5
- package/dist/src/private_namespace.js.map +0 -1
- package/dist/src/reference_impl.d.ts +0 -43
- package/dist/src/reference_impl.js +0 -152
- package/dist/src/reference_impl.js.map +0 -1
- package/dist/src/role_permissions.js.map +0 -1
- package/dist/src/state_machine/finite_state_machine.d.ts +0 -70
- package/dist/src/state_machine/finite_state_machine.js +0 -574
- package/dist/src/state_machine/finite_state_machine.js.map +0 -1
- package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +0 -39
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js +0 -249
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +0 -1
- package/dist/src/state_machine/ua_two_state_variable.d.ts +0 -55
- package/dist/src/state_machine/ua_two_state_variable.js +0 -323
- package/dist/src/state_machine/ua_two_state_variable.js.map +0 -1
- package/dist/src/tool_isSubtypeOf.d.ts +0 -18
- package/dist/src/tool_isSubtypeOf.js +0 -130
- package/dist/src/tool_isSubtypeOf.js.map +0 -1
- package/dist/src/ua_condition_type.js.map +0 -1
- package/dist/src/ua_data_type_impl.d.ts +0 -87
- package/dist/src/ua_data_type_impl.js +0 -393
- package/dist/src/ua_data_type_impl.js.map +0 -1
- package/dist/src/ua_method_impl.d.ts +0 -48
- package/dist/src/ua_method_impl.js +0 -280
- package/dist/src/ua_method_impl.js.map +0 -1
- package/dist/src/ua_object_impl.d.ts +0 -38
- package/dist/src/ua_object_impl.js +0 -214
- package/dist/src/ua_object_impl.js.map +0 -1
- package/dist/src/ua_object_type_impl.d.ts +0 -55
- package/dist/src/ua_object_type_impl.js +0 -131
- package/dist/src/ua_object_type_impl.js.map +0 -1
- package/dist/src/ua_reference_type_impl.d.ts +0 -42
- package/dist/src/ua_reference_type_impl.js +0 -146
- package/dist/src/ua_reference_type_impl.js.map +0 -1
- package/dist/src/ua_variable_impl.d.ts +0 -379
- package/dist/src/ua_variable_impl.js +0 -1940
- package/dist/src/ua_variable_impl.js.map +0 -1
- package/dist/src/ua_variable_impl_ext_obj.d.ts +0 -23
- package/dist/src/ua_variable_impl_ext_obj.js +0 -752
- package/dist/src/ua_variable_impl_ext_obj.js.map +0 -1
- package/dist/src/ua_variable_type_impl.d.ts +0 -79
- package/dist/src/ua_variable_type_impl.js +0 -276
- package/dist/src/ua_variable_type_impl.js.map +0 -1
- package/dist/src/ua_view_impl.d.ts +0 -18
- package/dist/src/ua_view_impl.js +0 -45
- package/dist/src/ua_view_impl.js.map +0 -1
- package/dist/src/validate_data_type_correctness.d.ts +0 -6
- package/dist/src/validate_data_type_correctness.js +0 -106
- package/dist/src/validate_data_type_correctness.js.map +0 -1
- package/source/address_space_ts.ts +0 -220
- package/source/continuation_points/continuation_point_manager.ts +0 -271
- package/source/helpers/argument_list.ts +0 -310
- package/source/helpers/call_helpers.ts +0 -100
- package/source/helpers/coerce_enum_value.ts +0 -33
- package/source/helpers/dump_tools.ts +0 -90
- package/source/helpers/ensure_secure_access.ts +0 -57
- package/source/helpers/multiform_func.ts +0 -78
- package/source/helpers/resolve_opaque_on_address_space.ts +0 -26
- package/source/index.ts +0 -72
- package/source/interfaces/alarms_and_conditions/condition_info_i.ts +0 -24
- package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +0 -235
- package/source/interfaces/alarms_and_conditions/deviation_stuff.ts +0 -16
- package/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +0 -8
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +0 -6
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +0 -6
- package/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +0 -13
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +0 -6
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +0 -6
- package/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +0 -21
- package/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +0 -28
- package/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +0 -43
- package/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +0 -36
- package/source/interfaces/alarms_and_conditions/ua_condition_ex.ts +0 -55
- package/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +0 -17
- package/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +0 -21
- package/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +0 -21
- package/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +0 -26
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +0 -29
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +0 -25
- package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +0 -57
- package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +0 -31
- package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +0 -15
- package/source/interfaces/nodeset_loader_options.ts +0 -38
- package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +0 -20
- package/source/interfaces/state_machine/ua_finite_state_machine_type.ts +0 -50
- package/source/interfaces/state_machine/ua_program_state_machine_type.ts +0 -14
- package/source/interfaces/state_machine/ua_shelved_state_machine_ex.ts +0 -35
- package/source/interfaces/state_machine/ua_state_machine_type.ts +0 -288
- package/source/loader/decode_xml_extension_object.ts +0 -80
- package/source/loader/ensure_datatype_extracted.ts +0 -122
- package/source/loader/generateAddressSpaceRaw.ts +0 -219
- package/source/loader/load_nodeset2.ts +0 -1275
- package/source/loader/make_xml_extension_object_parser.ts +0 -524
- package/source/loader/namespace_post_step.ts +0 -68
- package/source/loader/parsers/extension_object_parser.ts +0 -374
- package/source/loader/parsers/variant_parser.ts +0 -433
- package/source/loader/register_node_promoter.ts +0 -6
- package/source/namespace.ts +0 -7
- package/source/namespace_alarm_and_condition.ts +0 -78
- package/source/namespace_data_access.ts +0 -92
- package/source/namespace_machine_state.ts +0 -20
- package/source/pseudo_session.ts +0 -415
- package/source/session_context.ts +0 -725
- package/source/ua_interface.ts +0 -38
- package/source/ua_two_state_variable_ex.ts +0 -36
- package/src/_instantiate_helpers.ts +0 -197
- package/src/_mandatory_child_or_requested_optional_filter.ts +0 -100
- package/src/address_space.ts +0 -1631
- package/src/address_space_change_event_tools.ts +0 -177
- package/src/address_space_private.ts +0 -96
- package/src/alarms_and_conditions/condition_info_impl.ts +0 -44
- package/src/alarms_and_conditions/condition_snapshot_impl.ts +0 -792
- package/src/alarms_and_conditions/deviation_alarm_helper.ts +0 -73
- package/src/alarms_and_conditions/index.ts +0 -16
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +0 -331
- package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +0 -479
- package/src/alarms_and_conditions/ua_base_event_impl.ts +0 -42
- package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +0 -244
- package/src/alarms_and_conditions/ua_condition_impl.ts +0 -1261
- package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +0 -57
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +0 -94
- package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +0 -20
- package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +0 -109
- package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +0 -25
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +0 -244
- package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +0 -88
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +0 -223
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +0 -218
- package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +0 -26
- package/src/apply_condition_refresh.ts +0 -29
- package/src/base_node_impl.ts +0 -1907
- package/src/base_node_private.ts +0 -1287
- package/src/data_access/adjust_datavalue_status_code.ts +0 -36
- package/src/data_access/ua_multistate_discrete_impl.ts +0 -189
- package/src/data_access/ua_multistate_value_discrete_impl.ts +0 -369
- package/src/data_access/ua_two_state_discrete_impl.ts +0 -184
- package/src/event_data.ts +0 -83
- package/src/extension_object_array_node.ts +0 -331
- package/src/historical_access/address_space_historical_data_node.ts +0 -842
- package/src/index_current.ts +0 -51
- package/src/namespace_impl.ts +0 -2380
- package/src/namespace_private.ts +0 -77
- package/src/nodeid_manager.ts +0 -293
- package/src/nodeset_tools/construct_namespace_dependency.ts +0 -375
- package/src/nodeset_tools/dump_to_bsd.ts +0 -201
- package/src/nodeset_tools/nodeset_to_xml.ts +0 -1652
- package/src/private_namespace.ts +0 -21
- package/src/reference_impl.ts +0 -171
- package/src/state_machine/finite_state_machine.ts +0 -668
- package/src/state_machine/ua_shelving_state_machine_ex.ts +0 -330
- package/src/state_machine/ua_two_state_variable.ts +0 -421
- package/src/tool_isSubtypeOf.ts +0 -160
- package/src/ua_data_type_impl.ts +0 -483
- package/src/ua_method_impl.ts +0 -362
- package/src/ua_object_impl.ts +0 -278
- package/src/ua_object_type_impl.ts +0 -179
- package/src/ua_reference_type_impl.ts +0 -170
- package/src/ua_variable_impl.ts +0 -2489
- package/src/ua_variable_impl_ext_obj.ts +0 -903
- package/src/ua_variable_type_impl.ts +0 -385
- package/src/ua_view_impl.ts +0 -53
- package/src/validate_data_type_correctness.ts +0 -124
- /package/{source → api}/helpers/adjust_browse_direction.ts +0 -0
- /package/{source → api}/helpers/make_optionals_map.ts +0 -0
- /package/{source → api}/interfaces/alarms_and_conditions/install_setpoint_options.ts +0 -0
- /package/{source → api}/interfaces/alarms_and_conditions/instantiate_condition_options.ts +0 -0
- /package/{source → api}/interfaces/alarms_and_conditions/ua_base_event_ex.ts +0 -0
- /package/{source → api}/interfaces/data_access/ua_y_array_item_ex.ts +0 -0
- /package/{source → api}/interfaces/extension_object_constructor.ts +0 -0
- /package/{source → api}/interfaces/i_condition_variable_type_setter_options.ts +0 -0
- /package/{source → api}/interfaces/i_set_state_options.ts +0 -0
- /package/{source → api}/interfaces/state_machine/ua_transition_ex.ts +0 -0
- /package/{source → api}/interfaces/ua_subscription_diagnostics_variable_ex.ts +0 -0
- /package/{source → api}/loader/make_semver_compatible.ts +0 -0
- /package/{source → api}/loader/parsers/localized_text_parser.ts +0 -0
- /package/{source → api}/loader/parsers/nodeid_parser.ts +0 -0
- /package/{source → api}/loader/parsers/qualified_name_parser.ts +0 -0
- /package/{source → api}/set_namespace_meta_data.ts +0 -0
- /package/{source → api}/ua_addin.ts +0 -0
- /package/{source → api}/ua_root_folder.ts +0 -0
- /package/{source → api}/xml_writer.ts +0 -0
- /package/dist/{source → api}/continuation_points/continuation_point_manager.d.ts +0 -0
- /package/dist/{source → api}/helpers/adjust_browse_direction.d.ts +0 -0
- /package/dist/{source → api}/helpers/adjust_browse_direction.js +0 -0
- /package/dist/{source → api}/helpers/argument_list.d.ts +0 -0
- /package/dist/{source → api}/helpers/call_helpers.d.ts +0 -0
- /package/dist/{source → api}/helpers/coerce_enum_value.js +0 -0
- /package/dist/{source → api}/helpers/dump_tools.d.ts +0 -0
- /package/dist/{source → api}/helpers/make_optionals_map.d.ts +0 -0
- /package/dist/{source → api}/helpers/make_optionals_map.js +0 -0
- /package/dist/{source → api}/helpers/multiform_func.d.ts +0 -0
- /package/dist/{source → api}/helpers/resolve_opaque_on_address_space.d.ts +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/condition_snapshot.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/deviation_stuff.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/install_setpoint_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_condition_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_base_event_ex.d.ts +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_base_event_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_condition_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js +0 -0
- /package/dist/{source → api}/interfaces/data_access/ua_multistate_discrete_ex.js +0 -0
- /package/dist/{source → api}/interfaces/data_access/ua_multistate_value_discrete_ex.js +0 -0
- /package/dist/{source → api}/interfaces/data_access/ua_two_state_discrete_ex.js +0 -0
- /package/dist/{source → api}/interfaces/data_access/ua_y_array_item_ex.d.ts +0 -0
- /package/dist/{source → api}/interfaces/data_access/ua_y_array_item_ex.js +0 -0
- /package/dist/{source → api}/interfaces/extension_object_constructor.d.ts +0 -0
- /package/dist/{source → api}/interfaces/extension_object_constructor.js +0 -0
- /package/dist/{source → api}/interfaces/i_condition_variable_type_setter_options.d.ts +0 -0
- /package/dist/{source → api}/interfaces/i_condition_variable_type_setter_options.js +0 -0
- /package/dist/{source → api}/interfaces/i_set_state_options.d.ts +0 -0
- /package/dist/{source → api}/interfaces/i_set_state_options.js +0 -0
- /package/dist/{source → api}/interfaces/nodeset_loader_options.js +0 -0
- /package/dist/{source → api}/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js +0 -0
- /package/dist/{source → api}/interfaces/state_machine/ua_finite_state_machine_type.js +0 -0
- /package/dist/{source → api}/interfaces/state_machine/ua_program_state_machine_type.js +0 -0
- /package/dist/{source → api}/interfaces/state_machine/ua_shelved_state_machine_ex.js +0 -0
- /package/dist/{source → api}/interfaces/state_machine/ua_state_machine_type.js +0 -0
- /package/dist/{source → api}/interfaces/state_machine/ua_transition_ex.d.ts +0 -0
- /package/dist/{source → api}/interfaces/state_machine/ua_transition_ex.js +0 -0
- /package/dist/{source → api}/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +0 -0
- /package/dist/{source → api}/interfaces/ua_subscription_diagnostics_variable_ex.js +0 -0
- /package/dist/{source → api}/loader/ensure_datatype_extracted.d.ts +0 -0
- /package/dist/{source → api}/loader/make_semver_compatible.d.ts +0 -0
- /package/dist/{source → api}/loader/make_semver_compatible.js +0 -0
- /package/dist/{source → api}/loader/make_xml_extension_object_parser.d.ts +0 -0
- /package/dist/{source → api}/loader/namespace_post_step.d.ts +0 -0
- /package/dist/{source → api}/loader/parsers/extension_object_parser.d.ts +0 -0
- /package/dist/{source → api}/loader/parsers/localized_text_parser.d.ts +0 -0
- /package/dist/{source → api}/loader/parsers/localized_text_parser.js +0 -0
- /package/dist/{source → api}/loader/parsers/nodeid_parser.d.ts +0 -0
- /package/dist/{source → api}/loader/parsers/nodeid_parser.js +0 -0
- /package/dist/{source → api}/loader/parsers/qualified_name_parser.d.ts +0 -0
- /package/dist/{source → api}/loader/parsers/qualified_name_parser.js +0 -0
- /package/dist/{source → api}/namespace.js +0 -0
- /package/dist/{source → api}/namespace_alarm_and_condition.js +0 -0
- /package/dist/{source → api}/namespace_data_access.js +0 -0
- /package/dist/{source → api}/namespace_machine_state.js +0 -0
- /package/dist/{source → api}/session_context.js +0 -0
- /package/dist/{source → api}/set_namespace_meta_data.d.ts +0 -0
- /package/dist/{source → api}/set_namespace_meta_data.js +0 -0
- /package/dist/{source → api}/ua_addin.d.ts +0 -0
- /package/dist/{source → api}/ua_addin.js +0 -0
- /package/dist/{source → api}/ua_interface.d.ts +0 -0
- /package/dist/{source → api}/ua_root_folder.d.ts +0 -0
- /package/dist/{source → api}/ua_root_folder.js +0 -0
- /package/dist/{source → api}/ua_two_state_variable_ex.js +0 -0
- /package/dist/{source → api}/xml_writer.d.ts +0 -0
- /package/dist/{source → api}/xml_writer.js +0 -0
- /package/dist/{src → impl}/_instantiate_helpers.d.ts +0 -0
- /package/dist/{src → impl}/_mandatory_child_or_requested_optional_filter.d.ts +0 -0
- /package/dist/{src → impl}/address_space_change_event_tools.js +0 -0
- /package/dist/{src → impl}/address_space_private.js +0 -0
- /package/dist/{src → impl}/alarms_and_conditions/condition.d.ts +0 -0
- /package/dist/{src → impl}/alarms_and_conditions/condition.js +0 -0
- /package/dist/{src → impl}/check_value_rank_compatibility.d.ts +0 -0
- /package/dist/{src → impl}/check_value_rank_compatibility.js +0 -0
- /package/dist/{src → impl}/data_access/add_dataItem_stuff.d.ts +0 -0
- /package/dist/{src → impl}/data_access/add_dataItem_stuff.js +0 -0
- /package/dist/{src → impl}/data_access/adjust_datavalue_status_code.js +0 -0
- /package/dist/{src → impl}/get_basic_datatype.d.ts +0 -0
- /package/dist/{src → impl}/get_basic_datatype.js +0 -0
- /package/dist/{src → impl}/idx_iterator.d.ts +0 -0
- /package/dist/{src → impl}/idx_iterator.js +0 -0
- /package/dist/{src → impl}/namespace_private.js +0 -0
- /package/dist/{src → impl}/nodeid_manager.d.ts +0 -0
- /package/dist/{src → impl}/nodeset_tools/adjust_namespace_array.d.ts +0 -0
- /package/dist/{src → impl}/nodeset_tools/adjust_namespace_array.js +0 -0
- /package/dist/{src → impl}/private_namespace.js +0 -0
- /package/dist/{src → impl}/role_permissions.d.ts +0 -0
- /package/dist/{src → impl}/role_permissions.js +0 -0
- /package/dist/{src → impl}/ua_condition_type.d.ts +0 -0
- /package/dist/{src → impl}/ua_condition_type.js +0 -0
- /package/{src → impl}/alarms_and_conditions/condition.ts +0 -0
- /package/{src → impl}/check_value_rank_compatibility.ts +0 -0
- /package/{src → impl}/data_access/add_dataItem_stuff.ts +0 -0
- /package/{src → impl}/get_basic_datatype.ts +0 -0
- /package/{src → impl}/idx_iterator.ts +0 -0
- /package/{src → impl}/nodeset_tools/adjust_namespace_array.ts +0 -0
- /package/{src → impl}/role_permissions.ts +0 -0
- /package/{src → impl}/ua_condition_type.ts +0 -0
|
@@ -0,0 +1,1420 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-address-space.Private
|
|
3
|
+
*/
|
|
4
|
+
import chalk from "chalk";
|
|
5
|
+
import type {
|
|
6
|
+
BaseNode,
|
|
7
|
+
CloneExtraInfo,
|
|
8
|
+
CloneFilter,
|
|
9
|
+
IAddressSpace,
|
|
10
|
+
ISessionContext,
|
|
11
|
+
UADataType,
|
|
12
|
+
UAMethod,
|
|
13
|
+
UAObject,
|
|
14
|
+
UAObjectType,
|
|
15
|
+
UAReference,
|
|
16
|
+
UAReferenceType,
|
|
17
|
+
UAVariable,
|
|
18
|
+
UAVariableT,
|
|
19
|
+
UAVariableType
|
|
20
|
+
} from "node-opcua-address-space-base";
|
|
21
|
+
import { CloneHelper, type CloneOptions, type ConstructNodeIdOptions, fullPath2 } from "node-opcua-address-space-base";
|
|
22
|
+
import { assert } from "node-opcua-assert";
|
|
23
|
+
import type { DataType } from "node-opcua-basic-types";
|
|
24
|
+
import { ObjectTypeIds, VariableTypeIds } from "node-opcua-constants";
|
|
25
|
+
import {
|
|
26
|
+
AccessLevelFlag,
|
|
27
|
+
BrowseDirection,
|
|
28
|
+
coerceLocalizedText,
|
|
29
|
+
coerceQualifiedName,
|
|
30
|
+
type LocalizedText,
|
|
31
|
+
type LocalizedTextLike,
|
|
32
|
+
NodeClass,
|
|
33
|
+
ResultMask
|
|
34
|
+
} from "node-opcua-data-model";
|
|
35
|
+
import type { DataValue } from "node-opcua-data-value";
|
|
36
|
+
import { checkDebugFlag, make_errorLog, make_warningLog } from "node-opcua-debug";
|
|
37
|
+
import { ExpandedNodeId, NodeId, resolveNodeId, sameNodeId } from "node-opcua-nodeid";
|
|
38
|
+
import { ReferenceDescription, type ReferenceDescriptionOptions } from "node-opcua-types";
|
|
39
|
+
import type { AddressSpacePrivate } from "./address_space_private.js";
|
|
40
|
+
import { BaseNodeImpl, getReferenceType } from "./base_node_impl.js";
|
|
41
|
+
import { UANamespace_process_modelling_rule } from "./namespace_private.js";
|
|
42
|
+
import { ReferenceImpl, type ReferenceKey } from "./reference_impl.js";
|
|
43
|
+
import { referenceTypeVersion, typeHierarchyVersion } from "./reference_type_version.js";
|
|
44
|
+
import { wipeMemorizedStuff } from "./tool_isSubtypeOf.js";
|
|
45
|
+
|
|
46
|
+
const errorLog = make_errorLog("address-space:BaseNode");
|
|
47
|
+
const doTrace = checkDebugFlag("INSTANTIATE");
|
|
48
|
+
const traceLog = errorLog;
|
|
49
|
+
const warningLog = make_warningLog("address-space:BaseNode");
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* the private record hangs on the node itself under a symbol: as hidden from consumers as the
|
|
53
|
+
* WeakMap it replaces, but a property read rather than a hash lookup, on every access to every
|
|
54
|
+
* node field, in construction and in every browse and read after
|
|
55
|
+
*/
|
|
56
|
+
const PRIVATE = Symbol("BaseNodePrivate");
|
|
57
|
+
type WithPrivate = { [PRIVATE]?: BaseNodeCache };
|
|
58
|
+
|
|
59
|
+
interface BaseNodeCacheInner {
|
|
60
|
+
typeDefinition?: NodeId;
|
|
61
|
+
typeDefinitionObj?: UAVariableType | UAObjectType | null;
|
|
62
|
+
_children?: BaseNode[];
|
|
63
|
+
_versionNode?: UAVariableT<string, DataType.String> | null;
|
|
64
|
+
|
|
65
|
+
_ref?: Map<string, UAReference[]>;
|
|
66
|
+
/**
|
|
67
|
+
* memoized `findReferencesEx`: per reference type node, the forward then the inverse result;
|
|
68
|
+
* dropped with the rest of the cache on every reference added or removed, and when the
|
|
69
|
+
* reference-type hierarchy moved (`_refExVersion`)
|
|
70
|
+
*/
|
|
71
|
+
_refEx?: Map<UAReferenceType, ReferenceScanMemo>;
|
|
72
|
+
_refExVersion?: number;
|
|
73
|
+
_encoding?: Map<string, UAObject | null>;
|
|
74
|
+
_subtype_idx?: Map<number | string, UAReferenceType> | null;
|
|
75
|
+
_subtype_idxVersion?: number;
|
|
76
|
+
_allSubTypes?: UAReferenceType[] | null;
|
|
77
|
+
_allSubTypesVersion?: number;
|
|
78
|
+
_subtypeOfObj?: BaseNode | null;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type UAReferenceWithNodeRef = UAReference & { node: BaseNode };
|
|
82
|
+
export type HierarchicalIndexMap = Map<string, UAReferenceWithNodeRef | UAReferenceWithNodeRef[]>;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* the memoized scans of one node for one reference type: forward, inverse, and for each whether
|
|
86
|
+
* a reference in it still waits for its target (the target may be created after the scan; the
|
|
87
|
+
* memo then resolves it on the next hit rather than hand out a reference without a node)
|
|
88
|
+
*/
|
|
89
|
+
export type ReferenceScanMemo = [UAReference[] | undefined, UAReference[] | undefined, boolean, boolean];
|
|
90
|
+
|
|
91
|
+
interface BaseNodeCache {
|
|
92
|
+
_childByNameMap?: HierarchicalIndexMap;
|
|
93
|
+
/**
|
|
94
|
+
* set when a reference could not be indexed (target node or reference type not in the
|
|
95
|
+
* address space yet): the index is rebuilt on the next lookup instead of missing a child
|
|
96
|
+
*/
|
|
97
|
+
_childByNameMapIncomplete?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* the reference-type hierarchy the index was built against (referenceTypeVersion.count): a
|
|
100
|
+
* reference of a type that became hierarchical since is not in it, so it is rebuilt
|
|
101
|
+
*/
|
|
102
|
+
_childByNameMapVersion?: number;
|
|
103
|
+
__address_space: IAddressSpace | null;
|
|
104
|
+
_browseFilter?: (this: BaseNode, context?: ISessionContext) => boolean;
|
|
105
|
+
/** created on first use: a node that is never looked at pays nothing here */
|
|
106
|
+
_cache?: BaseNodeCacheInner;
|
|
107
|
+
/** built from _descriptionRaw on first read */
|
|
108
|
+
_description?: LocalizedText;
|
|
109
|
+
_descriptionRaw?: LocalizedTextLike | null;
|
|
110
|
+
/** built from _displayNameRaw on first read */
|
|
111
|
+
_displayName?: LocalizedText[];
|
|
112
|
+
_displayNameRaw?: LocalizedTextLike | LocalizedTextLike[];
|
|
113
|
+
_parent?: BaseNode | null;
|
|
114
|
+
/**
|
|
115
|
+
* the references other nodes hold to this one; `EMPTY_REFERENCE_INDEX` until the first one
|
|
116
|
+
* arrives, since a nodeset declares most references from both ends and most nodes never get one
|
|
117
|
+
*/
|
|
118
|
+
_back_referenceIdx: Map<ReferenceKey, UAReference>;
|
|
119
|
+
_referenceIdx: Map<ReferenceKey, UAReference>;
|
|
120
|
+
/** the property name this node is exposed as on its parents (see child_accessors.ts) */
|
|
121
|
+
_accessorName?: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* shared by every node without back references; read like any map, never written to: the first
|
|
126
|
+
* back reference replaces it with a map of the node's own (BaseNode_add_backward_reference)
|
|
127
|
+
*/
|
|
128
|
+
const EMPTY_REFERENCE_INDEX: Map<ReferenceKey, UAReference> = new Map();
|
|
129
|
+
|
|
130
|
+
export function BaseNode_initPrivate(self: BaseNode): BaseNodeCache {
|
|
131
|
+
const _private: BaseNodeCache = {
|
|
132
|
+
__address_space: null,
|
|
133
|
+
|
|
134
|
+
_referenceIdx: new Map(),
|
|
135
|
+
_back_referenceIdx: EMPTY_REFERENCE_INDEX,
|
|
136
|
+
|
|
137
|
+
_browseFilter: undefined,
|
|
138
|
+
_cache: undefined,
|
|
139
|
+
_description: undefined,
|
|
140
|
+
_descriptionRaw: undefined,
|
|
141
|
+
_displayName: undefined,
|
|
142
|
+
_displayNameRaw: undefined,
|
|
143
|
+
_parent: undefined
|
|
144
|
+
};
|
|
145
|
+
(self as unknown as WithPrivate)[PRIVATE] = _private;
|
|
146
|
+
return _private;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export function BaseNode_removePrivate(self: BaseNode): void {
|
|
150
|
+
// there is no need to delete object from weak map
|
|
151
|
+
// the GC will take care of this in due course
|
|
152
|
+
// g_weakMap.delete(self);
|
|
153
|
+
const _private = BaseNode_getPrivate(self);
|
|
154
|
+
_private._cache = undefined;
|
|
155
|
+
_private.__address_space = null;
|
|
156
|
+
_private._back_referenceIdx = EMPTY_REFERENCE_INDEX;
|
|
157
|
+
_private._referenceIdx = new Map();
|
|
158
|
+
_private._childByNameMap = undefined;
|
|
159
|
+
_private._description = undefined;
|
|
160
|
+
_private._descriptionRaw = undefined;
|
|
161
|
+
_private._displayName = undefined;
|
|
162
|
+
_private._displayNameRaw = undefined;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Drop the child index; it is rebuilt lazily on the next lookup. The nodeset loader calls this on
|
|
167
|
+
* every node once a load is complete, so an index built before the load (a second nodeset added at
|
|
168
|
+
* runtime to an address space already in use) cannot go stale.
|
|
169
|
+
*/
|
|
170
|
+
export function BaseNode_resetChildIndex(node: BaseNode): void {
|
|
171
|
+
const _private = BaseNode_getPrivate(node);
|
|
172
|
+
if (!_private) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
_private._childByNameMap = undefined;
|
|
176
|
+
_private._childByNameMapIncomplete = false;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export function BaseNode_getPrivate(self: BaseNode): BaseNodeCache {
|
|
180
|
+
return (self as unknown as WithPrivate)[PRIVATE] as BaseNodeCache;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export function BaseNode_getCache(node: BaseNode): BaseNodeCacheInner {
|
|
184
|
+
const _private = BaseNode_getPrivate(node);
|
|
185
|
+
if (!_private._cache) {
|
|
186
|
+
_private._cache = {};
|
|
187
|
+
}
|
|
188
|
+
return _private._cache;
|
|
189
|
+
}
|
|
190
|
+
export function BaseNode_clearCache(node: BaseNode): void {
|
|
191
|
+
const _private = BaseNode_getPrivate(node);
|
|
192
|
+
if (_private?._cache) {
|
|
193
|
+
_private._cache = undefined;
|
|
194
|
+
}
|
|
195
|
+
wipeMemorizedStuff(node);
|
|
196
|
+
}
|
|
197
|
+
const hasTypeDefinition_ReferenceTypeNodeId = resolveNodeId("HasTypeDefinition");
|
|
198
|
+
// looked up by NodeId rather than by name: a name lookup throws while namespace 0 is still
|
|
199
|
+
// loading, and the child index must simply answer "nothing yet" at that point
|
|
200
|
+
const hierarchicalReferences_ReferenceTypeNodeId = resolveNodeId("HierarchicalReferences");
|
|
201
|
+
|
|
202
|
+
export interface ToStringOptionBase {
|
|
203
|
+
level: number;
|
|
204
|
+
cycleDetector: Record<string, unknown>;
|
|
205
|
+
padding: string;
|
|
206
|
+
}
|
|
207
|
+
export interface ToStringOption extends ToStringOptionBase {
|
|
208
|
+
add(someLine: string): void;
|
|
209
|
+
indent(a: string, b: string | null): void;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export class ToStringBuilder implements ToStringOption {
|
|
213
|
+
public level = 0;
|
|
214
|
+
public cycleDetector: Record<string, unknown> = {};
|
|
215
|
+
public padding = "";
|
|
216
|
+
|
|
217
|
+
private str: string[] = [];
|
|
218
|
+
|
|
219
|
+
constructor() {
|
|
220
|
+
//
|
|
221
|
+
this.str = [];
|
|
222
|
+
}
|
|
223
|
+
public add(line: string): void {
|
|
224
|
+
this.str.push(line);
|
|
225
|
+
}
|
|
226
|
+
public toString(): string {
|
|
227
|
+
return this.str.join("\n");
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
public indent(str: string, padding: string | null): string {
|
|
231
|
+
padding = padding || " ";
|
|
232
|
+
return str
|
|
233
|
+
.split("\n")
|
|
234
|
+
.map((r) => {
|
|
235
|
+
return padding + r;
|
|
236
|
+
})
|
|
237
|
+
.join("\n");
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function set_as_processed(options: ToStringOption, nodeId: NodeId) {
|
|
242
|
+
options.cycleDetector[nodeId.toString()] = nodeId;
|
|
243
|
+
}
|
|
244
|
+
function is_already_processed(options: ToStringOption, nodeId: NodeId): boolean {
|
|
245
|
+
return !!options.cycleDetector[nodeId.toString()];
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export function BaseNode_toString(this: BaseNode, options: ToStringOption): void {
|
|
249
|
+
options.level = options.level || 1;
|
|
250
|
+
|
|
251
|
+
set_as_processed(options, this.nodeId);
|
|
252
|
+
|
|
253
|
+
options.add("");
|
|
254
|
+
options.add(options.padding + chalk.yellow(" nodeId : ") + this.nodeId.toString());
|
|
255
|
+
options.add(
|
|
256
|
+
`${options.padding + chalk.yellow(" nodeClass : ")}${NodeClass[this.nodeClass]} (${this.nodeClass})`
|
|
257
|
+
);
|
|
258
|
+
options.add(options.padding + chalk.yellow(" browseName : ") + this.browseName.toString());
|
|
259
|
+
options.add(
|
|
260
|
+
options.padding +
|
|
261
|
+
chalk.yellow(" displayName : ") +
|
|
262
|
+
this.displayName.map((f) => `${f.locale} ${f.text}`).join(" | ")
|
|
263
|
+
);
|
|
264
|
+
|
|
265
|
+
options.add(
|
|
266
|
+
options.padding + chalk.yellow(" description : ") + (this.description ? this.description.toString() : "")
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export function BaseNode_References_toString(this: BaseNode, options: ToStringOption): void {
|
|
271
|
+
const _private = BaseNode_getPrivate(this);
|
|
272
|
+
|
|
273
|
+
const displayOptions = {
|
|
274
|
+
addressSpace: this.addressSpace
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
const addressSpace = this.addressSpace;
|
|
278
|
+
|
|
279
|
+
options.add(`${options.padding + chalk.yellow(" references : ")} length =${_private._referenceIdx.size}`);
|
|
280
|
+
|
|
281
|
+
function dump_reference(follow: boolean, reference: UAReference | null) {
|
|
282
|
+
if (!reference) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
const o = ReferenceImpl.resolveReferenceNode(addressSpace, reference);
|
|
286
|
+
if (!o) {
|
|
287
|
+
warningLog("cannot find reference", reference.toString());
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
const name = o.browseName.toString();
|
|
291
|
+
const modellingRule = o.modellingRule || " ";
|
|
292
|
+
const extra =
|
|
293
|
+
modellingRule[0] +
|
|
294
|
+
(() => {
|
|
295
|
+
switch (o.nodeClass) {
|
|
296
|
+
case NodeClass.Object:
|
|
297
|
+
return "[O] ";
|
|
298
|
+
case NodeClass.Variable:
|
|
299
|
+
return `[V] ${(o as UAVariable).dataType.toString(displayOptions).padEnd(10)}`;
|
|
300
|
+
case NodeClass.Method:
|
|
301
|
+
return "[M] ";
|
|
302
|
+
case NodeClass.DataType:
|
|
303
|
+
return "[DT]";
|
|
304
|
+
case NodeClass.ReferenceType:
|
|
305
|
+
return "[RT]";
|
|
306
|
+
case NodeClass.ObjectType:
|
|
307
|
+
return "[OT]";
|
|
308
|
+
case NodeClass.VariableType:
|
|
309
|
+
return "[VT]";
|
|
310
|
+
case NodeClass.View:
|
|
311
|
+
return "[V] ";
|
|
312
|
+
}
|
|
313
|
+
return "";
|
|
314
|
+
})();
|
|
315
|
+
options.add(
|
|
316
|
+
options.padding +
|
|
317
|
+
chalk.yellow(" +-> ") +
|
|
318
|
+
reference.toString(displayOptions) +
|
|
319
|
+
" " +
|
|
320
|
+
chalk.cyan(name.padEnd(25, " ")) +
|
|
321
|
+
" " +
|
|
322
|
+
chalk.magentaBright(extra)
|
|
323
|
+
);
|
|
324
|
+
|
|
325
|
+
// ignore HasTypeDefinition as it has been already handled
|
|
326
|
+
if (sameNodeId(reference.referenceType, hasTypeDefinition_ReferenceTypeNodeId) && reference.nodeId.namespace === 0) {
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
if (o) {
|
|
330
|
+
if (!is_already_processed(options, o.nodeId)) {
|
|
331
|
+
set_as_processed(options, o.nodeId);
|
|
332
|
+
if (options.level > 1 && follow) {
|
|
333
|
+
const rr = (o as { toString(options: ToStringOptionBase): string }).toString({
|
|
334
|
+
cycleDetector: options.cycleDetector,
|
|
335
|
+
level: options.level - 1,
|
|
336
|
+
padding: `${options.padding} `
|
|
337
|
+
});
|
|
338
|
+
options.add(rr);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// direct reference
|
|
345
|
+
for (const r of _private._referenceIdx.values()) {
|
|
346
|
+
dump_reference(false, r);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
options.add(
|
|
350
|
+
options.padding +
|
|
351
|
+
chalk.yellow(" back_references : ") +
|
|
352
|
+
chalk.cyan(" length =") +
|
|
353
|
+
_private._back_referenceIdx.size +
|
|
354
|
+
chalk.grey(" ( references held by other nodes involving this node)")
|
|
355
|
+
);
|
|
356
|
+
for (const r of _private._back_referenceIdx.values()) {
|
|
357
|
+
dump_reference(false, r);
|
|
358
|
+
}
|
|
359
|
+
// backward reference
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
function _UAType_toString(this: UAReferenceType | UADataType | UAObjectType | UAVariableType, options: ToStringOption): void {
|
|
363
|
+
if (this.subtypeOfObj) {
|
|
364
|
+
options.add(
|
|
365
|
+
options.padding +
|
|
366
|
+
chalk.yellow(" subtypeOf : ") +
|
|
367
|
+
this.subtypeOfObj.browseName.toString() +
|
|
368
|
+
" (" +
|
|
369
|
+
this.subtypeOfObj.nodeId.toString() +
|
|
370
|
+
")"
|
|
371
|
+
);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
function _UAInstance_toString(this: UAVariable | UAMethod | UAObject, options: ToStringOption): void {
|
|
376
|
+
if (this.typeDefinitionObj) {
|
|
377
|
+
options.add(
|
|
378
|
+
options.padding +
|
|
379
|
+
chalk.yellow(" typeDefinition : ") +
|
|
380
|
+
this.typeDefinitionObj.browseName.toString() +
|
|
381
|
+
" (" +
|
|
382
|
+
this.typeDefinitionObj.nodeId.toString() +
|
|
383
|
+
")"
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
export function UAVariableType_toString(this: UAVariableType, options: ToStringOption): void {
|
|
389
|
+
BaseNode_toString.call(this, options);
|
|
390
|
+
_UAType_toString.call(this, options);
|
|
391
|
+
VariableOrVariableType_toString.call(this, options);
|
|
392
|
+
BaseNode_References_toString.call(this, options);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export function UAVariable_toString(this: UAVariable, options: ToStringOption): void {
|
|
396
|
+
BaseNode_toString.call(this, options);
|
|
397
|
+
_UAInstance_toString.call(this, options);
|
|
398
|
+
VariableOrVariableType_toString.call(this, options);
|
|
399
|
+
AccessLevelFlags_toString.call(this, options);
|
|
400
|
+
BaseNode_References_toString.call(this, options);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export function UAObject_toString(this: UAObject, options: ToStringOption): void {
|
|
404
|
+
BaseNode_toString.call(this, options);
|
|
405
|
+
_UAInstance_toString.call(this, options);
|
|
406
|
+
BaseNode_References_toString.call(this, options);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export function UAObjectType_toString(this: UAObjectType, options: ToStringOption): void {
|
|
410
|
+
BaseNode_toString.call(this, options);
|
|
411
|
+
_UAType_toString.call(this, options);
|
|
412
|
+
BaseNode_References_toString.call(this, options);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export function valueRankToString(valueRank: number): string {
|
|
416
|
+
switch (valueRank) {
|
|
417
|
+
case 1:
|
|
418
|
+
return "OneDimension (1)";
|
|
419
|
+
case 0:
|
|
420
|
+
return "OneOrMoreDimensions (0)"; // The value is an array with one or more dimensions
|
|
421
|
+
case -1:
|
|
422
|
+
return "Scalar (-1)";
|
|
423
|
+
case -2:
|
|
424
|
+
return "Any (-2)"; // The value can be a scalar or an array with any number of dimensions
|
|
425
|
+
case -3:
|
|
426
|
+
return "ScalarOrOneDimension (2)"; // The value can be a scalar or a one dimensional array.
|
|
427
|
+
default:
|
|
428
|
+
if (valueRank > 0) {
|
|
429
|
+
return `${valueRank}-Dimensions`;
|
|
430
|
+
} else {
|
|
431
|
+
return `Invalid (${valueRank})`;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
function accessLevelFlagToString(flag: AccessLevelFlag): string {
|
|
437
|
+
const str: string[] = [];
|
|
438
|
+
if (flag & AccessLevelFlag.CurrentRead) {
|
|
439
|
+
str.push("CurrentRead");
|
|
440
|
+
}
|
|
441
|
+
if (flag & AccessLevelFlag.CurrentWrite) {
|
|
442
|
+
str.push("CurrentWrite");
|
|
443
|
+
}
|
|
444
|
+
if (flag & AccessLevelFlag.HistoryRead) {
|
|
445
|
+
str.push("HistoryRead");
|
|
446
|
+
}
|
|
447
|
+
if (flag & AccessLevelFlag.HistoryWrite) {
|
|
448
|
+
str.push("HistoryWrite");
|
|
449
|
+
}
|
|
450
|
+
if (flag & AccessLevelFlag.SemanticChange) {
|
|
451
|
+
str.push("SemanticChange");
|
|
452
|
+
}
|
|
453
|
+
if (flag & AccessLevelFlag.StatusWrite) {
|
|
454
|
+
str.push("StatusWrite");
|
|
455
|
+
}
|
|
456
|
+
if (flag & AccessLevelFlag.TimestampWrite) {
|
|
457
|
+
str.push("TimestampWrite");
|
|
458
|
+
}
|
|
459
|
+
return str.join(" | ");
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
function AccessLevelFlags_toString(this: UAVariable, options: ToStringOption) {
|
|
463
|
+
assert(options);
|
|
464
|
+
options.add(
|
|
465
|
+
`${options.padding + chalk.yellow(" accessLevel : ")} ${accessLevelFlagToString(this.accessLevel)}`
|
|
466
|
+
);
|
|
467
|
+
if (this.userAccessLevel !== undefined) {
|
|
468
|
+
options.add(
|
|
469
|
+
`${options.padding + chalk.yellow(" userAccessLevel : ")} ${accessLevelFlagToString(this.userAccessLevel)}`
|
|
470
|
+
);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
interface WithDataValue {
|
|
475
|
+
$dataValue?: DataValue;
|
|
476
|
+
}
|
|
477
|
+
export function VariableOrVariableType_toString(this: UAVariableType | UAVariable, options: ToStringOption): void {
|
|
478
|
+
assert(options);
|
|
479
|
+
if (this.dataType) {
|
|
480
|
+
const addressSpace = this.addressSpace;
|
|
481
|
+
const d = addressSpace.findNode(this.dataType);
|
|
482
|
+
const n = d ? `(${d.browseName.toString()})` : " (???)";
|
|
483
|
+
options.add(`${options.padding + chalk.yellow(" dataType : ")} ${this.dataType} ${n}`);
|
|
484
|
+
}
|
|
485
|
+
if (this.nodeClass === NodeClass.Variable) {
|
|
486
|
+
const _dataValue = (<WithDataValue>this).$dataValue;
|
|
487
|
+
if (_dataValue) {
|
|
488
|
+
options.add(
|
|
489
|
+
options.padding +
|
|
490
|
+
chalk.yellow(" value : ") +
|
|
491
|
+
"\n" +
|
|
492
|
+
options.indent(_dataValue.toString(), `${options.padding} | `)
|
|
493
|
+
);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
if (Object.hasOwn(this, "valueRank")) {
|
|
498
|
+
if (this.valueRank !== undefined) {
|
|
499
|
+
options.add(
|
|
500
|
+
`${options.padding + chalk.yellow(" valueRank : ")} ${valueRankToString(this.valueRank)}`
|
|
501
|
+
);
|
|
502
|
+
} else {
|
|
503
|
+
options.add(`${options.padding + chalk.yellow(" valueRank : ")} undefined`);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
if (this.minimumSamplingInterval !== undefined) {
|
|
507
|
+
options.add(
|
|
508
|
+
`${options.padding + chalk.yellow(" minimumSamplingInterval : ")} ${this.minimumSamplingInterval.toString()} ms`
|
|
509
|
+
);
|
|
510
|
+
}
|
|
511
|
+
if (this.arrayDimensions) {
|
|
512
|
+
options.add(
|
|
513
|
+
`${options.padding + chalk.yellow(" arrayDimension : ")} [${this.arrayDimensions.join(",").toString()} ]`
|
|
514
|
+
);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
*
|
|
520
|
+
*
|
|
521
|
+
* MyDeriveType ------------------- -> MyBaseType --------------> TopologyElementType
|
|
522
|
+
* | | |
|
|
523
|
+
* +- ParameterSet +-> ParameterSet +-> ParameterSet
|
|
524
|
+
* | |
|
|
525
|
+
* +- Foo1 |
|
|
526
|
+
* +- Bar
|
|
527
|
+
*
|
|
528
|
+
* Instance
|
|
529
|
+
*
|
|
530
|
+
* @param newParent
|
|
531
|
+
* @param node
|
|
532
|
+
* @param copyAlsoModellingRules
|
|
533
|
+
* @param optionalFilter
|
|
534
|
+
* @param extraInfo
|
|
535
|
+
* @param browseNameMap
|
|
536
|
+
* @returns
|
|
537
|
+
*/
|
|
538
|
+
function _clone_children_on_template(
|
|
539
|
+
nodeToClone: UAObject | UAVariable | UAMethod | UAObjectType | UAVariableType,
|
|
540
|
+
newParent: BaseNode,
|
|
541
|
+
node: BaseNode,
|
|
542
|
+
copyAlsoModellingRules: boolean,
|
|
543
|
+
optionalFilter: CloneFilter,
|
|
544
|
+
extraInfo: CloneExtraInfo
|
|
545
|
+
) {
|
|
546
|
+
/**
|
|
547
|
+
* the type definition node of the node to clone
|
|
548
|
+
*/
|
|
549
|
+
const nodeToCloneTypeDefinition =
|
|
550
|
+
nodeToClone.nodeClass === NodeClass.ObjectType || nodeToClone.nodeClass === NodeClass.VariableType
|
|
551
|
+
? nodeToClone.subtypeOfObj
|
|
552
|
+
: null;
|
|
553
|
+
if (!nodeToCloneTypeDefinition) return;
|
|
554
|
+
|
|
555
|
+
// c8 ignore next
|
|
556
|
+
doTrace &&
|
|
557
|
+
traceLog(
|
|
558
|
+
extraInfo?.pad(),
|
|
559
|
+
chalk.gray(
|
|
560
|
+
"-------------------- now cloning children on template ",
|
|
561
|
+
node.browseName.toString(),
|
|
562
|
+
node.nodeId.toString(),
|
|
563
|
+
nodeToCloneTypeDefinition.browseName.toString()
|
|
564
|
+
)
|
|
565
|
+
);
|
|
566
|
+
|
|
567
|
+
const namespace = newParent.namespace;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* the child node of the new parent that match the node to clone or enrich
|
|
571
|
+
*/
|
|
572
|
+
const newParentChild = newParent.getChildByName(node.browseName);
|
|
573
|
+
if (!newParentChild) {
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
// we have found a matching child on the new parent.
|
|
577
|
+
// the mission is to enrich this child node with components and properties that
|
|
578
|
+
// exist also in the template
|
|
579
|
+
|
|
580
|
+
let typeDefinitionNode: UAVariableType | UAObjectType | null = nodeToCloneTypeDefinition;
|
|
581
|
+
while (typeDefinitionNode) {
|
|
582
|
+
// c8 ignore next
|
|
583
|
+
doTrace &&
|
|
584
|
+
traceLog(
|
|
585
|
+
extraInfo?.pad(),
|
|
586
|
+
chalk.green(
|
|
587
|
+
"-------------------- now cloning children on ",
|
|
588
|
+
newParentChild.browseName.toString(),
|
|
589
|
+
newParentChild.nodeId.toString(),
|
|
590
|
+
" (child of ",
|
|
591
|
+
node.browseName.toString(),
|
|
592
|
+
node.nodeId.toString(),
|
|
593
|
+
") from ",
|
|
594
|
+
typeDefinitionNode.browseName.toString()
|
|
595
|
+
)
|
|
596
|
+
);
|
|
597
|
+
|
|
598
|
+
// Find aggregates with same browseName as node. Do not search children as this includes nodes with HasSubType relation which we do
|
|
599
|
+
// not want. See issue #1326.
|
|
600
|
+
const aggregates = typeDefinitionNode.getAggregates().filter((n) => n.browseName.equals(node.browseName));
|
|
601
|
+
const typeDefinitionChild = aggregates.length > 0 ? aggregates[0] : null;
|
|
602
|
+
if (typeDefinitionChild) {
|
|
603
|
+
const references = typeDefinitionChild.findReferencesEx("Aggregates", BrowseDirection.Forward);
|
|
604
|
+
|
|
605
|
+
for (const ref of references) {
|
|
606
|
+
const grandChild = ref.node as UAVariable | UAObject | UAMethod;
|
|
607
|
+
if (grandChild.modellingRule === "MandatoryPlaceholder" || grandChild.modellingRule === "OptionalPlaceholder")
|
|
608
|
+
continue;
|
|
609
|
+
// if not already node present in new Parent => just ignore
|
|
610
|
+
const hasAlready = newParentChild.getChildByName(grandChild.browseName) !== null;
|
|
611
|
+
if (!hasAlready) {
|
|
612
|
+
if (optionalFilter && node && !optionalFilter.shouldKeep(node)) {
|
|
613
|
+
// c8 ignore next
|
|
614
|
+
doTrace &&
|
|
615
|
+
traceLog(
|
|
616
|
+
extraInfo.pad(),
|
|
617
|
+
"skipping optional ",
|
|
618
|
+
node.browseName.toString(),
|
|
619
|
+
"that doesn't appear in the filter"
|
|
620
|
+
);
|
|
621
|
+
continue; // skip this node
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
const options = {
|
|
625
|
+
namespace,
|
|
626
|
+
references: [
|
|
627
|
+
new ReferenceImpl({
|
|
628
|
+
referenceType: ref.referenceType,
|
|
629
|
+
isForward: false,
|
|
630
|
+
nodeId: newParentChild.nodeId
|
|
631
|
+
})
|
|
632
|
+
],
|
|
633
|
+
copyAlsoModellingRules
|
|
634
|
+
};
|
|
635
|
+
|
|
636
|
+
const alreadyCloned = extraInfo.getCloned({
|
|
637
|
+
originalParent: nodeToClone,
|
|
638
|
+
clonedParent: newParent,
|
|
639
|
+
originalNode: grandChild
|
|
640
|
+
});
|
|
641
|
+
if (alreadyCloned) {
|
|
642
|
+
alreadyCloned.addReference({
|
|
643
|
+
referenceType: ref.referenceType,
|
|
644
|
+
isForward: false,
|
|
645
|
+
nodeId: newParentChild.nodeId
|
|
646
|
+
});
|
|
647
|
+
} else {
|
|
648
|
+
const clonedGrandChild = grandChild.clone(options, optionalFilter, extraInfo);
|
|
649
|
+
extraInfo.registerClonedObject({
|
|
650
|
+
originalNode: grandChild,
|
|
651
|
+
clonedNode: clonedGrandChild
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
typeDefinitionNode = typeDefinitionNode.subtypeOfObj;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
/*
|
|
662
|
+
* clone properties and methods
|
|
663
|
+
* @private
|
|
664
|
+
*/
|
|
665
|
+
function _clone_collection_new(
|
|
666
|
+
nodeToClone: UAObject | UAVariable | UAMethod | UAObjectType | UAVariableType,
|
|
667
|
+
newParent: BaseNode,
|
|
668
|
+
collectionRef: UAReference[],
|
|
669
|
+
copyAlsoModellingRules: boolean,
|
|
670
|
+
optionalFilter: CloneFilter,
|
|
671
|
+
extraInfo: CloneExtraInfo,
|
|
672
|
+
browseNameMap: Set<string>
|
|
673
|
+
): void {
|
|
674
|
+
const namespace = newParent.namespace;
|
|
675
|
+
extraInfo = extraInfo || new CloneHelper();
|
|
676
|
+
const addressSpace = newParent.addressSpace;
|
|
677
|
+
assert(!optionalFilter || (typeof optionalFilter.shouldKeep === "function" && typeof optionalFilter.filterFor === "function"));
|
|
678
|
+
|
|
679
|
+
for (const reference of collectionRef) {
|
|
680
|
+
const node = ReferenceImpl.resolveReferenceNode(addressSpace, reference) as UAVariable | UAObject | UAMethod;
|
|
681
|
+
// ensure node is of the correct type,
|
|
682
|
+
// it may happen that the xml nodeset2 file was malformed
|
|
683
|
+
|
|
684
|
+
// c8 ignore next
|
|
685
|
+
if (typeof node.clone !== "function") {
|
|
686
|
+
warningLog(
|
|
687
|
+
chalk.red("Warning : cannot clone node ") +
|
|
688
|
+
fullPath2(node) +
|
|
689
|
+
" of class " +
|
|
690
|
+
NodeClass[node.nodeClass].toString() +
|
|
691
|
+
" while cloning " +
|
|
692
|
+
fullPath2(newParent)
|
|
693
|
+
);
|
|
694
|
+
continue;
|
|
695
|
+
}
|
|
696
|
+
if (node && !node.modellingRule) {
|
|
697
|
+
// c8 ignore next
|
|
698
|
+
doTrace && traceLog(extraInfo.pad(), "skipping with no modelling rule", fullPath2(node));
|
|
699
|
+
// those node stays in the Type
|
|
700
|
+
continue; // skip this node
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
if (optionalFilter && node && !optionalFilter.shouldKeep(node)) {
|
|
704
|
+
// c8 ignore next
|
|
705
|
+
doTrace && traceLog(extraInfo.pad(), "skipping optional that doesn't appear in the filter", fullPath2(node));
|
|
706
|
+
continue; // skip this node
|
|
707
|
+
}
|
|
708
|
+
const key = `${newParent.nodeId.toString()}(${newParent.browseName.toString()})/${node.browseName.toString()}`;
|
|
709
|
+
if (browseNameMap?.has(key)) {
|
|
710
|
+
_clone_children_on_template(nodeToClone, newParent, node, copyAlsoModellingRules, optionalFilter, extraInfo);
|
|
711
|
+
doTrace &&
|
|
712
|
+
traceLog(
|
|
713
|
+
extraInfo.pad(),
|
|
714
|
+
"skipping required node with same browseName",
|
|
715
|
+
fullPath2(node),
|
|
716
|
+
"because it has already been cloned",
|
|
717
|
+
"key=",
|
|
718
|
+
key
|
|
719
|
+
);
|
|
720
|
+
|
|
721
|
+
continue; // skipping node with same browseName
|
|
722
|
+
}
|
|
723
|
+
browseNameMap?.add(key);
|
|
724
|
+
|
|
725
|
+
// assert(reference.isForward);
|
|
726
|
+
// assert(reference.referenceType instanceof NodeId, "" + reference.referenceType.toString());
|
|
727
|
+
const options = {
|
|
728
|
+
namespace,
|
|
729
|
+
references: [new ReferenceImpl({ referenceType: reference.referenceType, isForward: false, nodeId: newParent.nodeId })],
|
|
730
|
+
copyAlsoModellingRules
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
const alreadyCloned = extraInfo.getCloned({ originalParent: nodeToClone, clonedParent: newParent, originalNode: node });
|
|
734
|
+
if (alreadyCloned) {
|
|
735
|
+
// c8 ignore next
|
|
736
|
+
doTrace &&
|
|
737
|
+
traceLog(
|
|
738
|
+
extraInfo.pad(),
|
|
739
|
+
"node ",
|
|
740
|
+
fullPath2(node),
|
|
741
|
+
"already cloned as",
|
|
742
|
+
fullPath2(alreadyCloned),
|
|
743
|
+
"\nnode to clone =",
|
|
744
|
+
fullPath2(nodeToClone),
|
|
745
|
+
"\nnew parent =",
|
|
746
|
+
fullPath2(newParent)
|
|
747
|
+
);
|
|
748
|
+
|
|
749
|
+
const hasReference =
|
|
750
|
+
alreadyCloned.findReferencesExAsObject(reference.referenceType, BrowseDirection.Inverse).length > 0;
|
|
751
|
+
if (!hasReference) {
|
|
752
|
+
alreadyCloned.addReference({
|
|
753
|
+
referenceType: reference.referenceType,
|
|
754
|
+
isForward: false,
|
|
755
|
+
nodeId: newParent.nodeId
|
|
756
|
+
});
|
|
757
|
+
} else {
|
|
758
|
+
// c8 ignore next
|
|
759
|
+
doTrace && traceLog(extraInfo.pad(), "reference to node ", fullPath2(alreadyCloned), " already exists !");
|
|
760
|
+
}
|
|
761
|
+
} else {
|
|
762
|
+
// c8 ignore next
|
|
763
|
+
doTrace &&
|
|
764
|
+
traceLog(
|
|
765
|
+
extraInfo.pad(),
|
|
766
|
+
"cloning => ",
|
|
767
|
+
reference.referenceType.toString({ addressSpace }),
|
|
768
|
+
"=>",
|
|
769
|
+
fullPath2(node),
|
|
770
|
+
chalk.magentaBright(node.typeDefinitionObj?.browseName.toString())
|
|
771
|
+
);
|
|
772
|
+
|
|
773
|
+
extraInfo.level += 1;
|
|
774
|
+
const clonedNode = node.clone(options, optionalFilter, extraInfo);
|
|
775
|
+
extraInfo.level -= 1;
|
|
776
|
+
|
|
777
|
+
// c8 ignore next
|
|
778
|
+
doTrace &&
|
|
779
|
+
traceLog(
|
|
780
|
+
extraInfo.pad(),
|
|
781
|
+
"cloned => ",
|
|
782
|
+
fullPath2(node),
|
|
783
|
+
"",
|
|
784
|
+
extraInfo.pad(),
|
|
785
|
+
" original nodeId",
|
|
786
|
+
node.nodeId.toString(),
|
|
787
|
+
"",
|
|
788
|
+
extraInfo.pad(),
|
|
789
|
+
" cloned nodeId",
|
|
790
|
+
clonedNode.nodeId.toString(),
|
|
791
|
+
`${fullPath2(clonedNode)}`
|
|
792
|
+
);
|
|
793
|
+
|
|
794
|
+
extraInfo.level++;
|
|
795
|
+
_clone_children_on_template(nodeToClone, newParent, node, copyAlsoModellingRules, optionalFilter, extraInfo);
|
|
796
|
+
extraInfo.level--;
|
|
797
|
+
|
|
798
|
+
// also clone or instantiate interface members that may be required in the optionals
|
|
799
|
+
extraInfo.level++;
|
|
800
|
+
_cloneInterface(nodeToClone, newParent, node, optionalFilter, extraInfo, browseNameMap);
|
|
801
|
+
extraInfo.level--;
|
|
802
|
+
// === clone);
|
|
803
|
+
// extraInfo.registerClonedObject(clone, node);
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
type UAInterface = UAObjectType;
|
|
809
|
+
function _extractInterfaces2(typeDefinitionNode: UAObjectType | UAVariableType, extraInfo: CloneExtraInfo): UAInterface[] {
|
|
810
|
+
if (
|
|
811
|
+
!typeDefinitionNode ||
|
|
812
|
+
(typeDefinitionNode.nodeId.namespace === 0 &&
|
|
813
|
+
(typeDefinitionNode.nodeId.value === ObjectTypeIds.BaseObjectType ||
|
|
814
|
+
typeDefinitionNode.nodeId.value === VariableTypeIds.BaseVariableType))
|
|
815
|
+
) {
|
|
816
|
+
return [];
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
const addressSpace = typeDefinitionNode.addressSpace;
|
|
820
|
+
|
|
821
|
+
const hasInterfaceReference = addressSpace.findReferenceType("HasInterface");
|
|
822
|
+
if (!hasInterfaceReference) {
|
|
823
|
+
// this version of the standard UA namespace doesn't support Interface yet
|
|
824
|
+
return [];
|
|
825
|
+
}
|
|
826
|
+
// example:
|
|
827
|
+
// FolderType
|
|
828
|
+
// FunctionalGroupType
|
|
829
|
+
// MachineryItemIdentificationType : IMachineryItemVendorNameplateType
|
|
830
|
+
// MachineIdentificationType : IMachineTagNameplateType, IMachineVendorNamePlateType
|
|
831
|
+
// MachineToolIdentificationType
|
|
832
|
+
//
|
|
833
|
+
//
|
|
834
|
+
// IMachineTagNameplateType -subtypeOf-> ITagNameplateType
|
|
835
|
+
// IMachineVendorNamePlateType -subtypeOf-> IMachineryItemVendorNamePlateType
|
|
836
|
+
// IMachineryItemVendorNamePlateType -subtypeOf-> IVendorNameplateType
|
|
837
|
+
const interfacesRef = typeDefinitionNode.findReferencesEx("HasInterface", BrowseDirection.Forward);
|
|
838
|
+
const interfaces = interfacesRef.map((r) => addressSpace.findNode(r.nodeId) as UAInterface);
|
|
839
|
+
|
|
840
|
+
const baseInterfaces: UAInterface[] = [];
|
|
841
|
+
for (const iface of interfaces) {
|
|
842
|
+
// c8 ignore next
|
|
843
|
+
doTrace &&
|
|
844
|
+
traceLog(
|
|
845
|
+
extraInfo.pad(),
|
|
846
|
+
typeDefinitionNode.browseName.toString(),
|
|
847
|
+
" - has interface -> ",
|
|
848
|
+
iface.browseName.toString()
|
|
849
|
+
);
|
|
850
|
+
baseInterfaces.push(iface);
|
|
851
|
+
if (iface.subtypeOfObj) {
|
|
852
|
+
extraInfo.level++;
|
|
853
|
+
baseInterfaces.push(..._extractInterfaces2(iface.subtypeOfObj, extraInfo));
|
|
854
|
+
extraInfo.level--;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
interfaces.push(...baseInterfaces);
|
|
858
|
+
if (typeDefinitionNode.subtypeOfObj) {
|
|
859
|
+
// c8 ignore next
|
|
860
|
+
doTrace &&
|
|
861
|
+
traceLog(
|
|
862
|
+
extraInfo.pad(),
|
|
863
|
+
typeDefinitionNode.browseName.toString(),
|
|
864
|
+
" - subtypeOf -> ",
|
|
865
|
+
typeDefinitionNode.subtypeOfObj.browseName.toString()
|
|
866
|
+
);
|
|
867
|
+
extraInfo.level++;
|
|
868
|
+
interfaces.push(..._extractInterfaces2(typeDefinitionNode.subtypeOfObj, extraInfo));
|
|
869
|
+
extraInfo.level--;
|
|
870
|
+
}
|
|
871
|
+
const deduplicatedInterfaces = [...new Set(interfaces)];
|
|
872
|
+
|
|
873
|
+
// c8 ignore next
|
|
874
|
+
doTrace &&
|
|
875
|
+
deduplicatedInterfaces.length &&
|
|
876
|
+
traceLog(
|
|
877
|
+
extraInfo.pad(),
|
|
878
|
+
chalk.yellow("Interface for ", typeDefinitionNode.browseName.toString()),
|
|
879
|
+
"=",
|
|
880
|
+
deduplicatedInterfaces.map((x) => x.browseName.toString()).join(" ")
|
|
881
|
+
);
|
|
882
|
+
return deduplicatedInterfaces;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
function _cloneInterface(
|
|
886
|
+
nodeToClone: UAObject | UAVariable | UAMethod | UAObjectType | UAVariableType,
|
|
887
|
+
_newParent: BaseNode,
|
|
888
|
+
node: UAObject | UAVariable | UAMethod,
|
|
889
|
+
optionalFilter: CloneFilter,
|
|
890
|
+
extraInfo: CloneExtraInfo,
|
|
891
|
+
browseNameMap: Set<string>
|
|
892
|
+
): void {
|
|
893
|
+
// c8 ignore next
|
|
894
|
+
doTrace &&
|
|
895
|
+
traceLog(
|
|
896
|
+
extraInfo?.pad(),
|
|
897
|
+
chalk.green("-------------------- now cloning interfaces of ", node.browseName.toString(), node.nodeId.toString())
|
|
898
|
+
);
|
|
899
|
+
|
|
900
|
+
extraInfo = extraInfo || new CloneHelper();
|
|
901
|
+
const addressSpace = node.addressSpace;
|
|
902
|
+
|
|
903
|
+
if (node.nodeClass !== NodeClass.Object && node.nodeClass !== NodeClass.Variable) {
|
|
904
|
+
return;
|
|
905
|
+
}
|
|
906
|
+
const typeDefinitionNode = node.typeDefinitionObj;
|
|
907
|
+
if (!typeDefinitionNode) {
|
|
908
|
+
return;
|
|
909
|
+
}
|
|
910
|
+
const interfaces = _extractInterfaces2(typeDefinitionNode, extraInfo);
|
|
911
|
+
if (interfaces.length === 0) {
|
|
912
|
+
// c8 ignore next
|
|
913
|
+
doTrace &&
|
|
914
|
+
false &&
|
|
915
|
+
traceLog(extraInfo.pad(), chalk.yellow("No interface for ", node.browseName.toString(), node.nodeId.toString()));
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
// c8 ignore next
|
|
920
|
+
doTrace && traceLog(extraInfo?.pad(), chalk.green("-------------------- interfaces are ", interfaces.length));
|
|
921
|
+
|
|
922
|
+
const localFilter = optionalFilter.filterFor(node);
|
|
923
|
+
|
|
924
|
+
for (const iface of interfaces) {
|
|
925
|
+
const aggregates = iface.findReferencesEx("Aggregates", BrowseDirection.Forward);
|
|
926
|
+
if (aggregates.length === 0) continue;
|
|
927
|
+
// c8 ignore next
|
|
928
|
+
doTrace &&
|
|
929
|
+
traceLog(
|
|
930
|
+
extraInfo.pad(),
|
|
931
|
+
chalk.magentaBright(" interface ", iface.browseName.toString()),
|
|
932
|
+
`\n${extraInfo?.pad()}`,
|
|
933
|
+
aggregates.map((r) => r.toString({ addressSpace })).join(`\n${extraInfo?.pad()}`)
|
|
934
|
+
);
|
|
935
|
+
_clone_collection_new(nodeToClone, node, aggregates, false, localFilter, extraInfo, browseNameMap);
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
function __clone_organizes_references(
|
|
940
|
+
nodeToClone: UAObject | UAVariable | UAMethod | UAObjectType | UAVariableType,
|
|
941
|
+
newParent: UAObject | UAVariable | UAMethod,
|
|
942
|
+
copyAlsoModellingRules: boolean,
|
|
943
|
+
optionalFilter: CloneFilter,
|
|
944
|
+
extraInfo: CloneExtraInfo,
|
|
945
|
+
browseNameMap: Set<string>
|
|
946
|
+
): void {
|
|
947
|
+
// find all references that derives from the Organizes
|
|
948
|
+
const organizedRef = nodeToClone.findReferencesEx("Organizes", BrowseDirection.Forward);
|
|
949
|
+
if (organizedRef.length === 0) return;
|
|
950
|
+
_clone_collection_new(nodeToClone, newParent, organizedRef, copyAlsoModellingRules, optionalFilter, extraInfo, browseNameMap);
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
function __clone_children_references(
|
|
954
|
+
nodeToClone: UAObject | UAVariable | UAMethod | UAObjectType | UAVariableType,
|
|
955
|
+
newParent: UAObject | UAVariable | UAMethod,
|
|
956
|
+
copyAlsoModellingRules: boolean,
|
|
957
|
+
optionalFilter: CloneFilter,
|
|
958
|
+
extraInfo: CloneExtraInfo,
|
|
959
|
+
browseNameMap: Set<string>
|
|
960
|
+
): void {
|
|
961
|
+
// find all references that derives from the Aggregates
|
|
962
|
+
const aggregatesRef = nodeToClone.findReferencesEx("Aggregates", BrowseDirection.Forward);
|
|
963
|
+
if (aggregatesRef.length === 0) return;
|
|
964
|
+
_clone_collection_new(nodeToClone, newParent, aggregatesRef, copyAlsoModellingRules, optionalFilter, extraInfo, browseNameMap);
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
function __clone_interfaces_related_references(
|
|
968
|
+
nodeToClone: UAObject | UAVariable | UAMethod | UAObjectType | UAVariableType,
|
|
969
|
+
newParent: UAObject | UAVariable | UAMethod,
|
|
970
|
+
copyAlsoModellingRules: boolean,
|
|
971
|
+
optionalFilter: CloneFilter,
|
|
972
|
+
extraInfo: CloneExtraInfo,
|
|
973
|
+
browseNameMap: Set<string>
|
|
974
|
+
): void {
|
|
975
|
+
// find all references that derives from the HasInterface
|
|
976
|
+
const hasInterfaceRef = nodeToClone.findReferencesEx("HasInterface", BrowseDirection.Forward);
|
|
977
|
+
if (hasInterfaceRef.length === 0) return;
|
|
978
|
+
for (const ref of hasInterfaceRef) {
|
|
979
|
+
let typeDefinitionNode = ReferenceImpl.resolveReferenceNode(nodeToClone.addressSpace, ref) as UAObjectType | null;
|
|
980
|
+
if (!typeDefinitionNode) {
|
|
981
|
+
continue;
|
|
982
|
+
}
|
|
983
|
+
if (doTrace)
|
|
984
|
+
traceLog(
|
|
985
|
+
extraInfo?.pad(),
|
|
986
|
+
chalk.blueBright(
|
|
987
|
+
newParent.browseName.toString(),
|
|
988
|
+
"-----> Exploring interface ",
|
|
989
|
+
typeDefinitionNode.browseName.toString()
|
|
990
|
+
)
|
|
991
|
+
);
|
|
992
|
+
while (typeDefinitionNode) {
|
|
993
|
+
// c8 ignore next
|
|
994
|
+
doTrace &&
|
|
995
|
+
traceLog(
|
|
996
|
+
extraInfo?.pad(),
|
|
997
|
+
chalk.blueBright(newParent.browseName.toString(), "-----> Exploring ", typeDefinitionNode.browseName.toString())
|
|
998
|
+
);
|
|
999
|
+
__clone_children_references(
|
|
1000
|
+
typeDefinitionNode,
|
|
1001
|
+
newParent,
|
|
1002
|
+
copyAlsoModellingRules,
|
|
1003
|
+
optionalFilter,
|
|
1004
|
+
extraInfo,
|
|
1005
|
+
browseNameMap
|
|
1006
|
+
);
|
|
1007
|
+
typeDefinitionNode = typeDefinitionNode.subtypeOfObj;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
export function _clone_hierarchical_references(
|
|
1012
|
+
nodeToClone: UAObject | UAVariable | UAMethod | UAObjectType | UAVariableType,
|
|
1013
|
+
newParent: UAObject | UAVariable | UAMethod,
|
|
1014
|
+
copyAlsoModellingRules: boolean,
|
|
1015
|
+
optionalFilter: CloneFilter,
|
|
1016
|
+
extraInfo: CloneExtraInfo,
|
|
1017
|
+
browseNameMap: Set<string>
|
|
1018
|
+
) {
|
|
1019
|
+
__clone_children_references(nodeToClone, newParent, copyAlsoModellingRules, optionalFilter, extraInfo, browseNameMap);
|
|
1020
|
+
__clone_organizes_references(nodeToClone, newParent, copyAlsoModellingRules, optionalFilter, extraInfo, browseNameMap);
|
|
1021
|
+
// __clone_interfaces_related_references(nodeToClone, newParent, copyAlsoModellingRules, optionalFilter, extraInfo, browseNameMap);
|
|
1022
|
+
}
|
|
1023
|
+
export function _clone_non_hierarchical_references(
|
|
1024
|
+
nodeToClone: UAObject | UAVariable | UAMethod | UAObjectType | UAVariableType,
|
|
1025
|
+
newParent: BaseNode,
|
|
1026
|
+
copyAlsoModellingRules: boolean,
|
|
1027
|
+
optionalFilter: CloneFilter,
|
|
1028
|
+
extraInfo: CloneExtraInfo,
|
|
1029
|
+
browseNameMap: Set<string>
|
|
1030
|
+
): void {
|
|
1031
|
+
// clone only some non hierarchical_references that we do want to clone
|
|
1032
|
+
// such as:
|
|
1033
|
+
// HasSubStateMachine
|
|
1034
|
+
// (may be other as well later ... to do )
|
|
1035
|
+
assert(newParent instanceof BaseNodeImpl);
|
|
1036
|
+
// find all reference that derives from the HasSubStateMachine
|
|
1037
|
+
const references = nodeToClone.findReferencesEx("HasSubStateMachine", BrowseDirection.Forward);
|
|
1038
|
+
if (references.length === 0) return;
|
|
1039
|
+
_clone_collection_new(nodeToClone, newParent, references, copyAlsoModellingRules, optionalFilter, extraInfo, browseNameMap);
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
/**
|
|
1043
|
+
|
|
1044
|
+
* @private
|
|
1045
|
+
*/
|
|
1046
|
+
export function _clone<T extends UAObject | UAVariable | UAMethod, O>(
|
|
1047
|
+
originalNode: T,
|
|
1048
|
+
Constructor: new (options: O) => T,
|
|
1049
|
+
options: CloneOptions,
|
|
1050
|
+
optionalFilter: CloneFilter,
|
|
1051
|
+
extraInfo: CloneExtraInfo
|
|
1052
|
+
): T {
|
|
1053
|
+
assert(typeof Constructor === "function");
|
|
1054
|
+
assert(options !== null && typeof options === "object");
|
|
1055
|
+
assert(
|
|
1056
|
+
!extraInfo || (extraInfo !== null && typeof extraInfo === "object" && typeof extraInfo.registerClonedObject === "function")
|
|
1057
|
+
);
|
|
1058
|
+
const namespace = options.namespace;
|
|
1059
|
+
const constructorOptions = {
|
|
1060
|
+
...options,
|
|
1061
|
+
addressSpace: namespace.addressSpace,
|
|
1062
|
+
browseName: originalNode.browseName,
|
|
1063
|
+
description: originalNode.description,
|
|
1064
|
+
displayName: originalNode.displayName,
|
|
1065
|
+
nodeClass: originalNode.nodeClass
|
|
1066
|
+
};
|
|
1067
|
+
constructorOptions.references = options.references || [];
|
|
1068
|
+
|
|
1069
|
+
if (originalNode.nodeClass === NodeClass.Variable || originalNode.nodeClass === NodeClass.Object) {
|
|
1070
|
+
const voThis = originalNode as UAObject | UAVariable;
|
|
1071
|
+
if (voThis.typeDefinition) {
|
|
1072
|
+
constructorOptions.references.push(
|
|
1073
|
+
new ReferenceImpl({
|
|
1074
|
+
isForward: true,
|
|
1075
|
+
nodeId: voThis.typeDefinition,
|
|
1076
|
+
referenceType: resolveNodeId("HasTypeDefinition")
|
|
1077
|
+
})
|
|
1078
|
+
);
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
if (!constructorOptions.modellingRule) {
|
|
1083
|
+
if (originalNode.modellingRule && options.copyAlsoModellingRules) {
|
|
1084
|
+
const modellingRuleNode = originalNode.findReferencesAsObject("HasModellingRule", true)[0];
|
|
1085
|
+
assert(modellingRuleNode);
|
|
1086
|
+
constructorOptions.references.push(
|
|
1087
|
+
new ReferenceImpl({
|
|
1088
|
+
isForward: true,
|
|
1089
|
+
nodeId: modellingRuleNode.nodeId,
|
|
1090
|
+
referenceType: resolveNodeId("HasModellingRule")
|
|
1091
|
+
})
|
|
1092
|
+
);
|
|
1093
|
+
}
|
|
1094
|
+
} else {
|
|
1095
|
+
UANamespace_process_modelling_rule(constructorOptions.references, constructorOptions.modellingRule);
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
constructorOptions.nodeId = namespace.constructNodeId(constructorOptions as ConstructNodeIdOptions);
|
|
1099
|
+
|
|
1100
|
+
assert(constructorOptions.nodeId instanceof NodeId);
|
|
1101
|
+
|
|
1102
|
+
const clonedNode = new Constructor(constructorOptions as unknown as O);
|
|
1103
|
+
(originalNode.addressSpace as AddressSpacePrivate)._register(clonedNode);
|
|
1104
|
+
|
|
1105
|
+
extraInfo.registerClonedObject({
|
|
1106
|
+
originalNode,
|
|
1107
|
+
clonedNode
|
|
1108
|
+
});
|
|
1109
|
+
|
|
1110
|
+
if (!options.ignoreChildren) {
|
|
1111
|
+
// clone children and the rest ....
|
|
1112
|
+
options.copyAlsoModellingRules = options.copyAlsoModellingRules || false;
|
|
1113
|
+
|
|
1114
|
+
const newFilter = optionalFilter.filterFor(clonedNode);
|
|
1115
|
+
|
|
1116
|
+
const browseNameMap = new Set<string>();
|
|
1117
|
+
_clone_hierarchical_references(
|
|
1118
|
+
originalNode,
|
|
1119
|
+
clonedNode,
|
|
1120
|
+
options.copyAlsoModellingRules,
|
|
1121
|
+
newFilter,
|
|
1122
|
+
extraInfo,
|
|
1123
|
+
browseNameMap
|
|
1124
|
+
);
|
|
1125
|
+
|
|
1126
|
+
if (originalNode.nodeClass === NodeClass.Object || originalNode.nodeClass === NodeClass.Variable) {
|
|
1127
|
+
let typeDefinitionNode: UAVariableType | UAObjectType | null = originalNode.typeDefinitionObj;
|
|
1128
|
+
|
|
1129
|
+
extraInfo.pushContext({
|
|
1130
|
+
clonedParent: clonedNode,
|
|
1131
|
+
originalParent: originalNode
|
|
1132
|
+
});
|
|
1133
|
+
|
|
1134
|
+
while (typeDefinitionNode) {
|
|
1135
|
+
// c8 ignore next
|
|
1136
|
+
doTrace &&
|
|
1137
|
+
traceLog(
|
|
1138
|
+
extraInfo?.pad(),
|
|
1139
|
+
chalk.blueBright(
|
|
1140
|
+
originalNode.browseName.toString(),
|
|
1141
|
+
"-----> Exploring ",
|
|
1142
|
+
typeDefinitionNode.browseName.toString()
|
|
1143
|
+
)
|
|
1144
|
+
);
|
|
1145
|
+
_clone_hierarchical_references(
|
|
1146
|
+
typeDefinitionNode,
|
|
1147
|
+
clonedNode,
|
|
1148
|
+
options.copyAlsoModellingRules,
|
|
1149
|
+
newFilter,
|
|
1150
|
+
extraInfo,
|
|
1151
|
+
browseNameMap
|
|
1152
|
+
);
|
|
1153
|
+
typeDefinitionNode = typeDefinitionNode.subtypeOfObj;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
extraInfo.popContext();
|
|
1157
|
+
}
|
|
1158
|
+
_clone_non_hierarchical_references(
|
|
1159
|
+
originalNode,
|
|
1160
|
+
clonedNode,
|
|
1161
|
+
options.copyAlsoModellingRules,
|
|
1162
|
+
newFilter,
|
|
1163
|
+
extraInfo,
|
|
1164
|
+
browseNameMap
|
|
1165
|
+
);
|
|
1166
|
+
}
|
|
1167
|
+
clonedNode.propagate_back_references();
|
|
1168
|
+
clonedNode.install_extra_properties();
|
|
1169
|
+
|
|
1170
|
+
return clonedNode;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* @returns false when the reference points to a node that is not (yet) in the address space:
|
|
1175
|
+
* such a dangling reference cannot be indexed by browse name, and the caller must remember that
|
|
1176
|
+
* the index is incomplete rather than silently lose the child.
|
|
1177
|
+
*/
|
|
1178
|
+
function _add(_childByNameMap: HierarchicalIndexMap, reference: UAReferenceWithNodeRef): boolean {
|
|
1179
|
+
const targetNode = reference.node;
|
|
1180
|
+
if (!targetNode) return false;
|
|
1181
|
+
const hash = targetNode.browseName?.name || "";
|
|
1182
|
+
const existing = _childByNameMap.get(hash);
|
|
1183
|
+
if (existing) {
|
|
1184
|
+
if (Array.isArray(existing)) {
|
|
1185
|
+
existing.push(reference);
|
|
1186
|
+
} else {
|
|
1187
|
+
_childByNameMap.set(hash, [existing, reference as UAReferenceWithNodeRef]);
|
|
1188
|
+
}
|
|
1189
|
+
} else {
|
|
1190
|
+
_childByNameMap.set(hash, reference as UAReferenceWithNodeRef);
|
|
1191
|
+
}
|
|
1192
|
+
return true;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
function sameRef(a: UAReference, b: UAReference) {
|
|
1196
|
+
if (a.isForward !== b.isForward) return false;
|
|
1197
|
+
if (!sameNodeId(a.nodeId, b.nodeId)) return false;
|
|
1198
|
+
if (!sameNodeId(a.referenceType, b.referenceType)) return false;
|
|
1199
|
+
return true;
|
|
1200
|
+
}
|
|
1201
|
+
function _remove(_childByNameMap: HierarchicalIndexMap, reference: UAReferenceWithNodeRef) {
|
|
1202
|
+
const target = reference.node;
|
|
1203
|
+
if (!target) return;
|
|
1204
|
+
const hash = target.browseName.name || "";
|
|
1205
|
+
const existing = _childByNameMap.get(hash);
|
|
1206
|
+
if (Array.isArray(existing)) {
|
|
1207
|
+
const remaining = existing.filter((r) => !sameRef(r, reference));
|
|
1208
|
+
if (remaining.length === 0) {
|
|
1209
|
+
_childByNameMap.delete(hash);
|
|
1210
|
+
} else if (remaining.length === 1) {
|
|
1211
|
+
_childByNameMap.set(hash, remaining[0]);
|
|
1212
|
+
} else {
|
|
1213
|
+
_childByNameMap.set(hash, remaining);
|
|
1214
|
+
}
|
|
1215
|
+
} else {
|
|
1216
|
+
_childByNameMap.delete(hash);
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
/**
|
|
1220
|
+
* keep an existing child index in step with a forward reference just added to `node`
|
|
1221
|
+
*/
|
|
1222
|
+
export function _handle_HierarchicalReference(node: BaseNode, reference: UAReference): void {
|
|
1223
|
+
const _private = BaseNode_getPrivate(node);
|
|
1224
|
+
if (!reference.isForward || !_private._childByNameMap) return;
|
|
1225
|
+
const addressSpace = node.addressSpace;
|
|
1226
|
+
const referenceType = ReferenceImpl.resolveReferenceType(addressSpace, reference);
|
|
1227
|
+
const hierarchicalReferences = addressSpace.findReferenceType(hierarchicalReferences_ReferenceTypeNodeId);
|
|
1228
|
+
if (!referenceType || !hierarchicalReferences) {
|
|
1229
|
+
_private._childByNameMapIncomplete = true;
|
|
1230
|
+
return;
|
|
1231
|
+
}
|
|
1232
|
+
let isHierarchical: boolean;
|
|
1233
|
+
try {
|
|
1234
|
+
isHierarchical = referenceType.isSubtypeOf(hierarchicalReferences);
|
|
1235
|
+
} catch {
|
|
1236
|
+
// the supertype chain of a reference type declared later in the file being loaded
|
|
1237
|
+
_private._childByNameMapIncomplete = true;
|
|
1238
|
+
return;
|
|
1239
|
+
}
|
|
1240
|
+
if (!isHierarchical) return;
|
|
1241
|
+
ReferenceImpl.resolveReferenceNode(addressSpace, reference);
|
|
1242
|
+
if (!_add(_private._childByNameMap, reference as UAReferenceWithNodeRef)) {
|
|
1243
|
+
_private._childByNameMapIncomplete = true;
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* The child index of `node`: browse name -> forward hierarchical reference(s), target resolved.
|
|
1249
|
+
*
|
|
1250
|
+
* Built lazily and kept by `_handle_HierarchicalReference` / `_remove_HierarchicalReference`. It is
|
|
1251
|
+
* not kept while a nodeset is loading (`suspendBackReference`) nor when some target could not be
|
|
1252
|
+
* resolved: a lookup then gets a transient map and the next one rebuilds. Before namespace 0 has
|
|
1253
|
+
* loaded `HierarchicalReferences` nothing can be hierarchical yet and the map is empty.
|
|
1254
|
+
*/
|
|
1255
|
+
export function _get_HierarchicalReference(node: BaseNode): HierarchicalIndexMap {
|
|
1256
|
+
const _private = BaseNode_getPrivate(node);
|
|
1257
|
+
if (
|
|
1258
|
+
_private._childByNameMap &&
|
|
1259
|
+
!_private._childByNameMapIncomplete &&
|
|
1260
|
+
_private._childByNameMapVersion === referenceTypeVersion.count
|
|
1261
|
+
) {
|
|
1262
|
+
return _private._childByNameMap;
|
|
1263
|
+
}
|
|
1264
|
+
const addressSpace = node.addressSpace as AddressSpacePrivate;
|
|
1265
|
+
const map: HierarchicalIndexMap = new Map();
|
|
1266
|
+
const hierarchicalReferences = addressSpace.findReferenceType(hierarchicalReferences_ReferenceTypeNodeId);
|
|
1267
|
+
if (!hierarchicalReferences) {
|
|
1268
|
+
return map;
|
|
1269
|
+
}
|
|
1270
|
+
let complete = true;
|
|
1271
|
+
for (const reference of node.findReferencesEx(hierarchicalReferences, BrowseDirection.Forward)) {
|
|
1272
|
+
ReferenceImpl.resolveReferenceNode(addressSpace, reference);
|
|
1273
|
+
if (!_add(map, reference as UAReferenceWithNodeRef)) {
|
|
1274
|
+
complete = false;
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
if (complete && !addressSpace.suspendBackReference) {
|
|
1278
|
+
_private._childByNameMap = map;
|
|
1279
|
+
_private._childByNameMapVersion = referenceTypeVersion.count;
|
|
1280
|
+
} else {
|
|
1281
|
+
_private._childByNameMap = undefined;
|
|
1282
|
+
}
|
|
1283
|
+
_private._childByNameMapIncomplete = false;
|
|
1284
|
+
return map;
|
|
1285
|
+
}
|
|
1286
|
+
export function _remove_HierarchicalReference(node: BaseNodeImpl, reference: UAReference) {
|
|
1287
|
+
const _private = BaseNode_getPrivate(node);
|
|
1288
|
+
if (_private._childByNameMap && reference.isForward) {
|
|
1289
|
+
const addressSpace = node.addressSpace;
|
|
1290
|
+
const referenceType = ReferenceImpl.resolveReferenceType(addressSpace, reference);
|
|
1291
|
+
|
|
1292
|
+
if (referenceType) {
|
|
1293
|
+
const HierarchicalReferencesType = addressSpace.findReferenceType(hierarchicalReferences_ReferenceTypeNodeId);
|
|
1294
|
+
if (HierarchicalReferencesType && referenceType.isSubtypeOf(HierarchicalReferencesType)) {
|
|
1295
|
+
ReferenceImpl.resolveReferenceNode(addressSpace, reference);
|
|
1296
|
+
_remove(_private._childByNameMap, reference as UAReferenceWithNodeRef);
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
function _makeReferenceDescription(addressSpace: IAddressSpace, reference: UAReference, resultMask: number): ReferenceDescription {
|
|
1303
|
+
const isForward = reference.isForward;
|
|
1304
|
+
|
|
1305
|
+
const referenceTypeId = ReferenceImpl.resolveReferenceType(addressSpace, reference).nodeId;
|
|
1306
|
+
assert(referenceTypeId instanceof NodeId);
|
|
1307
|
+
|
|
1308
|
+
const obj = ReferenceImpl.resolveReferenceNode(addressSpace, reference);
|
|
1309
|
+
|
|
1310
|
+
let data: ReferenceDescriptionOptions = {};
|
|
1311
|
+
|
|
1312
|
+
if (!obj) {
|
|
1313
|
+
// cannot find reference node
|
|
1314
|
+
data = {
|
|
1315
|
+
isForward,
|
|
1316
|
+
nodeId: reference.nodeId as ExpandedNodeId,
|
|
1317
|
+
referenceTypeId: resultMask & ResultMask.ReferenceType ? referenceTypeId : null,
|
|
1318
|
+
typeDefinition: undefined
|
|
1319
|
+
};
|
|
1320
|
+
} else {
|
|
1321
|
+
const obj2 = obj;
|
|
1322
|
+
|
|
1323
|
+
const objOrVar =
|
|
1324
|
+
obj2.nodeClass === NodeClass.Object || obj2.nodeClass === NodeClass.Variable ? (obj2 as UAVariable | UAObject) : null;
|
|
1325
|
+
|
|
1326
|
+
assert(reference.nodeId, " obj.nodeId");
|
|
1327
|
+
data = {
|
|
1328
|
+
browseName: resultMask & ResultMask.BrowseName ? coerceQualifiedName(obj.browseName) : null,
|
|
1329
|
+
displayName: resultMask & ResultMask.DisplayName ? coerceLocalizedText(obj.displayName[0]) : null,
|
|
1330
|
+
isForward: resultMask & ResultMask.IsForward ? isForward : false,
|
|
1331
|
+
nodeClass: resultMask & ResultMask.NodeClass ? obj.nodeClass : NodeClass.Unspecified,
|
|
1332
|
+
nodeId: obj.nodeId as ExpandedNodeId,
|
|
1333
|
+
referenceTypeId: resultMask & ResultMask.ReferenceType ? referenceTypeId : null,
|
|
1334
|
+
typeDefinition: resultMask & ResultMask.TypeDefinition ? (objOrVar?.typeDefinition as ExpandedNodeId) : undefined
|
|
1335
|
+
};
|
|
1336
|
+
}
|
|
1337
|
+
if (data.typeDefinition === null) {
|
|
1338
|
+
data.typeDefinition = ExpandedNodeId.nullNodeId as ExpandedNodeId;
|
|
1339
|
+
}
|
|
1340
|
+
const referenceDescription = new ReferenceDescription(data);
|
|
1341
|
+
return referenceDescription;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
export function _constructReferenceDescription(
|
|
1345
|
+
addressSpace: IAddressSpace,
|
|
1346
|
+
references: UAReference[],
|
|
1347
|
+
resultMask: number
|
|
1348
|
+
): ReferenceDescription[] {
|
|
1349
|
+
assert(Array.isArray(references));
|
|
1350
|
+
return references.map((reference: UAReference) => _makeReferenceDescription(addressSpace, reference, resultMask));
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
export function BaseNode_remove_backward_reference(this: BaseNodeImpl, reference: UAReference): void {
|
|
1354
|
+
const _private = BaseNode_getPrivate(this);
|
|
1355
|
+
_remove_HierarchicalReference(this, reference);
|
|
1356
|
+
const h = (<ReferenceImpl>reference).key(this.addressSpace as AddressSpacePrivate);
|
|
1357
|
+
if (_private._back_referenceIdx.has(h)) {
|
|
1358
|
+
// note : h may not exist in _back_referenceIdx since we are not indexing
|
|
1359
|
+
// _back_referenceIdx to UAObjectType and UAVariableType for performance reasons
|
|
1360
|
+
(<ReferenceImpl>_private._back_referenceIdx.get(h)).dispose();
|
|
1361
|
+
_private._back_referenceIdx.delete(h);
|
|
1362
|
+
// the memoized reference scans of this node listed the reference just removed
|
|
1363
|
+
BaseNode_clearCache(this);
|
|
1364
|
+
noteReferenceTypeChange(this, reference);
|
|
1365
|
+
}
|
|
1366
|
+
(<ReferenceImpl>reference).dispose();
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
/**
|
|
1370
|
+
* a reference added to or removed from a reference type may move it in the hierarchy (a
|
|
1371
|
+
* HasSubtype link made at runtime): every memo built against the hierarchy is then stale
|
|
1372
|
+
*/
|
|
1373
|
+
export function noteReferenceTypeChange(node: BaseNode, reference?: UAReference): void {
|
|
1374
|
+
if (node.nodeClass === NodeClass.ReferenceType) {
|
|
1375
|
+
referenceTypeVersion.count += 1;
|
|
1376
|
+
}
|
|
1377
|
+
if (reference && sameNodeId(reference.referenceType, hasSubtype_ReferenceTypeNodeId)) {
|
|
1378
|
+
// the answer of isSubtypeOf may have changed for every type below this node
|
|
1379
|
+
typeHierarchyVersion.count += 1;
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
const hasSubtype_ReferenceTypeNodeId = resolveNodeId("HasSubtype");
|
|
1383
|
+
|
|
1384
|
+
export function BaseNode_add_backward_reference(this: BaseNodeImpl, reference: UAReference): void {
|
|
1385
|
+
const _private = BaseNode_getPrivate(this);
|
|
1386
|
+
const h = (<ReferenceImpl>reference).key(this.addressSpace as AddressSpacePrivate);
|
|
1387
|
+
// c8 ignore next
|
|
1388
|
+
const forward = _private._referenceIdx.get(h) as ReferenceImpl | undefined;
|
|
1389
|
+
if (forward) {
|
|
1390
|
+
// the reference exists already among the forward references: a NodeSet2 file declares
|
|
1391
|
+
// most references from both ends. Nothing to add, but the forward reference may have
|
|
1392
|
+
// been added before its target existed (and memoized as such): the target is here now
|
|
1393
|
+
if (!forward.node) {
|
|
1394
|
+
forward.node = (reference as ReferenceImpl).node || (this.addressSpace.findNode(reference.nodeId) as BaseNode);
|
|
1395
|
+
}
|
|
1396
|
+
return;
|
|
1397
|
+
}
|
|
1398
|
+
const backward = _private._back_referenceIdx.get(h) as ReferenceImpl | undefined;
|
|
1399
|
+
if (backward) {
|
|
1400
|
+
// installed by an earlier propagation: the end-of-load sweep visits every namespace, so a
|
|
1401
|
+
// nodeset loaded into an address space already in use meets the back references of the
|
|
1402
|
+
// first load. The same back reference twice is nothing to add
|
|
1403
|
+
if (!backward.node) {
|
|
1404
|
+
backward.node = (reference as ReferenceImpl).node || (this.addressSpace.findNode(reference.nodeId) as BaseNode);
|
|
1405
|
+
}
|
|
1406
|
+
return;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
if (!getReferenceType(reference)) {
|
|
1410
|
+
const _stop_here = 1;
|
|
1411
|
+
}
|
|
1412
|
+
// assert(reference._referenceType instanceof ReferenceType);
|
|
1413
|
+
if (_private._back_referenceIdx === EMPTY_REFERENCE_INDEX) {
|
|
1414
|
+
_private._back_referenceIdx = new Map();
|
|
1415
|
+
}
|
|
1416
|
+
_private._back_referenceIdx.set(h, reference);
|
|
1417
|
+
noteReferenceTypeChange(this, reference);
|
|
1418
|
+
_handle_HierarchicalReference(this, reference);
|
|
1419
|
+
BaseNode_clearCache(this);
|
|
1420
|
+
}
|