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,1768 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @module node-opcua-address-space
|
|
4
|
+
*/
|
|
5
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.BaseNodeImpl = void 0;
|
|
10
|
+
exports.makeAttributeEventName = makeAttributeEventName;
|
|
11
|
+
exports.resolveChildAccessor = resolveChildAccessor;
|
|
12
|
+
exports.childAccessorNamesShadowedBy = childAccessorNamesShadowedBy;
|
|
13
|
+
exports.flushSharedChildAccessors = flushSharedChildAccessors;
|
|
14
|
+
exports.defineSharedChildAccessors = defineSharedChildAccessors;
|
|
15
|
+
exports.getReferenceType = getReferenceType;
|
|
16
|
+
const node_util_1 = require("node:util");
|
|
17
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
18
|
+
const node_opcua_address_space_base_1 = require("node-opcua-address-space-base");
|
|
19
|
+
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
20
|
+
const node_opcua_constants_1 = require("node-opcua-constants");
|
|
21
|
+
const node_opcua_data_model_1 = require("node-opcua-data-model");
|
|
22
|
+
const node_opcua_data_value_1 = require("node-opcua-data-value");
|
|
23
|
+
const node_opcua_debug_1 = require("node-opcua-debug");
|
|
24
|
+
const node_opcua_nodeid_1 = require("node-opcua-nodeid");
|
|
25
|
+
const node_opcua_status_code_1 = require("node-opcua-status-code");
|
|
26
|
+
const node_opcua_types_1 = require("node-opcua-types");
|
|
27
|
+
const node_opcua_variant_1 = require("node-opcua-variant");
|
|
28
|
+
const dump_tools_js_1 = require("../api/helpers/dump_tools.js");
|
|
29
|
+
const session_context_js_1 = require("../api/session_context.js");
|
|
30
|
+
const address_space_change_event_tools_js_1 = require("./address_space_change_event_tools.js");
|
|
31
|
+
const base_node_private_js_1 = require("./base_node_private.js");
|
|
32
|
+
const child_accessors_js_1 = require("./child_accessors.js");
|
|
33
|
+
const reference_impl_js_1 = require("./reference_impl.js");
|
|
34
|
+
const reference_type_version_js_1 = require("./reference_type_version.js");
|
|
35
|
+
const role_permissions_js_1 = require("./role_permissions.js");
|
|
36
|
+
const doDebug = false;
|
|
37
|
+
const warningLog = (0, node_opcua_debug_1.make_warningLog)("base_node_impl");
|
|
38
|
+
const errorLog = (0, node_opcua_debug_1.make_errorLog)("base_node_impl");
|
|
39
|
+
const debugLog = (0, node_opcua_debug_1.make_debugLog)("base_node_impl");
|
|
40
|
+
const HasEventSourceReferenceType = (0, node_opcua_nodeid_1.resolveNodeId)("HasEventSource");
|
|
41
|
+
const HasNotifierReferenceType = (0, node_opcua_nodeid_1.resolveNodeId)("HasNotifier");
|
|
42
|
+
const HierarchicalReferencesType = (0, node_opcua_nodeid_1.resolveNodeId)("HierarchicalReferences");
|
|
43
|
+
const HasChildReferenceType = (0, node_opcua_nodeid_1.resolveNodeId)("HasChild");
|
|
44
|
+
/** a node with more references than this keeps the result of its reference scans */
|
|
45
|
+
const referenceScanMemoThreshold = 8;
|
|
46
|
+
const wellKnownReferenceTypesByAddressSpace = new WeakMap();
|
|
47
|
+
function wellKnownReferenceTypes(addressSpace) {
|
|
48
|
+
const known = wellKnownReferenceTypesByAddressSpace.get(addressSpace);
|
|
49
|
+
// an address space is disposed namespace by namespace, namespace 0 first: a child lookup made
|
|
50
|
+
// while a later namespace is torn down must not be handed reference types that are gone
|
|
51
|
+
if (known && !known.hasChild.isDisposed()) {
|
|
52
|
+
return known;
|
|
53
|
+
}
|
|
54
|
+
const hierarchicalReferences = addressSpace.findReferenceType(HierarchicalReferencesType);
|
|
55
|
+
const hasChild = addressSpace.findReferenceType(HasChildReferenceType);
|
|
56
|
+
const hasComponent = addressSpace.findReferenceType(HasComponentReferenceType);
|
|
57
|
+
const hasProperty = addressSpace.findReferenceType(HasPropertyReferenceType);
|
|
58
|
+
const organizes = addressSpace.findReferenceType(OrganizesReferenceType);
|
|
59
|
+
if (!hierarchicalReferences || !hasChild || !hasComponent || !hasProperty || !organizes) {
|
|
60
|
+
return null; // namespace 0 is still loading
|
|
61
|
+
}
|
|
62
|
+
const resolved = { hierarchicalReferences, hasChild, hasComponent, hasProperty, organizes };
|
|
63
|
+
wellKnownReferenceTypesByAddressSpace.set(addressSpace, resolved);
|
|
64
|
+
return resolved;
|
|
65
|
+
}
|
|
66
|
+
const HasComponentReferenceType = (0, node_opcua_nodeid_1.resolveNodeId)("HasComponent");
|
|
67
|
+
const HasPropertyReferenceType = (0, node_opcua_nodeid_1.resolveNodeId)("HasProperty");
|
|
68
|
+
const OrganizesReferenceType = (0, node_opcua_nodeid_1.resolveNodeId)("Organizes");
|
|
69
|
+
function defaultBrowseFilterFunc(_context) {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
function _get_QualifiedBrowseName(browseName) {
|
|
73
|
+
return (0, node_opcua_data_model_1.coerceQualifiedName)(browseName) || "";
|
|
74
|
+
}
|
|
75
|
+
function _is_valid_BrowseDirection(browseDirection) {
|
|
76
|
+
return (browseDirection === node_opcua_data_model_1.BrowseDirection.Forward ||
|
|
77
|
+
browseDirection === node_opcua_data_model_1.BrowseDirection.Inverse ||
|
|
78
|
+
browseDirection === node_opcua_data_model_1.BrowseDirection.Both);
|
|
79
|
+
}
|
|
80
|
+
function makeAttributeEventName(attributeId) {
|
|
81
|
+
const attributeName = node_opcua_data_model_1.attributeNameById[attributeId];
|
|
82
|
+
return `${attributeName}_changed`;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Base class for all Node classes
|
|
86
|
+
*
|
|
87
|
+
* BaseNode is the base class for all the OPCUA objects in the address space
|
|
88
|
+
* It provides attributes and a set of references to other nodes.
|
|
89
|
+
* see:
|
|
90
|
+
* {{#crossLink "UAObject"}}{{/crossLink}},
|
|
91
|
+
* {{#crossLink "UAVariable"}}{{/crossLink}},
|
|
92
|
+
* {{#crossLink "Reference"}}{{/crossLink}},
|
|
93
|
+
* {{#crossLink "UAMethod"}}{{/crossLink}},
|
|
94
|
+
* {{#crossLink "UAView"}}{{/crossLink}},
|
|
95
|
+
* {{#crossLink "UAObjectType"}}{{/crossLink}},
|
|
96
|
+
* {{#crossLink "UADataType"}}{{/crossLink}},
|
|
97
|
+
* {{#crossLink "UAVariableType"}}{{/crossLink}},
|
|
98
|
+
*
|
|
99
|
+
*
|
|
100
|
+
*/
|
|
101
|
+
class BaseNodeImpl extends node_opcua_address_space_base_1.TypedEventEmitter {
|
|
102
|
+
static makeAttributeEventName(attributeId) {
|
|
103
|
+
return makeAttributeEventName(attributeId);
|
|
104
|
+
}
|
|
105
|
+
_accessRestrictions;
|
|
106
|
+
_rolePermissions;
|
|
107
|
+
// public onFirstBrowseAction?: (this: BaseNode<T>) => Promise<void>;
|
|
108
|
+
get addressSpace() {
|
|
109
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
110
|
+
// c8 ignore next
|
|
111
|
+
if (!_private) {
|
|
112
|
+
throw new Error(`Internal error , cannot extract private data from ${this.browseName.toString()}`);
|
|
113
|
+
}
|
|
114
|
+
return _private.__address_space;
|
|
115
|
+
}
|
|
116
|
+
get addressSpacePrivate() {
|
|
117
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
118
|
+
// c8 ignore next
|
|
119
|
+
if (!_private) {
|
|
120
|
+
throw new Error(`Internal error , cannot extract private data from ${this.browseName.toString()}`);
|
|
121
|
+
}
|
|
122
|
+
return _private.__address_space;
|
|
123
|
+
}
|
|
124
|
+
get displayName() {
|
|
125
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
126
|
+
if (!_private._displayName) {
|
|
127
|
+
const raw = _private._displayNameRaw ?? "";
|
|
128
|
+
const displayNames = Array.isArray(raw) ? raw : [raw];
|
|
129
|
+
_private._displayName = displayNames.map(node_opcua_data_model_1.coerceLocalizedText);
|
|
130
|
+
}
|
|
131
|
+
return _private._displayName;
|
|
132
|
+
}
|
|
133
|
+
setDisplayName(value) {
|
|
134
|
+
if (!Array.isArray(value)) {
|
|
135
|
+
this.setDisplayName([value]);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
this._setDisplayName(value);
|
|
139
|
+
/**
|
|
140
|
+
* fires when the displayName is changed.
|
|
141
|
+
* @event DisplayName_changed
|
|
142
|
+
* @param dataValue {DataValue}
|
|
143
|
+
*/
|
|
144
|
+
this._notifyAttributeChange(node_opcua_data_model_1.AttributeIds.DisplayName);
|
|
145
|
+
}
|
|
146
|
+
get description() {
|
|
147
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
148
|
+
if (!_private._description) {
|
|
149
|
+
_private._description = (0, node_opcua_data_model_1.coerceLocalizedText)(_private._descriptionRaw ?? null) || new node_opcua_data_model_1.LocalizedText({ text: "" });
|
|
150
|
+
}
|
|
151
|
+
return _private._description;
|
|
152
|
+
}
|
|
153
|
+
setDescription(value) {
|
|
154
|
+
this._setDescription(value);
|
|
155
|
+
/**
|
|
156
|
+
* fires when the description attribute is changed.
|
|
157
|
+
* @event Description_changed
|
|
158
|
+
* @param dataValue {DataValue}
|
|
159
|
+
*/
|
|
160
|
+
this._notifyAttributeChange(node_opcua_data_model_1.AttributeIds.Description);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* returns the nodeId of this node's Type Definition
|
|
164
|
+
*/
|
|
165
|
+
get typeDefinition() {
|
|
166
|
+
const _cache = (0, base_node_private_js_1.BaseNode_getCache)(this);
|
|
167
|
+
if (!_cache.typeDefinition) {
|
|
168
|
+
const has_type_definition_ref = this.findReference("HasTypeDefinition", true);
|
|
169
|
+
let nodeId = has_type_definition_ref ? has_type_definition_ref.nodeId : null;
|
|
170
|
+
if (!nodeId) {
|
|
171
|
+
switch (this.nodeClass) {
|
|
172
|
+
case node_opcua_data_model_1.NodeClass.Object:
|
|
173
|
+
nodeId = (0, node_opcua_nodeid_1.coerceNodeId)(node_opcua_constants_1.ObjectTypeIds.BaseObjectType);
|
|
174
|
+
break;
|
|
175
|
+
case node_opcua_data_model_1.NodeClass.Variable:
|
|
176
|
+
nodeId = (0, node_opcua_nodeid_1.coerceNodeId)(node_opcua_constants_1.VariableTypeIds.BaseVariableType);
|
|
177
|
+
break;
|
|
178
|
+
default:
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
_cache.typeDefinition = nodeId;
|
|
182
|
+
}
|
|
183
|
+
return _cache.typeDefinition;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* returns the nodeId of this node's Type Definition
|
|
187
|
+
*/
|
|
188
|
+
get typeDefinitionObj() {
|
|
189
|
+
const _cache = (0, base_node_private_js_1.BaseNode_getCache)(this);
|
|
190
|
+
if (undefined === _cache.typeDefinitionObj) {
|
|
191
|
+
const nodeId = this.typeDefinition;
|
|
192
|
+
_cache.typeDefinitionObj = nodeId ? this.addressSpace.findNode(nodeId) : null;
|
|
193
|
+
}
|
|
194
|
+
if (!_cache.typeDefinitionObj) {
|
|
195
|
+
warningLog(this.nodeClass, "cannot find typeDefinitionObj ", this.browseName.toString(), this.nodeId.toString(), node_opcua_data_model_1.NodeClass[this.nodeClass]);
|
|
196
|
+
}
|
|
197
|
+
return _cache.typeDefinitionObj;
|
|
198
|
+
}
|
|
199
|
+
get parentNodeId() {
|
|
200
|
+
const parent = this.parent;
|
|
201
|
+
return parent ? parent.nodeId : undefined;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* namespace index
|
|
205
|
+
*/
|
|
206
|
+
get namespaceIndex() {
|
|
207
|
+
return this.nodeId.namespace;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* namespace uri
|
|
211
|
+
*/
|
|
212
|
+
get namespaceUri() {
|
|
213
|
+
return this.addressSpace.getNamespaceUri(this.namespaceIndex);
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* the parent node
|
|
217
|
+
*/
|
|
218
|
+
get parent() {
|
|
219
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
220
|
+
if (_private._parent === undefined) {
|
|
221
|
+
// never been set before
|
|
222
|
+
_private._parent = _setup_parent_item.call(this, _private._referenceIdx);
|
|
223
|
+
}
|
|
224
|
+
return _private._parent || null;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* @property modellingRule
|
|
228
|
+
* @type {String|undefined}
|
|
229
|
+
*/
|
|
230
|
+
get modellingRule() {
|
|
231
|
+
const r = this.findReferencesAsObject("HasModellingRule");
|
|
232
|
+
if (!r || r.length === 0) {
|
|
233
|
+
return null; /// "? modellingRule missing ?"; // consider "Mandatory"
|
|
234
|
+
}
|
|
235
|
+
const r0 = r[0];
|
|
236
|
+
return r0.browseName.toString();
|
|
237
|
+
}
|
|
238
|
+
nodeClass = node_opcua_data_model_1.NodeClass.Unspecified;
|
|
239
|
+
nodeId;
|
|
240
|
+
browseName;
|
|
241
|
+
_postInstantiateFunc;
|
|
242
|
+
/**
|
|
243
|
+
* @internal
|
|
244
|
+
* @param options
|
|
245
|
+
*/
|
|
246
|
+
constructor(options) {
|
|
247
|
+
super();
|
|
248
|
+
(0, node_opcua_assert_1.assert)(this.nodeClass === node_opcua_data_model_1.NodeClass.Unspecified, "must not be specify a nodeClass");
|
|
249
|
+
(0, node_opcua_assert_1.assert)(options.addressSpace); // expecting an address space
|
|
250
|
+
(0, node_opcua_assert_1.assert)(options.browseName instanceof node_opcua_data_model_1.QualifiedName, "Expecting a valid QualifiedName");
|
|
251
|
+
(0, node_opcua_assert_1.assert)(options.nodeId instanceof node_opcua_nodeid_1.NodeId, "Expecting a valid NodeId");
|
|
252
|
+
options.references = options.references || [];
|
|
253
|
+
const _private = (0, base_node_private_js_1.BaseNode_initPrivate)(this);
|
|
254
|
+
_private.__address_space = options.addressSpace;
|
|
255
|
+
this.nodeId = options.nodeId instanceof node_opcua_nodeid_1.NodeId ? options.nodeId : (0, node_opcua_nodeid_1.resolveNodeId)(options.nodeId);
|
|
256
|
+
// QualifiedName
|
|
257
|
+
/**
|
|
258
|
+
* the node browseName
|
|
259
|
+
* @property browseName
|
|
260
|
+
* @type QualifiedName
|
|
261
|
+
* @static
|
|
262
|
+
*/
|
|
263
|
+
this.browseName = _get_QualifiedBrowseName(options.browseName);
|
|
264
|
+
// re-use browseName as displayName if displayName is missing
|
|
265
|
+
options.displayName = options.displayName || this.browseName.name?.toString();
|
|
266
|
+
if (options.description === undefined) {
|
|
267
|
+
options.description = null;
|
|
268
|
+
}
|
|
269
|
+
this._setDisplayName(options.displayName || "");
|
|
270
|
+
this._setDescription(options.description);
|
|
271
|
+
// user defined filter function for browsing
|
|
272
|
+
const _browseFilter = options.browseFilter || defaultBrowseFilterFunc;
|
|
273
|
+
(0, node_opcua_assert_1.assert)(typeof _browseFilter === "function");
|
|
274
|
+
_private._browseFilter = _browseFilter;
|
|
275
|
+
// normalize reference type
|
|
276
|
+
// this will convert any referenceType expressed with its inverseName into
|
|
277
|
+
// its normal name and fix the isForward flag accordingly.
|
|
278
|
+
// ( e.g "ComponentOf" isForward:true => "HasComponent", isForward:false)
|
|
279
|
+
for (const reference of options.references) {
|
|
280
|
+
this.__addReference(reference, false);
|
|
281
|
+
}
|
|
282
|
+
// the cache was empty to start with; one clear covers every reference just added
|
|
283
|
+
this._clear_caches();
|
|
284
|
+
this._accessRestrictions = options.accessRestrictions;
|
|
285
|
+
this._rolePermissions = (0, role_permissions_js_1.coerceRolePermissions)(options.rolePermissions);
|
|
286
|
+
// make `parent.<thisName>` resolve to this node: through a getter shared by every node when
|
|
287
|
+
// a nodeset is loading (defined in one batch by the loader, see flushSharedChildAccessors),
|
|
288
|
+
// through the own accessor installed by install_extra_properties otherwise
|
|
289
|
+
// (see child_accessors.ts for why the two paths exist)
|
|
290
|
+
_private._accessorName = (0, child_accessors_js_1.registerChildName)(this.browseName.name, options.addressSpace.suspendBackReference);
|
|
291
|
+
}
|
|
292
|
+
getDisplayName(_locale) {
|
|
293
|
+
return this.displayName[0].text || "";
|
|
294
|
+
}
|
|
295
|
+
get namespace() {
|
|
296
|
+
return this.addressSpacePrivate.getNamespace(this.nodeId.namespace);
|
|
297
|
+
}
|
|
298
|
+
// ---------------------------------------------------------------------------------------------------
|
|
299
|
+
// Finders
|
|
300
|
+
// ---------------------------------------------------------------------------------------------------
|
|
301
|
+
findReferencesEx(referenceType, browseDirection) {
|
|
302
|
+
browseDirection = browseDirection !== undefined ? browseDirection : node_opcua_data_model_1.BrowseDirection.Forward;
|
|
303
|
+
(0, node_opcua_assert_1.assert)(_is_valid_BrowseDirection(browseDirection));
|
|
304
|
+
(0, node_opcua_assert_1.assert)(browseDirection !== node_opcua_data_model_1.BrowseDirection.Both);
|
|
305
|
+
const referenceTypeNode = this._coerceReferenceType(referenceType);
|
|
306
|
+
if (!referenceTypeNode) {
|
|
307
|
+
// note: when loading nodeset2.xml files, reference type may not exit yet
|
|
308
|
+
// throw new Error("expecting valid reference name " + strReference);
|
|
309
|
+
return [];
|
|
310
|
+
}
|
|
311
|
+
const isForward = browseDirection === node_opcua_data_model_1.BrowseDirection.Forward;
|
|
312
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
313
|
+
// Memoized per reference type and direction, on the nodes where a scan is worth remembering:
|
|
314
|
+
// a scan touches every reference of the node and runs checkHasSubtype on each, and the same
|
|
315
|
+
// question is asked over and over (every child lookup, every browse) of folders, types and
|
|
316
|
+
// the Server object. A leaf variable holds three references; scanning them costs less than
|
|
317
|
+
// the map would, and a model with a hundred thousand of them cannot afford one map each.
|
|
318
|
+
// The memo goes with the rest of _cache whenever a reference is added or removed, and when
|
|
319
|
+
// a reference type was created since it was built.
|
|
320
|
+
const memoize = _private._referenceIdx.size + _private._back_referenceIdx.size > referenceScanMemoThreshold;
|
|
321
|
+
let entry;
|
|
322
|
+
const slot = isForward ? 0 : 1;
|
|
323
|
+
if (memoize) {
|
|
324
|
+
const _cache = (0, base_node_private_js_1.BaseNode_getCache)(this);
|
|
325
|
+
if (_cache._refExVersion !== reference_type_version_js_1.referenceTypeVersion.count) {
|
|
326
|
+
_cache._refEx = undefined;
|
|
327
|
+
_cache._refExVersion = reference_type_version_js_1.referenceTypeVersion.count;
|
|
328
|
+
}
|
|
329
|
+
if (!_cache._refEx) {
|
|
330
|
+
_cache._refEx = new Map();
|
|
331
|
+
}
|
|
332
|
+
entry = _cache._refEx.get(referenceTypeNode);
|
|
333
|
+
if (!entry) {
|
|
334
|
+
entry = [undefined, undefined, false, false];
|
|
335
|
+
_cache._refEx.set(referenceTypeNode, entry);
|
|
336
|
+
}
|
|
337
|
+
const memoized = entry[slot];
|
|
338
|
+
if (memoized) {
|
|
339
|
+
if (entry[slot + 2]) {
|
|
340
|
+
// a reference was scanned before its target existed: the same answer as a
|
|
341
|
+
// fresh scan, which resolves every target it can
|
|
342
|
+
entry[slot + 2] = resolveScannedReferences(this.addressSpace, memoized);
|
|
343
|
+
}
|
|
344
|
+
return memoized;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
const results = [];
|
|
348
|
+
const addressSpace = this.addressSpace;
|
|
349
|
+
let unresolved = false;
|
|
350
|
+
const process = (referenceIdx) => {
|
|
351
|
+
for (const ref of referenceIdx.values()) {
|
|
352
|
+
if (ref.isForward === isForward && referenceTypeNode.checkHasSubtype(ref.referenceType)) {
|
|
353
|
+
// callers read ref.node: resolved here, once per reference, for the references a
|
|
354
|
+
// load left unresolved (the end-of-load sweep no longer visits every one)
|
|
355
|
+
if (!ref.node && !resolveReferenceNode(addressSpace, ref)) {
|
|
356
|
+
unresolved = true;
|
|
357
|
+
}
|
|
358
|
+
results.push(ref);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
process(_private._referenceIdx);
|
|
363
|
+
process(_private._back_referenceIdx);
|
|
364
|
+
if (entry) {
|
|
365
|
+
// the array is handed out again on every hit: frozen, so that a caller changing it
|
|
366
|
+
// fails loudly rather than changing what every later caller sees
|
|
367
|
+
entry[slot] = Object.freeze(results);
|
|
368
|
+
entry[slot + 2] = unresolved;
|
|
369
|
+
}
|
|
370
|
+
return results;
|
|
371
|
+
}
|
|
372
|
+
findReferences_no_cache(referenceTypeNode, isForward = true) {
|
|
373
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
374
|
+
const result = [];
|
|
375
|
+
const addressSpace = this.addressSpace;
|
|
376
|
+
const keep = (ref) => {
|
|
377
|
+
if (ref.isForward === isForward && (0, node_opcua_nodeid_1.sameNodeId)(ref.referenceType, referenceTypeNode.nodeId)) {
|
|
378
|
+
if (!ref.node) {
|
|
379
|
+
resolveReferenceNode(addressSpace, ref);
|
|
380
|
+
}
|
|
381
|
+
result.push(ref);
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
for (const ref of _private._referenceIdx.values()) {
|
|
385
|
+
keep(ref);
|
|
386
|
+
}
|
|
387
|
+
for (const ref of _private._back_referenceIdx.values()) {
|
|
388
|
+
keep(ref);
|
|
389
|
+
}
|
|
390
|
+
return result;
|
|
391
|
+
}
|
|
392
|
+
findReferences(referenceType, isForward = true) {
|
|
393
|
+
const _cache = (0, base_node_private_js_1.BaseNode_getCache)(this);
|
|
394
|
+
const referenceTypeNode = this._coerceReferenceType(referenceType);
|
|
395
|
+
if (!referenceTypeNode) {
|
|
396
|
+
// note: when loading nodeset2.xml files, reference type may not exit yet
|
|
397
|
+
// throw new Error("expecting valid reference name " + strReference);
|
|
398
|
+
return [];
|
|
399
|
+
}
|
|
400
|
+
_cache._ref = _cache._ref || new Map();
|
|
401
|
+
const hash = `r|${referenceTypeNode.nodeId.toString()}|${isForward ? "f" : "b"}`;
|
|
402
|
+
if (_cache._ref.has(hash)) {
|
|
403
|
+
return _cache._ref.get(hash) || [];
|
|
404
|
+
}
|
|
405
|
+
// c8 ignore next
|
|
406
|
+
if (doDebug && !this.addressSpace.findReferenceType(referenceTypeNode.nodeId)) {
|
|
407
|
+
throw new Error(`expecting valid reference name ${referenceType}`);
|
|
408
|
+
}
|
|
409
|
+
const result = Object.freeze(this.findReferences_no_cache(referenceTypeNode, isForward));
|
|
410
|
+
_cache._ref.set(hash, result);
|
|
411
|
+
return result;
|
|
412
|
+
}
|
|
413
|
+
findReference(strReference, isForward) {
|
|
414
|
+
const refs = this.findReferences(strReference, isForward);
|
|
415
|
+
if (refs.length !== 1 && refs.length !== 0) {
|
|
416
|
+
throw new Error("findReference: expecting only one or zero element here");
|
|
417
|
+
}
|
|
418
|
+
return refs[0] || null;
|
|
419
|
+
}
|
|
420
|
+
findReferencesExAsObject(referenceType, browseDirection) {
|
|
421
|
+
const references = this.findReferencesEx(referenceType, browseDirection);
|
|
422
|
+
return _asObject(references, this.addressSpace);
|
|
423
|
+
}
|
|
424
|
+
findReferencesAsObject(referenceType, isForward) {
|
|
425
|
+
const references = this.findReferences(referenceType, isForward);
|
|
426
|
+
return _asObject(references, this.addressSpace);
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* return an array with the Aggregates of this object.
|
|
430
|
+
*/
|
|
431
|
+
getAggregates() {
|
|
432
|
+
return this.findReferencesExAsObject("Aggregates", node_opcua_data_model_1.BrowseDirection.Forward);
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* return an array with the components of this object.
|
|
436
|
+
*/
|
|
437
|
+
getComponents() {
|
|
438
|
+
return this.findReferencesExAsObject("HasComponent", node_opcua_data_model_1.BrowseDirection.Forward);
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* return a array with the properties of this object.
|
|
442
|
+
*/
|
|
443
|
+
getProperties() {
|
|
444
|
+
return this.findReferencesExAsObject("HasProperty", node_opcua_data_model_1.BrowseDirection.Forward);
|
|
445
|
+
}
|
|
446
|
+
static _hasChild = new node_opcua_nodeid_1.NodeId(node_opcua_nodeid_1.NodeIdType.NUMERIC, node_opcua_constants_1.ReferenceTypeIds.HasChild);
|
|
447
|
+
getChildren() {
|
|
448
|
+
// return this.findReferencesExAsObject(BaseNodeImpl._hasChild, BrowseDirection.Forward);
|
|
449
|
+
const _cache = (0, base_node_private_js_1.BaseNode_getCache)(this);
|
|
450
|
+
if (!_cache._children) {
|
|
451
|
+
_cache._children = this.findReferencesExAsObject(BaseNodeImpl._hasChild, node_opcua_data_model_1.BrowseDirection.Forward);
|
|
452
|
+
}
|
|
453
|
+
return _cache._children;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* return a array with the notifiers of this object.
|
|
457
|
+
* only reference of exact type HasNotifier are returned.
|
|
458
|
+
*/
|
|
459
|
+
getNotifiers() {
|
|
460
|
+
return this.findReferencesAsObject(HasNotifierReferenceType, true);
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* return a array with the event source of this object.
|
|
464
|
+
* only reference of exact type HasEventSource are returned.
|
|
465
|
+
*/
|
|
466
|
+
getEventSources() {
|
|
467
|
+
return this.findReferencesAsObject(HasEventSourceReferenceType, true);
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* return a array of the objects for which this node is an EventSource
|
|
471
|
+
*/
|
|
472
|
+
getEventSourceOfs() {
|
|
473
|
+
return this.findReferencesAsObject(HasEventSourceReferenceType, false);
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* the children of this node named `browseName` reached through a reference of type
|
|
477
|
+
* `referenceType` or a subtype of it, read from the child index rather than by scanning the
|
|
478
|
+
* references of the node again
|
|
479
|
+
*/
|
|
480
|
+
_selectChildren(browseName, namespaceIndex, referenceType) {
|
|
481
|
+
const references = _select_by_browse_name((0, base_node_private_js_1._get_HierarchicalReference)(this), browseName, namespaceIndex);
|
|
482
|
+
if (references.length === 0) {
|
|
483
|
+
return [];
|
|
484
|
+
}
|
|
485
|
+
const referenceTypeNode = this.addressSpace.findReferenceType(referenceType);
|
|
486
|
+
if (!referenceTypeNode) {
|
|
487
|
+
return [];
|
|
488
|
+
}
|
|
489
|
+
const selected = [];
|
|
490
|
+
for (const reference of references) {
|
|
491
|
+
if (referenceTypeNode.checkHasSubtype(reference.referenceType)) {
|
|
492
|
+
const node = reference_impl_js_1.ReferenceImpl.resolveReferenceNode(this.addressSpace, reference);
|
|
493
|
+
if (node) {
|
|
494
|
+
selected.push(node);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
if (selected.length > 1 && typeof browseName === "string" && (namespaceIndex === null || namespaceIndex === undefined)) {
|
|
499
|
+
warningLog("Multiple children exist with name ", browseName, " please specify a namespace index");
|
|
500
|
+
}
|
|
501
|
+
return selected;
|
|
502
|
+
}
|
|
503
|
+
getComponentByName(browseName, namespaceIndex) {
|
|
504
|
+
const select = this._selectChildren(browseName, namespaceIndex, HasComponentReferenceType);
|
|
505
|
+
(0, node_opcua_assert_1.assert)(select.length <= 1, "BaseNode#getComponentByName found duplicated reference");
|
|
506
|
+
if (select.length === 1) {
|
|
507
|
+
const component = select[0];
|
|
508
|
+
if (component.nodeClass === node_opcua_data_model_1.NodeClass.Method) {
|
|
509
|
+
warningLog("please use getMethodByName to retrieve a method");
|
|
510
|
+
return null;
|
|
511
|
+
}
|
|
512
|
+
(0, node_opcua_assert_1.assert)(component.nodeClass === node_opcua_data_model_1.NodeClass.Variable || component.nodeClass === node_opcua_data_model_1.NodeClass.Object);
|
|
513
|
+
return component;
|
|
514
|
+
}
|
|
515
|
+
else {
|
|
516
|
+
return null;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
getPropertyByName(browseName, namespaceIndex) {
|
|
520
|
+
const select = this._selectChildren(browseName, namespaceIndex, HasPropertyReferenceType);
|
|
521
|
+
(0, node_opcua_assert_1.assert)(select.length <= 1, "BaseNode#getPropertyByName found duplicated reference");
|
|
522
|
+
if (select.length === 1 && select[0].nodeClass !== node_opcua_data_model_1.NodeClass.Variable) {
|
|
523
|
+
throw new Error("Expecting a property to be of nodeClass==NodeClass.Variable");
|
|
524
|
+
}
|
|
525
|
+
return select.length === 1 ? select[0] : null;
|
|
526
|
+
}
|
|
527
|
+
getFolderElementByName(browseName, namespaceIndex) {
|
|
528
|
+
const select = this._selectChildren(browseName, namespaceIndex, OrganizesReferenceType);
|
|
529
|
+
return select.length === 1 ? select[0] : null;
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* returns the list of nodes that this folder object organizes
|
|
533
|
+
*/
|
|
534
|
+
getFolderElements() {
|
|
535
|
+
return this.findReferencesExAsObject("Organizes", node_opcua_data_model_1.BrowseDirection.Forward);
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* returns the list of methods that this object provides
|
|
539
|
+
* @return an array with Method objects.
|
|
540
|
+
*
|
|
541
|
+
*
|
|
542
|
+
* Note: internally, methods are special types of components
|
|
543
|
+
*/
|
|
544
|
+
getMethods() {
|
|
545
|
+
const components = this.getComponents();
|
|
546
|
+
return components.filter((obj) => obj.nodeClass === node_opcua_data_model_1.NodeClass.Method);
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* returns the method exposed by this object and with the given nodeId
|
|
550
|
+
*/
|
|
551
|
+
getMethodById(nodeId) {
|
|
552
|
+
const methods = this.getMethods();
|
|
553
|
+
const found = methods.find((m) => m.nodeId.toString() === nodeId.toString());
|
|
554
|
+
return found || null;
|
|
555
|
+
}
|
|
556
|
+
getMethodByName(methodName, namespaceIndex) {
|
|
557
|
+
// methods are components of a special node class
|
|
558
|
+
const select = this._selectChildren(methodName, namespaceIndex, HasComponentReferenceType).filter((node) => node.nodeClass === node_opcua_data_model_1.NodeClass.Method);
|
|
559
|
+
(0, node_opcua_assert_1.assert)(select.length <= 1, "BaseNode#getMethodByName found duplicated reference");
|
|
560
|
+
return select.length === 1 ? select[0] : null;
|
|
561
|
+
}
|
|
562
|
+
getWriteMask() {
|
|
563
|
+
return 0;
|
|
564
|
+
}
|
|
565
|
+
getUserWriteMask() {
|
|
566
|
+
return 0;
|
|
567
|
+
}
|
|
568
|
+
readAttribute(context, attributeId, indexRange, dataEncoding) {
|
|
569
|
+
indexRange;
|
|
570
|
+
dataEncoding;
|
|
571
|
+
(0, node_opcua_assert_1.assert)(!context || context instanceof session_context_js_1.SessionContext);
|
|
572
|
+
const options = {};
|
|
573
|
+
options.statusCode = node_opcua_status_code_1.StatusCodes.Good;
|
|
574
|
+
switch (attributeId) {
|
|
575
|
+
case node_opcua_data_model_1.AttributeIds.NodeId: // NodeId
|
|
576
|
+
options.value = { dataType: node_opcua_variant_1.DataType.NodeId, value: this.nodeId };
|
|
577
|
+
break;
|
|
578
|
+
case node_opcua_data_model_1.AttributeIds.NodeClass: // NodeClass
|
|
579
|
+
(0, node_opcua_assert_1.assert)(Number.isFinite(this.nodeClass));
|
|
580
|
+
options.value = { dataType: node_opcua_variant_1.DataType.Int32, value: this.nodeClass };
|
|
581
|
+
break;
|
|
582
|
+
case node_opcua_data_model_1.AttributeIds.BrowseName: // QualifiedName
|
|
583
|
+
(0, node_opcua_assert_1.assert)(this.browseName instanceof node_opcua_data_model_1.QualifiedName);
|
|
584
|
+
options.value = { dataType: node_opcua_variant_1.DataType.QualifiedName, value: this.browseName };
|
|
585
|
+
break;
|
|
586
|
+
case node_opcua_data_model_1.AttributeIds.DisplayName: // LocalizedText
|
|
587
|
+
options.value = { dataType: node_opcua_variant_1.DataType.LocalizedText, value: this.displayName[0] };
|
|
588
|
+
break;
|
|
589
|
+
case node_opcua_data_model_1.AttributeIds.Description: // LocalizedText
|
|
590
|
+
options.value = { dataType: node_opcua_variant_1.DataType.LocalizedText, value: this.description };
|
|
591
|
+
break;
|
|
592
|
+
case node_opcua_data_model_1.AttributeIds.WriteMask:
|
|
593
|
+
options.value = { dataType: node_opcua_variant_1.DataType.UInt32, value: this.getWriteMask() };
|
|
594
|
+
break;
|
|
595
|
+
case node_opcua_data_model_1.AttributeIds.UserWriteMask:
|
|
596
|
+
options.value = { dataType: node_opcua_variant_1.DataType.UInt32, value: this.getUserWriteMask() };
|
|
597
|
+
break;
|
|
598
|
+
case node_opcua_data_model_1.AttributeIds.AccessRestrictions:
|
|
599
|
+
return this._readAccessRestrictions(context);
|
|
600
|
+
case node_opcua_data_model_1.AttributeIds.RolePermissions:
|
|
601
|
+
return this._readRolePermissions(context);
|
|
602
|
+
case node_opcua_data_model_1.AttributeIds.UserRolePermissions:
|
|
603
|
+
return this._readUserRolePermissions(context);
|
|
604
|
+
default:
|
|
605
|
+
options.value = null;
|
|
606
|
+
options.statusCode = node_opcua_status_code_1.StatusCodes.BadAttributeIdInvalid;
|
|
607
|
+
break;
|
|
608
|
+
}
|
|
609
|
+
// xx options.serverTimestamp = new Date();
|
|
610
|
+
return new node_opcua_data_value_1.DataValue(options);
|
|
611
|
+
}
|
|
612
|
+
writeAttribute(context, writeValue, callback) {
|
|
613
|
+
context = context || session_context_js_1.SessionContext.defaultContext;
|
|
614
|
+
(0, node_opcua_assert_1.assert)(context instanceof session_context_js_1.SessionContext);
|
|
615
|
+
(0, node_opcua_assert_1.assert)(typeof callback === "function");
|
|
616
|
+
if (writeValue.attributeId === undefined ||
|
|
617
|
+
writeValue.attributeId <= 0 ||
|
|
618
|
+
writeValue.attributeId > node_opcua_data_model_1.AttributeIds.AccessLevelEx) {
|
|
619
|
+
callback(null, node_opcua_status_code_1.StatusCodes.BadAttributeIdInvalid);
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
if (!this.canUserWriteAttribute(context, writeValue.attributeId)) {
|
|
623
|
+
callback(null, node_opcua_status_code_1.StatusCodes.BadUserAccessDenied);
|
|
624
|
+
return;
|
|
625
|
+
}
|
|
626
|
+
// by default Node is read-only,
|
|
627
|
+
// this method needs to be overridden to change the behavior
|
|
628
|
+
callback(null, node_opcua_status_code_1.StatusCodes.BadNotWritable);
|
|
629
|
+
}
|
|
630
|
+
fullName() {
|
|
631
|
+
if (this.parentNodeId) {
|
|
632
|
+
const parent = this.addressSpace.findNode(this.parentNodeId);
|
|
633
|
+
// c8 ignore next
|
|
634
|
+
if (parent) {
|
|
635
|
+
return `${parent.fullName()}.${this.browseName.toString()}`;
|
|
636
|
+
}
|
|
637
|
+
else {
|
|
638
|
+
return `NOT YET REGISTERED${this.parentNodeId.toString()}.${this.browseName.toString()}`;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
return this.browseName.toString();
|
|
642
|
+
}
|
|
643
|
+
ownReferences() {
|
|
644
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
645
|
+
return [..._private._referenceIdx.values()];
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
*
|
|
649
|
+
* @param relativePathElement
|
|
650
|
+
* @param isLast
|
|
651
|
+
* @return {NodeId[]}
|
|
652
|
+
*/
|
|
653
|
+
browseNodeByTargetName(relativePathElement, isLast) {
|
|
654
|
+
relativePathElement.targetName = relativePathElement.targetName || new node_opcua_data_model_1.QualifiedName({});
|
|
655
|
+
// part 4.0 v1.03 $7.26 RelativePath
|
|
656
|
+
// The BrowseName of the target node.
|
|
657
|
+
// The final element may have an empty targetName. In this situation all targets of the references identified by
|
|
658
|
+
// the referenceTypeId are the targets of the RelativePath.
|
|
659
|
+
// The targetName shall be specified for all other elements.
|
|
660
|
+
// The current path cannot be followed any further if no targets with the specified BrowseName exist.
|
|
661
|
+
(0, node_opcua_assert_1.assert)(relativePathElement.targetName instanceof node_opcua_data_model_1.QualifiedName);
|
|
662
|
+
(0, node_opcua_assert_1.assert)(relativePathElement.targetName.namespaceIndex >= 0);
|
|
663
|
+
(0, node_opcua_assert_1.assert)((relativePathElement.targetName.name?.length || 0) > 0);
|
|
664
|
+
// The type of reference to follow from the current node.
|
|
665
|
+
// The current path cannot be followed any further if the referenceTypeId is not available on the Node instance.
|
|
666
|
+
// If not specified then all References are included and the parameter includeSubtypes is ignored.
|
|
667
|
+
(0, node_opcua_assert_1.assert)(Object.hasOwn(relativePathElement, "referenceTypeId"));
|
|
668
|
+
// Indicates whether the inverse Reference should be followed.
|
|
669
|
+
// The inverse reference is followed if this value is TRUE.
|
|
670
|
+
(0, node_opcua_assert_1.assert)(Object.hasOwn(relativePathElement, "isInverse"));
|
|
671
|
+
// Indicates whether subtypes of the ReferenceType should be followed.
|
|
672
|
+
// Subtypes are included if this value is TRUE.
|
|
673
|
+
(0, node_opcua_assert_1.assert)(Object.hasOwn(relativePathElement, "includeSubtypes"));
|
|
674
|
+
// A forward step naming its target through a hierarchical reference type, the shape of
|
|
675
|
+
// almost every TranslateBrowsePath element, is a lookup in the child index rather than a
|
|
676
|
+
// scan of every reference of the node; the filter below still applies to what it finds.
|
|
677
|
+
const references = this._hierarchicalStepCandidates(relativePathElement) ?? this.allReferences();
|
|
678
|
+
const _check_reference = (reference) => {
|
|
679
|
+
if (relativePathElement.referenceTypeId.isEmpty()) {
|
|
680
|
+
return true;
|
|
681
|
+
}
|
|
682
|
+
(0, node_opcua_assert_1.assert)(relativePathElement.referenceTypeId instanceof node_opcua_nodeid_1.NodeId);
|
|
683
|
+
if ((relativePathElement.isInverse && reference.isForward) ||
|
|
684
|
+
(!relativePathElement.isInverse && !reference.isForward)) {
|
|
685
|
+
return false;
|
|
686
|
+
}
|
|
687
|
+
(0, node_opcua_assert_1.assert)(Object.hasOwn(reference, "isForward"));
|
|
688
|
+
const referenceType = resolveReferenceType(this.addressSpace, reference);
|
|
689
|
+
const referenceTypeId = referenceType.nodeId;
|
|
690
|
+
if ((0, node_opcua_nodeid_1.sameNodeId)(relativePathElement.referenceTypeId, referenceTypeId)) {
|
|
691
|
+
return true;
|
|
692
|
+
}
|
|
693
|
+
if (relativePathElement.includeSubtypes) {
|
|
694
|
+
const baseType = this.addressSpace.findReferenceType(relativePathElement.referenceTypeId);
|
|
695
|
+
if (baseType && referenceType.isSubtypeOf(baseType)) {
|
|
696
|
+
return true;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
return false;
|
|
700
|
+
};
|
|
701
|
+
const nodeIdsMap = {};
|
|
702
|
+
let nodeIds = [];
|
|
703
|
+
for (const reference of references) {
|
|
704
|
+
if (!_check_reference(reference)) {
|
|
705
|
+
continue;
|
|
706
|
+
}
|
|
707
|
+
const obj = resolveReferenceNode(this.addressSpace, reference);
|
|
708
|
+
// c8 ignore next
|
|
709
|
+
if (!obj) {
|
|
710
|
+
throw new Error(` cannot find node with id ${reference.nodeId.toString()}`);
|
|
711
|
+
}
|
|
712
|
+
if ((0, node_util_1.isDeepStrictEqual)(obj.browseName, relativePathElement.targetName)) {
|
|
713
|
+
// compare QualifiedName
|
|
714
|
+
const key = obj.nodeId.toString();
|
|
715
|
+
if (!Object.hasOwn(nodeIdsMap, key)) {
|
|
716
|
+
nodeIds.push(obj.nodeId);
|
|
717
|
+
nodeIdsMap[key] = obj;
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
if (nodeIds.length === 0 && (this.nodeClass === node_opcua_data_model_1.NodeClass.ObjectType || this.nodeClass === node_opcua_data_model_1.NodeClass.VariableType)) {
|
|
722
|
+
const nodeType = this;
|
|
723
|
+
if (nodeType.subtypeOf) {
|
|
724
|
+
// browsing also InstanceDeclarations included in base type
|
|
725
|
+
const baseType = this.addressSpace.findNode(nodeType.subtypeOf);
|
|
726
|
+
const n = baseType.browseNodeByTargetName(relativePathElement, isLast);
|
|
727
|
+
nodeIds = [].concat(nodeIds, n);
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
return nodeIds;
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* the references of this node that can answer a relative path element, taken from the child
|
|
734
|
+
* index, or null when the element is one the index cannot answer (an inverse step, an
|
|
735
|
+
* unspecified or non-hierarchical reference type, no target name)
|
|
736
|
+
*/
|
|
737
|
+
_hierarchicalStepCandidates(relativePathElement) {
|
|
738
|
+
const targetName = relativePathElement.targetName;
|
|
739
|
+
if (relativePathElement.isInverse || !targetName?.name || relativePathElement.referenceTypeId.isEmpty()) {
|
|
740
|
+
return null;
|
|
741
|
+
}
|
|
742
|
+
const wellKnown = wellKnownReferenceTypes(this.addressSpace);
|
|
743
|
+
const referenceType = this.addressSpace.findReferenceType(relativePathElement.referenceTypeId);
|
|
744
|
+
if (!wellKnown || !referenceType) {
|
|
745
|
+
return null;
|
|
746
|
+
}
|
|
747
|
+
if (referenceType !== wellKnown.hierarchicalReferences && !referenceType.isSubtypeOf(wellKnown.hierarchicalReferences)) {
|
|
748
|
+
return null;
|
|
749
|
+
}
|
|
750
|
+
return _select_by_browse_name((0, base_node_private_js_1._get_HierarchicalReference)(this), targetName, targetName.namespaceIndex);
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* browse the node to extract information requested in browseDescription
|
|
754
|
+
* and returns an array with reference descriptions
|
|
755
|
+
*
|
|
756
|
+
*
|
|
757
|
+
*
|
|
758
|
+
*/
|
|
759
|
+
browseNode(browseDescription, context) {
|
|
760
|
+
(0, node_opcua_assert_1.assert)(Number.isFinite(browseDescription.nodeClassMask));
|
|
761
|
+
const do_debug = false;
|
|
762
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
763
|
+
const addressSpace = this.addressSpace;
|
|
764
|
+
const referenceTypeId = normalize_referenceTypeId(addressSpace, browseDescription.referenceTypeId);
|
|
765
|
+
(0, node_opcua_assert_1.assert)(referenceTypeId instanceof node_opcua_nodeid_1.NodeId);
|
|
766
|
+
const browseDirection = browseDescription.browseDirection !== undefined ? browseDescription.browseDirection : node_opcua_data_model_1.BrowseDirection.Both;
|
|
767
|
+
// get all possible references
|
|
768
|
+
let references = this.allReferences();
|
|
769
|
+
/* c8 ignore next */
|
|
770
|
+
if (do_debug) {
|
|
771
|
+
// c8 ignore next
|
|
772
|
+
doDebug && debugLog("all references :", this.nodeId.toString(), this.browseName.toString());
|
|
773
|
+
(0, dump_tools_js_1.dumpReferences)(addressSpace, _private._referenceIdx.values());
|
|
774
|
+
}
|
|
775
|
+
// filter out references not matching referenceType
|
|
776
|
+
references = _filter_by_referenceType.call(this, browseDescription, references, referenceTypeId);
|
|
777
|
+
references = _filter_by_direction(references, browseDirection);
|
|
778
|
+
references = _filter_by_nodeClass.call(this, references, browseDescription.nodeClassMask);
|
|
779
|
+
references = _filter_by_userFilter.call(this, references, context);
|
|
780
|
+
if (context) {
|
|
781
|
+
references = _filter_by_context(this, references, context);
|
|
782
|
+
}
|
|
783
|
+
const referenceDescriptions = (0, base_node_private_js_1._constructReferenceDescription)(addressSpace, references, browseDescription.resultMask);
|
|
784
|
+
/* c8 ignore next */
|
|
785
|
+
if (do_debug) {
|
|
786
|
+
(0, dump_tools_js_1.dumpReferenceDescriptions)(this.addressSpace, referenceDescriptions);
|
|
787
|
+
}
|
|
788
|
+
return referenceDescriptions;
|
|
789
|
+
}
|
|
790
|
+
allReferences() {
|
|
791
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
792
|
+
const references = [..._private._referenceIdx.values(), ..._private._back_referenceIdx.values()];
|
|
793
|
+
const addressSpace = this.addressSpace;
|
|
794
|
+
for (const ref of references) {
|
|
795
|
+
if (!ref.node) {
|
|
796
|
+
resolveReferenceNode(addressSpace, ref);
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
return references;
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* @param reference
|
|
803
|
+
* @param reference.referenceType {String}
|
|
804
|
+
* @param [reference.isForward = true] {Boolean}
|
|
805
|
+
* @param reference.nodeId {Node|NodeId|String}
|
|
806
|
+
*
|
|
807
|
+
* @example
|
|
808
|
+
*
|
|
809
|
+
* view.addReference({ referenceType: "Organizes", nodeId: myDevice });
|
|
810
|
+
*
|
|
811
|
+
* or
|
|
812
|
+
*
|
|
813
|
+
* myDevice1.addReference({ referenceType: "OrganizedBy", nodeId: view });
|
|
814
|
+
*/
|
|
815
|
+
addReference(reference) {
|
|
816
|
+
const referenceNode = this.__addReference(reference);
|
|
817
|
+
const addressSpace = this.addressSpace;
|
|
818
|
+
if (!resolveReferenceType(addressSpace, referenceNode)) {
|
|
819
|
+
throw new Error(`BaseNode#addReference : invalid reference ${reference.toString()}`);
|
|
820
|
+
}
|
|
821
|
+
_propagate_ref.call(this, addressSpace, referenceNode);
|
|
822
|
+
this.install_extra_properties();
|
|
823
|
+
(0, address_space_change_event_tools_js_1._handle_add_reference_change_event)(this, referenceNode.nodeId);
|
|
824
|
+
}
|
|
825
|
+
removeReference(referenceOpts) {
|
|
826
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
827
|
+
(0, node_opcua_assert_1.assert)(Object.hasOwn(referenceOpts, "referenceType"));
|
|
828
|
+
// xx isForward is optional : assert(Object.prototype.hasOwnProperty.call(reference,"isForward"));
|
|
829
|
+
(0, node_opcua_assert_1.assert)(Object.hasOwn(referenceOpts, "nodeId"));
|
|
830
|
+
const addressSpace = this.addressSpace;
|
|
831
|
+
const reference = addressSpace.normalizeReferenceTypes([referenceOpts])?.[0];
|
|
832
|
+
const h = reference.key(addressSpace);
|
|
833
|
+
const relatedNode = addressSpace.findNode(reference.nodeId);
|
|
834
|
+
// c8 ignore next
|
|
835
|
+
if (!relatedNode) {
|
|
836
|
+
return;
|
|
837
|
+
}
|
|
838
|
+
const backwardReference = new reference_impl_js_1.ReferenceImpl({
|
|
839
|
+
isForward: !reference.isForward,
|
|
840
|
+
nodeId: this.nodeId,
|
|
841
|
+
referenceType: reference.referenceType
|
|
842
|
+
});
|
|
843
|
+
if (_private._referenceIdx.has(h)) {
|
|
844
|
+
_private._referenceIdx.delete(h);
|
|
845
|
+
base_node_private_js_1.BaseNode_remove_backward_reference.call(relatedNode, backwardReference);
|
|
846
|
+
(0, base_node_private_js_1._remove_HierarchicalReference)(this, reference);
|
|
847
|
+
this.uninstall_extra_properties(reference);
|
|
848
|
+
this._clear_caches();
|
|
849
|
+
(0, base_node_private_js_1.noteReferenceTypeChange)(this, reference);
|
|
850
|
+
}
|
|
851
|
+
else if (_private._back_referenceIdx.has(h)) {
|
|
852
|
+
relatedNode.removeReference(backwardReference);
|
|
853
|
+
}
|
|
854
|
+
else {
|
|
855
|
+
// A back reference of a massively used type was never installed: _propagate_ref
|
|
856
|
+
// skips HasTypeDefinition and HasModellingRule deliberately, "because there are
|
|
857
|
+
// too many". Removal has to mirror that, or detaching any node asks its type
|
|
858
|
+
// definition to drop a reference it never held - which is where the hundred-odd
|
|
859
|
+
// "Cannot find reference to remove: ns=0;i=40" lines per run came from. The
|
|
860
|
+
// absence is the designed state, not a fault worth reporting.
|
|
861
|
+
const referenceType = resolveReferenceType(addressSpace, reference);
|
|
862
|
+
if (!reference.isForward && referenceType && (0, reference_impl_js_1.isMassivelyUsedReferenceType)(referenceType.nodeId)) {
|
|
863
|
+
return;
|
|
864
|
+
}
|
|
865
|
+
warningLog(`Cannot find reference to remove: ${reference.toString()}`);
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
*
|
|
870
|
+
*/
|
|
871
|
+
resolveNodeId(nodeId) {
|
|
872
|
+
return this.addressSpace.resolveNodeId(nodeId);
|
|
873
|
+
}
|
|
874
|
+
/**
|
|
875
|
+
* Expose the hierarchical children of this node as properties of this node, and this node as
|
|
876
|
+
* a property of its parents, for the browse names that have no shared accessor.
|
|
877
|
+
*
|
|
878
|
+
* A node created while a nodeset loads needs nothing here: its name got a getter on the
|
|
879
|
+
* prototype (see child_accessors.ts). This is the path for nodes created afterwards through the
|
|
880
|
+
* namespace API, whose browse names may be anything and must not touch the prototype.
|
|
881
|
+
*/
|
|
882
|
+
install_extra_properties() {
|
|
883
|
+
const addressSpace = this.addressSpace;
|
|
884
|
+
if (addressSpace.isFrugal) {
|
|
885
|
+
return;
|
|
886
|
+
}
|
|
887
|
+
const wellKnown = wellKnownReferenceTypes(addressSpace);
|
|
888
|
+
if (!wellKnown) {
|
|
889
|
+
return; // namespace 0 is still loading
|
|
890
|
+
}
|
|
891
|
+
const { hasChild, hasComponent, hasProperty, organizes } = wellKnown;
|
|
892
|
+
const self = this;
|
|
893
|
+
const visit = (reference) => {
|
|
894
|
+
if (reference.isForward) {
|
|
895
|
+
if (hasChild.checkHasSubtype(reference.referenceType) || organizes.checkHasSubtype(reference.referenceType)) {
|
|
896
|
+
install_child_as_object_property(self, resolveReferenceNode(addressSpace, reference));
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
else if (hasComponent.checkHasSubtype(reference.referenceType) ||
|
|
900
|
+
hasProperty.checkHasSubtype(reference.referenceType) ||
|
|
901
|
+
organizes.checkHasSubtype(reference.referenceType)) {
|
|
902
|
+
// Only this node is new, so only this node has to appear on the parent.
|
|
903
|
+
// Re-walking every child the parent already has made building a folder
|
|
904
|
+
// of N children cost O(N^2) - measured at 7.2s for 3000 children.
|
|
905
|
+
install_child_as_object_property(resolveReferenceNode(addressSpace, reference), self);
|
|
906
|
+
}
|
|
907
|
+
};
|
|
908
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
909
|
+
for (const reference of _private._referenceIdx.values()) {
|
|
910
|
+
visit(reference);
|
|
911
|
+
}
|
|
912
|
+
for (const reference of _private._back_referenceIdx.values()) {
|
|
913
|
+
visit(reference);
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
/**
|
|
917
|
+
* undo install_extra_properties for one reference, on both ends when it is an inverse one
|
|
918
|
+
*/
|
|
919
|
+
uninstall_extra_properties(reference) {
|
|
920
|
+
const addressSpace = this.addressSpace;
|
|
921
|
+
if (addressSpace.isFrugal) {
|
|
922
|
+
return;
|
|
923
|
+
}
|
|
924
|
+
if (!reference.isForward) {
|
|
925
|
+
const parentNode = resolveReferenceNode(addressSpace, reference);
|
|
926
|
+
if (parentNode) {
|
|
927
|
+
parentNode.uninstall_extra_properties({
|
|
928
|
+
isForward: true,
|
|
929
|
+
nodeId: this.nodeId,
|
|
930
|
+
referenceType: reference.referenceType
|
|
931
|
+
});
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
const childNode = resolveReferenceNode(addressSpace, reference);
|
|
935
|
+
if (childNode) {
|
|
936
|
+
uninstall_child_object_property(this, childNode);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
toString() {
|
|
940
|
+
const options = new base_node_private_js_1.ToStringBuilder();
|
|
941
|
+
base_node_private_js_1.BaseNode_toString.call(this, options);
|
|
942
|
+
return options.toString();
|
|
943
|
+
}
|
|
944
|
+
toJSON() {
|
|
945
|
+
return {
|
|
946
|
+
nodeId: this.nodeId.toString(),
|
|
947
|
+
nodeClass: node_opcua_data_model_1.NodeClass[this.nodeClass],
|
|
948
|
+
browseName: this.browseName.toString(),
|
|
949
|
+
displayName: this.displayName.length ? this.displayName[0].text : ""
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
953
|
+
return this.toString();
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* @property isFalseSubStateOf
|
|
957
|
+
* @type {BaseNode|null}
|
|
958
|
+
*/
|
|
959
|
+
get isFalseSubStateOf() {
|
|
960
|
+
const r = this.findReferencesAsObject("HasFalseSubState", false);
|
|
961
|
+
if (!r || r.length === 0) {
|
|
962
|
+
return null;
|
|
963
|
+
}
|
|
964
|
+
(0, node_opcua_assert_1.assert)(r.length === 1);
|
|
965
|
+
return r[0];
|
|
966
|
+
}
|
|
967
|
+
/**
|
|
968
|
+
* @property isTrueSubStateOf
|
|
969
|
+
* @type {BaseNode|null}
|
|
970
|
+
*/
|
|
971
|
+
get isTrueSubStateOf() {
|
|
972
|
+
const r = this.findReferencesAsObject("HasTrueSubState", false);
|
|
973
|
+
if (!r || r.length === 0) {
|
|
974
|
+
return null;
|
|
975
|
+
}
|
|
976
|
+
(0, node_opcua_assert_1.assert)(r.length === 1);
|
|
977
|
+
return r[0];
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
* @return {UAStateVariable[]} return an array with the SubStates of this object.
|
|
981
|
+
*/
|
|
982
|
+
getFalseSubStates() {
|
|
983
|
+
return this.findReferencesAsObject("HasFalseSubState");
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
|
|
987
|
+
* @return {UAStateVariable[]} return an array with the SubStates of this object.
|
|
988
|
+
*/
|
|
989
|
+
getTrueSubStates() {
|
|
990
|
+
return this.findReferencesAsObject("HasTrueSubState");
|
|
991
|
+
}
|
|
992
|
+
findHierarchicalReferences() {
|
|
993
|
+
return this.findReferencesEx("HierarchicalReferences", node_opcua_data_model_1.BrowseDirection.Forward);
|
|
994
|
+
}
|
|
995
|
+
//
|
|
996
|
+
getChildByName(browseName, namespaceIndex) {
|
|
997
|
+
var childrenMap = (0, base_node_private_js_1._get_HierarchicalReference)(this);
|
|
998
|
+
const select = _select_by_browse_name(childrenMap, browseName, namespaceIndex);
|
|
999
|
+
if (select.length === 0) {
|
|
1000
|
+
return null;
|
|
1001
|
+
}
|
|
1002
|
+
const ref = select[0];
|
|
1003
|
+
const r = this.addressSpace.findReferenceType(ref.referenceType);
|
|
1004
|
+
if (!r)
|
|
1005
|
+
return null;
|
|
1006
|
+
const hasChild = this.addressSpace.findReferenceType("HasChild");
|
|
1007
|
+
if (!hasChild) {
|
|
1008
|
+
return null; // too early, bmy be namespace 0 is still loading
|
|
1009
|
+
}
|
|
1010
|
+
if (r.isSubtypeOf(hasChild)) {
|
|
1011
|
+
return ref.node || null;
|
|
1012
|
+
}
|
|
1013
|
+
return null;
|
|
1014
|
+
}
|
|
1015
|
+
getNodeVersion() {
|
|
1016
|
+
return this.getChildByName("NodeVersion", 0);
|
|
1017
|
+
/*
|
|
1018
|
+
const cache = BaseNode_getCache(this);
|
|
1019
|
+
if (cache._versionNode == undefined) {
|
|
1020
|
+
cache._versionNode = this.getChildByName("NodeVersion", 0) as UAProperty<string, DataType.String> | null;
|
|
1021
|
+
}
|
|
1022
|
+
return cache._versionNode as UAProperty<UAString, DataType.String> | null;
|
|
1023
|
+
*/
|
|
1024
|
+
}
|
|
1025
|
+
get nodeVersion() {
|
|
1026
|
+
return this.getNodeVersion() || undefined;
|
|
1027
|
+
}
|
|
1028
|
+
set nodeVersion(_n) {
|
|
1029
|
+
(0, node_opcua_assert_1.assert)(false);
|
|
1030
|
+
}
|
|
1031
|
+
get toStateNode() {
|
|
1032
|
+
const nodes = this.findReferencesAsObject("ToState", true);
|
|
1033
|
+
(0, node_opcua_assert_1.assert)(nodes.length <= 1);
|
|
1034
|
+
return nodes.length === 1 ? nodes[0] : null;
|
|
1035
|
+
}
|
|
1036
|
+
get fromStateNode() {
|
|
1037
|
+
const nodes = this.findReferencesAsObject("FromState", true);
|
|
1038
|
+
(0, node_opcua_assert_1.assert)(nodes.length <= 1);
|
|
1039
|
+
return nodes.length === 1 ? nodes[0] : null;
|
|
1040
|
+
}
|
|
1041
|
+
/**
|
|
1042
|
+
* this methods propagates the forward references to the pointed node
|
|
1043
|
+
* by inserting backward references to the counter part node
|
|
1044
|
+
* @private
|
|
1045
|
+
*/
|
|
1046
|
+
propagate_back_references() {
|
|
1047
|
+
this._propagate_back_references(undefined);
|
|
1048
|
+
}
|
|
1049
|
+
/**
|
|
1050
|
+
* propagate_back_references for a node a NodeSet2 file declared: its references may be held
|
|
1051
|
+
* by their target as well, so each is looked up there before a back reference is built
|
|
1052
|
+
*/
|
|
1053
|
+
propagate_back_references_declared_from_both_ends() {
|
|
1054
|
+
this._propagate_back_references((0, reference_impl_js_1.nodeIdKey)(this.nodeId));
|
|
1055
|
+
}
|
|
1056
|
+
/** one reference of a node a NodeSet2 file declared, see propagate_back_references_declared_from_both_ends */
|
|
1057
|
+
propagate_back_reference_declared_from_both_ends(reference) {
|
|
1058
|
+
if (this.addressSpace.suspendBackReference) {
|
|
1059
|
+
return;
|
|
1060
|
+
}
|
|
1061
|
+
_propagate_ref.call(this, this.addressSpace, reference, (0, reference_impl_js_1.nodeIdKey)(this.nodeId));
|
|
1062
|
+
}
|
|
1063
|
+
_propagate_back_references(sourceNodeKey) {
|
|
1064
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
1065
|
+
if (this.addressSpace.suspendBackReference) {
|
|
1066
|
+
// this indicates that the base node is constructed from an xml definition
|
|
1067
|
+
// propagate_back_references will be called later once the file has been completely processed.
|
|
1068
|
+
return;
|
|
1069
|
+
}
|
|
1070
|
+
const addressSpace = this.addressSpace;
|
|
1071
|
+
for (const reference of _private._referenceIdx.values()) {
|
|
1072
|
+
_propagate_ref.call(this, addressSpace, reference, sourceNodeKey);
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
/**
|
|
1076
|
+
* the dispose method should be called when the node is no longer used, to release
|
|
1077
|
+
* back pointer to the address space and clear caches.
|
|
1078
|
+
*
|
|
1079
|
+
* @private
|
|
1080
|
+
*/
|
|
1081
|
+
dispose() {
|
|
1082
|
+
this.emit("dispose");
|
|
1083
|
+
this.removeAllListeners();
|
|
1084
|
+
this._clear_caches();
|
|
1085
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
1086
|
+
for (const ref of _private._back_referenceIdx.values()) {
|
|
1087
|
+
ref.dispose();
|
|
1088
|
+
}
|
|
1089
|
+
for (const ref of _private._referenceIdx.values()) {
|
|
1090
|
+
ref.dispose();
|
|
1091
|
+
}
|
|
1092
|
+
(0, base_node_private_js_1.BaseNode_removePrivate)(this);
|
|
1093
|
+
}
|
|
1094
|
+
isDisposed() {
|
|
1095
|
+
return !this.addressSpacePrivate;
|
|
1096
|
+
}
|
|
1097
|
+
// c8 ignore next
|
|
1098
|
+
dumpXML(xmlWriter) {
|
|
1099
|
+
console.error(" This ", node_opcua_data_model_1.NodeClass[this.nodeClass]);
|
|
1100
|
+
(0, node_opcua_assert_1.assert)(false, "BaseNode#dumpXML NOT IMPLEMENTED !");
|
|
1101
|
+
(0, node_opcua_assert_1.assert)(xmlWriter);
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* Undo the effect of propagate_back_references
|
|
1105
|
+
*/
|
|
1106
|
+
unpropagate_back_references() {
|
|
1107
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
1108
|
+
const addressSpace = this.addressSpace;
|
|
1109
|
+
for (const reference of _private._referenceIdx.values()) {
|
|
1110
|
+
// filter out non Hierarchical References
|
|
1111
|
+
const referenceType = resolveReferenceType(addressSpace, reference);
|
|
1112
|
+
// c8 ignore next
|
|
1113
|
+
if (!referenceType) {
|
|
1114
|
+
console.error(chalk_1.default.red(" ERROR"), " cannot find reference ", reference.referenceType, reference.toString());
|
|
1115
|
+
}
|
|
1116
|
+
const related_node = resolveReferenceNode(addressSpace, reference);
|
|
1117
|
+
if (related_node) {
|
|
1118
|
+
(0, node_opcua_assert_1.assert)(reference.nodeId.toString() !== this.nodeId.toString());
|
|
1119
|
+
base_node_private_js_1.BaseNode_remove_backward_reference.call(related_node, new reference_impl_js_1.ReferenceImpl({
|
|
1120
|
+
isForward: !reference.isForward,
|
|
1121
|
+
nodeId: this.nodeId,
|
|
1122
|
+
referenceType: reference.referenceType
|
|
1123
|
+
}));
|
|
1124
|
+
} // else addressSpace may be incomplete
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
installPostInstallFunc(f) {
|
|
1128
|
+
if (!f) {
|
|
1129
|
+
// nothing to do
|
|
1130
|
+
return;
|
|
1131
|
+
}
|
|
1132
|
+
function chain(f1, f2) {
|
|
1133
|
+
return function chainingFunc(...args) {
|
|
1134
|
+
if (f1) {
|
|
1135
|
+
f1.apply(this, args);
|
|
1136
|
+
}
|
|
1137
|
+
if (f2) {
|
|
1138
|
+
f2.apply(this, args);
|
|
1139
|
+
}
|
|
1140
|
+
};
|
|
1141
|
+
}
|
|
1142
|
+
this._postInstantiateFunc = chain.call(this, this._postInstantiateFunc, f);
|
|
1143
|
+
}
|
|
1144
|
+
_on_child_added(childNode) {
|
|
1145
|
+
// this._clear_caches();
|
|
1146
|
+
// return;
|
|
1147
|
+
const cache = (0, base_node_private_js_1.BaseNode_getCache)(this);
|
|
1148
|
+
const tmpV = cache._versionNode;
|
|
1149
|
+
const tmpC = cache._children;
|
|
1150
|
+
this._clear_caches();
|
|
1151
|
+
const newCache = (0, base_node_private_js_1.BaseNode_getCache)(this);
|
|
1152
|
+
newCache._versionNode = tmpV;
|
|
1153
|
+
newCache._children = tmpC;
|
|
1154
|
+
if (newCache._children) {
|
|
1155
|
+
newCache._children?.push(childNode);
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
_on_child_removed(_obj) {
|
|
1159
|
+
// obj; // unused;
|
|
1160
|
+
this._clear_caches();
|
|
1161
|
+
}
|
|
1162
|
+
/**
|
|
1163
|
+
* @private
|
|
1164
|
+
* @param reference
|
|
1165
|
+
*/
|
|
1166
|
+
_add_backward_reference(reference) {
|
|
1167
|
+
base_node_private_js_1.BaseNode_add_backward_reference.call(this, reference);
|
|
1168
|
+
}
|
|
1169
|
+
_coerceReferenceType(referenceType) {
|
|
1170
|
+
let result = null;
|
|
1171
|
+
if (typeof referenceType === "string") {
|
|
1172
|
+
result = this.addressSpace.findReferenceType(referenceType);
|
|
1173
|
+
/* c8 ignore next */
|
|
1174
|
+
if (!result) {
|
|
1175
|
+
errorLog("referenceType ", referenceType, " cannot be found");
|
|
1176
|
+
throw new Error(`Cannot coerce reference with name ${referenceType}`);
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
else if (referenceType instanceof node_opcua_nodeid_1.NodeId) {
|
|
1180
|
+
result = this.addressSpace.findNode(referenceType);
|
|
1181
|
+
if (!result) {
|
|
1182
|
+
return null;
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
else {
|
|
1186
|
+
result = referenceType;
|
|
1187
|
+
}
|
|
1188
|
+
(0, node_opcua_assert_1.assert)(result, "reference must exists");
|
|
1189
|
+
(0, node_opcua_assert_1.assert)(result.nodeClass === node_opcua_data_model_1.NodeClass.ReferenceType);
|
|
1190
|
+
return result;
|
|
1191
|
+
}
|
|
1192
|
+
__addReference(referenceOpts, clearCaches = true) {
|
|
1193
|
+
const addressSpace = this.addressSpace;
|
|
1194
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
1195
|
+
(0, node_opcua_assert_1.assert)(Object.hasOwn(referenceOpts, "referenceType"));
|
|
1196
|
+
// xx isForward is optional : assert(Object.prototype.hasOwnProperty.call(reference,"isForward"));
|
|
1197
|
+
(0, node_opcua_assert_1.assert)(Object.hasOwn(referenceOpts, "nodeId"));
|
|
1198
|
+
const reference = addressSpace.normalizeReferenceType(referenceOpts);
|
|
1199
|
+
(0, node_opcua_assert_1.assert)(reference instanceof reference_impl_js_1.ReferenceImpl);
|
|
1200
|
+
const h = reference.key(addressSpace);
|
|
1201
|
+
(0, node_opcua_assert_1.assert)(!_private._back_referenceIdx.has(h), "reference exists already in _back_references");
|
|
1202
|
+
(0, node_opcua_assert_1.assert)(!_private._referenceIdx.has(h), "reference exists already in _references");
|
|
1203
|
+
_private._referenceIdx.set(h, reference);
|
|
1204
|
+
(0, base_node_private_js_1._handle_HierarchicalReference)(this, reference);
|
|
1205
|
+
if (clearCaches) {
|
|
1206
|
+
this._clear_caches();
|
|
1207
|
+
(0, base_node_private_js_1.noteReferenceTypeChange)(this, reference);
|
|
1208
|
+
}
|
|
1209
|
+
return reference;
|
|
1210
|
+
}
|
|
1211
|
+
/** kept as given; the LocalizedText objects are built on first read (most nodes are never asked) */
|
|
1212
|
+
_setDisplayName(displayName) {
|
|
1213
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
1214
|
+
_private._displayNameRaw = displayName;
|
|
1215
|
+
_private._displayName = undefined;
|
|
1216
|
+
}
|
|
1217
|
+
_setDescription(description) {
|
|
1218
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
1219
|
+
_private._descriptionRaw = description;
|
|
1220
|
+
_private._description = undefined;
|
|
1221
|
+
}
|
|
1222
|
+
_notifyAttributeChange(attributeId) {
|
|
1223
|
+
const event_name = BaseNodeImpl.makeAttributeEventName(attributeId);
|
|
1224
|
+
this.emit(event_name, this.readAttribute(session_context_js_1.SessionContext.defaultContext, attributeId));
|
|
1225
|
+
}
|
|
1226
|
+
_clear_caches() {
|
|
1227
|
+
(0, base_node_private_js_1.BaseNode_clearCache)(this);
|
|
1228
|
+
}
|
|
1229
|
+
canUserWriteAttribute(context, attributeId) {
|
|
1230
|
+
// the Client is allowed to write to Attributes other than the Value,
|
|
1231
|
+
// Historizing or RolePermissions Attribute
|
|
1232
|
+
if (!context)
|
|
1233
|
+
return true;
|
|
1234
|
+
if (attributeId === node_opcua_data_model_1.AttributeIds.Historizing) {
|
|
1235
|
+
return context.checkPermission(this, node_opcua_types_1.PermissionType.WriteHistorizing);
|
|
1236
|
+
}
|
|
1237
|
+
if (attributeId === node_opcua_data_model_1.AttributeIds.RolePermissions) {
|
|
1238
|
+
return context.checkPermission(this, node_opcua_types_1.PermissionType.WriteRolePermissions);
|
|
1239
|
+
}
|
|
1240
|
+
if (attributeId === node_opcua_data_model_1.AttributeIds.Value) {
|
|
1241
|
+
return context.checkPermission(this, node_opcua_types_1.PermissionType.Write);
|
|
1242
|
+
}
|
|
1243
|
+
return context.checkPermission(this, node_opcua_types_1.PermissionType.WriteAttribute);
|
|
1244
|
+
}
|
|
1245
|
+
_readAccessRestrictions(_context) {
|
|
1246
|
+
// https://reference.opcfoundation.org/v104/Core/docs/Part3/8.56/
|
|
1247
|
+
if (this.accessRestrictions === undefined) {
|
|
1248
|
+
return new node_opcua_data_value_1.DataValue({ statusCode: node_opcua_status_code_1.StatusCodes.BadAttributeIdInvalid });
|
|
1249
|
+
}
|
|
1250
|
+
return new node_opcua_data_value_1.DataValue({
|
|
1251
|
+
statusCode: node_opcua_status_code_1.StatusCodes.Good,
|
|
1252
|
+
value: {
|
|
1253
|
+
dataType: node_opcua_variant_1.DataType.UInt16,
|
|
1254
|
+
value: this.accessRestrictions
|
|
1255
|
+
}
|
|
1256
|
+
});
|
|
1257
|
+
}
|
|
1258
|
+
_readRolePermissions(context) {
|
|
1259
|
+
// https://reference.opcfoundation.org/v104/Core/docs/Part3/4.8.3/
|
|
1260
|
+
// to do check that current user can read permission
|
|
1261
|
+
if (context && !context.checkPermission(this, node_opcua_types_1.PermissionType.ReadRolePermissions)) {
|
|
1262
|
+
return new node_opcua_data_value_1.DataValue({
|
|
1263
|
+
statusCode: node_opcua_status_code_1.StatusCodes.BadSecurityModeInsufficient
|
|
1264
|
+
});
|
|
1265
|
+
}
|
|
1266
|
+
if (this.rolePermissions === undefined) {
|
|
1267
|
+
// to do : If not specified, the value of DefaultUserRolePermissions Property from
|
|
1268
|
+
// the Namespace Metadata Object associated with the Node is used instead.
|
|
1269
|
+
return new node_opcua_data_value_1.DataValue({
|
|
1270
|
+
statusCode: node_opcua_status_code_1.StatusCodes.BadAttributeIdInvalid
|
|
1271
|
+
});
|
|
1272
|
+
}
|
|
1273
|
+
const rolePermissions = this.rolePermissions.map(({ roleId, permissions }) => {
|
|
1274
|
+
return new node_opcua_types_1.RolePermissionType({
|
|
1275
|
+
roleId: toRoleNodeId(roleId),
|
|
1276
|
+
permissions
|
|
1277
|
+
});
|
|
1278
|
+
});
|
|
1279
|
+
return new node_opcua_data_value_1.DataValue({
|
|
1280
|
+
statusCode: node_opcua_status_code_1.StatusCodes.Good,
|
|
1281
|
+
value: {
|
|
1282
|
+
dataType: node_opcua_variant_1.DataType.ExtensionObject,
|
|
1283
|
+
arrayType: node_opcua_variant_1.VariantArrayType.Array,
|
|
1284
|
+
value: rolePermissions
|
|
1285
|
+
}
|
|
1286
|
+
});
|
|
1287
|
+
}
|
|
1288
|
+
_readUserRolePermissions(context) {
|
|
1289
|
+
const allUserCanSeeTheirOwnRolePermissions = true;
|
|
1290
|
+
if (!allUserCanSeeTheirOwnRolePermissions) {
|
|
1291
|
+
// to do check that current user can read permission
|
|
1292
|
+
if (context && !context.checkPermission(this, node_opcua_types_1.PermissionType.ReadRolePermissions)) {
|
|
1293
|
+
return new node_opcua_data_value_1.DataValue({
|
|
1294
|
+
statusCode: node_opcua_status_code_1.StatusCodes.BadSecurityModeInsufficient
|
|
1295
|
+
});
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
if (this.rolePermissions === undefined) {
|
|
1299
|
+
// to do : If not specified, the value of DefaultUserRolePermissions Property from
|
|
1300
|
+
// the Namespace Metadata Object associated with the Node is used instead.
|
|
1301
|
+
return new node_opcua_data_value_1.DataValue({
|
|
1302
|
+
statusCode: node_opcua_status_code_1.StatusCodes.BadAttributeIdInvalid
|
|
1303
|
+
});
|
|
1304
|
+
}
|
|
1305
|
+
const context1 = context === null ? session_context_js_1.SessionContext.defaultContext : context;
|
|
1306
|
+
// for the time being get user Permission
|
|
1307
|
+
const rolePermissions = this.rolePermissions
|
|
1308
|
+
.map(({ roleId, permissions }) => {
|
|
1309
|
+
return new node_opcua_types_1.RolePermissionType({
|
|
1310
|
+
roleId: toRoleNodeId(roleId),
|
|
1311
|
+
permissions
|
|
1312
|
+
});
|
|
1313
|
+
})
|
|
1314
|
+
.filter(({ roleId }) => context1.currentUserHasRole(roleId));
|
|
1315
|
+
return new node_opcua_data_value_1.DataValue({
|
|
1316
|
+
statusCode: node_opcua_status_code_1.StatusCodes.Good,
|
|
1317
|
+
value: {
|
|
1318
|
+
dataType: node_opcua_variant_1.DataType.ExtensionObject,
|
|
1319
|
+
arrayType: node_opcua_variant_1.VariantArrayType.Array,
|
|
1320
|
+
value: rolePermissions
|
|
1321
|
+
}
|
|
1322
|
+
});
|
|
1323
|
+
}
|
|
1324
|
+
/**
|
|
1325
|
+
*
|
|
1326
|
+
* @param rolePermissions
|
|
1327
|
+
*/
|
|
1328
|
+
setRolePermissions(rolePermissions) {
|
|
1329
|
+
this._rolePermissions = (0, role_permissions_js_1.coerceRolePermissions)(rolePermissions);
|
|
1330
|
+
}
|
|
1331
|
+
getRolePermissions(inherited) {
|
|
1332
|
+
if (this.rolePermissions === undefined && inherited) {
|
|
1333
|
+
return this.namespace.getDefaultRolePermissions();
|
|
1334
|
+
}
|
|
1335
|
+
return this._rolePermissions || null;
|
|
1336
|
+
}
|
|
1337
|
+
get rolePermissions() {
|
|
1338
|
+
return this._rolePermissions || undefined;
|
|
1339
|
+
}
|
|
1340
|
+
setAccessRestrictions(accessRestrictions) {
|
|
1341
|
+
this._accessRestrictions = accessRestrictions;
|
|
1342
|
+
}
|
|
1343
|
+
get accessRestrictions() {
|
|
1344
|
+
return this._accessRestrictions;
|
|
1345
|
+
}
|
|
1346
|
+
getAccessRestrictions(inherited) {
|
|
1347
|
+
if (this._accessRestrictions === undefined && inherited) {
|
|
1348
|
+
return this.namespace.getDefaultAccessRestrictions();
|
|
1349
|
+
}
|
|
1350
|
+
return this._accessRestrictions || node_opcua_data_model_1.AccessRestrictionsFlag.None;
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
exports.BaseNodeImpl = BaseNodeImpl;
|
|
1354
|
+
function toRoleNodeId(s) {
|
|
1355
|
+
if (typeof s === "string") {
|
|
1356
|
+
return (0, node_opcua_nodeid_1.resolveNodeId)(session_context_js_1.WellKnownRolesNodeId[s]);
|
|
1357
|
+
}
|
|
1358
|
+
return (0, node_opcua_nodeid_1.coerceNodeId)(s);
|
|
1359
|
+
}
|
|
1360
|
+
let displayWarning = true;
|
|
1361
|
+
function toString_ReferenceDescription(ref, options) {
|
|
1362
|
+
const addressSpace = options.addressSpace;
|
|
1363
|
+
const refNode = addressSpace.findNode(ref.referenceType);
|
|
1364
|
+
if (!refNode) {
|
|
1365
|
+
return `Unknown Ref : ${ref}`;
|
|
1366
|
+
}
|
|
1367
|
+
const r = new reference_impl_js_1.ReferenceImpl({
|
|
1368
|
+
isForward: ref.isForward,
|
|
1369
|
+
nodeId: ref.nodeId,
|
|
1370
|
+
referenceType: refNode.nodeId
|
|
1371
|
+
});
|
|
1372
|
+
const str = r.toString(options);
|
|
1373
|
+
r.dispose();
|
|
1374
|
+
return str;
|
|
1375
|
+
}
|
|
1376
|
+
function _setup_parent_item(referencesMap) {
|
|
1377
|
+
let references = referencesMap.values();
|
|
1378
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
|
|
1379
|
+
(0, node_opcua_assert_1.assert)(!_private._parent, "_setup_parent_item has been already called");
|
|
1380
|
+
const addressSpace = this.addressSpace;
|
|
1381
|
+
if (referencesMap.size > 0) {
|
|
1382
|
+
references = this.findReferencesEx("Aggregates", node_opcua_data_model_1.BrowseDirection.Inverse);
|
|
1383
|
+
if (references.length >= 1) {
|
|
1384
|
+
// c8 ignore next
|
|
1385
|
+
if (references.length > 1) {
|
|
1386
|
+
if (displayWarning) {
|
|
1387
|
+
const options = { addressSpace };
|
|
1388
|
+
warningLog(" More than one Aggregates reference have been found for parent of object");
|
|
1389
|
+
warningLog(" object node id:", this.nodeId.toString(), chalk_1.default.cyan(this.browseName.toString()));
|
|
1390
|
+
warningLog(" browseResults:");
|
|
1391
|
+
warningLog(references.map((f) => toString_ReferenceDescription(f, options)).join("\n"));
|
|
1392
|
+
warningLog(" first one will be used as parent");
|
|
1393
|
+
// xx assert(browseResults.length === 1);
|
|
1394
|
+
displayWarning = false;
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
return reference_impl_js_1.ReferenceImpl.resolveReferenceNode(addressSpace, references[0]);
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
return null;
|
|
1401
|
+
}
|
|
1402
|
+
function toObject(addressSpace, reference) {
|
|
1403
|
+
const obj = resolveReferenceNode(addressSpace, reference);
|
|
1404
|
+
// c8 ignore next
|
|
1405
|
+
if (doDebug && !obj) {
|
|
1406
|
+
// c8 ignore next
|
|
1407
|
+
doDebug &&
|
|
1408
|
+
debugLog(chalk_1.default.red(" Warning : object with nodeId ") +
|
|
1409
|
+
chalk_1.default.cyan(reference.nodeId.toString()) +
|
|
1410
|
+
chalk_1.default.red(" cannot be found in the address space !"));
|
|
1411
|
+
}
|
|
1412
|
+
return obj;
|
|
1413
|
+
}
|
|
1414
|
+
function _asObject(references, addressSpace) {
|
|
1415
|
+
return references.map((a) => toObject(addressSpace, a)).filter((o) => !!o);
|
|
1416
|
+
}
|
|
1417
|
+
function _select_by_browse_name(map, browseName, namespaceIndex) {
|
|
1418
|
+
if ((namespaceIndex === null || namespaceIndex === undefined) && typeof browseName === "string") {
|
|
1419
|
+
// no namespace specified and needed
|
|
1420
|
+
const result = map.get(browseName);
|
|
1421
|
+
if (result) {
|
|
1422
|
+
if (Array.isArray(result)) {
|
|
1423
|
+
return result;
|
|
1424
|
+
}
|
|
1425
|
+
return [result];
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
else {
|
|
1429
|
+
const _browseName = (0, node_opcua_data_model_1.coerceQualifiedName)(typeof browseName === "string" ? { name: browseName, namespaceIndex } : browseName);
|
|
1430
|
+
// c8 ignore next
|
|
1431
|
+
if (!_browseName) {
|
|
1432
|
+
return [];
|
|
1433
|
+
}
|
|
1434
|
+
const result = map.get(_browseName.name || "");
|
|
1435
|
+
if (result) {
|
|
1436
|
+
if (Array.isArray(result)) {
|
|
1437
|
+
// only select the one with the matching namepsace index
|
|
1438
|
+
return result.filter((t) => t.node.browseName.namespaceIndex === _browseName.namespaceIndex);
|
|
1439
|
+
}
|
|
1440
|
+
else {
|
|
1441
|
+
if (result.node.browseName.namespaceIndex === _browseName.namespaceIndex) {
|
|
1442
|
+
return [result];
|
|
1443
|
+
}
|
|
1444
|
+
return [];
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
return [];
|
|
1449
|
+
}
|
|
1450
|
+
let displayWarningReferencePointingToItSelf = true;
|
|
1451
|
+
function _propagate_ref(addressSpace, reference, sourceNodeKey) {
|
|
1452
|
+
// filter out non Hierarchical References
|
|
1453
|
+
const referenceType = reference_impl_js_1.ReferenceImpl.resolveReferenceType(addressSpace, reference);
|
|
1454
|
+
// c8 ignore next
|
|
1455
|
+
if (!referenceType) {
|
|
1456
|
+
errorLog(chalk_1.default.red(" ERROR"), " cannot find reference ", reference.referenceType, reference.toString());
|
|
1457
|
+
}
|
|
1458
|
+
// ------------------------------- Filter out back reference when reference type
|
|
1459
|
+
// is HasTypeDefinition, HasModellingRule, etc ...
|
|
1460
|
+
//
|
|
1461
|
+
// var referenceNode = Reference.resolveReferenceNode(addressSpace,reference);
|
|
1462
|
+
// ignore propagation on back reference to UAVariableType or UAObject Type reference
|
|
1463
|
+
// because there are too many !
|
|
1464
|
+
if (!referenceType || (0, reference_impl_js_1.isMassivelyUsedReferenceType)(referenceType.nodeId)) {
|
|
1465
|
+
return;
|
|
1466
|
+
}
|
|
1467
|
+
const related_node = resolveReferenceNode(addressSpace, reference);
|
|
1468
|
+
if (related_node) {
|
|
1469
|
+
// verify that reference doesn't point to object it this (see mantis 3099)
|
|
1470
|
+
if ((0, node_opcua_nodeid_1.sameNodeId)(reference.nodeId, this.nodeId)) {
|
|
1471
|
+
// c8 ignore next
|
|
1472
|
+
if (displayWarningReferencePointingToItSelf) {
|
|
1473
|
+
// this could happen with method
|
|
1474
|
+
warningLog(" Warning: a Reference is pointing to source ", this.nodeId.toString(), this.browseName.toString(), ". Is this intentional ?");
|
|
1475
|
+
displayWarningReferencePointingToItSelf = false;
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
// NodeSet2 files declare most references from both ends, so the related node usually
|
|
1479
|
+
// holds the inverse as a forward reference of its own already: nothing to add, and no
|
|
1480
|
+
// ReferenceImpl to build for BaseNode_add_backward_reference to throw away. A node
|
|
1481
|
+
// created at runtime rarely is, and BaseNode_add_backward_reference copes when it is.
|
|
1482
|
+
if (sourceNodeKey !== undefined) {
|
|
1483
|
+
const inverse = (0, base_node_private_js_1.BaseNode_getPrivate)(related_node)._referenceIdx.get(reference.inverseKey(addressSpace, sourceNodeKey));
|
|
1484
|
+
if (inverse) {
|
|
1485
|
+
if (!inverse.node) {
|
|
1486
|
+
inverse.node = this;
|
|
1487
|
+
}
|
|
1488
|
+
return;
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
related_node._add_backward_reference(new reference_impl_js_1.ReferenceImpl({
|
|
1492
|
+
_referenceType: getReferenceType(reference),
|
|
1493
|
+
isForward: !reference.isForward,
|
|
1494
|
+
node: this,
|
|
1495
|
+
nodeId: this.nodeId,
|
|
1496
|
+
referenceType: reference.referenceType
|
|
1497
|
+
}));
|
|
1498
|
+
} // else addressSpace may be incomplete and under construction (while loading a nodeset.xml file for instance)
|
|
1499
|
+
}
|
|
1500
|
+
/** resolve what can be; true when a reference still has no target */
|
|
1501
|
+
function resolveScannedReferences(addressSpace, references) {
|
|
1502
|
+
let unresolved = false;
|
|
1503
|
+
for (const ref of references) {
|
|
1504
|
+
if (!ref.node && !resolveReferenceNode(addressSpace, ref)) {
|
|
1505
|
+
unresolved = true;
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
return unresolved;
|
|
1509
|
+
}
|
|
1510
|
+
function nodeid_is_nothing(nodeid) {
|
|
1511
|
+
return nodeid.value === 0 && nodeid.namespace === 0;
|
|
1512
|
+
}
|
|
1513
|
+
/**
|
|
1514
|
+
|
|
1515
|
+
* @param addressSpace {IAddressSpace}
|
|
1516
|
+
* @param referenceTypeId {String|NodeId|null} : the referenceType either as a string or a nodeId
|
|
1517
|
+
* @return {NodeId}
|
|
1518
|
+
*/
|
|
1519
|
+
function normalize_referenceTypeId(addressSpace, referenceTypeId) {
|
|
1520
|
+
if (!referenceTypeId) {
|
|
1521
|
+
return (0, node_opcua_nodeid_1.makeNodeId)(0);
|
|
1522
|
+
}
|
|
1523
|
+
if (typeof referenceTypeId === "string") {
|
|
1524
|
+
const ref = addressSpace.findReferenceType(referenceTypeId);
|
|
1525
|
+
if (ref) {
|
|
1526
|
+
return ref.nodeId;
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
let nodeId;
|
|
1530
|
+
try {
|
|
1531
|
+
nodeId = addressSpace.resolveNodeId(referenceTypeId);
|
|
1532
|
+
}
|
|
1533
|
+
catch (err) {
|
|
1534
|
+
errorLog("cannot normalize_referenceTypeId", referenceTypeId);
|
|
1535
|
+
throw err;
|
|
1536
|
+
}
|
|
1537
|
+
(0, node_opcua_assert_1.assert)(nodeId);
|
|
1538
|
+
return nodeId;
|
|
1539
|
+
}
|
|
1540
|
+
const resolveReferenceNode = reference_impl_js_1.ReferenceImpl.resolveReferenceNode;
|
|
1541
|
+
const resolveReferenceType = reference_impl_js_1.ReferenceImpl.resolveReferenceType;
|
|
1542
|
+
function _filter_by_referenceType(browseDescription, references, referenceTypeId) {
|
|
1543
|
+
// make sure we have a valid referenceTypeId if not null
|
|
1544
|
+
if (!nodeid_is_nothing(referenceTypeId)) {
|
|
1545
|
+
(0, node_opcua_assert_1.assert)(referenceTypeId instanceof node_opcua_nodeid_1.NodeId);
|
|
1546
|
+
const referenceType = this.addressSpace.findNode(referenceTypeId);
|
|
1547
|
+
(0, node_opcua_debug_1.dumpIf)(!referenceType, referenceTypeId);
|
|
1548
|
+
// c8 ignore next
|
|
1549
|
+
if (!referenceType || referenceType.nodeClass !== node_opcua_data_model_1.NodeClass.ReferenceType) {
|
|
1550
|
+
throw new Error("Cannot find reference type");
|
|
1551
|
+
}
|
|
1552
|
+
if (!browseDescription.includeSubtypes && referenceType.isAbstract) {
|
|
1553
|
+
warningLog("filter by reference will skip all reference as referenceType is abstract and includeSubtypes is false");
|
|
1554
|
+
}
|
|
1555
|
+
references = references.filter((reference) => {
|
|
1556
|
+
const ref = resolveReferenceType(this.addressSpace, reference);
|
|
1557
|
+
// c8 ignore next
|
|
1558
|
+
if (!ref) {
|
|
1559
|
+
throw new Error(`Cannot find reference type ${reference.toString()}`);
|
|
1560
|
+
}
|
|
1561
|
+
// unknown type ... this may happen when the address space is not fully build
|
|
1562
|
+
(0, node_opcua_assert_1.assert)(ref.nodeClass === node_opcua_data_model_1.NodeClass.ReferenceType);
|
|
1563
|
+
const isSameType = (0, node_opcua_nodeid_1.sameNodeId)(ref.nodeId, referenceType.nodeId);
|
|
1564
|
+
if (isSameType) {
|
|
1565
|
+
return true;
|
|
1566
|
+
}
|
|
1567
|
+
if (browseDescription.includeSubtypes) {
|
|
1568
|
+
return ref.isSubtypeOf(referenceType);
|
|
1569
|
+
}
|
|
1570
|
+
else {
|
|
1571
|
+
return false;
|
|
1572
|
+
}
|
|
1573
|
+
});
|
|
1574
|
+
}
|
|
1575
|
+
return references;
|
|
1576
|
+
}
|
|
1577
|
+
function forwardOnly(reference) {
|
|
1578
|
+
return reference.isForward;
|
|
1579
|
+
}
|
|
1580
|
+
function reverseOnly(reference) {
|
|
1581
|
+
return !reference.isForward;
|
|
1582
|
+
}
|
|
1583
|
+
function _filter_by_direction(references, browseDirection) {
|
|
1584
|
+
if (browseDirection === node_opcua_data_model_1.BrowseDirection.Both) {
|
|
1585
|
+
return references;
|
|
1586
|
+
}
|
|
1587
|
+
if (browseDirection === node_opcua_data_model_1.BrowseDirection.Forward) {
|
|
1588
|
+
return references.filter(forwardOnly);
|
|
1589
|
+
}
|
|
1590
|
+
else {
|
|
1591
|
+
return references.filter(reverseOnly);
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
/*
|
|
1595
|
+
function _filter_by_context(node: BaseNode, references: Reference[], context: SessionContext): Reference[] {
|
|
1596
|
+
if (!context.isBrowseAccessRestricted(node)) {
|
|
1597
|
+
return references;
|
|
1598
|
+
}
|
|
1599
|
+
// browse access is restricted for forward
|
|
1600
|
+
return [];
|
|
1601
|
+
}
|
|
1602
|
+
*/
|
|
1603
|
+
function _filter_by_context(node, references, context) {
|
|
1604
|
+
const addressSpace = node.addressSpace;
|
|
1605
|
+
return references.filter((reference) => !context.isBrowseAccessRestricted(resolveReferenceNode(addressSpace, reference)));
|
|
1606
|
+
}
|
|
1607
|
+
function _filter_by_nodeClass(references, nodeClassMask) {
|
|
1608
|
+
(0, node_opcua_assert_1.assert)(Number.isFinite(nodeClassMask));
|
|
1609
|
+
if (nodeClassMask === 0) {
|
|
1610
|
+
return references;
|
|
1611
|
+
}
|
|
1612
|
+
const addressSpace = this.addressSpace;
|
|
1613
|
+
return references.filter((reference) => {
|
|
1614
|
+
const obj = resolveReferenceNode(addressSpace, reference);
|
|
1615
|
+
if (!obj) {
|
|
1616
|
+
return false;
|
|
1617
|
+
}
|
|
1618
|
+
// the NodeClass values are the NodeClassMask bits (Part 4, BrowseDescription.nodeClassMask)
|
|
1619
|
+
return (nodeClassMask & obj.nodeClass) !== 0;
|
|
1620
|
+
});
|
|
1621
|
+
}
|
|
1622
|
+
function _filter_by_userFilter(references, context) {
|
|
1623
|
+
const addressSpace = this.addressSpace;
|
|
1624
|
+
return references.filter((reference) => {
|
|
1625
|
+
const obj = resolveReferenceNode(addressSpace, reference);
|
|
1626
|
+
// c8 ignore next
|
|
1627
|
+
if (!obj) {
|
|
1628
|
+
return false;
|
|
1629
|
+
}
|
|
1630
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(obj);
|
|
1631
|
+
// c8 ignore next
|
|
1632
|
+
if (!_private._browseFilter) {
|
|
1633
|
+
throw Error("Internal error : cannot find browseFilter");
|
|
1634
|
+
}
|
|
1635
|
+
const filter1 = _private._browseFilter.call(obj, context);
|
|
1636
|
+
return filter1;
|
|
1637
|
+
});
|
|
1638
|
+
}
|
|
1639
|
+
/**
|
|
1640
|
+
* the child designated by `node.<accessorName>`: what the shared getters resolve, exposed for the
|
|
1641
|
+
* code that walks dotted paths by name (`_getCompositeKey`); works under `isFrugal` too, where no
|
|
1642
|
+
* own accessor is ever installed
|
|
1643
|
+
*/
|
|
1644
|
+
function resolveChildAccessor(node, accessorName) {
|
|
1645
|
+
const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(node);
|
|
1646
|
+
// the prototype itself, or a disposed node
|
|
1647
|
+
if (!_private?.__address_space) {
|
|
1648
|
+
return undefined;
|
|
1649
|
+
}
|
|
1650
|
+
// a dotted child is a component, a property, a subtype or an organized node; a node that is
|
|
1651
|
+
// only an event source or a notifier of this one is not exposed, and removing the structural
|
|
1652
|
+
// reference removes the child even when an event reference to it remains
|
|
1653
|
+
const wellKnown = wellKnownReferenceTypes(node.addressSpace);
|
|
1654
|
+
if (!wellKnown) {
|
|
1655
|
+
return undefined; // namespace 0 is still loading
|
|
1656
|
+
}
|
|
1657
|
+
const { hasChild, organizes } = wellKnown;
|
|
1658
|
+
return (0, child_accessors_js_1.resolveChildInIndex)((0, base_node_private_js_1._get_HierarchicalReference)(node), accessorName, (reference) => hasChild.checkHasSubtype(reference.referenceType) || organizes.checkHasSubtype(reference.referenceType));
|
|
1659
|
+
}
|
|
1660
|
+
/**
|
|
1661
|
+
* The accessor names under which a child of `node` can never be reached: the reserved names, the
|
|
1662
|
+
* members of the class of the node (attributes, methods, EventEmitter and Object members) and its
|
|
1663
|
+
* own fields. A child carrying one of these is reachable through `getChildByName` only.
|
|
1664
|
+
*
|
|
1665
|
+
* The generator of the typed nodeset interfaces reads this so that a generated interface names a
|
|
1666
|
+
* child exactly the way the runtime exposes it.
|
|
1667
|
+
*
|
|
1668
|
+
* @internal
|
|
1669
|
+
*/
|
|
1670
|
+
function childAccessorNamesShadowedBy(node) {
|
|
1671
|
+
const names = new Set((0, child_accessors_js_1.reservedChildAccessorNames)());
|
|
1672
|
+
// a member of the class that resolves the child of that name itself, the way the shared
|
|
1673
|
+
// accessors do: BaseNode.nodeVersion is the NodeVersion property, and declared as such
|
|
1674
|
+
const membersExposingTheChild = new Set(["nodeVersion"]);
|
|
1675
|
+
for (const own of Object.getOwnPropertyNames(node)) {
|
|
1676
|
+
// an own accessor is a child installed by install_extra_properties, not a field
|
|
1677
|
+
if (!Object.getOwnPropertyDescriptor(node, own)?.get) {
|
|
1678
|
+
names.add(own);
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
for (let proto = Object.getPrototypeOf(node); proto; proto = Object.getPrototypeOf(proto)) {
|
|
1682
|
+
// the shared child accessors sit on BaseNodeImpl.prototype and are the names the runtime
|
|
1683
|
+
// does expose; the same name on a subclass prototype is a real member that wins over them
|
|
1684
|
+
const sharedAccessorsLiveHere = proto === BaseNodeImpl.prototype;
|
|
1685
|
+
for (const member of Object.getOwnPropertyNames(proto)) {
|
|
1686
|
+
if (membersExposingTheChild.has(member) || (sharedAccessorsLiveHere && (0, child_accessors_js_1.hasSharedChildAccessor)(member))) {
|
|
1687
|
+
continue;
|
|
1688
|
+
}
|
|
1689
|
+
names.add(member);
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
return names;
|
|
1693
|
+
}
|
|
1694
|
+
function resolveSharedChildAccessor(node, accessorName) {
|
|
1695
|
+
return resolveChildAccessor(node, accessorName);
|
|
1696
|
+
}
|
|
1697
|
+
/**
|
|
1698
|
+
* Define the shared getter of every browse name seen since the last call: the nodeset loader calls
|
|
1699
|
+
* it once a load is complete, so that the prototype changes in one batch rather than once per
|
|
1700
|
+
* new name in the middle of node creation.
|
|
1701
|
+
*/
|
|
1702
|
+
function flushSharedChildAccessors() {
|
|
1703
|
+
return (0, child_accessors_js_1.defineSharedChildAccessors)(BaseNodeImpl.prototype, resolveSharedChildAccessor);
|
|
1704
|
+
}
|
|
1705
|
+
/**
|
|
1706
|
+
* Give browse names created at runtime a shared accessor, for an application that builds its
|
|
1707
|
+
* model through the namespace API and wants `parent.<child>` without an accessor on every parent.
|
|
1708
|
+
*/
|
|
1709
|
+
function defineSharedChildAccessors(browseNames) {
|
|
1710
|
+
for (const browseName of browseNames) {
|
|
1711
|
+
(0, child_accessors_js_1.registerChildName)(browseName, true);
|
|
1712
|
+
}
|
|
1713
|
+
flushSharedChildAccessors();
|
|
1714
|
+
}
|
|
1715
|
+
/**
|
|
1716
|
+
* Expose `child` as `parentObj.<accessorName>` through an own accessor, unless the name is taken
|
|
1717
|
+
* already: by a shared accessor (which resolves it anyway), by an attribute, a method or a field
|
|
1718
|
+
* of the parent, or by an earlier child of the same name (first installed wins).
|
|
1719
|
+
*
|
|
1720
|
+
* This is the runtime fallback of child_accessors.ts, for names no loaded nodeset declared.
|
|
1721
|
+
*/
|
|
1722
|
+
/** the child an own accessor was installed for, kept on the getter itself */
|
|
1723
|
+
const installedFor = Symbol("installedFor");
|
|
1724
|
+
function install_child_as_object_property(parentObj, child) {
|
|
1725
|
+
// the parent may be unresolvable while a nodeset is still loading
|
|
1726
|
+
if (!parentObj || !child) {
|
|
1727
|
+
return;
|
|
1728
|
+
}
|
|
1729
|
+
const name = (0, base_node_private_js_1.BaseNode_getPrivate)(child)?._accessorName;
|
|
1730
|
+
if (!name || (0, child_accessors_js_1.isReservedChildAccessorName)(name) || (0, child_accessors_js_1.hasSharedChildAccessor)(name) || name in parentObj) {
|
|
1731
|
+
return;
|
|
1732
|
+
}
|
|
1733
|
+
doDebug && debugLog(`Installing property ${name}`, " on ", parentObj.browseName.toString());
|
|
1734
|
+
const get = () =>
|
|
1735
|
+
// an own property wins over the prototype: should the name get a shared getter later
|
|
1736
|
+
// (a nodeset loaded afterwards declares it), this accessor answers what the getter
|
|
1737
|
+
// would, through the child index, rather than the child it was installed for
|
|
1738
|
+
(0, child_accessors_js_1.hasSharedChildAccessor)(name) ? resolveChildAccessor(parentObj, name) : child;
|
|
1739
|
+
get[installedFor] = child;
|
|
1740
|
+
Object.defineProperty(parentObj, name, {
|
|
1741
|
+
configurable: true, // so that uninstall_child_object_property can remove it
|
|
1742
|
+
enumerable: true,
|
|
1743
|
+
get
|
|
1744
|
+
});
|
|
1745
|
+
}
|
|
1746
|
+
function uninstall_child_object_property(parentObj, child) {
|
|
1747
|
+
const name = (0, base_node_private_js_1.BaseNode_getPrivate)(child)?._accessorName;
|
|
1748
|
+
if (!name) {
|
|
1749
|
+
return;
|
|
1750
|
+
}
|
|
1751
|
+
// only an accessor installed above goes, whether or not the name has a shared getter by now;
|
|
1752
|
+
// a field or a method of the same name stays, and so does an accessor for another child of
|
|
1753
|
+
// the same name. The getter is asked for the child it was installed for, not what it resolves
|
|
1754
|
+
const descriptor = Object.getOwnPropertyDescriptor(parentObj, name);
|
|
1755
|
+
if (!descriptor?.get || !descriptor.configurable || descriptor.get[installedFor] !== child) {
|
|
1756
|
+
return;
|
|
1757
|
+
}
|
|
1758
|
+
delete parentObj[name];
|
|
1759
|
+
}
|
|
1760
|
+
function getReferenceType(reference) {
|
|
1761
|
+
const r = reference._referenceType;
|
|
1762
|
+
// c8 ignore next
|
|
1763
|
+
if (!r) {
|
|
1764
|
+
throw new Error("Internal error : cannot find referenceType");
|
|
1765
|
+
}
|
|
1766
|
+
return r;
|
|
1767
|
+
}
|
|
1768
|
+
//# sourceMappingURL=base_node_impl.js.map
|