node-opcua-address-space 2.179.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 +524 -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 +0 -517
- 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 -717
- 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}/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
package/src/address_space.ts
DELETED
|
@@ -1,1631 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module node-opcua-address-space
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import chalk from "chalk";
|
|
6
|
-
import type {
|
|
7
|
-
AddReferenceOpts,
|
|
8
|
-
BaseNode,
|
|
9
|
-
IEventData,
|
|
10
|
-
IHistoricalDataNodeOptions,
|
|
11
|
-
ISessionContext,
|
|
12
|
-
IVariableHistorian,
|
|
13
|
-
IVariableHistorianOptions,
|
|
14
|
-
MethodCallInterceptor,
|
|
15
|
-
RaiseEventData,
|
|
16
|
-
ShutdownTask,
|
|
17
|
-
UADataType,
|
|
18
|
-
UAEventType,
|
|
19
|
-
UAMethod,
|
|
20
|
-
UAObject,
|
|
21
|
-
UAObjectType,
|
|
22
|
-
UAReference,
|
|
23
|
-
UAReferenceType,
|
|
24
|
-
UAVariable,
|
|
25
|
-
UAVariableType,
|
|
26
|
-
UAView
|
|
27
|
-
} from "node-opcua-address-space-base";
|
|
28
|
-
import { assert } from "node-opcua-assert";
|
|
29
|
-
import type { ExtraDataTypeManager } from "node-opcua-client-dynamic-extension-object";
|
|
30
|
-
import { DataTypeIds, VariableTypeIds } from "node-opcua-constants";
|
|
31
|
-
import { BrowseDirection, NodeClass, QualifiedName } from "node-opcua-data-model";
|
|
32
|
-
import { make_debugLog, make_errorLog, make_warningLog } from "node-opcua-debug";
|
|
33
|
-
import type { ExtensionObject } from "node-opcua-extension-object";
|
|
34
|
-
import {
|
|
35
|
-
coerceExpandedNodeId,
|
|
36
|
-
coerceNodeId,
|
|
37
|
-
type INodeId,
|
|
38
|
-
makeNodeId,
|
|
39
|
-
NodeId,
|
|
40
|
-
type NodeIdLike,
|
|
41
|
-
NodeIdType,
|
|
42
|
-
resolveNodeId,
|
|
43
|
-
sameNodeId
|
|
44
|
-
} from "node-opcua-nodeid";
|
|
45
|
-
import { ObjectRegistry } from "node-opcua-object-registry";
|
|
46
|
-
import { BrowseResult } from "node-opcua-service-browse";
|
|
47
|
-
import { StatusCodes } from "node-opcua-status-code";
|
|
48
|
-
import type {
|
|
49
|
-
BrowseDescription,
|
|
50
|
-
BrowsePathTargetOptions,
|
|
51
|
-
BrowseResultOptions,
|
|
52
|
-
ModelChangeStructureDataType,
|
|
53
|
-
RelativePathElement
|
|
54
|
-
} from "node-opcua-types";
|
|
55
|
-
import { BrowsePath, BrowsePathResult } from "node-opcua-types";
|
|
56
|
-
import { isNullOrUndefined, lowerFirstLetter, randomBytes } from "node-opcua-utils";
|
|
57
|
-
import { DataType, Variant, VariantArrayType, type VariantOptions, type VariantT } from "node-opcua-variant";
|
|
58
|
-
import { adjustBrowseDirection } from "../source/helpers/adjust_browse_direction";
|
|
59
|
-
import type { ExtensionObjectConstructorFuncWithSchema } from "../source/interfaces/extension_object_constructor";
|
|
60
|
-
import type { UARootFolder } from "../source/ua_root_folder";
|
|
61
|
-
import type { AddressSpacePrivate } from "./address_space_private";
|
|
62
|
-
import { UAAcknowledgeableConditionImplBase, UAConditionImplBase } from "./alarms_and_conditions";
|
|
63
|
-
import { BaseNodeImpl } from "./base_node_impl";
|
|
64
|
-
import { EventData } from "./event_data";
|
|
65
|
-
import { AddressSpace_installHistoricalDataNode } from "./historical_access/address_space_historical_data_node";
|
|
66
|
-
import { isNonEmptyQualifiedName, NamespaceImpl } from "./namespace_impl";
|
|
67
|
-
import type { NamespacePrivate } from "./namespace_private";
|
|
68
|
-
import { ReferenceImpl } from "./reference_impl";
|
|
69
|
-
import { UADataTypeImpl } from "./ua_data_type_impl";
|
|
70
|
-
import { UAObjectImpl } from "./ua_object_impl";
|
|
71
|
-
import { UAObjectTypeImpl } from "./ua_object_type_impl";
|
|
72
|
-
import { UAReferenceTypeImpl } from "./ua_reference_type_impl";
|
|
73
|
-
import type { UAVariableImpl } from "./ua_variable_impl";
|
|
74
|
-
|
|
75
|
-
const doDebug = false;
|
|
76
|
-
const errorLog = make_errorLog(__filename);
|
|
77
|
-
const debugLog = make_debugLog(__filename);
|
|
78
|
-
const warningLog = make_warningLog(__filename);
|
|
79
|
-
|
|
80
|
-
const Dequeue = require("dequeue");
|
|
81
|
-
|
|
82
|
-
const regexNumberColumnString = /^([0-9]+):(.*)/;
|
|
83
|
-
const enumerationTypeNodeId = coerceNodeId(DataTypeIds.Enumeration);
|
|
84
|
-
/**
|
|
85
|
-
* Extracts the namespace and browse name as a string from the given input.
|
|
86
|
-
*
|
|
87
|
-
* @param addressSpace The address space instance.
|
|
88
|
-
* @param browseNameOrNodeId A NodeIdLike, QualifiedName, or string representing the browse name or node id.
|
|
89
|
-
* @param namespaceIndex Optional namespace index.
|
|
90
|
-
* @returns A tuple containing the NamespacePrivate and the browse name as a string.
|
|
91
|
-
*/
|
|
92
|
-
function _extract_namespace_and_browse_name_as_string(
|
|
93
|
-
addressSpace: AddressSpace,
|
|
94
|
-
browseNameOrNodeId: NodeIdLike | QualifiedName,
|
|
95
|
-
namespaceIndex?: number
|
|
96
|
-
): [NamespacePrivate, string] {
|
|
97
|
-
assert(!namespaceIndex || namespaceIndex >= 0);
|
|
98
|
-
|
|
99
|
-
let result: [NamespacePrivate, string] | undefined;
|
|
100
|
-
|
|
101
|
-
if (namespaceIndex !== undefined && namespaceIndex > 0) {
|
|
102
|
-
assert(typeof browseNameOrNodeId === "string", "expecting a string when namespaceIndex is specified");
|
|
103
|
-
result = [addressSpace.getNamespace(namespaceIndex), browseNameOrNodeId.toString()];
|
|
104
|
-
} else if (typeof browseNameOrNodeId === "string") {
|
|
105
|
-
// we may have a string like "ns=1;i=1234" or "ns=1:MyBrowseName"
|
|
106
|
-
if (isNodeIdString(browseNameOrNodeId)) {
|
|
107
|
-
return _extract_namespace_and_browse_name_as_string(
|
|
108
|
-
addressSpace,
|
|
109
|
-
addressSpace.resolveNodeId(browseNameOrNodeId),
|
|
110
|
-
namespaceIndex
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
// we must have a BrowseName string
|
|
114
|
-
if (browseNameOrNodeId.indexOf(":") >= 0) {
|
|
115
|
-
const a = browseNameOrNodeId.split(":");
|
|
116
|
-
namespaceIndex = a.length === 2 ? parseInt(a[0], 10) : namespaceIndex;
|
|
117
|
-
browseNameOrNodeId = a.length === 2 ? a[1] : browseNameOrNodeId;
|
|
118
|
-
}
|
|
119
|
-
result = [addressSpace.getNamespace(namespaceIndex || 0), browseNameOrNodeId];
|
|
120
|
-
} else if (browseNameOrNodeId instanceof QualifiedName) {
|
|
121
|
-
namespaceIndex = browseNameOrNodeId.namespaceIndex;
|
|
122
|
-
result = [addressSpace.getNamespace(namespaceIndex), browseNameOrNodeId.name || ""];
|
|
123
|
-
} else if (typeof browseNameOrNodeId === "number") {
|
|
124
|
-
result = [addressSpace.getDefaultNamespace(), DataType[browseNameOrNodeId]];
|
|
125
|
-
} else if (browseNameOrNodeId instanceof NodeId) {
|
|
126
|
-
// we have a nodeId
|
|
127
|
-
const nodeId = browseNameOrNodeId as NodeId;
|
|
128
|
-
namespaceIndex = nodeId.namespace;
|
|
129
|
-
const node = addressSpace.findNode(nodeId);
|
|
130
|
-
const browseName = node ? node.browseName.toString() : "UnknownNode";
|
|
131
|
-
result = [addressSpace.getNamespace(namespaceIndex), browseName];
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/* c8 ignore next */
|
|
135
|
-
if (!result?.[0]) {
|
|
136
|
-
throw new Error(` Cannot find namespace associated with ${browseNameOrNodeId} ${namespaceIndex}`);
|
|
137
|
-
}
|
|
138
|
-
return result as [NamespacePrivate, string];
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* returns true if str matches a nodeID, e.g i=123 or ns=...
|
|
143
|
-
*/
|
|
144
|
-
function isNodeIdString(str: unknown): boolean {
|
|
145
|
-
if (typeof str !== "string") {
|
|
146
|
-
return false;
|
|
147
|
-
}
|
|
148
|
-
return str.substring(0, 2) === "i=" || str.substring(0, 3) === "ns=";
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* `AddressSpace` is a collection of UA nodes.
|
|
153
|
-
*
|
|
154
|
-
* const addressSpace = AddressSpace.create();
|
|
155
|
-
*/
|
|
156
|
-
export interface IHistorizerFactory {
|
|
157
|
-
create(node: UAVariable, options: IVariableHistorianOptions): IVariableHistorian;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export class AddressSpace implements AddressSpacePrivate {
|
|
161
|
-
public get rootFolder(): UARootFolder {
|
|
162
|
-
const rootFolder = this.findNode(this.resolveNodeId("RootFolder"));
|
|
163
|
-
if (!rootFolder) {
|
|
164
|
-
// throw new Error("AddressSpace doesn't contain rootFolder object");
|
|
165
|
-
return null as unknown as UARootFolder;
|
|
166
|
-
}
|
|
167
|
-
return rootFolder as unknown as UARootFolder;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
public static isNonEmptyQualifiedName = isNonEmptyQualifiedName;
|
|
171
|
-
public static historizerFactory?: IHistorizerFactory;
|
|
172
|
-
|
|
173
|
-
public static create(): AddressSpace {
|
|
174
|
-
return new AddressSpace();
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
private static registry = new ObjectRegistry();
|
|
178
|
-
|
|
179
|
-
/***
|
|
180
|
-
* @internal
|
|
181
|
-
* @private
|
|
182
|
-
*/
|
|
183
|
-
public suspendBackReference = false;
|
|
184
|
-
public isFrugal = false;
|
|
185
|
-
public historizingNodes: Set<UAVariable> = new Set();
|
|
186
|
-
public _condition_refresh_in_progress = false;
|
|
187
|
-
|
|
188
|
-
public readonly isNodeIdString = isNodeIdString;
|
|
189
|
-
private readonly _private_namespaceIndex: number;
|
|
190
|
-
private readonly _namespaceArray: NamespacePrivate[];
|
|
191
|
-
private _shutdownTask?: ShutdownTask[];
|
|
192
|
-
private _eventIdCounter?: Buffer;
|
|
193
|
-
public $$extraDataTypeManager?: ExtraDataTypeManager;
|
|
194
|
-
private _modelChangeTransactionCounter = 0;
|
|
195
|
-
private _modelChanges: ModelChangeStructureDataType[] = [];
|
|
196
|
-
public _methodCallInterceptors: MethodCallInterceptor[] = [];
|
|
197
|
-
|
|
198
|
-
constructor() {
|
|
199
|
-
this._private_namespaceIndex = 1;
|
|
200
|
-
this._namespaceArray = [];
|
|
201
|
-
// special namespace 0 is reserved for the UA namespace
|
|
202
|
-
this.registerNamespace("http://opcfoundation.org/UA/");
|
|
203
|
-
AddressSpace.registry.register(this);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
public toJSON(): Record<string, string | number | undefined> {
|
|
207
|
-
return {
|
|
208
|
-
namespaces: this._namespaceArray.length
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
public toString(): string {
|
|
213
|
-
return `AddressSpace({ namespaces: ${this._namespaceArray.length} })`;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
public [Symbol.for("nodejs.util.inspect.custom")](): string {
|
|
217
|
-
return this.toString();
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* @internal
|
|
221
|
-
*/
|
|
222
|
-
public getDataTypeManager(): ExtraDataTypeManager {
|
|
223
|
-
if (!this.$$extraDataTypeManager) {
|
|
224
|
-
throw new Error("expecting a $$extraDataTypeManager please make sure ensureDatatypeExtracted is called");
|
|
225
|
-
}
|
|
226
|
-
return this.$$extraDataTypeManager;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
public getNamespaceUri(namespaceIndex: number): string {
|
|
230
|
-
assert(namespaceIndex >= 0 && namespaceIndex < this._namespaceArray.length);
|
|
231
|
-
return this._namespaceArray[namespaceIndex].namespaceUri;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/***
|
|
235
|
-
*/
|
|
236
|
-
public getNamespace(namespaceIndexOrName: string | number): NamespacePrivate {
|
|
237
|
-
if (typeof namespaceIndexOrName === "number") {
|
|
238
|
-
const namespaceIndex = namespaceIndexOrName;
|
|
239
|
-
assert(namespaceIndex >= 0 && namespaceIndex < this._namespaceArray.length, "invalid namespace index ( out of bound)");
|
|
240
|
-
return this._namespaceArray[namespaceIndex];
|
|
241
|
-
} else {
|
|
242
|
-
const namespaceUri = namespaceIndexOrName;
|
|
243
|
-
assert(typeof namespaceUri === "string");
|
|
244
|
-
const index = this.getNamespaceIndex(namespaceUri);
|
|
245
|
-
return this._namespaceArray[index];
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/***
|
|
250
|
-
* @return the default namespace (standard OPCUA namespace)
|
|
251
|
-
*/
|
|
252
|
-
public getDefaultNamespace(): NamespacePrivate {
|
|
253
|
-
return this.getNamespace(0);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
/***
|
|
257
|
-
*
|
|
258
|
-
* objects instances managed by the server will be created in this namespace.
|
|
259
|
-
*
|
|
260
|
-
* @return address space own namespace
|
|
261
|
-
*/
|
|
262
|
-
public getOwnNamespace(): NamespacePrivate {
|
|
263
|
-
/* c8 ignore next */
|
|
264
|
-
if (this._private_namespaceIndex >= this._namespaceArray.length) {
|
|
265
|
-
throw new Error("please create the private namespace");
|
|
266
|
-
}
|
|
267
|
-
return this.getNamespace(this._private_namespaceIndex);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* @return the namespace index of a namespace given by its namespace uri
|
|
272
|
-
*
|
|
273
|
-
*/
|
|
274
|
-
public getNamespaceIndex(namespaceUri: string): number {
|
|
275
|
-
assert(typeof namespaceUri === "string");
|
|
276
|
-
return this._namespaceArray.findIndex((ns: NamespacePrivate) => ns.namespaceUri === namespaceUri);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
*
|
|
281
|
-
* register a new namespace,
|
|
282
|
-
* it is OK to call registerNamespace even if namespace has already been registered;
|
|
283
|
-
* in this case the registerNamespace has no effect and returns the existing namespace.
|
|
284
|
-
*
|
|
285
|
-
* @param namespaceUri {string}
|
|
286
|
-
* @returns {Namespace}
|
|
287
|
-
*/
|
|
288
|
-
public registerNamespace(namespaceUri: string): NamespacePrivate {
|
|
289
|
-
let index = this._namespaceArray.findIndex((ns) => ns.namespaceUri === namespaceUri);
|
|
290
|
-
if (index !== -1) {
|
|
291
|
-
assert(this._namespaceArray[index].addressSpace === this);
|
|
292
|
-
return this._namespaceArray[index];
|
|
293
|
-
}
|
|
294
|
-
index = this._namespaceArray.length;
|
|
295
|
-
this._namespaceArray.push(
|
|
296
|
-
new NamespaceImpl({
|
|
297
|
-
addressSpace: this,
|
|
298
|
-
index,
|
|
299
|
-
namespaceUri,
|
|
300
|
-
publicationDate: new Date(),
|
|
301
|
-
version: "undefined"
|
|
302
|
-
})
|
|
303
|
-
);
|
|
304
|
-
return this._namespaceArray[index];
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
/***
|
|
308
|
-
* @return {Namespace[]} the namespace array
|
|
309
|
-
*/
|
|
310
|
-
public getNamespaceArray(): NamespacePrivate[] {
|
|
311
|
-
return this._namespaceArray;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
*
|
|
316
|
-
* @param alias {String} the alias name
|
|
317
|
-
* @param nodeId {NodeId}
|
|
318
|
-
* @internal
|
|
319
|
-
*/
|
|
320
|
-
public addAlias(alias: string, nodeId: NodeId): void {
|
|
321
|
-
assert(typeof alias === "string");
|
|
322
|
-
assert(nodeId instanceof NodeId);
|
|
323
|
-
this.getNamespace(nodeId.namespace).addAlias(alias, nodeId);
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* find an node by node Id
|
|
328
|
-
* @param nodeId a nodeId or a string coerce-able to nodeID, representing the object to find.
|
|
329
|
-
* @return {BaseNode|null}
|
|
330
|
-
*/
|
|
331
|
-
public findNode(nodeId: NodeIdLike): BaseNode | null {
|
|
332
|
-
if (!(nodeId instanceof NodeId)) {
|
|
333
|
-
nodeId = this.resolveNodeId(nodeId);
|
|
334
|
-
}
|
|
335
|
-
if (nodeId.namespace < 0 || nodeId.namespace >= this._namespaceArray.length) {
|
|
336
|
-
// namespace index is out of bound
|
|
337
|
-
return null;
|
|
338
|
-
}
|
|
339
|
-
const namespace = this._namespaceArray[nodeId.namespace];
|
|
340
|
-
return namespace.findNode2(nodeId) as BaseNode;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
public findMethod(nodeId: NodeId | string): UAMethod | null {
|
|
344
|
-
const node = this.findNode(nodeId);
|
|
345
|
-
if (!node || node.nodeClass !== NodeClass.Method) {
|
|
346
|
-
return null;
|
|
347
|
-
}
|
|
348
|
-
return node as UAMethod;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* resolved a string or a nodeId to a nodeID
|
|
353
|
-
*/
|
|
354
|
-
public resolveNodeId(nodeId: NodeIdLike): NodeId {
|
|
355
|
-
if (typeof nodeId === "string") {
|
|
356
|
-
const m = nodeId.match(regexNumberColumnString);
|
|
357
|
-
if (m && m.length === 3) {
|
|
358
|
-
const namespaceIndex = parseInt(m[1], 10);
|
|
359
|
-
const aliasName = m[2];
|
|
360
|
-
const namespace = this.getNamespace(namespaceIndex);
|
|
361
|
-
// check if the string is a known alias
|
|
362
|
-
const aliasNodeId = namespace.resolveAlias(aliasName);
|
|
363
|
-
if (aliasNodeId !== null) {
|
|
364
|
-
return aliasNodeId;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
const namespaceArray: string[] = this.getNamespaceArray().map((a) => a.namespaceUri);
|
|
369
|
-
|
|
370
|
-
return resolveNodeId(nodeId, { namespaceArray });
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
*
|
|
375
|
-
* @param objectType {String|NodeId|QualifiedName}
|
|
376
|
-
* @param [namespaceIndex=0 {Number}] an optional namespace index
|
|
377
|
-
* @return {UAObjectType|null}
|
|
378
|
-
*
|
|
379
|
-
* @example
|
|
380
|
-
*
|
|
381
|
-
* ```javascript
|
|
382
|
-
* const objectType = addressSpace.findObjectType("ns=0;i=58");
|
|
383
|
-
* objectType.browseName.toString().should.eql("BaseObjectType");
|
|
384
|
-
*
|
|
385
|
-
* const objectType = addressSpace.findObjectType("BaseObjectType");
|
|
386
|
-
* objectType.browseName.toString().should.eql("BaseObjectType");
|
|
387
|
-
*
|
|
388
|
-
* const objectType = addressSpace.findObjectType(resolveNodeId("ns=0;i=58"));
|
|
389
|
-
* objectType.browseName.toString().should.eql("BaseObjectType");
|
|
390
|
-
*
|
|
391
|
-
* const objectType = addressSpace.findObjectType("CustomObjectType",36);
|
|
392
|
-
* objectType.nodeId.namespace.should.eql(36);
|
|
393
|
-
* objectType.browseName.toString().should.eql("BaseObjectType");
|
|
394
|
-
*
|
|
395
|
-
* const objectType = addressSpace.findObjectType("36:CustomObjectType");
|
|
396
|
-
* objectType.nodeId.namespace.should.eql(36);
|
|
397
|
-
* objectType.browseName.toString().should.eql("BaseObjectType");
|
|
398
|
-
* ```
|
|
399
|
-
*/
|
|
400
|
-
public findObjectType(objectType: NodeIdLike, namespaceIndex?: number): UAObjectType | null {
|
|
401
|
-
if (objectType instanceof NodeId) {
|
|
402
|
-
return _find_by_node_id<UAObjectType>(this, objectType, namespaceIndex);
|
|
403
|
-
}
|
|
404
|
-
const [namespace, browseName] = _extract_namespace_and_browse_name_as_string(this, objectType, namespaceIndex);
|
|
405
|
-
return namespace.findObjectType(browseName);
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
/**
|
|
409
|
-
* @param variableType {String|NodeId}
|
|
410
|
-
* @param [namespaceIndex=0 {Number}] an optional namespace index
|
|
411
|
-
* @return {UAObjectType|null}
|
|
412
|
-
*
|
|
413
|
-
* @example
|
|
414
|
-
*
|
|
415
|
-
* ```javascript
|
|
416
|
-
* const objectType = addressSpace.findVariableType("ns=0;i=62");
|
|
417
|
-
* objectType.browseName.toString().should.eql("BaseVariableType");
|
|
418
|
-
*
|
|
419
|
-
* const objectType = addressSpace.findVariableType("BaseVariableType");
|
|
420
|
-
* objectType.browseName.toString().should.eql("BaseVariableType");
|
|
421
|
-
*
|
|
422
|
-
* const objectType = addressSpace.findVariableType(resolveNodeId("ns=0;i=62"));
|
|
423
|
-
* objectType.browseName.toString().should.eql("BaseVariableType");
|
|
424
|
-
* ```
|
|
425
|
-
*/
|
|
426
|
-
public findVariableType(variableType: string | NodeId, namespaceIndex?: number): UAVariableType | null {
|
|
427
|
-
if (variableType instanceof NodeId) {
|
|
428
|
-
return _find_by_node_id<UAVariableType>(this, variableType, namespaceIndex);
|
|
429
|
-
}
|
|
430
|
-
const [namespace, browseName] = _extract_namespace_and_browse_name_as_string(this, variableType, namespaceIndex);
|
|
431
|
-
return namespace.findVariableType(browseName);
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
* Find the DataType node from a NodeId or a browseName
|
|
436
|
-
* @param dataType {String|NodeId}
|
|
437
|
-
* @param [namespaceIndex=0 {Number}] an optional namespace index
|
|
438
|
-
* @return {DataType|null}
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
* @example
|
|
442
|
-
*
|
|
443
|
-
* ```javascript
|
|
444
|
-
* const dataDouble = addressSpace.findDataType("Double");
|
|
445
|
-
* const dataDouble = addressSpace.findDataType(resolveNodeId("ns=0;i=3"));
|
|
446
|
-
* ```
|
|
447
|
-
*/
|
|
448
|
-
public findDataType(dataType: number | string | NodeId | DataType, namespaceIndex?: number): UADataType | null {
|
|
449
|
-
// startingNode i=24 :
|
|
450
|
-
// BaseDataType
|
|
451
|
-
// +-> Boolean (i=1) {BooleanDataType (ns=2:9898)
|
|
452
|
-
// +-> String (i=12)
|
|
453
|
-
// +->NumericRange
|
|
454
|
-
// +->Time
|
|
455
|
-
// +-> DateTime
|
|
456
|
-
// +-> Structure
|
|
457
|
-
// +-> Node
|
|
458
|
-
// +-> ObjectNode
|
|
459
|
-
if (dataType instanceof UADataTypeImpl) {
|
|
460
|
-
return this.findDataType(dataType.nodeId);
|
|
461
|
-
} else if (dataType instanceof NodeId) {
|
|
462
|
-
return _find_by_node_id<UADataType>(this, dataType, namespaceIndex);
|
|
463
|
-
}
|
|
464
|
-
if (typeof dataType === "number") {
|
|
465
|
-
if (DataType[dataType] !== undefined) {
|
|
466
|
-
return this.findDataType(makeNodeId(dataType, 0)) as UADataType;
|
|
467
|
-
} else {
|
|
468
|
-
return this.findDataType(resolveNodeId(dataType));
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
const res = _extract_namespace_and_browse_name_as_string(this, dataType, namespaceIndex);
|
|
472
|
-
const namespace = res[0];
|
|
473
|
-
const browseName = res[1];
|
|
474
|
-
return namespace.findDataType(browseName) as UADataType;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
/**
|
|
478
|
-
*
|
|
479
|
-
* @example
|
|
480
|
-
*
|
|
481
|
-
* const dataType = addressSpace.findDataType("ns=0;i=12");
|
|
482
|
-
* addressSpace.findCorrespondingBasicDataType(dataType).should.eql(DataType.String);
|
|
483
|
-
*
|
|
484
|
-
* const dataType = addressSpace.findDataType("ServerStatusDataType"); // ServerStatus
|
|
485
|
-
* addressSpace.findCorrespondingBasicDataType(dataType).should.eql(DataType.ExtensionObject);
|
|
486
|
-
*
|
|
487
|
-
*/
|
|
488
|
-
public findCorrespondingBasicDataType(dataTypeNode: NodeIdLike | UADataType): DataType {
|
|
489
|
-
const _orig_dataTypeNode = dataTypeNode;
|
|
490
|
-
if (typeof dataTypeNode === "string") {
|
|
491
|
-
const resolvedDataType = this.resolveNodeId(dataTypeNode);
|
|
492
|
-
/* c8 ignore next */
|
|
493
|
-
if (!resolvedDataType) {
|
|
494
|
-
throw new Error(`Cannot resolve ${_orig_dataTypeNode.toString()}`);
|
|
495
|
-
}
|
|
496
|
-
dataTypeNode = resolvedDataType;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
if (dataTypeNode instanceof NodeId) {
|
|
500
|
-
const foundDataTypeNode = this.findDataType(dataTypeNode);
|
|
501
|
-
/* c8 ignore next */
|
|
502
|
-
if (!foundDataTypeNode) {
|
|
503
|
-
throw Error(`cannot find dataTypeNode ${_orig_dataTypeNode.toString()}`);
|
|
504
|
-
}
|
|
505
|
-
dataTypeNode = foundDataTypeNode;
|
|
506
|
-
}
|
|
507
|
-
/* c8 ignore next */
|
|
508
|
-
if (!(dataTypeNode instanceof UADataTypeImpl)) {
|
|
509
|
-
throw new Error(
|
|
510
|
-
"we are expecting an UADataType here : " +
|
|
511
|
-
_orig_dataTypeNode.toString() +
|
|
512
|
-
" should not refer to a " +
|
|
513
|
-
(dataTypeNode as BaseNode).browseName.name
|
|
514
|
-
);
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
if (sameNodeId(enumerationTypeNodeId, dataTypeNode?.nodeId)) {
|
|
518
|
-
return DataType.Int32;
|
|
519
|
-
}
|
|
520
|
-
const n = dataTypeNode.nodeId as INodeId;
|
|
521
|
-
|
|
522
|
-
if (n.namespace === 0 && n.value === 29) {
|
|
523
|
-
// Number
|
|
524
|
-
return DataType.Null; //which one ?
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
if (n.namespace === 0 && n.value === 0) {
|
|
528
|
-
return DataType.Null;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
if (n.identifierType === NodeIdType.NUMERIC && n.namespace === 0 && n.value <= 25) {
|
|
532
|
-
return n.value as DataType;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
const result = this.findCorrespondingBasicDataType(dataTypeNode.subtypeOfObj as UADataType);
|
|
536
|
-
|
|
537
|
-
return result;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* find a ReferenceType by its inverse name.
|
|
542
|
-
* @param inverseName the inverse name of the ReferenceType to find
|
|
543
|
-
* @deprecated
|
|
544
|
-
*/
|
|
545
|
-
public findReferenceTypeFromInverseName(inverseName: string): UAReferenceType | null {
|
|
546
|
-
return this.getDefaultNamespace().findReferenceTypeFromInverseName(inverseName) as UAReferenceType;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* @param refType {String|NodeId}
|
|
551
|
-
* @param [namespaceIndex=0 {Number}] an optional namespace index
|
|
552
|
-
* @return {ReferenceType|null}
|
|
553
|
-
*
|
|
554
|
-
* refType could be
|
|
555
|
-
* - a string representing a nodeid : e.g. `i=9004` or ns=1;i=6030
|
|
556
|
-
* - a string representing a browse name : e.g `"HasTypeDefinition"`.
|
|
557
|
-
* In this case it should be in the alias list.
|
|
558
|
-
*
|
|
559
|
-
*/
|
|
560
|
-
public findReferenceType(refType: NodeIdLike, namespaceIndex?: number): UAReferenceType | null {
|
|
561
|
-
// startingNode ns=0;i=31 : References
|
|
562
|
-
// +-> References i=31
|
|
563
|
-
// +->(hasSubtype) NonHierarchicalReferences
|
|
564
|
-
// +->(hasSubtype) HasTypeDefinition
|
|
565
|
-
// +->(hasSubtype) HierarchicalReferences
|
|
566
|
-
// +->(hasSubtype) HasChild/ChildOf
|
|
567
|
-
// +->(hasSubtype) Aggregates/AggregatedBy
|
|
568
|
-
// +-> HasProperty/PropertyOf
|
|
569
|
-
// +-> HasComponent/ComponentOf
|
|
570
|
-
// +-> HasHistoricalConfiguration/HistoricalConfigurationOf
|
|
571
|
-
// +->(hasSubtype) HasSubtype/HasSupertype
|
|
572
|
-
// +->(hasSubtype) Organizes/OrganizedBy
|
|
573
|
-
// +->(hasSubtype) HasEventSource/EventSourceOf
|
|
574
|
-
let node: UAReferenceType | null;
|
|
575
|
-
|
|
576
|
-
if ((!(refType instanceof NodeId) && isNodeIdString(refType)) || typeof refType === "number") {
|
|
577
|
-
refType = resolveNodeId(refType);
|
|
578
|
-
}
|
|
579
|
-
if (refType instanceof NodeId) {
|
|
580
|
-
node = this.findNode(refType) as UAReferenceType;
|
|
581
|
-
/* c8 ignore next */
|
|
582
|
-
if (!(node && node.nodeClass === NodeClass.ReferenceType)) {
|
|
583
|
-
// throw new Error("cannot resolve referenceId "+ refType.toString());
|
|
584
|
-
return null;
|
|
585
|
-
}
|
|
586
|
-
} else {
|
|
587
|
-
assert(typeof refType === "string");
|
|
588
|
-
node = this._findReferenceType(refType, namespaceIndex) as UAReferenceType;
|
|
589
|
-
}
|
|
590
|
-
return node;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* returns the inverse name of the referenceType.
|
|
595
|
-
*
|
|
596
|
-
* @param referenceType {String} : the reference type name
|
|
597
|
-
* @return {String} the name of the inverse reference type.
|
|
598
|
-
*
|
|
599
|
-
* @example
|
|
600
|
-
*
|
|
601
|
-
* ```javascript
|
|
602
|
-
* addressSpace.inverseReferenceType("OrganizedBy").should.eql("Organizes");
|
|
603
|
-
* addressSpace.inverseReferenceType("Organizes").should.eql("OrganizedBy");
|
|
604
|
-
* ```
|
|
605
|
-
*
|
|
606
|
-
*/
|
|
607
|
-
public inverseReferenceType(referenceType: string): string {
|
|
608
|
-
assert(typeof referenceType === "string");
|
|
609
|
-
const n1 = this.findReferenceType(referenceType);
|
|
610
|
-
if (n1) {
|
|
611
|
-
return n1.inverseName?.text as string;
|
|
612
|
-
} else {
|
|
613
|
-
const n2 = this.findReferenceTypeFromInverseName(referenceType);
|
|
614
|
-
return n2?.browseName.toString() || "";
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
/**
|
|
619
|
-
* find an EventType node in the address space
|
|
620
|
-
* @param eventTypeId {String|NodeId|UAObjectType} the eventType to find
|
|
621
|
-
* @param namespaceIndex the namespace index of the event to find
|
|
622
|
-
* @return {UAObjectType|null} the EventType found or null.
|
|
623
|
-
*
|
|
624
|
-
* note:
|
|
625
|
-
* - the method with throw an exception if a node is found
|
|
626
|
-
* that is not a BaseEventType or a subtype of it.
|
|
627
|
-
*
|
|
628
|
-
* @example
|
|
629
|
-
*
|
|
630
|
-
* var evtType = addressSpace.findEventType("AuditEventType");
|
|
631
|
-
*
|
|
632
|
-
*/
|
|
633
|
-
public findEventType(eventTypeId: NodeIdLike | UAEventType, namespaceIndex?: number): UAEventType | null {
|
|
634
|
-
let eventType: UAEventType;
|
|
635
|
-
|
|
636
|
-
if (eventTypeId instanceof BaseNodeImpl) {
|
|
637
|
-
eventType = eventTypeId as BaseNode as UAEventType;
|
|
638
|
-
} else {
|
|
639
|
-
eventType = this.findObjectType(eventTypeId as NodeIdLike, namespaceIndex) as UAEventType;
|
|
640
|
-
}
|
|
641
|
-
if (!eventType) {
|
|
642
|
-
return null;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
const baseEventType = this.findObjectType("BaseEventType");
|
|
646
|
-
|
|
647
|
-
/* c8 ignore next */
|
|
648
|
-
if (!baseEventType) {
|
|
649
|
-
throw new Error("expecting BaseEventType - please check you nodeset xml file!");
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
if (sameNodeId(eventType.nodeId, baseEventType.nodeId)) {
|
|
653
|
-
return eventType as UAObjectType;
|
|
654
|
-
}
|
|
655
|
-
/* eventTypeNode should be a sub type of "BaseEventType" */
|
|
656
|
-
/* c8 ignore next */
|
|
657
|
-
if (!eventType.isSubtypeOf(baseEventType)) {
|
|
658
|
-
throw new Error("findEventType: event found is not subType of BaseEventType");
|
|
659
|
-
}
|
|
660
|
-
return eventType as UAEventType;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
/**
|
|
664
|
-
* EventId is generated by the Server to uniquely identify a particular Event Notification.
|
|
665
|
-
* @return {Variant} dataType: "ByteString"
|
|
666
|
-
*/
|
|
667
|
-
public generateEventId(): VariantT<Buffer, DataType.ByteString> {
|
|
668
|
-
/*
|
|
669
|
-
* OpcUA 1.02 part 5 : 6.4.2 BaseEventType
|
|
670
|
-
* The Server is responsible to ensure that each Event has its unique EventId.
|
|
671
|
-
* It may do this, for example, by putting GUIDs into the ByteString.
|
|
672
|
-
* Clients can use the EventId to assist in minimizing or eliminating gaps and overlaps that may occur during
|
|
673
|
-
* a redundancy fail-over. The EventId shall always be returned as value and the Server is not allowed to
|
|
674
|
-
* return a StatusCode for the EventId indicating an error.
|
|
675
|
-
*
|
|
676
|
-
*/
|
|
677
|
-
const offset = 16;
|
|
678
|
-
if (!this._eventIdCounter) {
|
|
679
|
-
this._eventIdCounter = randomBytes(20);
|
|
680
|
-
this._eventIdCounter.writeInt32BE(0, offset);
|
|
681
|
-
}
|
|
682
|
-
this._eventIdCounter.writeInt32BE(this._eventIdCounter.readInt32BE(offset) + 1, offset);
|
|
683
|
-
|
|
684
|
-
return new Variant({
|
|
685
|
-
dataType: DataType.ByteString,
|
|
686
|
-
value: Buffer.from(this._eventIdCounter)
|
|
687
|
-
}) as VariantT<Buffer, DataType.ByteString>;
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
/*=
|
|
691
|
-
* construct a simple javascript object with all the default properties of the event
|
|
692
|
-
*
|
|
693
|
-
*
|
|
694
|
-
* eventTypeId can be a UAEventType
|
|
695
|
-
*
|
|
696
|
-
* @private
|
|
697
|
-
*/
|
|
698
|
-
public constructEventData(eventTypeId: UAEventType, dataInput: Record<string, unknown>): IEventData {
|
|
699
|
-
const data: RaiseEventData = (dataInput || {}) as RaiseEventData;
|
|
700
|
-
|
|
701
|
-
// construct the reference dataStructure to store event Data
|
|
702
|
-
let eventTypeNode: UAEventType | null = eventTypeId;
|
|
703
|
-
|
|
704
|
-
// make sure that eventType is really a object that derived from EventType
|
|
705
|
-
if (eventTypeId instanceof UAObjectTypeImpl) {
|
|
706
|
-
eventTypeNode = this.findEventType(eventTypeId) as UAEventType | null;
|
|
707
|
-
}
|
|
708
|
-
/* c8 ignore next */
|
|
709
|
-
if (!eventTypeNode) throw new Error(` cannot find EventType for ${eventTypeId}`);
|
|
710
|
-
|
|
711
|
-
assert(eventTypeNode instanceof UAObjectTypeImpl, "eventTypeId must represent a UAObjectType");
|
|
712
|
-
|
|
713
|
-
// eventId
|
|
714
|
-
assert(!Object.hasOwn(data, "eventId"), "eventId constructEventData : options object should not have eventId property");
|
|
715
|
-
data.eventId = data.eventId || this.generateEventId();
|
|
716
|
-
|
|
717
|
-
// eventType
|
|
718
|
-
data.eventType = { dataType: DataType.NodeId, value: eventTypeNode.nodeId };
|
|
719
|
-
|
|
720
|
-
// sourceNode
|
|
721
|
-
assert(Object.hasOwn(data, "sourceNode"), "expecting a source node to be defined");
|
|
722
|
-
data.sourceNode = new Variant(data.sourceNode);
|
|
723
|
-
assert(data.sourceNode.dataType === DataType.NodeId);
|
|
724
|
-
|
|
725
|
-
// sourceName
|
|
726
|
-
const sourceNode = this.findNode(data.sourceNode.value);
|
|
727
|
-
if (!sourceNode) {
|
|
728
|
-
warningLog(
|
|
729
|
-
`constructEventData: cannot find sourceNode ${data.sourceNode.value?.toString()} for event ${eventTypeNode.browseName.toString()}`
|
|
730
|
-
);
|
|
731
|
-
}
|
|
732
|
-
data.sourceName = data.sourceName || {
|
|
733
|
-
dataType: DataType.String,
|
|
734
|
-
value: sourceNode?.getDisplayName("en") || ""
|
|
735
|
-
};
|
|
736
|
-
|
|
737
|
-
const nowUTC = new Date();
|
|
738
|
-
|
|
739
|
-
// time (UtcTime)
|
|
740
|
-
// TODO
|
|
741
|
-
data.time = data.time || { dataType: DataType.DateTime, value: nowUTC };
|
|
742
|
-
|
|
743
|
-
// receivedTime (UtcTime)
|
|
744
|
-
// TODO
|
|
745
|
-
data.receiveTime = data.receiveTime || { dataType: DataType.DateTime, value: nowUTC };
|
|
746
|
-
|
|
747
|
-
// localTime (UtcTime)
|
|
748
|
-
// TODO
|
|
749
|
-
data.localTime = data.localTime || { dataType: DataType.DateTime, value: nowUTC };
|
|
750
|
-
|
|
751
|
-
// message (LocalizedText)
|
|
752
|
-
data.message = data.message || { dataType: DataType.LocalizedText, value: { text: "" } };
|
|
753
|
-
|
|
754
|
-
// severity (UInt16)
|
|
755
|
-
data.severity = data.severity || { dataType: DataType.UInt16, value: 0 };
|
|
756
|
-
|
|
757
|
-
// xx // reminder : event type cannot be instantiated directly !
|
|
758
|
-
// xx assert(eventTypeNode.isAbstract);
|
|
759
|
-
|
|
760
|
-
const baseObjectType = this.findObjectType("BaseObjectType"); // i=58
|
|
761
|
-
/* c8 ignore next */
|
|
762
|
-
if (!baseObjectType) {
|
|
763
|
-
throw new Error("BaseObjectType must be defined in the address space");
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
const hasProperty = (data: RaiseEventData, propertyName: string): boolean => Object.hasOwn(data, propertyName);
|
|
767
|
-
|
|
768
|
-
const visitedProperties: { [key: string]: number } = {};
|
|
769
|
-
const alreadyVisited = (key: string) => Object.hasOwn(visitedProperties, key);
|
|
770
|
-
const markAsVisited = (key: string) => (visitedProperties[key] = 1);
|
|
771
|
-
|
|
772
|
-
function _process_var(self: BaseNode, prefixLower: string, prefixStandard: string, node: BaseNode) {
|
|
773
|
-
const lowerName = prefixLower + lowerFirstLetter(node.browseName?.name || "");
|
|
774
|
-
const fullBrowsePath = prefixStandard + node.browseName.toString();
|
|
775
|
-
if (alreadyVisited(lowerName)) {
|
|
776
|
-
return;
|
|
777
|
-
}
|
|
778
|
-
markAsVisited(lowerName);
|
|
779
|
-
|
|
780
|
-
if (hasProperty(data, lowerName)) {
|
|
781
|
-
eventData._createValue(fullBrowsePath, node, data[lowerName] as VariantOptions);
|
|
782
|
-
} else {
|
|
783
|
-
// add a property , but with a null variant
|
|
784
|
-
eventData._createValue(fullBrowsePath, node, { dataType: DataType.Null });
|
|
785
|
-
|
|
786
|
-
// c8 ignore next
|
|
787
|
-
if (doDebug) {
|
|
788
|
-
if (node.modellingRule === "Mandatory") {
|
|
789
|
-
errorLog(
|
|
790
|
-
chalk.red("ERROR : AddressSpace#constructEventData(eventType,options) " + "cannot find property ") +
|
|
791
|
-
self.browseName.toString() +
|
|
792
|
-
" => " +
|
|
793
|
-
chalk.cyan(lowerName)
|
|
794
|
-
);
|
|
795
|
-
} else {
|
|
796
|
-
errorLog(
|
|
797
|
-
chalk.yellow(
|
|
798
|
-
"Warning : AddressSpace#constructEventData(eventType,options)" + " cannot find property "
|
|
799
|
-
) +
|
|
800
|
-
self.browseName.toString() +
|
|
801
|
-
" => " +
|
|
802
|
-
chalk.cyan(lowerName)
|
|
803
|
-
);
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
// verify that all elements of data are valid
|
|
810
|
-
function verify_data_is_valid(data1: Record<string, unknown>) {
|
|
811
|
-
Object.keys(data1).forEach((k: string) => {
|
|
812
|
-
if (k === "$eventDataSource") {
|
|
813
|
-
return;
|
|
814
|
-
}
|
|
815
|
-
/* c8 ignore next */
|
|
816
|
-
if (!alreadyVisited(k)) {
|
|
817
|
-
warningLog(
|
|
818
|
-
"constructEventData: cannot find property '" +
|
|
819
|
-
k +
|
|
820
|
-
"' in [ " +
|
|
821
|
-
Object.keys(visitedProperties).join(", ") +
|
|
822
|
-
"] when filling " +
|
|
823
|
-
eventTypeNode?.browseName.toString()
|
|
824
|
-
);
|
|
825
|
-
}
|
|
826
|
-
});
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
const populate_data = (self: UAObjectType, eventData1: EventData) => {
|
|
830
|
-
if (sameNodeId(baseObjectType?.nodeId, self.nodeId)) {
|
|
831
|
-
return; // nothing to do
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
const baseTypeNodeId = self.subtypeOf;
|
|
835
|
-
/* c8 ignore next */
|
|
836
|
-
if (!baseTypeNodeId) {
|
|
837
|
-
throw new Error(`Object ${self.browseName.toString()} with nodeId ${self.nodeId} has no Type`);
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
const baseType = this.findNode(baseTypeNodeId);
|
|
841
|
-
/* c8 ignore next */
|
|
842
|
-
if (!baseType) {
|
|
843
|
-
throw new Error(chalk.red("Cannot find object with nodeId ") + baseTypeNodeId);
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
// subtypeOf always points to another node in the ObjectType hierarchy
|
|
847
|
-
populate_data(baseType as UAObjectType, eventData1);
|
|
848
|
-
|
|
849
|
-
// get properties and components from base class
|
|
850
|
-
const properties = self.getProperties();
|
|
851
|
-
const components = self.getComponents();
|
|
852
|
-
const children = ([] as BaseNode[]).concat(properties, components);
|
|
853
|
-
|
|
854
|
-
// c8 ignore next
|
|
855
|
-
if (doDebug) {
|
|
856
|
-
debugLog(` ${chalk.bgWhite.cyan(self.browseName.toString())}`);
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
for (const node of children) {
|
|
860
|
-
// only keep those that have a "HasModellingRule"
|
|
861
|
-
if (!node.modellingRule) {
|
|
862
|
-
continue;
|
|
863
|
-
}
|
|
864
|
-
// ignore also methods
|
|
865
|
-
if (node.nodeClass === NodeClass.Method) {
|
|
866
|
-
continue;
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
_process_var(self, "", "", node);
|
|
870
|
-
|
|
871
|
-
// also store value in index
|
|
872
|
-
// xx eventData.__nodes[node.nodeId.toString()] = eventData[lowerName];
|
|
873
|
-
|
|
874
|
-
const children2 = node.getAggregates();
|
|
875
|
-
if (children2.length > 0) {
|
|
876
|
-
const lowerName = lowerFirstLetter(node.browseName.name || "");
|
|
877
|
-
const standardName = node.browseName.toString();
|
|
878
|
-
for (const child2 of children2) {
|
|
879
|
-
_process_var(self, `${lowerName}.`, `${standardName}.`, child2);
|
|
880
|
-
}
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
};
|
|
884
|
-
|
|
885
|
-
const eventData = new EventData(eventTypeNode);
|
|
886
|
-
|
|
887
|
-
// verify standard properties...
|
|
888
|
-
populate_data(eventTypeNode, eventData);
|
|
889
|
-
|
|
890
|
-
verify_data_is_valid(data);
|
|
891
|
-
|
|
892
|
-
return eventData;
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
// - Browse --------------------------------------------------------------------------------------------------------
|
|
896
|
-
/**
|
|
897
|
-
* browse some path.
|
|
898
|
-
*
|
|
899
|
-
* @param {BrowsePath} browsePath
|
|
900
|
-
* @return {BrowsePathResult}
|
|
901
|
-
*
|
|
902
|
-
* This service can be used translates one or more browse paths into NodeIds.
|
|
903
|
-
* A browse path is constructed of a starting Node and a RelativePath. The specified starting Node
|
|
904
|
-
* identifies the Node from which the RelativePath is based. The RelativePath contains a sequence of
|
|
905
|
-
* ReferenceTypes and BrowseNames.
|
|
906
|
-
*
|
|
907
|
-
* |StatusCode | |
|
|
908
|
-
* |------------------------------|:-----------------------------------------------------------|
|
|
909
|
-
* |BadNodeIdUnknown | |
|
|
910
|
-
* |BadNodeIdInvalid | |
|
|
911
|
-
* |BadNothingToDo | - the relative path contains an empty list ) |
|
|
912
|
-
* |BadBrowseNameInvalid | - target name is missing in relative path |
|
|
913
|
-
* |UncertainReferenceOutOfServer | - The path element has targets which are in another server.|
|
|
914
|
-
* |BadTooManyMatches | |
|
|
915
|
-
* |BadQueryTooComplex | |
|
|
916
|
-
* |BadNoMatch | |
|
|
917
|
-
*
|
|
918
|
-
*
|
|
919
|
-
*
|
|
920
|
-
*/
|
|
921
|
-
public browsePath(browsePath: BrowsePath): BrowsePathResult {
|
|
922
|
-
assert(browsePath instanceof BrowsePath);
|
|
923
|
-
|
|
924
|
-
const startingNode = this.findNode(browsePath.startingNode);
|
|
925
|
-
|
|
926
|
-
if (!startingNode) {
|
|
927
|
-
return new BrowsePathResult({ statusCode: StatusCodes.BadNodeIdUnknown });
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
if (!browsePath.relativePath.elements || browsePath.relativePath.elements.length === 0) {
|
|
931
|
-
return new BrowsePathResult({
|
|
932
|
-
statusCode: StatusCodes.BadNothingToDo,
|
|
933
|
-
targets: []
|
|
934
|
-
});
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
const elements_length = browsePath.relativePath.elements.length;
|
|
938
|
-
// -------------------------------------------------------------------------------------------------------
|
|
939
|
-
// verify standard RelativePath construction
|
|
940
|
-
// from OPCUA 1.03 - PArt 3 - 7.6 RelativePath:
|
|
941
|
-
// TargetName The BrowseName of the target node.
|
|
942
|
-
// The final element may have an empty targetName. In this situation all targets of the
|
|
943
|
-
// references identified by the referenceTypeId are the targets of the RelativePath.
|
|
944
|
-
// The targetName shall be specified for all other elements.
|
|
945
|
-
// The current path cannot be followed any further if no targets with the specified
|
|
946
|
-
// BrowseName exist.
|
|
947
|
-
// Let's detect null targetName which are not in last position and return BadBrowseNameInvalid if not
|
|
948
|
-
//
|
|
949
|
-
const empty_targetName_not_in_lastPos = browsePath.relativePath.elements.reduce((prev, e, index) => {
|
|
950
|
-
const is_last = index + 1 === elements_length;
|
|
951
|
-
const isBad = !is_last && (!e.targetName || e.targetName.isEmpty());
|
|
952
|
-
return prev + (isBad ? 1 : 0);
|
|
953
|
-
}, 0);
|
|
954
|
-
if (empty_targetName_not_in_lastPos) {
|
|
955
|
-
return new BrowsePathResult({ statusCode: StatusCodes.BadBrowseNameInvalid });
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
// from OPCUA 1.03 - PArt 3 - 5.8.4 TranslateBrowsePathToNodeIds
|
|
959
|
-
// TranslateBrowsePathToNodeIds further restrict RelativePath targetName rules:
|
|
960
|
-
// The last element in the relativePath shall always have a targetName specified.
|
|
961
|
-
const last_el = browsePath.relativePath.elements[elements_length - 1];
|
|
962
|
-
if (!last_el.targetName?.name || last_el.targetName.name.length === 0) {
|
|
963
|
-
return new BrowsePathResult({ statusCode: StatusCodes.BadBrowseNameInvalid });
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
const res: BrowsePathTargetOptions[] = [];
|
|
967
|
-
|
|
968
|
-
const explore_element = (curNodeObject: BaseNode, elements: RelativePathElement[], index: number) => {
|
|
969
|
-
const element = elements[index];
|
|
970
|
-
const is_last = index + 1 === elements.length;
|
|
971
|
-
const nodeIds = curNodeObject.browseNodeByTargetName(element, is_last);
|
|
972
|
-
const targets = nodeIds.map((nodeId: NodeId) => {
|
|
973
|
-
return {
|
|
974
|
-
remainingPathIndex: elements.length - index,
|
|
975
|
-
targetId: nodeId
|
|
976
|
-
};
|
|
977
|
-
});
|
|
978
|
-
|
|
979
|
-
if (!is_last) {
|
|
980
|
-
// explorer
|
|
981
|
-
for (const target of targets) {
|
|
982
|
-
const node = this.findNode(target.targetId);
|
|
983
|
-
if (!node) {
|
|
984
|
-
continue;
|
|
985
|
-
}
|
|
986
|
-
explore_element(node, elements, index + 1);
|
|
987
|
-
}
|
|
988
|
-
} else {
|
|
989
|
-
for (const target of targets) {
|
|
990
|
-
res.push({
|
|
991
|
-
remainingPathIndex: 0xffffffff,
|
|
992
|
-
targetId: coerceExpandedNodeId(target.targetId)
|
|
993
|
-
});
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
};
|
|
997
|
-
|
|
998
|
-
explore_element(startingNode, browsePath.relativePath.elements, 0);
|
|
999
|
-
|
|
1000
|
-
if (res.length === 0) {
|
|
1001
|
-
return new BrowsePathResult({ statusCode: StatusCodes.BadNoMatch });
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
return new BrowsePathResult({
|
|
1005
|
-
statusCode: StatusCodes.Good,
|
|
1006
|
-
targets: res
|
|
1007
|
-
});
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
|
-
// - Extension Object ----------------------------------------------------------------------------------------------
|
|
1011
|
-
public getExtensionObjectConstructor(dataType: NodeId | UADataType): ExtensionObjectConstructorFuncWithSchema {
|
|
1012
|
-
assert(dataType, "expecting a dataType");
|
|
1013
|
-
|
|
1014
|
-
if (dataType instanceof NodeId) {
|
|
1015
|
-
const tmp = this.findNode(dataType);
|
|
1016
|
-
/* c8 ignore next */
|
|
1017
|
-
if (!tmp) {
|
|
1018
|
-
throw new Error(`getExtensionObjectConstructor: cannot resolve dataType ${dataType}`);
|
|
1019
|
-
}
|
|
1020
|
-
dataType = tmp as UADataType;
|
|
1021
|
-
}
|
|
1022
|
-
/* c8 ignore next */
|
|
1023
|
-
if (!(dataType instanceof UADataTypeImpl)) {
|
|
1024
|
-
// may be dataType was the NodeId of the "Binary Encoding" node
|
|
1025
|
-
throw new Error(`getExtensionObjectConstructor: dataType has unexpected type${dataType}`);
|
|
1026
|
-
}
|
|
1027
|
-
const _dataType = dataType as UADataTypeImpl;
|
|
1028
|
-
|
|
1029
|
-
// to do verify that dataType is of type "Structure"
|
|
1030
|
-
const structureDataType = this.findDataType("Structure");
|
|
1031
|
-
/* c8 ignore next */
|
|
1032
|
-
if (!structureDataType) {
|
|
1033
|
-
throw new Error("getExtensionObjectConstructor: cannot find 'Structure' DataType in standard address Space");
|
|
1034
|
-
}
|
|
1035
|
-
/* c8 ignore next */
|
|
1036
|
-
if (!_dataType.isSubtypeOf(structureDataType)) {
|
|
1037
|
-
// c8 ignore next
|
|
1038
|
-
doDebug && debugLog(_dataType.toString());
|
|
1039
|
-
}
|
|
1040
|
-
assert(_dataType.isSubtypeOf(structureDataType));
|
|
1041
|
-
if (!_dataType._extensionObjectConstructor) {
|
|
1042
|
-
if (!this.$$extraDataTypeManager) {
|
|
1043
|
-
throw new Error(
|
|
1044
|
-
`getExtensionObjectConstructor: cannot build a constructor for ${_dataType.browseName.toString()} (${_dataType.nodeId.toString()}): ` +
|
|
1045
|
-
"the DataType manager is not initialised. " +
|
|
1046
|
-
"Make sure generateAddressSpace() completed successfully and/or that ensureDatatypeExtracted(addressSpace) was awaited before using structured DataTypes."
|
|
1047
|
-
);
|
|
1048
|
-
}
|
|
1049
|
-
const dataTypeManager = this.$$extraDataTypeManager;
|
|
1050
|
-
_dataType._extensionObjectConstructor = dataTypeManager.getExtensionObjectConstructorFromDataType(
|
|
1051
|
-
_dataType.nodeId
|
|
1052
|
-
) as ExtensionObjectConstructorFuncWithSchema;
|
|
1053
|
-
}
|
|
1054
|
-
assert(_dataType._extensionObjectConstructor, "dataType must have a constructor");
|
|
1055
|
-
const Constructor = _dataType._extensionObjectConstructor;
|
|
1056
|
-
return Constructor;
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
/**
|
|
1060
|
-
* @param dataType
|
|
1061
|
-
* @param [options]
|
|
1062
|
-
* @return the constructed extension object
|
|
1063
|
-
*
|
|
1064
|
-
*
|
|
1065
|
-
* @example
|
|
1066
|
-
*
|
|
1067
|
-
* // example 1
|
|
1068
|
-
* var extObj = addressSpace.constructExtensionObject("BuildInfo",{ productName: "PRODUCT_NAME"});
|
|
1069
|
-
*
|
|
1070
|
-
* // example 2
|
|
1071
|
-
* serverStatusDataType.nodeClass.should.eql(NodeClass.DataType);
|
|
1072
|
-
* serverStatusDataType.browseName.toString().should.eql("ServerStatusDataType");
|
|
1073
|
-
* var serverStatus = addressSpace.constructExtensionObject(serverStatusDataType);
|
|
1074
|
-
* serverStatus.should.be.instanceof(ServerStatusDataType);
|
|
1075
|
-
*/
|
|
1076
|
-
public constructExtensionObject(dataType: UADataType | NodeId, options?: Record<string, unknown>): ExtensionObject {
|
|
1077
|
-
const Constructor = this.getExtensionObjectConstructor(dataType);
|
|
1078
|
-
return new Constructor(options);
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
/**
|
|
1082
|
-
* cleanup all resources maintained by this addressSpace.
|
|
1083
|
-
*/
|
|
1084
|
-
public dispose(): void {
|
|
1085
|
-
this._namespaceArray.map((namespace: NamespacePrivate) => namespace.dispose());
|
|
1086
|
-
AddressSpace.registry.unregister(this);
|
|
1087
|
-
/* c8 ignore next */
|
|
1088
|
-
if (this._shutdownTask && this._shutdownTask.length > 0) {
|
|
1089
|
-
throw new Error("AddressSpace#dispose : shutdown has not been called");
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
/**
|
|
1094
|
-
* register a function that will be called when the server will perform its shut down.
|
|
1095
|
-
*/
|
|
1096
|
-
public registerShutdownTask(task: ShutdownTask): void {
|
|
1097
|
-
this._shutdownTask = this._shutdownTask || [];
|
|
1098
|
-
assert(typeof task === "function");
|
|
1099
|
-
this._shutdownTask.push(task);
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
/**
|
|
1103
|
-
* Register a method call interceptor.
|
|
1104
|
-
* Interceptors are called sequentially before each UAMethod.execute().
|
|
1105
|
-
* If any interceptor returns a non-Good StatusCode, the method call
|
|
1106
|
-
* is rejected and subsequent interceptors are skipped.
|
|
1107
|
-
*/
|
|
1108
|
-
public addMethodCallInterceptor(interceptor: MethodCallInterceptor): void {
|
|
1109
|
-
assert(typeof interceptor === "function");
|
|
1110
|
-
this._methodCallInterceptors.push(interceptor);
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
/**
|
|
1114
|
-
* Remove a previously registered method call interceptor.
|
|
1115
|
-
*/
|
|
1116
|
-
public removeMethodCallInterceptor(interceptor: MethodCallInterceptor): void {
|
|
1117
|
-
const index = this._methodCallInterceptors.indexOf(interceptor);
|
|
1118
|
-
if (index !== -1) {
|
|
1119
|
-
this._methodCallInterceptors.splice(index, 1);
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
public async shutdown(): Promise<void> {
|
|
1124
|
-
const performTasks = async (tasks: ShutdownTask[]) => {
|
|
1125
|
-
// perform registerShutdownTask
|
|
1126
|
-
for (const task of tasks) {
|
|
1127
|
-
await task.call(this);
|
|
1128
|
-
}
|
|
1129
|
-
};
|
|
1130
|
-
if (this._shutdownTask) {
|
|
1131
|
-
const tasks = this._shutdownTask;
|
|
1132
|
-
this._shutdownTask = [];
|
|
1133
|
-
await performTasks(tasks);
|
|
1134
|
-
}
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
public browseSingleNode(nodeId: NodeIdLike, browseDescription: BrowseDescription, context?: ISessionContext): BrowseResult {
|
|
1138
|
-
const browseResult: BrowseResultOptions = {
|
|
1139
|
-
continuationPoint: undefined,
|
|
1140
|
-
references: null,
|
|
1141
|
-
statusCode: StatusCodes.Good
|
|
1142
|
-
};
|
|
1143
|
-
|
|
1144
|
-
if (!browseDescription || browseDescription.browseDirection === BrowseDirection.Invalid) {
|
|
1145
|
-
browseResult.statusCode = StatusCodes.BadBrowseDirectionInvalid;
|
|
1146
|
-
return new BrowseResult(browseResult);
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
browseDescription.browseDirection = adjustBrowseDirection(browseDescription.browseDirection, BrowseDirection.Forward);
|
|
1150
|
-
|
|
1151
|
-
/* c8 ignore next */
|
|
1152
|
-
if (typeof nodeId === "number") {
|
|
1153
|
-
throw new Error("Not Implemented");
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
if (typeof nodeId === "string") {
|
|
1157
|
-
const node = this.findNode(this.resolveNodeId(nodeId));
|
|
1158
|
-
if (node) {
|
|
1159
|
-
nodeId = node.nodeId;
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
// check if referenceTypeId is correct
|
|
1164
|
-
if (browseDescription.referenceTypeId instanceof NodeId) {
|
|
1165
|
-
if (browseDescription.referenceTypeId.value === 0) {
|
|
1166
|
-
(browseDescription as unknown as { referenceTypeId: NodeId | null }).referenceTypeId = null;
|
|
1167
|
-
} else {
|
|
1168
|
-
const rf = this.findNode(browseDescription.referenceTypeId);
|
|
1169
|
-
if (!rf || !(rf instanceof UAReferenceTypeImpl)) {
|
|
1170
|
-
browseResult.statusCode = StatusCodes.BadReferenceTypeIdInvalid;
|
|
1171
|
-
return new BrowseResult(browseResult);
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
const obj = this.findNode(nodeId);
|
|
1177
|
-
|
|
1178
|
-
if (!obj) {
|
|
1179
|
-
// Object Not Found
|
|
1180
|
-
browseResult.statusCode = StatusCodes.BadNodeIdUnknown;
|
|
1181
|
-
} else {
|
|
1182
|
-
browseResult.statusCode = StatusCodes.Good;
|
|
1183
|
-
browseResult.references = obj.browseNode(browseDescription, context);
|
|
1184
|
-
}
|
|
1185
|
-
return new BrowseResult(browseResult);
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
/**
|
|
1189
|
-
* @param folder
|
|
1190
|
-
* @private
|
|
1191
|
-
*/
|
|
1192
|
-
public _coerceFolder(folder: UAObject): BaseNode | null {
|
|
1193
|
-
folder = this._coerceNode(folder) as UAObject;
|
|
1194
|
-
/* c8 ignore next */
|
|
1195
|
-
if (folder && !_isFolder(this, folder)) {
|
|
1196
|
-
throw new Error(`Parent folder must be of FolderType ${folder.typeDefinition.toString()}`);
|
|
1197
|
-
}
|
|
1198
|
-
return folder;
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
/**
|
|
1202
|
-
*
|
|
1203
|
-
* @param view
|
|
1204
|
-
* @param modelChange
|
|
1205
|
-
* @private
|
|
1206
|
-
*/
|
|
1207
|
-
public _collectModelChange(_view: UAView | null, modelChange: ModelChangeStructureDataType): void {
|
|
1208
|
-
this._modelChanges.push(modelChange);
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
/**
|
|
1212
|
-
*
|
|
1213
|
-
* walk up the hierarchy of objects until a view is found
|
|
1214
|
-
* objects may belong to multiples views.
|
|
1215
|
-
* Note: this method doesn't return the main view => Server object.
|
|
1216
|
-
* @param node {BaseNode}
|
|
1217
|
-
* @return {BaseNode[]}
|
|
1218
|
-
*/
|
|
1219
|
-
/**
|
|
1220
|
-
*
|
|
1221
|
-
* @param node
|
|
1222
|
-
* @private
|
|
1223
|
-
*/
|
|
1224
|
-
public extractRootViews(node: UAObject | UAVariable): UAView[] {
|
|
1225
|
-
assert(node.nodeClass === NodeClass.Object || node.nodeClass === NodeClass.Variable);
|
|
1226
|
-
|
|
1227
|
-
const visitedMap: Record<string, BaseNode> = {};
|
|
1228
|
-
|
|
1229
|
-
const q = new Dequeue();
|
|
1230
|
-
q.push(node);
|
|
1231
|
-
|
|
1232
|
-
const objectsFolder = this.rootFolder.objects;
|
|
1233
|
-
assert(objectsFolder instanceof UAObjectImpl);
|
|
1234
|
-
|
|
1235
|
-
const results: UAView[] = [];
|
|
1236
|
-
|
|
1237
|
-
while (q.length) {
|
|
1238
|
-
node = q.shift();
|
|
1239
|
-
|
|
1240
|
-
const references = node.findReferencesEx("HierarchicalReferences", BrowseDirection.Inverse);
|
|
1241
|
-
|
|
1242
|
-
const parentNodes = references.map((r: UAReference) => ReferenceImpl.resolveReferenceNode(this, r) as BaseNode);
|
|
1243
|
-
|
|
1244
|
-
for (const parent of parentNodes) {
|
|
1245
|
-
if (sameNodeId(parent.nodeId, objectsFolder.nodeId)) {
|
|
1246
|
-
continue; // nothing to do
|
|
1247
|
-
}
|
|
1248
|
-
if (parent.nodeClass === NodeClass.View) {
|
|
1249
|
-
results.push(parent as UAView);
|
|
1250
|
-
} else {
|
|
1251
|
-
const key = parent.nodeId.toString();
|
|
1252
|
-
if (Object.hasOwn(visitedMap, key)) {
|
|
1253
|
-
continue;
|
|
1254
|
-
}
|
|
1255
|
-
visitedMap[key] = parent;
|
|
1256
|
-
q.push(parent);
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
return results;
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
/**
|
|
1264
|
-
*
|
|
1265
|
-
* @param func
|
|
1266
|
-
* @private
|
|
1267
|
-
*/
|
|
1268
|
-
public modelChangeTransaction(func: () => void): void {
|
|
1269
|
-
this._modelChangeTransactionCounter = this._modelChangeTransactionCounter || 0;
|
|
1270
|
-
|
|
1271
|
-
function beginModelChange(this: AddressSpace) {
|
|
1272
|
-
this._modelChanges = this._modelChanges || [];
|
|
1273
|
-
assert(this._modelChangeTransactionCounter >= 0);
|
|
1274
|
-
this._modelChangeTransactionCounter += 1;
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
function endModelChange(this: AddressSpace) {
|
|
1278
|
-
this._modelChangeTransactionCounter -= 1;
|
|
1279
|
-
|
|
1280
|
-
if (this._modelChangeTransactionCounter === 0) {
|
|
1281
|
-
if (this._modelChanges.length === 0) {
|
|
1282
|
-
return; // nothing to do
|
|
1283
|
-
}
|
|
1284
|
-
// increase version number of participating nodes
|
|
1285
|
-
|
|
1286
|
-
// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore
|
|
1287
|
-
// const nodeIds = _.uniq(this._modelChanges.map((c: any) => c.affected));
|
|
1288
|
-
const nodeIds = [...new Set(this._modelChanges.map((c) => c.affected))];
|
|
1289
|
-
|
|
1290
|
-
const nodes = nodeIds.map((nodeId: NodeId) => this.findNode(nodeId));
|
|
1291
|
-
|
|
1292
|
-
nodes.forEach(_increase_version_number);
|
|
1293
|
-
// raise events
|
|
1294
|
-
|
|
1295
|
-
if (this.rootFolder.objects.server) {
|
|
1296
|
-
const eventTypeNode = this.findEventType("GeneralModelChangeEventType");
|
|
1297
|
-
|
|
1298
|
-
if (eventTypeNode) {
|
|
1299
|
-
this.rootFolder.objects.server.raiseEvent(eventTypeNode, {
|
|
1300
|
-
// Part 5 - 6.4.32 GeneralModelChangeEventType
|
|
1301
|
-
changes: {
|
|
1302
|
-
dataType: DataType.ExtensionObject,
|
|
1303
|
-
arrayType: VariantArrayType.Array,
|
|
1304
|
-
value: this._modelChanges
|
|
1305
|
-
}
|
|
1306
|
-
});
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
this._modelChanges = [];
|
|
1310
|
-
// _notifyModelChange(this);
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
beginModelChange.call(this);
|
|
1315
|
-
try {
|
|
1316
|
-
func();
|
|
1317
|
-
} catch (err) {
|
|
1318
|
-
errorLog("modelChangeTransaction", (err as Error)?.message);
|
|
1319
|
-
throw err;
|
|
1320
|
-
} finally {
|
|
1321
|
-
endModelChange.call(this);
|
|
1322
|
-
}
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
/**
|
|
1326
|
-
* normalize the ReferenceType field of the Reference Object
|
|
1327
|
-
* @param params.referenceType {String|nodeId}
|
|
1328
|
-
* @param params.isForward {Boolean} default value: true;
|
|
1329
|
-
* @return {Object} a new reference object with the normalized name { referenceType: <value>, isForward: <flag>}
|
|
1330
|
-
*/
|
|
1331
|
-
public normalizeReferenceType(params: AddReferenceOpts | ReferenceImpl): UAReference {
|
|
1332
|
-
if (params instanceof ReferenceImpl) {
|
|
1333
|
-
// a reference has already been normalized
|
|
1334
|
-
return params;
|
|
1335
|
-
}
|
|
1336
|
-
// ----------------------------------------------- handle is forward
|
|
1337
|
-
assert(params.isForward === undefined || typeof params.isForward === "boolean");
|
|
1338
|
-
params.isForward = isNullOrUndefined(params.isForward) ? true : !!params.isForward;
|
|
1339
|
-
|
|
1340
|
-
// referenceType = Organizes , isForward = true => referenceType = Organizes , isForward = true
|
|
1341
|
-
// referenceType = Organizes , isForward = false => referenceType = Organizes , isForward = false
|
|
1342
|
-
// referenceType = OrganizedBy , isForward = true => referenceType = Organizes , isForward = **false**
|
|
1343
|
-
// referenceType = OrganizedBy , isForward = false => referenceType = Organizes , isForward = **true**
|
|
1344
|
-
|
|
1345
|
-
// ----------------------------------------------- handle referenceType
|
|
1346
|
-
if (params.referenceType instanceof UAReferenceTypeImpl) {
|
|
1347
|
-
params.referenceType = params.referenceType as UAReferenceTypeImpl;
|
|
1348
|
-
params.referenceType = params.referenceType.nodeId;
|
|
1349
|
-
} else if (typeof params.referenceType === "string") {
|
|
1350
|
-
const inv = this.findReferenceTypeFromInverseName(params.referenceType);
|
|
1351
|
-
if (inv) {
|
|
1352
|
-
params.referenceType = inv.nodeId;
|
|
1353
|
-
params._referenceType = inv;
|
|
1354
|
-
params.isForward = !params.isForward;
|
|
1355
|
-
} else {
|
|
1356
|
-
params.referenceType = resolveNodeId(params.referenceType);
|
|
1357
|
-
const refType = this.findReferenceType(params.referenceType);
|
|
1358
|
-
if (refType) {
|
|
1359
|
-
params._referenceType = refType;
|
|
1360
|
-
}
|
|
1361
|
-
}
|
|
1362
|
-
}
|
|
1363
|
-
assert(params.referenceType instanceof NodeId);
|
|
1364
|
-
|
|
1365
|
-
// ----------- now resolve target NodeId;
|
|
1366
|
-
if (params.nodeId instanceof BaseNodeImpl) {
|
|
1367
|
-
assert(!Object.hasOwn(params, "node"));
|
|
1368
|
-
params.node = params.nodeId as BaseNode;
|
|
1369
|
-
params.nodeId = params.node.nodeId;
|
|
1370
|
-
} else {
|
|
1371
|
-
let _nodeId = params.nodeId as NodeId;
|
|
1372
|
-
assert(!!_nodeId, "missing 'nodeId' in reference");
|
|
1373
|
-
const _nodeIdWithNodeId = _nodeId as unknown as { nodeId?: NodeId };
|
|
1374
|
-
if (_nodeId && _nodeIdWithNodeId.nodeId) {
|
|
1375
|
-
_nodeId = _nodeIdWithNodeId.nodeId;
|
|
1376
|
-
}
|
|
1377
|
-
_nodeId = resolveNodeId(_nodeId);
|
|
1378
|
-
params.nodeId = _nodeId;
|
|
1379
|
-
}
|
|
1380
|
-
return new ReferenceImpl(params);
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1383
|
-
public normalizeReferenceTypes(references?: AddReferenceOpts[] | ReferenceImpl[] | null): UAReference[] {
|
|
1384
|
-
if (!references || references.length === 0) {
|
|
1385
|
-
return [];
|
|
1386
|
-
}
|
|
1387
|
-
return references.map((el) => this.normalizeReferenceType(el));
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
// -- Historical Node -----------------------------------------------------------------------------------------
|
|
1391
|
-
/**
|
|
1392
|
-
*
|
|
1393
|
-
* @param node
|
|
1394
|
-
* @param options
|
|
1395
|
-
*/
|
|
1396
|
-
public installHistoricalDataNode(node: UAVariable, options?: IHistoricalDataNodeOptions): void {
|
|
1397
|
-
AddressSpace_installHistoricalDataNode.call(this, node as UAVariableImpl, options);
|
|
1398
|
-
}
|
|
1399
|
-
|
|
1400
|
-
// -- Alarms & Conditions -----------------------------------------------------------------------------------------
|
|
1401
|
-
/**
|
|
1402
|
-
*
|
|
1403
|
-
*/
|
|
1404
|
-
public installAlarmsAndConditionsService(): void {
|
|
1405
|
-
UAConditionImplBase.install_condition_refresh_handle(this);
|
|
1406
|
-
UAAcknowledgeableConditionImplBase.install_method_handle_on_type(this);
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
// -- internal stuff -----------------------------------------------------------------------------------------------
|
|
1410
|
-
public _coerceNode(node: string | BaseNode | NodeId): BaseNode | null {
|
|
1411
|
-
// coerce to BaseNode object
|
|
1412
|
-
if (node instanceof BaseNodeImpl) {
|
|
1413
|
-
return node as BaseNode;
|
|
1414
|
-
}
|
|
1415
|
-
// it's a node id like
|
|
1416
|
-
// coerce parent folder to an object
|
|
1417
|
-
const returnValue = this.findNode(resolveNodeId(node as NodeIdLike));
|
|
1418
|
-
/*
|
|
1419
|
-
if (!hasTypeDefinition(node as BaseNode)) {
|
|
1420
|
-
node = this.findNode(node.nodeId) || node;
|
|
1421
|
-
if (!node || !hasTypeDefinition(node)) {
|
|
1422
|
-
return null;
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
*/
|
|
1426
|
-
return returnValue;
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
public _coerce_DataType(dataType: number | NodeId | string | BaseNode): NodeId {
|
|
1430
|
-
if (dataType instanceof NodeId) {
|
|
1431
|
-
// xx assert(self.findDataType(dataType));
|
|
1432
|
-
return dataType;
|
|
1433
|
-
}
|
|
1434
|
-
if (dataType === 0) {
|
|
1435
|
-
return NodeId.nullNodeId;
|
|
1436
|
-
}
|
|
1437
|
-
return this._coerce_Type(dataType, DataTypeIds, "DataTypeIds", AddressSpace.prototype.findDataType);
|
|
1438
|
-
}
|
|
1439
|
-
|
|
1440
|
-
public _coerceTypeDefinition(typeDefinition: string | NodeId): NodeId {
|
|
1441
|
-
if (typeof typeDefinition === "string") {
|
|
1442
|
-
// coerce parent folder to an node
|
|
1443
|
-
const typeDefinitionNode = this.findNode(typeDefinition);
|
|
1444
|
-
/* c8 ignore next */
|
|
1445
|
-
if (!typeDefinitionNode) {
|
|
1446
|
-
throw new Error(`_coerceTypeDefinition: cannot find node ${typeDefinition}`);
|
|
1447
|
-
}
|
|
1448
|
-
typeDefinition = typeDefinitionNode.nodeId;
|
|
1449
|
-
}
|
|
1450
|
-
assert(typeDefinition instanceof NodeId);
|
|
1451
|
-
return typeDefinition;
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
public _coerceType<T extends BaseNode>(baseType: string | NodeId | BaseNode, topMostBaseType: string, nodeClass: NodeClass): T {
|
|
1455
|
-
assert(typeof topMostBaseType === "string");
|
|
1456
|
-
const topMostBaseTypeNode = this.findNode(topMostBaseType) as T;
|
|
1457
|
-
|
|
1458
|
-
/* c8 ignore next */
|
|
1459
|
-
if (!topMostBaseTypeNode) {
|
|
1460
|
-
throw new Error(`Cannot find topMostBaseTypeNode ${topMostBaseType.toString()}`);
|
|
1461
|
-
}
|
|
1462
|
-
assert(topMostBaseTypeNode instanceof BaseNodeImpl);
|
|
1463
|
-
assert(topMostBaseTypeNode.nodeClass === nodeClass);
|
|
1464
|
-
|
|
1465
|
-
if (!baseType) {
|
|
1466
|
-
return topMostBaseTypeNode;
|
|
1467
|
-
}
|
|
1468
|
-
assert(typeof baseType === "string" || baseType instanceof BaseNodeImpl || baseType instanceof NodeId);
|
|
1469
|
-
let baseTypeNode: T;
|
|
1470
|
-
if (baseType instanceof BaseNodeImpl) {
|
|
1471
|
-
baseTypeNode = baseType as BaseNode as T;
|
|
1472
|
-
} else {
|
|
1473
|
-
baseTypeNode = this.findNode(baseType as NodeIdLike) as T;
|
|
1474
|
-
}
|
|
1475
|
-
|
|
1476
|
-
/* c8 ignore next*/
|
|
1477
|
-
if (!baseTypeNode) {
|
|
1478
|
-
throw new Error(`Cannot find ObjectType or VariableType for ${baseType.toString()}`);
|
|
1479
|
-
}
|
|
1480
|
-
const baseTypeNodeWithIsSubtypeOf = baseTypeNode as unknown as { isSubtypeOf?: (t: BaseNode) => boolean };
|
|
1481
|
-
/* c8 ignore next */
|
|
1482
|
-
if (!baseTypeNodeWithIsSubtypeOf.isSubtypeOf) {
|
|
1483
|
-
throw new Error(`Cannot find ObjectType or VariableType for ${baseType.toString()}`);
|
|
1484
|
-
}
|
|
1485
|
-
/* c8 ignore next */
|
|
1486
|
-
if (!baseTypeNodeWithIsSubtypeOf.isSubtypeOf(topMostBaseTypeNode)) {
|
|
1487
|
-
throw new Error("wrong type ");
|
|
1488
|
-
}
|
|
1489
|
-
return baseTypeNode;
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
|
-
public _coerce_VariableTypeIds(dataType: NodeId | string | BaseNode): NodeId {
|
|
1493
|
-
return this._coerce_Type(dataType, VariableTypeIds, "VariableTypeIds", AddressSpace.prototype.findVariableType);
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
public _register(node: BaseNode): void {
|
|
1497
|
-
assert(node.nodeId instanceof NodeId);
|
|
1498
|
-
const namespace = this.getNamespace(node.nodeId.namespace);
|
|
1499
|
-
namespace._register(node);
|
|
1500
|
-
}
|
|
1501
|
-
|
|
1502
|
-
public deleteNode(nodeOrNodeId: NodeId | BaseNode): void {
|
|
1503
|
-
_getNamespace(this, nodeOrNodeId).deleteNode(nodeOrNodeId);
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
public isEnumeration(dataType: NodeId): boolean {
|
|
1507
|
-
// DataType must be one of Enumeration
|
|
1508
|
-
const dataTypeNode = this.findDataType(dataType) as UADataType;
|
|
1509
|
-
if (!dataTypeNode) {
|
|
1510
|
-
throw new Error(` Cannot find DataType ${dataType.toString()} in standard address Space`);
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
|
-
const enumerationNode = this.findDataType("Enumeration");
|
|
1514
|
-
if (!enumerationNode) {
|
|
1515
|
-
throw new Error(" Cannot find 'Enumeration' DataType in standard address Space");
|
|
1516
|
-
}
|
|
1517
|
-
return dataTypeNode.isSubtypeOf(enumerationNode);
|
|
1518
|
-
}
|
|
1519
|
-
|
|
1520
|
-
private _coerce_Type(
|
|
1521
|
-
dataType: BaseNode | string | NodeId | number,
|
|
1522
|
-
typeMap: Record<string, number | string>,
|
|
1523
|
-
typeMapName: string,
|
|
1524
|
-
finderMethod: (this: AddressSpace, nodeId: NodeId) => BaseNode | null
|
|
1525
|
-
): NodeId {
|
|
1526
|
-
if (typeof dataType === "number") {
|
|
1527
|
-
return this._coerce_Type(coerceNodeId(dataType), typeMap, typeMapName, finderMethod);
|
|
1528
|
-
}
|
|
1529
|
-
if (dataType instanceof BaseNodeImpl) {
|
|
1530
|
-
dataType = dataType.nodeId;
|
|
1531
|
-
}
|
|
1532
|
-
assert(typeMap !== null && typeof typeMap === "object");
|
|
1533
|
-
let nodeId: NodeId | null;
|
|
1534
|
-
if (typeof dataType === "string") {
|
|
1535
|
-
if (isNodeIdString(dataType)) {
|
|
1536
|
-
const nodeId = this.resolveNodeId(dataType);
|
|
1537
|
-
if (nodeId.isEmpty()) {
|
|
1538
|
-
// this is a valid dataType NodeId, but it has no definition in the address space
|
|
1539
|
-
return NodeId.nullNodeId;
|
|
1540
|
-
}
|
|
1541
|
-
const node = this.findNode(nodeId);
|
|
1542
|
-
if (node) {
|
|
1543
|
-
// if dataType is a nodeId string, we can use it directly
|
|
1544
|
-
return node.nodeId;
|
|
1545
|
-
} else {
|
|
1546
|
-
warningLog("Expecting valid nodeId of a DataType : ", nodeId.toString());
|
|
1547
|
-
return nodeId;
|
|
1548
|
-
}
|
|
1549
|
-
}
|
|
1550
|
-
const namespace0 = this.getDefaultNamespace();
|
|
1551
|
-
// resolve dataType
|
|
1552
|
-
nodeId = namespace0.resolveAlias(dataType);
|
|
1553
|
-
if (!nodeId) {
|
|
1554
|
-
// dataType was not found in the aliases database
|
|
1555
|
-
if (typeMap[dataType]) {
|
|
1556
|
-
nodeId = makeNodeId(typeMap[dataType], 0);
|
|
1557
|
-
return nodeId;
|
|
1558
|
-
} else {
|
|
1559
|
-
nodeId = resolveNodeId(dataType);
|
|
1560
|
-
}
|
|
1561
|
-
}
|
|
1562
|
-
} else if (typeof dataType === "number") {
|
|
1563
|
-
nodeId = makeNodeId(dataType, 0);
|
|
1564
|
-
} else {
|
|
1565
|
-
nodeId = resolveNodeId(dataType as NodeIdLike);
|
|
1566
|
-
}
|
|
1567
|
-
/* c8 ignore next */
|
|
1568
|
-
if (nodeId == null || !(nodeId instanceof NodeId)) {
|
|
1569
|
-
throw new Error("Expecting valid nodeId ");
|
|
1570
|
-
}
|
|
1571
|
-
const el = finderMethod.call(this, nodeId);
|
|
1572
|
-
|
|
1573
|
-
if (!el) {
|
|
1574
|
-
// verify that node Id exists in standard type map typeMap
|
|
1575
|
-
const find = Object.values(typeMap).filter((a) => a === nodeId?.value);
|
|
1576
|
-
/* c8 ignore next */
|
|
1577
|
-
if (find.length !== 1) {
|
|
1578
|
-
throw new Error(` cannot find ${dataType.toString()} in typeMap ${typeMapName} L = ${find.length}`);
|
|
1579
|
-
}
|
|
1580
|
-
}
|
|
1581
|
-
return nodeId;
|
|
1582
|
-
}
|
|
1583
|
-
|
|
1584
|
-
private _findReferenceType(refType: NodeId | string, namespaceIndex?: number): UAReferenceType | null {
|
|
1585
|
-
if (refType instanceof NodeId) {
|
|
1586
|
-
return _find_by_node_id<UAReferenceType>(this, refType, namespaceIndex);
|
|
1587
|
-
}
|
|
1588
|
-
const [namespace, browseName] = _extract_namespace_and_browse_name_as_string(this, refType, namespaceIndex);
|
|
1589
|
-
return namespace.findReferenceType(browseName);
|
|
1590
|
-
}
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1593
|
-
function _getNamespace(addressSpace: AddressSpace, nodeOrNodId: BaseNode | NodeId): NamespacePrivate {
|
|
1594
|
-
const nodeId: NodeId = nodeOrNodId instanceof BaseNodeImpl ? nodeOrNodId.nodeId : (nodeOrNodId as NodeId);
|
|
1595
|
-
return addressSpace.getNamespace(nodeId.namespace);
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
|
-
function _find_by_node_id<T extends BaseNode>(addressSpace: AddressSpace, nodeId: NodeId, _namespaceIndex?: number): T {
|
|
1599
|
-
const obj = addressSpace.findNode(nodeId);
|
|
1600
|
-
return obj as T;
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
/**
|
|
1604
|
-
* return true if nodeId is a UAFolder
|
|
1605
|
-
* @param addressSpace
|
|
1606
|
-
* @param folder
|
|
1607
|
-
* @return {Boolean}
|
|
1608
|
-
* @private
|
|
1609
|
-
*/
|
|
1610
|
-
function _isFolder(addressSpace: AddressSpace, folder: UAObject): boolean {
|
|
1611
|
-
const folderType = addressSpace.findObjectType("FolderType") as UAObjectType;
|
|
1612
|
-
assert(folder instanceof BaseNodeImpl);
|
|
1613
|
-
assert(folder.typeDefinitionObj);
|
|
1614
|
-
return folder.typeDefinitionObj.isSubtypeOf(folderType);
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
function _increase_version_number(node: BaseNode | null) {
|
|
1618
|
-
const uaNodeVersion = node?.getNodeVersion();
|
|
1619
|
-
if (uaNodeVersion) {
|
|
1620
|
-
const rawValue = uaNodeVersion.readValue().value.value || "";
|
|
1621
|
-
let previousValue = parseInt(rawValue || "0", 10);
|
|
1622
|
-
if (Number.isNaN(previousValue)) {
|
|
1623
|
-
warningLog("NodeVersion was ", rawValue);
|
|
1624
|
-
previousValue = 0;
|
|
1625
|
-
}
|
|
1626
|
-
uaNodeVersion.setValueFromSource({
|
|
1627
|
-
dataType: DataType.String,
|
|
1628
|
-
value: (previousValue + 1).toString()
|
|
1629
|
-
});
|
|
1630
|
-
}
|
|
1631
|
-
}
|