node-opcua-address-space 2.183.0 → 2.184.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/helpers/adjust_browse_direction.ts +1 -1
- package/api/helpers/argument_list.ts +9 -9
- package/api/helpers/coerce_enum_value.ts +1 -0
- package/api/helpers/dump_tools.ts +1 -1
- package/api/index.ts +2 -1
- package/api/interfaces/alarms_and_conditions/deviation_stuff.ts +30 -0
- package/api/interfaces/data_access/ua_multistate_discrete_ex.ts +1 -1
- package/api/interfaces/nodeset_loader_options.ts +17 -0
- package/api/loader/decode_xml_extension_object.ts +1 -1
- package/api/loader/ensure_datatype_extracted.ts +73 -37
- package/api/loader/generateAddressSpaceRaw.ts +32 -22
- package/api/loader/load_nodeset2.ts +2 -2
- package/api/loader/namespace_post_step.ts +1 -1
- package/api/loader/narrow_instance_datatypes.ts +22 -9
- package/api/loader/nodeset_image_codec.ts +26 -12
- package/api/loader/nodeset_record_applier.ts +1 -1
- package/api/loader/nodeset_xml_producer.ts +8 -6
- package/api/loader/parsers/extension_object_parser.ts +3 -3
- package/api/loader/register_node_promoter.ts +10 -2
- package/api/pseudo_session.ts +1 -1
- package/bin/{nodeset_equivalence.js → nodeset_equivalence.cjs} +1 -1
- package/bin/{opcua-nodeset-image.js → opcua-nodeset-image.cjs} +1 -1
- package/bin/{opcua-nodeset-live.js → opcua-nodeset-live.cjs} +2 -2
- package/dist/api/address_space_public.d.ts +1 -0
- package/dist/api/address_space_public.d.ts.map +1 -0
- package/dist/api/address_space_public.js +2 -5
- package/dist/api/address_space_public.js.map +1 -1
- package/dist/api/address_space_ts.d.ts +1 -0
- package/dist/api/address_space_ts.d.ts.map +1 -0
- package/dist/api/address_space_ts.js +2 -5
- package/dist/api/address_space_ts.js.map +1 -1
- package/dist/api/continuation_points/continuation_point_manager.d.ts +1 -0
- package/dist/api/continuation_points/continuation_point_manager.d.ts.map +1 -0
- package/dist/api/continuation_points/continuation_point_manager.js +13 -17
- package/dist/api/continuation_points/continuation_point_manager.js.map +1 -1
- package/dist/api/helpers/adjust_browse_direction.d.ts +1 -0
- package/dist/api/helpers/adjust_browse_direction.d.ts.map +1 -0
- package/dist/api/helpers/adjust_browse_direction.js +2 -5
- package/dist/api/helpers/adjust_browse_direction.js.map +1 -1
- package/dist/api/helpers/argument_list.d.ts +1 -0
- package/dist/api/helpers/argument_list.d.ts.map +1 -0
- package/dist/api/helpers/argument_list.js +61 -69
- package/dist/api/helpers/argument_list.js.map +1 -1
- package/dist/api/helpers/call_helpers.d.ts +1 -0
- package/dist/api/helpers/call_helpers.d.ts.map +1 -0
- package/dist/api/helpers/call_helpers.js +25 -28
- package/dist/api/helpers/call_helpers.js.map +1 -1
- package/dist/api/helpers/coerce_enum_value.d.ts +1 -0
- package/dist/api/helpers/coerce_enum_value.d.ts.map +1 -0
- package/dist/api/helpers/coerce_enum_value.js +15 -17
- package/dist/api/helpers/coerce_enum_value.js.map +1 -1
- package/dist/api/helpers/dump_tools.d.ts +1 -0
- package/dist/api/helpers/dump_tools.d.ts.map +1 -0
- package/dist/api/helpers/dump_tools.js +19 -29
- package/dist/api/helpers/dump_tools.js.map +1 -1
- package/dist/api/helpers/ensure_secure_access.d.ts +1 -0
- package/dist/api/helpers/ensure_secure_access.d.ts.map +1 -0
- package/dist/api/helpers/ensure_secure_access.js +24 -28
- package/dist/api/helpers/ensure_secure_access.js.map +1 -1
- package/dist/api/helpers/make_optionals_map.d.ts +1 -0
- package/dist/api/helpers/make_optionals_map.d.ts.map +1 -0
- package/dist/api/helpers/make_optionals_map.js +1 -4
- package/dist/api/helpers/make_optionals_map.js.map +1 -1
- package/dist/api/helpers/multiform_func.d.ts +1 -0
- package/dist/api/helpers/multiform_func.d.ts.map +1 -0
- package/dist/api/helpers/multiform_func.js +4 -8
- package/dist/api/helpers/multiform_func.js.map +1 -1
- package/dist/api/helpers/resolve_opaque_on_address_space.d.ts +1 -0
- package/dist/api/helpers/resolve_opaque_on_address_space.d.ts.map +1 -0
- package/dist/api/helpers/resolve_opaque_on_address_space.js +10 -13
- package/dist/api/helpers/resolve_opaque_on_address_space.js.map +1 -1
- package/dist/api/index.d.ts +3 -1
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +93 -218
- package/dist/api/index.js.map +1 -1
- package/dist/api/interfaces/alarms_and_conditions/condition_info_i.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/condition_info_i.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/condition_info_i.js +2 -5
- package/dist/api/interfaces/alarms_and_conditions/condition_info_i.js.map +1 -1
- package/dist/api/interfaces/alarms_and_conditions/condition_snapshot.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/condition_snapshot.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/condition_snapshot.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/deviation_stuff.d.ts +29 -0
- package/dist/api/interfaces/alarms_and_conditions/deviation_stuff.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/deviation_stuff.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/install_setpoint_options.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/install_setpoint_options.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_condition_options.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/promote_to_alarm_options.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/promote_to_alarm_options.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/promote_to_alarm_options.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/ua_base_event_ex.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_base_event_ex.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_base_event_ex.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_condition_ex.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_condition_ex.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js +1 -2
- package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js +1 -2
- package/dist/api/interfaces/data_access/ua_multistate_discrete_ex.d.ts +2 -1
- package/dist/api/interfaces/data_access/ua_multistate_discrete_ex.d.ts.map +1 -0
- package/dist/api/interfaces/data_access/ua_multistate_discrete_ex.js +1 -2
- package/dist/api/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +1 -0
- package/dist/api/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts.map +1 -0
- package/dist/api/interfaces/data_access/ua_multistate_value_discrete_ex.js +1 -2
- package/dist/api/interfaces/data_access/ua_two_state_discrete_ex.d.ts +1 -0
- package/dist/api/interfaces/data_access/ua_two_state_discrete_ex.d.ts.map +1 -0
- package/dist/api/interfaces/data_access/ua_two_state_discrete_ex.js +1 -2
- package/dist/api/interfaces/data_access/ua_y_array_item_ex.d.ts +1 -0
- package/dist/api/interfaces/data_access/ua_y_array_item_ex.d.ts.map +1 -0
- package/dist/api/interfaces/data_access/ua_y_array_item_ex.js +1 -2
- package/dist/api/interfaces/extension_object_constructor.d.ts +1 -0
- package/dist/api/interfaces/extension_object_constructor.d.ts.map +1 -0
- package/dist/api/interfaces/extension_object_constructor.js +1 -2
- package/dist/api/interfaces/i_condition_variable_type_setter_options.d.ts +1 -0
- package/dist/api/interfaces/i_condition_variable_type_setter_options.d.ts.map +1 -0
- package/dist/api/interfaces/i_condition_variable_type_setter_options.js +1 -2
- package/dist/api/interfaces/i_set_state_options.d.ts +1 -0
- package/dist/api/interfaces/i_set_state_options.d.ts.map +1 -0
- package/dist/api/interfaces/i_set_state_options.js +1 -2
- package/dist/api/interfaces/nodeset_loader_options.d.ts +18 -0
- package/dist/api/interfaces/nodeset_loader_options.d.ts.map +1 -0
- package/dist/api/interfaces/nodeset_loader_options.js +1 -2
- package/dist/api/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +1 -0
- package/dist/api/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts.map +1 -0
- package/dist/api/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js +1 -2
- package/dist/api/interfaces/state_machine/ua_finite_state_machine_type.d.ts +1 -0
- package/dist/api/interfaces/state_machine/ua_finite_state_machine_type.d.ts.map +1 -0
- package/dist/api/interfaces/state_machine/ua_finite_state_machine_type.js +1 -2
- package/dist/api/interfaces/state_machine/ua_program_state_machine_type.d.ts +1 -0
- package/dist/api/interfaces/state_machine/ua_program_state_machine_type.d.ts.map +1 -0
- package/dist/api/interfaces/state_machine/ua_program_state_machine_type.js +1 -2
- package/dist/api/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +1 -0
- package/dist/api/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts.map +1 -0
- package/dist/api/interfaces/state_machine/ua_shelved_state_machine_ex.js +1 -2
- package/dist/api/interfaces/state_machine/ua_state_machine_type.d.ts +1 -0
- package/dist/api/interfaces/state_machine/ua_state_machine_type.d.ts.map +1 -0
- package/dist/api/interfaces/state_machine/ua_state_machine_type.js +1 -2
- package/dist/api/interfaces/state_machine/ua_state_machine_type.js.map +1 -1
- package/dist/api/interfaces/state_machine/ua_transition_ex.d.ts +1 -0
- package/dist/api/interfaces/state_machine/ua_transition_ex.d.ts.map +1 -0
- package/dist/api/interfaces/state_machine/ua_transition_ex.js +1 -2
- package/dist/api/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +1 -0
- package/dist/api/interfaces/ua_subscription_diagnostics_variable_ex.d.ts.map +1 -0
- package/dist/api/interfaces/ua_subscription_diagnostics_variable_ex.js +1 -2
- package/dist/api/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -1
- package/dist/api/loader/decode_xml_extension_object.d.ts +1 -0
- package/dist/api/loader/decode_xml_extension_object.d.ts.map +1 -0
- package/dist/api/loader/decode_xml_extension_object.js +13 -17
- package/dist/api/loader/decode_xml_extension_object.js.map +1 -1
- package/dist/api/loader/ensure_datatype_extracted.d.ts +1 -0
- package/dist/api/loader/ensure_datatype_extracted.d.ts.map +1 -0
- package/dist/api/loader/ensure_datatype_extracted.js +83 -52
- package/dist/api/loader/ensure_datatype_extracted.js.map +1 -1
- package/dist/api/loader/generateAddressSpaceRaw.d.ts +1 -0
- package/dist/api/loader/generateAddressSpaceRaw.d.ts.map +1 -0
- package/dist/api/loader/generateAddressSpaceRaw.js +76 -74
- package/dist/api/loader/generateAddressSpaceRaw.js.map +1 -1
- package/dist/api/loader/load_nodeset2.d.ts +1 -0
- package/dist/api/loader/load_nodeset2.d.ts.map +1 -0
- package/dist/api/loader/load_nodeset2.js +44 -51
- package/dist/api/loader/load_nodeset2.js.map +1 -1
- package/dist/api/loader/make_semver_compatible.d.ts +1 -0
- package/dist/api/loader/make_semver_compatible.d.ts.map +1 -0
- package/dist/api/loader/make_semver_compatible.js +1 -4
- package/dist/api/loader/make_semver_compatible.js.map +1 -1
- package/dist/api/loader/make_xml_extension_object_parser.d.ts +1 -0
- package/dist/api/loader/make_xml_extension_object_parser.d.ts.map +1 -0
- package/dist/api/loader/make_xml_extension_object_parser.js +37 -40
- package/dist/api/loader/make_xml_extension_object_parser.js.map +1 -1
- package/dist/api/loader/namespace_post_step.d.ts +1 -0
- package/dist/api/loader/namespace_post_step.d.ts.map +1 -0
- package/dist/api/loader/namespace_post_step.js +12 -17
- package/dist/api/loader/namespace_post_step.js.map +1 -1
- package/dist/api/loader/narrow_instance_datatypes.d.ts +1 -0
- package/dist/api/loader/narrow_instance_datatypes.d.ts.map +1 -0
- package/dist/api/loader/narrow_instance_datatypes.js +38 -28
- package/dist/api/loader/narrow_instance_datatypes.js.map +1 -1
- package/dist/api/loader/nodeset_builtin_formats.d.ts +1 -0
- package/dist/api/loader/nodeset_builtin_formats.d.ts.map +1 -0
- package/dist/api/loader/nodeset_builtin_formats.js +20 -25
- package/dist/api/loader/nodeset_builtin_formats.js.map +1 -1
- package/dist/api/loader/nodeset_format.d.ts +1 -0
- package/dist/api/loader/nodeset_format.d.ts.map +1 -0
- package/dist/api/loader/nodeset_format.js +4 -10
- package/dist/api/loader/nodeset_format.js.map +1 -1
- package/dist/api/loader/nodeset_image.d.ts +1 -0
- package/dist/api/loader/nodeset_image.d.ts.map +1 -0
- package/dist/api/loader/nodeset_image.js +38 -54
- package/dist/api/loader/nodeset_image.js.map +1 -1
- package/dist/api/loader/nodeset_image_codec.d.ts +1 -0
- package/dist/api/loader/nodeset_image_codec.d.ts.map +1 -0
- package/dist/api/loader/nodeset_image_codec.js +118 -116
- package/dist/api/loader/nodeset_image_codec.js.map +1 -1
- package/dist/api/loader/nodeset_image_store.d.ts +1 -0
- package/dist/api/loader/nodeset_image_store.d.ts.map +1 -0
- package/dist/api/loader/nodeset_image_store.js +5 -11
- package/dist/api/loader/nodeset_image_store.js.map +1 -1
- package/dist/api/loader/nodeset_record.d.ts +1 -0
- package/dist/api/loader/nodeset_record.d.ts.map +1 -0
- package/dist/api/loader/nodeset_record.js +3 -7
- package/dist/api/loader/nodeset_record.js.map +1 -1
- package/dist/api/loader/nodeset_record_applier.d.ts +1 -0
- package/dist/api/loader/nodeset_record_applier.d.ts.map +1 -0
- package/dist/api/loader/nodeset_record_applier.js +89 -97
- package/dist/api/loader/nodeset_record_applier.js.map +1 -1
- package/dist/api/loader/nodeset_records_to_xml.d.ts +1 -0
- package/dist/api/loader/nodeset_records_to_xml.d.ts.map +1 -0
- package/dist/api/loader/nodeset_records_to_xml.js +82 -88
- package/dist/api/loader/nodeset_records_to_xml.js.map +1 -1
- package/dist/api/loader/nodeset_source.d.ts +1 -0
- package/dist/api/loader/nodeset_source.d.ts.map +1 -0
- package/dist/api/loader/nodeset_source.js +14 -21
- package/dist/api/loader/nodeset_source.js.map +1 -1
- package/dist/api/loader/nodeset_source_helpers.d.ts +1 -0
- package/dist/api/loader/nodeset_source_helpers.d.ts.map +1 -0
- package/dist/api/loader/nodeset_source_helpers.js +2 -6
- package/dist/api/loader/nodeset_source_helpers.js.map +1 -1
- package/dist/api/loader/nodeset_to_image.d.ts +1 -0
- package/dist/api/loader/nodeset_to_image.d.ts.map +1 -0
- package/dist/api/loader/nodeset_to_image.js +12 -15
- package/dist/api/loader/nodeset_to_image.js.map +1 -1
- package/dist/api/loader/nodeset_xml_header.d.ts +1 -0
- package/dist/api/loader/nodeset_xml_header.d.ts.map +1 -0
- package/dist/api/loader/nodeset_xml_header.js +9 -14
- package/dist/api/loader/nodeset_xml_header.js.map +1 -1
- package/dist/api/loader/nodeset_xml_primitives.d.ts +1 -0
- package/dist/api/loader/nodeset_xml_primitives.d.ts.map +1 -0
- package/dist/api/loader/nodeset_xml_primitives.js +32 -53
- package/dist/api/loader/nodeset_xml_primitives.js.map +1 -1
- package/dist/api/loader/nodeset_xml_producer.d.ts +1 -0
- package/dist/api/loader/nodeset_xml_producer.d.ts.map +1 -0
- package/dist/api/loader/nodeset_xml_producer.js +49 -51
- package/dist/api/loader/nodeset_xml_producer.js.map +1 -1
- package/dist/api/loader/parsers/extension_object_parser.d.ts +1 -0
- package/dist/api/loader/parsers/extension_object_parser.d.ts.map +1 -0
- package/dist/api/loader/parsers/extension_object_parser.js +49 -57
- package/dist/api/loader/parsers/extension_object_parser.js.map +1 -1
- package/dist/api/loader/parsers/localized_text_parser.d.ts +1 -0
- package/dist/api/loader/parsers/localized_text_parser.d.ts.map +1 -0
- package/dist/api/loader/parsers/localized_text_parser.js +3 -6
- package/dist/api/loader/parsers/localized_text_parser.js.map +1 -1
- package/dist/api/loader/parsers/nodeid_parser.d.ts +1 -0
- package/dist/api/loader/parsers/nodeid_parser.d.ts.map +1 -0
- package/dist/api/loader/parsers/nodeid_parser.js +3 -7
- package/dist/api/loader/parsers/nodeid_parser.js.map +1 -1
- package/dist/api/loader/parsers/qualified_name_parser.d.ts +1 -0
- package/dist/api/loader/parsers/qualified_name_parser.d.ts.map +1 -0
- package/dist/api/loader/parsers/qualified_name_parser.js +5 -9
- package/dist/api/loader/parsers/qualified_name_parser.js.map +1 -1
- package/dist/api/loader/parsers/variant_parser.d.ts +1 -0
- package/dist/api/loader/parsers/variant_parser.d.ts.map +1 -0
- package/dist/api/loader/parsers/variant_parser.js +59 -63
- package/dist/api/loader/parsers/variant_parser.js.map +1 -1
- package/dist/api/loader/register_node_promoter.d.ts +10 -1
- package/dist/api/loader/register_node_promoter.d.ts.map +1 -0
- package/dist/api/loader/register_node_promoter.js +11 -7
- package/dist/api/loader/register_node_promoter.js.map +1 -1
- package/dist/api/namespace.d.ts +1 -0
- package/dist/api/namespace.d.ts.map +1 -0
- package/dist/api/namespace.js +1 -2
- package/dist/api/namespace_alarm_and_condition.d.ts +1 -0
- package/dist/api/namespace_alarm_and_condition.d.ts.map +1 -0
- package/dist/api/namespace_alarm_and_condition.js +1 -2
- package/dist/api/namespace_data_access.d.ts +1 -0
- package/dist/api/namespace_data_access.d.ts.map +1 -0
- package/dist/api/namespace_data_access.js +1 -2
- package/dist/api/namespace_machine_state.d.ts +1 -0
- package/dist/api/namespace_machine_state.d.ts.map +1 -0
- package/dist/api/namespace_machine_state.js +1 -2
- package/dist/api/namespace_of.d.ts +1 -0
- package/dist/api/namespace_of.d.ts.map +1 -0
- package/dist/api/namespace_of.js +1 -4
- package/dist/api/namespace_of.js.map +1 -1
- package/dist/api/pseudo_session.d.ts +1 -0
- package/dist/api/pseudo_session.d.ts.map +1 -0
- package/dist/api/pseudo_session.js +56 -62
- package/dist/api/pseudo_session.js.map +1 -1
- package/dist/api/session_context.d.ts +1 -0
- package/dist/api/session_context.d.ts.map +1 -0
- package/dist/api/session_context.js +60 -68
- package/dist/api/session_context.js.map +1 -1
- package/dist/api/set_namespace_meta_data.d.ts +1 -0
- package/dist/api/set_namespace_meta_data.d.ts.map +1 -0
- package/dist/api/set_namespace_meta_data.js +10 -13
- package/dist/api/set_namespace_meta_data.js.map +1 -1
- package/dist/api/ua_addin.d.ts +1 -0
- package/dist/api/ua_addin.d.ts.map +1 -0
- package/dist/api/ua_addin.js +9 -13
- package/dist/api/ua_addin.js.map +1 -1
- package/dist/api/ua_interface.d.ts +1 -0
- package/dist/api/ua_interface.d.ts.map +1 -0
- package/dist/api/ua_interface.js +5 -8
- package/dist/api/ua_interface.js.map +1 -1
- package/dist/api/ua_root_folder.d.ts +1 -0
- package/dist/api/ua_root_folder.d.ts.map +1 -0
- package/dist/api/ua_root_folder.js +1 -2
- package/dist/api/ua_two_state_variable_ex.d.ts +1 -0
- package/dist/api/ua_two_state_variable_ex.d.ts.map +1 -0
- package/dist/api/ua_two_state_variable_ex.js +1 -2
- package/dist/api/xml_writer.d.ts +1 -0
- package/dist/api/xml_writer.d.ts.map +1 -0
- package/dist/api/xml_writer.js +1 -2
- package/dist/impl/_instantiate_helpers.d.ts +1 -0
- package/dist/impl/_instantiate_helpers.d.ts.map +1 -0
- package/dist/impl/_instantiate_helpers.js +25 -31
- package/dist/impl/_instantiate_helpers.js.map +1 -1
- package/dist/impl/_mandatory_child_or_requested_optional_filter.d.ts +1 -0
- package/dist/impl/_mandatory_child_or_requested_optional_filter.d.ts.map +1 -0
- package/dist/impl/_mandatory_child_or_requested_optional_filter.js +16 -20
- package/dist/impl/_mandatory_child_or_requested_optional_filter.js.map +1 -1
- package/dist/impl/address_space.d.ts +40 -0
- package/dist/impl/address_space.d.ts.map +1 -0
- package/dist/impl/address_space.js +246 -189
- package/dist/impl/address_space.js.map +1 -1
- package/dist/impl/address_space_change_event_tools.d.ts +1 -0
- package/dist/impl/address_space_change_event_tools.d.ts.map +1 -0
- package/dist/impl/address_space_change_event_tools.js +31 -29
- package/dist/impl/address_space_change_event_tools.js.map +1 -1
- package/dist/impl/address_space_private.d.ts +2 -0
- package/dist/impl/address_space_private.d.ts.map +1 -0
- package/dist/impl/address_space_private.js +1 -2
- package/dist/impl/address_space_private.js.map +1 -1
- package/dist/impl/alarms_and_conditions/condition.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/condition.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/condition.js +1 -2
- package/dist/impl/alarms_and_conditions/condition.js.map +1 -1
- package/dist/impl/alarms_and_conditions/condition_info_impl.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/condition_info_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/condition_info_impl.js +3 -7
- package/dist/impl/alarms_and_conditions/condition_info_impl.js.map +1 -1
- package/dist/impl/alarms_and_conditions/condition_snapshot_impl.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/condition_snapshot_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/condition_snapshot_impl.js +77 -81
- package/dist/impl/alarms_and_conditions/condition_snapshot_impl.js.map +1 -1
- package/dist/impl/alarms_and_conditions/deviation_alarm_helper.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/deviation_alarm_helper.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/deviation_alarm_helper.js +17 -20
- package/dist/impl/alarms_and_conditions/deviation_alarm_helper.js.map +1 -1
- package/dist/impl/alarms_and_conditions/index.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/index.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/index.js +13 -29
- package/dist/impl/alarms_and_conditions/index.js.map +1 -1
- package/dist/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +60 -65
- package/dist/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
- package/dist/impl/alarms_and_conditions/ua_alarm_condition_impl.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/ua_alarm_condition_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_alarm_condition_impl.js +53 -59
- package/dist/impl/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
- package/dist/impl/alarms_and_conditions/ua_base_event_impl.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/ua_base_event_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_base_event_impl.js +12 -16
- package/dist/impl/alarms_and_conditions/ua_base_event_impl.js.map +1 -1
- package/dist/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +34 -39
- package/dist/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -1
- package/dist/impl/alarms_and_conditions/ua_condition_impl.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/ua_condition_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_condition_impl.js +140 -148
- package/dist/impl/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/impl/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/ua_discrete_alarm_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_discrete_alarm_impl.js +6 -10
- package/dist/impl/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
- package/dist/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +9 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +28 -22
- package/dist/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +3 -7
- package/dist/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -1
- package/dist/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +14 -18
- package/dist/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js +2 -6
- package/dist/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -1
- package/dist/impl/alarms_and_conditions/ua_limit_alarm_impl.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/ua_limit_alarm_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_limit_alarm_impl.js +35 -39
- package/dist/impl/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +9 -0
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +27 -21
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +27 -31
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/impl/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_off_normal_alarm_impl.js +18 -22
- package/dist/impl/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
- package/dist/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +1 -0
- package/dist/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +3 -7
- package/dist/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -1
- package/dist/impl/apply_condition_refresh.d.ts +1 -0
- package/dist/impl/apply_condition_refresh.d.ts.map +1 -0
- package/dist/impl/apply_condition_refresh.js +1 -4
- package/dist/impl/apply_condition_refresh.js.map +1 -1
- package/dist/impl/base_node_impl.d.ts +1 -0
- package/dist/impl/base_node_impl.d.ts.map +1 -0
- package/dist/impl/base_node_impl.js +279 -292
- package/dist/impl/base_node_impl.js.map +1 -1
- package/dist/impl/base_node_private.d.ts +1 -0
- package/dist/impl/base_node_private.d.ts.map +1 -0
- package/dist/impl/base_node_private.js +168 -199
- package/dist/impl/base_node_private.js.map +1 -1
- package/dist/impl/bulk_load_clock.d.ts +35 -0
- package/dist/impl/bulk_load_clock.d.ts.map +1 -0
- package/dist/impl/bulk_load_clock.js +58 -0
- package/dist/impl/bulk_load_clock.js.map +1 -0
- package/dist/impl/check_value_rank_compatibility.d.ts +1 -0
- package/dist/impl/check_value_rank_compatibility.d.ts.map +1 -0
- package/dist/impl/check_value_rank_compatibility.js +1 -4
- package/dist/impl/check_value_rank_compatibility.js.map +1 -1
- package/dist/impl/child_accessors.d.ts +1 -0
- package/dist/impl/child_accessors.d.ts.map +1 -0
- package/dist/impl/child_accessors.js +10 -20
- package/dist/impl/child_accessors.js.map +1 -1
- package/dist/impl/data_access/add_dataItem_stuff.d.ts +1 -0
- package/dist/impl/data_access/add_dataItem_stuff.d.ts.map +1 -0
- package/dist/impl/data_access/add_dataItem_stuff.js +6 -9
- package/dist/impl/data_access/add_dataItem_stuff.js.map +1 -1
- package/dist/impl/data_access/adjust_datavalue_status_code.d.ts +1 -0
- package/dist/impl/data_access/adjust_datavalue_status_code.d.ts.map +1 -0
- package/dist/impl/data_access/adjust_datavalue_status_code.js +9 -12
- package/dist/impl/data_access/adjust_datavalue_status_code.js.map +1 -1
- package/dist/impl/data_access/semantics_changed.d.ts +12 -0
- package/dist/impl/data_access/semantics_changed.d.ts.map +1 -0
- package/dist/impl/data_access/semantics_changed.js +44 -10
- package/dist/impl/data_access/semantics_changed.js.map +1 -1
- package/dist/impl/data_access/ua_multistate_discrete_impl.d.ts +2 -1
- package/dist/impl/data_access/ua_multistate_discrete_impl.d.ts.map +1 -0
- package/dist/impl/data_access/ua_multistate_discrete_impl.js +35 -41
- package/dist/impl/data_access/ua_multistate_discrete_impl.js.map +1 -1
- package/dist/impl/data_access/ua_multistate_value_discrete_impl.d.ts +1 -0
- package/dist/impl/data_access/ua_multistate_value_discrete_impl.d.ts.map +1 -0
- package/dist/impl/data_access/ua_multistate_value_discrete_impl.js +71 -78
- package/dist/impl/data_access/ua_multistate_value_discrete_impl.js.map +1 -1
- package/dist/impl/data_access/ua_two_state_discrete_impl.d.ts +1 -0
- package/dist/impl/data_access/ua_two_state_discrete_impl.d.ts.map +1 -0
- package/dist/impl/data_access/ua_two_state_discrete_impl.js +27 -36
- package/dist/impl/data_access/ua_two_state_discrete_impl.js.map +1 -1
- package/dist/impl/event_data.d.ts +1 -0
- package/dist/impl/event_data.d.ts.map +1 -0
- package/dist/impl/event_data.js +15 -19
- package/dist/impl/event_data.js.map +1 -1
- package/dist/impl/event_layout.d.ts +1 -0
- package/dist/impl/event_layout.d.ts.map +1 -0
- package/dist/impl/event_layout.js +12 -16
- package/dist/impl/event_layout.js.map +1 -1
- package/dist/impl/extension_object_array_node.d.ts +1 -0
- package/dist/impl/extension_object_array_node.d.ts.map +1 -0
- package/dist/impl/extension_object_array_node.js +47 -53
- package/dist/impl/extension_object_array_node.js.map +1 -1
- package/dist/impl/get_basic_datatype.d.ts +1 -0
- package/dist/impl/get_basic_datatype.d.ts.map +1 -0
- package/dist/impl/get_basic_datatype.js +6 -10
- package/dist/impl/get_basic_datatype.js.map +1 -1
- package/dist/impl/handle_hierarchy_parent.d.ts +1 -0
- package/dist/impl/handle_hierarchy_parent.d.ts.map +1 -0
- package/dist/impl/handle_hierarchy_parent.js +26 -30
- package/dist/impl/handle_hierarchy_parent.js.map +1 -1
- package/dist/impl/historical_access/address_space_historical_data_node.d.ts +1 -0
- package/dist/impl/historical_access/address_space_historical_data_node.d.ts.map +1 -0
- package/dist/impl/historical_access/address_space_historical_data_node.js +76 -84
- package/dist/impl/historical_access/address_space_historical_data_node.js.map +1 -1
- package/dist/impl/historical_access/read_processed_details_hook.d.ts +1 -0
- package/dist/impl/historical_access/read_processed_details_hook.d.ts.map +1 -0
- package/dist/impl/historical_access/read_processed_details_hook.js +1 -4
- package/dist/impl/historical_access/read_processed_details_hook.js.map +1 -1
- package/dist/impl/historizer_factory.d.ts +1 -0
- package/dist/impl/historizer_factory.d.ts.map +1 -0
- package/dist/impl/historizer_factory.js +1 -4
- package/dist/impl/historizer_factory.js.map +1 -1
- package/dist/impl/idx_iterator.d.ts +1 -0
- package/dist/impl/idx_iterator.d.ts.map +1 -0
- package/dist/impl/idx_iterator.js +1 -5
- package/dist/impl/idx_iterator.js.map +1 -1
- package/dist/impl/namespace_impl.d.ts +32 -0
- package/dist/impl/namespace_impl.d.ts.map +1 -0
- package/dist/impl/namespace_impl.js +418 -318
- package/dist/impl/namespace_impl.js.map +1 -1
- package/dist/impl/namespace_private.d.ts +3 -0
- package/dist/impl/namespace_private.d.ts.map +1 -0
- package/dist/impl/namespace_private.js +3 -6
- package/dist/impl/namespace_private.js.map +1 -1
- package/dist/impl/nodeid_manager.d.ts +16 -0
- package/dist/impl/nodeid_manager.d.ts.map +1 -0
- package/dist/impl/nodeid_manager.js +70 -46
- package/dist/impl/nodeid_manager.js.map +1 -1
- package/dist/impl/nodeset_tools/adjust_namespace_array.d.ts +1 -0
- package/dist/impl/nodeset_tools/adjust_namespace_array.d.ts.map +1 -0
- package/dist/impl/nodeset_tools/adjust_namespace_array.js +1 -4
- package/dist/impl/nodeset_tools/adjust_namespace_array.js.map +1 -1
- package/dist/impl/nodeset_tools/construct_namespace_dependency.d.ts +1 -0
- package/dist/impl/nodeset_tools/construct_namespace_dependency.d.ts.map +1 -0
- package/dist/impl/nodeset_tools/construct_namespace_dependency.js +28 -39
- package/dist/impl/nodeset_tools/construct_namespace_dependency.js.map +1 -1
- package/dist/impl/nodeset_tools/dump_to_bsd.d.ts +1 -0
- package/dist/impl/nodeset_tools/dump_to_bsd.d.ts.map +1 -0
- package/dist/impl/nodeset_tools/dump_to_bsd.js +14 -20
- package/dist/impl/nodeset_tools/dump_to_bsd.js.map +1 -1
- package/dist/impl/nodeset_tools/nodeset_to_records.d.ts +1 -0
- package/dist/impl/nodeset_tools/nodeset_to_records.d.ts.map +1 -0
- package/dist/impl/nodeset_tools/nodeset_to_records.js +125 -139
- package/dist/impl/nodeset_tools/nodeset_to_records.js.map +1 -1
- package/dist/impl/nodeset_tools/nodeset_to_xml.d.ts +1 -0
- package/dist/impl/nodeset_tools/nodeset_to_xml.d.ts.map +1 -0
- package/dist/impl/nodeset_tools/nodeset_to_xml.js +190 -202
- package/dist/impl/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/impl/private_namespace.d.ts +1 -0
- package/dist/impl/private_namespace.d.ts.map +1 -0
- package/dist/impl/private_namespace.js +3 -8
- package/dist/impl/private_namespace.js.map +1 -1
- package/dist/impl/reference_impl.d.ts +1 -0
- package/dist/impl/reference_impl.d.ts.map +1 -0
- package/dist/impl/reference_impl.js +24 -37
- package/dist/impl/reference_impl.js.map +1 -1
- package/dist/impl/reference_type_version.d.ts +1 -0
- package/dist/impl/reference_type_version.d.ts.map +1 -0
- package/dist/impl/reference_type_version.js +2 -5
- package/dist/impl/reference_type_version.js.map +1 -1
- package/dist/impl/role_permissions.d.ts +1 -0
- package/dist/impl/role_permissions.d.ts.map +1 -0
- package/dist/impl/role_permissions.js +3 -6
- package/dist/impl/role_permissions.js.map +1 -1
- package/dist/impl/state_machine/finite_state_machine.d.ts +1 -0
- package/dist/impl/state_machine/finite_state_machine.d.ts.map +1 -0
- package/dist/impl/state_machine/finite_state_machine.js +123 -97
- package/dist/impl/state_machine/finite_state_machine.js.map +1 -1
- package/dist/impl/state_machine/ua_shelving_state_machine_ex.d.ts +1 -0
- package/dist/impl/state_machine/ua_shelving_state_machine_ex.d.ts.map +1 -0
- package/dist/impl/state_machine/ua_shelving_state_machine_ex.js +57 -62
- package/dist/impl/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
- package/dist/impl/state_machine/ua_two_state_variable.d.ts +1 -0
- package/dist/impl/state_machine/ua_two_state_variable.d.ts.map +1 -0
- package/dist/impl/state_machine/ua_two_state_variable.js +56 -63
- package/dist/impl/state_machine/ua_two_state_variable.js.map +1 -1
- package/dist/impl/tool_isSubtypeOf.d.ts +1 -0
- package/dist/impl/tool_isSubtypeOf.d.ts.map +1 -0
- package/dist/impl/tool_isSubtypeOf.js +27 -34
- package/dist/impl/tool_isSubtypeOf.js.map +1 -1
- package/dist/impl/ua_condition_type.d.ts +1 -0
- package/dist/impl/ua_condition_type.d.ts.map +1 -0
- package/dist/impl/ua_condition_type.js +1 -2
- package/dist/impl/ua_data_type_impl.d.ts +1 -0
- package/dist/impl/ua_data_type_impl.d.ts.map +1 -0
- package/dist/impl/ua_data_type_impl.js +99 -83
- package/dist/impl/ua_data_type_impl.js.map +1 -1
- package/dist/impl/ua_method_impl.d.ts +3 -2
- package/dist/impl/ua_method_impl.d.ts.map +1 -0
- package/dist/impl/ua_method_impl.js +74 -78
- package/dist/impl/ua_method_impl.js.map +1 -1
- package/dist/impl/ua_object_impl.d.ts +1 -0
- package/dist/impl/ua_object_impl.d.ts.map +1 -0
- package/dist/impl/ua_object_impl.js +48 -51
- package/dist/impl/ua_object_impl.js.map +1 -1
- package/dist/impl/ua_object_type_impl.d.ts +1 -0
- package/dist/impl/ua_object_type_impl.d.ts.map +1 -0
- package/dist/impl/ua_object_type_impl.js +36 -39
- package/dist/impl/ua_object_type_impl.js.map +1 -1
- package/dist/impl/ua_reference_type_impl.d.ts +2 -1
- package/dist/impl/ua_reference_type_impl.d.ts.map +1 -0
- package/dist/impl/ua_reference_type_impl.js +41 -45
- package/dist/impl/ua_reference_type_impl.js.map +1 -1
- package/dist/impl/ua_variable_impl.d.ts +1 -0
- package/dist/impl/ua_variable_impl.d.ts.map +1 -0
- package/dist/impl/ua_variable_impl.js +373 -376
- package/dist/impl/ua_variable_impl.js.map +1 -1
- package/dist/impl/ua_variable_impl_ext_obj.d.ts +1 -0
- package/dist/impl/ua_variable_impl_ext_obj.d.ts.map +1 -0
- package/dist/impl/ua_variable_impl_ext_obj.js +79 -97
- package/dist/impl/ua_variable_impl_ext_obj.js.map +1 -1
- package/dist/impl/ua_variable_type_impl.d.ts +1 -0
- package/dist/impl/ua_variable_type_impl.d.ts.map +1 -0
- package/dist/impl/ua_variable_type_impl.js +78 -84
- package/dist/impl/ua_variable_type_impl.js.map +1 -1
- package/dist/impl/ua_view_impl.d.ts +1 -0
- package/dist/impl/ua_view_impl.d.ts.map +1 -0
- package/dist/impl/ua_view_impl.js +18 -22
- package/dist/impl/ua_view_impl.js.map +1 -1
- package/dist/impl/validate_data_type_correctness.d.ts +1 -0
- package/dist/impl/validate_data_type_correctness.d.ts.map +1 -0
- package/dist/impl/validate_data_type_correctness.js +24 -30
- package/dist/impl/validate_data_type_correctness.js.map +1 -1
- package/dist/tsconfig_base.tsbuildinfo +1 -1
- package/distHelpers/add_event_generator_object.d.ts +1 -0
- package/distHelpers/add_event_generator_object.d.ts.map +1 -0
- package/distHelpers/add_event_generator_object.js +8 -11
- package/distHelpers/add_event_generator_object.js.map +1 -1
- package/distHelpers/address_space_digest.d.ts +1 -0
- package/distHelpers/address_space_digest.d.ts.map +1 -0
- package/distHelpers/address_space_digest.js +1 -5
- package/distHelpers/address_space_digest.js.map +1 -1
- package/distHelpers/alarms_and_conditions_demo.d.ts +1 -0
- package/distHelpers/alarms_and_conditions_demo.d.ts.map +1 -0
- package/distHelpers/alarms_and_conditions_demo.js +8 -11
- package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
- package/distHelpers/assertHasMatchingReference.d.ts +1 -0
- package/distHelpers/assertHasMatchingReference.d.ts.map +1 -0
- package/distHelpers/assertHasMatchingReference.js +6 -9
- package/distHelpers/assertHasMatchingReference.js.map +1 -1
- package/distHelpers/boiler_system.d.ts +1 -0
- package/distHelpers/boiler_system.d.ts.map +1 -0
- package/distHelpers/boiler_system.js +36 -40
- package/distHelpers/boiler_system.js.map +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.d.ts +1 -0
- package/distHelpers/create_minimalist_address_space_nodeset.d.ts.map +1 -0
- package/distHelpers/create_minimalist_address_space_nodeset.js +29 -35
- package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -1
- package/distHelpers/date_utils.d.ts +1 -0
- package/distHelpers/date_utils.d.ts.map +1 -0
- package/distHelpers/date_utils.js +1 -4
- package/distHelpers/date_utils.js.map +1 -1
- package/distHelpers/dump_statemachine.d.ts +1 -0
- package/distHelpers/dump_statemachine.d.ts.map +1 -0
- package/distHelpers/dump_statemachine.js +1 -2
- package/distHelpers/dump_statemachine.js.map +1 -1
- package/distHelpers/get_address_space_fixture.d.ts +1 -0
- package/distHelpers/get_address_space_fixture.d.ts.map +1 -0
- package/distHelpers/get_address_space_fixture.js +12 -18
- package/distHelpers/get_address_space_fixture.js.map +1 -1
- package/distHelpers/get_mini_address_space.d.ts +1 -0
- package/distHelpers/get_mini_address_space.d.ts.map +1 -0
- package/distHelpers/get_mini_address_space.js +12 -18
- package/distHelpers/get_mini_address_space.js.map +1 -1
- package/distHelpers/index.d.ts +1 -0
- package/distHelpers/index.d.ts.map +1 -0
- package/distHelpers/index.js +10 -26
- package/distHelpers/index.js.map +1 -1
- package/distHelpers/mock_session.d.ts +1 -0
- package/distHelpers/mock_session.d.ts.map +1 -0
- package/distHelpers/mock_session.js +11 -16
- package/distHelpers/mock_session.js.map +1 -1
- package/distNodeJS/address_space_digest.d.ts +1 -0
- package/distNodeJS/address_space_digest.d.ts.map +1 -0
- package/distNodeJS/address_space_digest.js +3 -6
- package/distNodeJS/address_space_digest.js.map +1 -1
- package/distNodeJS/generate_address_space.d.ts +1 -0
- package/distNodeJS/generate_address_space.d.ts.map +1 -0
- package/distNodeJS/generate_address_space.js +67 -97
- package/distNodeJS/generate_address_space.js.map +1 -1
- package/distNodeJS/index.d.ts +1 -0
- package/distNodeJS/index.d.ts.map +1 -0
- package/distNodeJS/index.js +3 -19
- package/distNodeJS/index.js.map +1 -1
- package/distNodeJS/nodeset_image_file_store.d.ts +1 -0
- package/distNodeJS/nodeset_image_file_store.d.ts.map +1 -0
- package/distNodeJS/nodeset_image_file_store.js +20 -28
- package/distNodeJS/nodeset_image_file_store.js.map +1 -1
- package/impl/_mandatory_child_or_requested_optional_filter.ts +3 -3
- package/impl/address_space.ts +75 -6
- package/impl/address_space_change_event_tools.ts +7 -0
- package/impl/address_space_private.ts +1 -0
- package/impl/alarms_and_conditions/condition_snapshot_impl.ts +1 -1
- package/impl/alarms_and_conditions/deviation_alarm_helper.ts +3 -0
- package/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +1 -1
- package/impl/alarms_and_conditions/ua_alarm_condition_impl.ts +1 -1
- package/impl/alarms_and_conditions/ua_condition_impl.ts +1 -1
- package/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +12 -1
- package/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +12 -1
- package/impl/bulk_load_clock.ts +65 -0
- package/impl/data_access/semantics_changed.ts +39 -1
- package/impl/data_access/ua_multistate_discrete_impl.ts +1 -1
- package/impl/extension_object_array_node.ts +5 -5
- package/impl/historical_access/address_space_historical_data_node.ts +2 -2
- package/impl/namespace_impl.ts +119 -2
- package/impl/namespace_private.ts +3 -0
- package/impl/nodeid_manager.ts +40 -5
- package/impl/nodeset_tools/construct_namespace_dependency.ts +4 -4
- package/impl/nodeset_tools/dump_to_bsd.ts +1 -1
- package/impl/nodeset_tools/nodeset_to_xml.ts +1 -1
- package/impl/state_machine/finite_state_machine.ts +56 -10
- package/impl/state_machine/ua_shelving_state_machine_ex.ts +1 -1
- package/impl/state_machine/ua_two_state_variable.ts +1 -1
- package/impl/tool_isSubtypeOf.ts +1 -1
- package/impl/ua_data_type_impl.ts +26 -5
- package/impl/ua_method_impl.ts +10 -6
- package/impl/ua_object_impl.ts +6 -2
- package/impl/ua_object_type_impl.ts +1 -0
- package/impl/ua_variable_impl.ts +15 -8
- package/impl/ua_variable_type_impl.ts +4 -3
- package/nodeJS.d.ts +1 -1
- package/nodeJS.js +1 -1
- package/package.json +42 -41
- package/source_nodejs/generate_address_space.ts +31 -14
- package/testHelpers.d.ts +1 -1
- package/testHelpers.js +1 -1
- /package/bin/{nodeset_tool_common.js → nodeset_tool_common.cjs} +0 -0
|
@@ -1,91 +1,85 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* @module node-opcua-address-space
|
|
4
3
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const add_dataItem_stuff_js_1 = require("./data_access/add_dataItem_stuff.js");
|
|
32
|
-
const ua_multistate_discrete_impl_js_1 = require("./data_access/ua_multistate_discrete_impl.js");
|
|
33
|
-
const ua_multistate_value_discrete_impl_js_1 = require("./data_access/ua_multistate_value_discrete_impl.js");
|
|
34
|
-
const ua_two_state_discrete_impl_js_1 = require("./data_access/ua_two_state_discrete_impl.js");
|
|
35
|
-
const handle_hierarchy_parent_js_1 = require("./handle_hierarchy_parent.js");
|
|
4
|
+
import chalk from "chalk";
|
|
5
|
+
import { assert } from "node-opcua-assert";
|
|
6
|
+
import { coerceInt64 } from "node-opcua-basic-types";
|
|
7
|
+
import { AxisScaleEnumeration } from "node-opcua-data-access";
|
|
8
|
+
import { AccessRestrictionsFlag, BrowseDirection, coerceLocalizedText, coerceQualifiedName, NodeClass, QualifiedName } from "node-opcua-data-model";
|
|
9
|
+
import { dumpIf, make_errorLog, make_warningLog } from "node-opcua-debug";
|
|
10
|
+
import { coerceNodeId, NodeId, NodeIdType, resolveNodeId, sameNodeId } from "node-opcua-nodeid";
|
|
11
|
+
import { StatusCodes } from "node-opcua-status-code";
|
|
12
|
+
import { Argument, AxisInformation, EnumDefinition, EnumField, EnumValueType, EUInformation, Range } from "node-opcua-types";
|
|
13
|
+
import { isNullOrUndefined } from "node-opcua-utils";
|
|
14
|
+
import { DataType, Variant, VariantArrayType, verifyRankAndDimensions } from "node-opcua-variant";
|
|
15
|
+
import { _handle_delete_node_model_change_event, _handle_model_change_event } from "./address_space_change_event_tools.js";
|
|
16
|
+
import { UAAcknowledgeableConditionImplBase, UAAlarmConditionImplBase, UAConditionImplBase, UADiscreteAlarmImplBase } from "./alarms_and_conditions/index.js";
|
|
17
|
+
import { UAExclusiveDeviationAlarmImplBase } from "./alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js";
|
|
18
|
+
import { UAExclusiveLimitAlarmImplBase } from "./alarms_and_conditions/ua_exclusive_limit_alarm_impl.js";
|
|
19
|
+
import { UALimitAlarmImplBase } from "./alarms_and_conditions/ua_limit_alarm_impl.js";
|
|
20
|
+
import { UANonExclusiveDeviationAlarmImplBase } from "./alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js";
|
|
21
|
+
import { UANonExclusiveLimitAlarmImplBase } from "./alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js";
|
|
22
|
+
import { UAOffNormalAlarmImplBase } from "./alarms_and_conditions/ua_off_normal_alarm_impl.js";
|
|
23
|
+
import { BaseNodeImpl } from "./base_node_impl.js";
|
|
24
|
+
import { BaseNode_getPrivate } from "./base_node_private.js";
|
|
25
|
+
import { add_dataItem_stuff } from "./data_access/add_dataItem_stuff.js";
|
|
26
|
+
import { _addMultiStateDiscrete } from "./data_access/ua_multistate_discrete_impl.js";
|
|
27
|
+
import { _addMultiStateValueDiscrete } from "./data_access/ua_multistate_value_discrete_impl.js";
|
|
28
|
+
import { _addTwoStateDiscrete } from "./data_access/ua_two_state_discrete_impl.js";
|
|
29
|
+
import { _coerce_parent, _handle_hierarchy_parent } from "./handle_hierarchy_parent.js";
|
|
36
30
|
//
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
import { UANamespace_process_modelling_rule } from "./namespace_private.js";
|
|
32
|
+
import { NodeIdManager } from "./nodeid_manager.js";
|
|
33
|
+
import { coerceRolePermissions } from "./role_permissions.js";
|
|
40
34
|
// state machine
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
35
|
+
import { _addTwoStateVariable } from "./state_machine/ua_two_state_variable.js";
|
|
36
|
+
import { UADataTypeImpl } from "./ua_data_type_impl.js";
|
|
37
|
+
import { UAMethodImpl } from "./ua_method_impl.js";
|
|
38
|
+
import { UAObjectImpl } from "./ua_object_impl.js";
|
|
39
|
+
import { UAObjectTypeImpl } from "./ua_object_type_impl.js";
|
|
40
|
+
import { UAReferenceTypeImpl } from "./ua_reference_type_impl.js";
|
|
41
|
+
import { UAVariableImpl } from "./ua_variable_impl.js";
|
|
42
|
+
import { UAVariableTypeImpl } from "./ua_variable_type_impl.js";
|
|
43
|
+
import { UAViewImpl } from "./ua_view_impl.js";
|
|
50
44
|
function _makeHashKey(nodeId) {
|
|
51
45
|
switch (nodeId.identifierType) {
|
|
52
|
-
case
|
|
53
|
-
case
|
|
46
|
+
case NodeIdType.STRING:
|
|
47
|
+
case NodeIdType.GUID:
|
|
54
48
|
return nodeId.value;
|
|
55
|
-
case
|
|
49
|
+
case NodeIdType.NUMERIC:
|
|
56
50
|
return nodeId.value;
|
|
57
51
|
default:
|
|
58
|
-
|
|
59
|
-
if (nodeId.identifierType !==
|
|
52
|
+
/* c8 ignore next */
|
|
53
|
+
if (nodeId.identifierType !== NodeIdType.BYTESTRING) {
|
|
60
54
|
throw new Error("invalid nodeIdType");
|
|
61
55
|
}
|
|
62
56
|
return nodeId.value ? nodeId.value.toString() : "OPAQUE:0";
|
|
63
57
|
}
|
|
64
58
|
}
|
|
65
59
|
const doDebug = false;
|
|
66
|
-
const errorLog =
|
|
67
|
-
const warningLog =
|
|
60
|
+
const errorLog = make_errorLog("AddressSpace");
|
|
61
|
+
const warningLog = make_warningLog("AddressSpace");
|
|
68
62
|
const regExp1 = /^(s|i|b|g)=/;
|
|
69
63
|
const regExpNamespaceDotBrowseName = /^[0-9]+:(.*)/;
|
|
70
64
|
function detachNode(node) {
|
|
71
65
|
const addressSpace = node.addressSpace;
|
|
72
|
-
const nonHierarchicalReferences = node.findReferencesEx("NonHierarchicalReferences",
|
|
66
|
+
const nonHierarchicalReferences = node.findReferencesEx("NonHierarchicalReferences", BrowseDirection.Inverse);
|
|
73
67
|
for (const ref of nonHierarchicalReferences) {
|
|
74
|
-
|
|
68
|
+
assert(!ref.isForward);
|
|
75
69
|
ref.node?.removeReference({
|
|
76
70
|
isForward: !ref.isForward,
|
|
77
71
|
nodeId: node.nodeId,
|
|
78
72
|
referenceType: ref.referenceType
|
|
79
73
|
});
|
|
80
74
|
}
|
|
81
|
-
const nonHierarchicalReferencesF = node.findReferencesEx("NonHierarchicalReferences",
|
|
75
|
+
const nonHierarchicalReferencesF = node.findReferencesEx("NonHierarchicalReferences", BrowseDirection.Forward);
|
|
82
76
|
for (const ref of nonHierarchicalReferencesF) {
|
|
83
77
|
if (!ref.node) {
|
|
84
78
|
// could be a special case of a frequently use target node such as ModellingRule_Mandatory that do not back trace
|
|
85
79
|
// their reference
|
|
86
80
|
continue;
|
|
87
81
|
}
|
|
88
|
-
|
|
82
|
+
assert(ref.isForward);
|
|
89
83
|
ref.node?.removeReference({
|
|
90
84
|
isForward: !ref.isForward,
|
|
91
85
|
nodeId: node.nodeId,
|
|
@@ -93,9 +87,9 @@ function detachNode(node) {
|
|
|
93
87
|
});
|
|
94
88
|
}
|
|
95
89
|
// remove reversed Hierarchical references
|
|
96
|
-
const hierarchicalReferences = node.findReferencesEx("HierarchicalReferences",
|
|
90
|
+
const hierarchicalReferences = node.findReferencesEx("HierarchicalReferences", BrowseDirection.Inverse);
|
|
97
91
|
for (const ref of hierarchicalReferences) {
|
|
98
|
-
|
|
92
|
+
assert(!ref.isForward);
|
|
99
93
|
const parent = addressSpace.findNode(ref.nodeId);
|
|
100
94
|
parent.removeReference({
|
|
101
95
|
isForward: !ref.isForward,
|
|
@@ -109,14 +103,14 @@ function toNodeId(nodeId) {
|
|
|
109
103
|
if (!nodeId) {
|
|
110
104
|
return undefined;
|
|
111
105
|
}
|
|
112
|
-
if (nodeId instanceof
|
|
106
|
+
if (nodeId instanceof NodeId) {
|
|
113
107
|
return nodeId;
|
|
114
108
|
}
|
|
115
109
|
if (typeof nodeId === "string") {
|
|
116
|
-
return
|
|
110
|
+
return coerceNodeId(nodeId);
|
|
117
111
|
}
|
|
118
112
|
if (typeof nodeId === "number") {
|
|
119
|
-
return
|
|
113
|
+
return coerceNodeId(nodeId);
|
|
120
114
|
}
|
|
121
115
|
return nodeId.nodeId;
|
|
122
116
|
}
|
|
@@ -132,8 +126,8 @@ function toNodeId(nodeId) {
|
|
|
132
126
|
*
|
|
133
127
|
* @internal
|
|
134
128
|
*/
|
|
135
|
-
class NamespaceImpl {
|
|
136
|
-
static _handle_hierarchy_parent =
|
|
129
|
+
export class NamespaceImpl {
|
|
130
|
+
static _handle_hierarchy_parent = _handle_hierarchy_parent;
|
|
137
131
|
static isNonEmptyQualifiedName = isNonEmptyQualifiedName;
|
|
138
132
|
namespaceUri;
|
|
139
133
|
addressSpace;
|
|
@@ -154,7 +148,7 @@ class NamespaceImpl {
|
|
|
154
148
|
defaultAccessRestrictions;
|
|
155
149
|
defaultRolePermissions;
|
|
156
150
|
constructor(options) {
|
|
157
|
-
|
|
151
|
+
/* c8 ignore next */
|
|
158
152
|
if (!(typeof options.namespaceUri === "string")) {
|
|
159
153
|
throw new Error(`NamespaceImpl constructor: namespaceUri must exists and be a string : got ${options.namespaceUri}`);
|
|
160
154
|
}
|
|
@@ -176,7 +170,7 @@ class NamespaceImpl {
|
|
|
176
170
|
this._referenceTypeMap = new Map();
|
|
177
171
|
this._referenceTypeMapInv = new Map();
|
|
178
172
|
this._dataTypeMap = new Map();
|
|
179
|
-
this._nodeIdManager = new
|
|
173
|
+
this._nodeIdManager = new NodeIdManager(this.index, this.addressSpace);
|
|
180
174
|
}
|
|
181
175
|
getDefaultNamespace() {
|
|
182
176
|
return this.index === 0 ? this : this.addressSpace.getDefaultNamespace();
|
|
@@ -278,7 +272,7 @@ class NamespaceImpl {
|
|
|
278
272
|
}
|
|
279
273
|
findNode2(nodeId) {
|
|
280
274
|
// this one is faster assuming you have a nodeId
|
|
281
|
-
|
|
275
|
+
assert(nodeId.namespace === this.index);
|
|
282
276
|
return this._nodeid_index.get(_makeHashKey(nodeId)) || null;
|
|
283
277
|
}
|
|
284
278
|
findNode(nodeId) {
|
|
@@ -287,7 +281,7 @@ class NamespaceImpl {
|
|
|
287
281
|
nodeId = `ns=${this.index};${nodeId}`;
|
|
288
282
|
}
|
|
289
283
|
}
|
|
290
|
-
nodeId =
|
|
284
|
+
nodeId = resolveNodeId(nodeId);
|
|
291
285
|
return this.findNode2(nodeId);
|
|
292
286
|
}
|
|
293
287
|
/**
|
|
@@ -329,9 +323,9 @@ class NamespaceImpl {
|
|
|
329
323
|
* @return {ReferenceType}
|
|
330
324
|
*/
|
|
331
325
|
findReferenceTypeFromInverseName(inverseName) {
|
|
332
|
-
|
|
326
|
+
assert(typeof inverseName === "string");
|
|
333
327
|
const node = this._referenceTypeMapInv.get(inverseName);
|
|
334
|
-
|
|
328
|
+
assert(!node || (node.nodeClass === NodeClass.ReferenceType && node.inverseName.text === inverseName));
|
|
335
329
|
return node ? node : null;
|
|
336
330
|
}
|
|
337
331
|
/**
|
|
@@ -341,9 +335,9 @@ class NamespaceImpl {
|
|
|
341
335
|
* @param nodeId {NodeId} NodeId must belong to this namespace
|
|
342
336
|
*/
|
|
343
337
|
addAlias(alias_name, nodeId) {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
338
|
+
assert(typeof alias_name === "string");
|
|
339
|
+
assert(nodeId instanceof NodeId);
|
|
340
|
+
assert(nodeId.namespace === this.index);
|
|
347
341
|
this._aliases.set(alias_name, nodeId);
|
|
348
342
|
}
|
|
349
343
|
resolveAlias(name) {
|
|
@@ -364,10 +358,10 @@ class NamespaceImpl {
|
|
|
364
358
|
*
|
|
365
359
|
*/
|
|
366
360
|
addObjectType(options) {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
return this._addObjectOrVariableType(options, "BaseObjectType",
|
|
361
|
+
assert(!Object.hasOwn(options, "dataType"), "an objectType should not have a dataType");
|
|
362
|
+
assert(!Object.hasOwn(options, "valueRank"), "an objectType should not have a valueRank");
|
|
363
|
+
assert(!Object.hasOwn(options, "arrayDimensions"), "an objectType should not have a arrayDimensions");
|
|
364
|
+
return this._addObjectOrVariableType(options, "BaseObjectType", NodeClass.ObjectType);
|
|
371
365
|
}
|
|
372
366
|
/**
|
|
373
367
|
* add a new Variable type to the address space
|
|
@@ -385,14 +379,14 @@ class NamespaceImpl {
|
|
|
385
379
|
*
|
|
386
380
|
*/
|
|
387
381
|
addVariableType(options) {
|
|
388
|
-
|
|
382
|
+
assert(!Object.hasOwn(options, "arrayDimension"), "Do you mean ArrayDimensions ?");
|
|
389
383
|
// dataType
|
|
390
384
|
options.dataType = options.dataType || "Int32";
|
|
391
385
|
options.dataType = this.addressSpace._coerce_DataType(options.dataType);
|
|
392
386
|
// valueRank/ arrayDimensions
|
|
393
|
-
|
|
387
|
+
verifyRankAndDimensions(options);
|
|
394
388
|
// arrayDimensions
|
|
395
|
-
const variableType = this._addObjectOrVariableType(options, "BaseVariableType",
|
|
389
|
+
const variableType = this._addObjectOrVariableType(options, "BaseVariableType", NodeClass.VariableType);
|
|
396
390
|
variableType.dataType = options.dataType;
|
|
397
391
|
variableType.valueRank = options.valueRank || 0;
|
|
398
392
|
variableType.arrayDimensions = options.arrayDimensions || [];
|
|
@@ -403,19 +397,19 @@ class NamespaceImpl {
|
|
|
403
397
|
*/
|
|
404
398
|
addVariable(options) {
|
|
405
399
|
if (Object.hasOwn(options, "propertyOf") && options.propertyOf) {
|
|
406
|
-
|
|
400
|
+
assert(!options.typeDefinition || options.typeDefinition === "PropertyType");
|
|
407
401
|
options.typeDefinition = options.typeDefinition || "PropertyType";
|
|
408
402
|
}
|
|
409
403
|
else {
|
|
410
|
-
|
|
404
|
+
assert(!options.typeDefinition || options.typeDefinition !== "PropertyType");
|
|
411
405
|
}
|
|
412
406
|
return this._addVariable(options);
|
|
413
407
|
}
|
|
414
408
|
addView(options) {
|
|
415
|
-
|
|
416
|
-
|
|
409
|
+
assert(Object.hasOwn(options, "browseName"));
|
|
410
|
+
assert(Object.hasOwn(options, "organizedBy"));
|
|
417
411
|
const browseName = options.browseName;
|
|
418
|
-
|
|
412
|
+
assert(typeof browseName === "string");
|
|
419
413
|
const addressSpace = this.addressSpace;
|
|
420
414
|
const baseDataVariableTypeId = addressSpace.findVariableType("BaseDataVariableType")?.nodeId;
|
|
421
415
|
// ------------------------------------------ TypeDefinition
|
|
@@ -423,28 +417,28 @@ class NamespaceImpl {
|
|
|
423
417
|
options.references = options.references || [];
|
|
424
418
|
options.references.push({
|
|
425
419
|
isForward: true,
|
|
426
|
-
nodeId: toNodeId(_typeDefinition) ||
|
|
420
|
+
nodeId: toNodeId(_typeDefinition) || NodeId.nullNodeId,
|
|
427
421
|
referenceType: "HasTypeDefinition"
|
|
428
422
|
});
|
|
429
423
|
const createOptions = options;
|
|
430
|
-
|
|
431
|
-
createOptions.nodeClass =
|
|
424
|
+
assert(!createOptions.nodeClass);
|
|
425
|
+
createOptions.nodeClass = NodeClass.View;
|
|
432
426
|
const view = this.createNode(createOptions);
|
|
433
|
-
|
|
434
|
-
|
|
427
|
+
assert(view.nodeId instanceof NodeId);
|
|
428
|
+
assert(view.nodeClass === NodeClass.View);
|
|
435
429
|
return view;
|
|
436
430
|
}
|
|
437
431
|
addObject(options1) {
|
|
438
432
|
const options = options1;
|
|
439
|
-
|
|
440
|
-
options.nodeClass =
|
|
433
|
+
assert(!options.nodeClass || options.nodeClass === NodeClass.Object);
|
|
434
|
+
options.nodeClass = NodeClass.Object;
|
|
441
435
|
const typeDefinition = options.typeDefinition || "BaseObjectType";
|
|
442
436
|
options.references = options.references || [];
|
|
443
437
|
options.references.push({ referenceType: "HasTypeDefinition", isForward: true, nodeId: typeDefinition });
|
|
444
438
|
options.eventNotifier = +(options.eventNotifier || 0);
|
|
445
439
|
const obj = this.createNode(options);
|
|
446
|
-
|
|
447
|
-
|
|
440
|
+
assert(obj instanceof UAObjectImpl);
|
|
441
|
+
assert(obj.nodeClass === NodeClass.Object);
|
|
448
442
|
return obj;
|
|
449
443
|
}
|
|
450
444
|
/**
|
|
@@ -462,10 +456,10 @@ class NamespaceImpl {
|
|
|
462
456
|
options = { browseName: options };
|
|
463
457
|
}
|
|
464
458
|
const addressSpace = this.addressSpace;
|
|
465
|
-
|
|
459
|
+
assert(!options.typeDefinition, "addFolder does not expect typeDefinition to be defined ");
|
|
466
460
|
const typeDefinition = addressSpace._coerceTypeDefinition("FolderType");
|
|
467
461
|
parentFolder = addressSpace._coerceFolder(parentFolder);
|
|
468
|
-
options.nodeClass =
|
|
462
|
+
options.nodeClass = NodeClass.Object;
|
|
469
463
|
options.references = [
|
|
470
464
|
{ referenceType: "HasTypeDefinition", isForward: true, nodeId: typeDefinition },
|
|
471
465
|
{ referenceType: "Organizes", isForward: false, nodeId: parentFolder.nodeId }
|
|
@@ -483,12 +477,12 @@ class NamespaceImpl {
|
|
|
483
477
|
addReferenceType(options) {
|
|
484
478
|
const addressSpace = this.addressSpace;
|
|
485
479
|
const options1 = options;
|
|
486
|
-
options1.nodeClass =
|
|
480
|
+
options1.nodeClass = NodeClass.ReferenceType;
|
|
487
481
|
options1.references = options.references || [];
|
|
488
482
|
options1.nodeId = options.nodeId;
|
|
489
483
|
if (options.subtypeOf) {
|
|
490
|
-
const subtypeOfNodeId = addressSpace._coerceType(options.subtypeOf, "References",
|
|
491
|
-
|
|
484
|
+
const subtypeOfNodeId = addressSpace._coerceType(options.subtypeOf, "References", NodeClass.ReferenceType);
|
|
485
|
+
assert(subtypeOfNodeId);
|
|
492
486
|
options1.references.push({
|
|
493
487
|
isForward: false,
|
|
494
488
|
nodeId: subtypeOfNodeId,
|
|
@@ -505,17 +499,17 @@ class NamespaceImpl {
|
|
|
505
499
|
// compared with their parameters erased to constraints, so declaring the narrower one
|
|
506
500
|
// here makes this method fail to satisfy the very interface it implements
|
|
507
501
|
addMultiStateDiscrete(options) {
|
|
508
|
-
return
|
|
502
|
+
return _addMultiStateDiscrete(this, options);
|
|
509
503
|
}
|
|
510
504
|
/**
|
|
511
505
|
|
|
512
506
|
*/
|
|
513
507
|
createDataType(options) {
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
508
|
+
assert(Object.hasOwn(options, "isAbstract"), "must provide isAbstract");
|
|
509
|
+
assert(!Object.hasOwn(options, "nodeClass"));
|
|
510
|
+
assert(Object.hasOwn(options, "browseName"), "must provide a browseName");
|
|
517
511
|
const options1 = options;
|
|
518
|
-
options1.nodeClass =
|
|
512
|
+
options1.nodeClass = NodeClass.DataType;
|
|
519
513
|
options1.references = options.references || [];
|
|
520
514
|
if (options1.references.length === 0) {
|
|
521
515
|
if (!options1.subtypeOf) {
|
|
@@ -523,7 +517,7 @@ class NamespaceImpl {
|
|
|
523
517
|
}
|
|
524
518
|
}
|
|
525
519
|
if (options1.subtypeOf) {
|
|
526
|
-
if (!(options1.subtypeOf instanceof
|
|
520
|
+
if (!(options1.subtypeOf instanceof UADataTypeImpl)) {
|
|
527
521
|
options1.subtypeOf = this.addressSpace.findDataType(options1.subtypeOf);
|
|
528
522
|
}
|
|
529
523
|
if (!options1.subtypeOf) {
|
|
@@ -551,21 +545,21 @@ class NamespaceImpl {
|
|
|
551
545
|
let node = null;
|
|
552
546
|
const addressSpace = this.addressSpace;
|
|
553
547
|
addressSpace.modelChangeTransaction(() => {
|
|
554
|
-
|
|
548
|
+
assert(isNonEmptyQualifiedName(options.browseName));
|
|
555
549
|
// xx assert(Object.prototype.hasOwnProperty.call(options,"browseName") && options.browseName.length > 0);
|
|
556
|
-
|
|
550
|
+
assert(Object.hasOwn(options, "nodeClass"));
|
|
557
551
|
options.references = addressSpace.normalizeReferenceTypes(options.references);
|
|
558
552
|
const references = _copy_references(options.references);
|
|
559
|
-
|
|
553
|
+
_handle_hierarchy_parent(addressSpace, references, options);
|
|
560
554
|
_handle_event_hierarchy_parent(addressSpace, references, options);
|
|
561
|
-
|
|
555
|
+
UANamespace_process_modelling_rule(references, options.modellingRule);
|
|
562
556
|
options.references = references;
|
|
563
557
|
node = this.internalCreateNode(options);
|
|
564
|
-
|
|
558
|
+
assert(node.nodeId instanceof NodeId);
|
|
565
559
|
node.propagate_back_references();
|
|
566
560
|
node.install_extra_properties();
|
|
567
561
|
_create_node_version_if_needed(node, options);
|
|
568
|
-
|
|
562
|
+
_handle_model_change_event(node);
|
|
569
563
|
});
|
|
570
564
|
return node;
|
|
571
565
|
}
|
|
@@ -579,8 +573,8 @@ class NamespaceImpl {
|
|
|
579
573
|
*/
|
|
580
574
|
deleteNode(nodeOrNodeId) {
|
|
581
575
|
let node = null;
|
|
582
|
-
let nodeId = new
|
|
583
|
-
if (nodeOrNodeId instanceof
|
|
576
|
+
let nodeId = new NodeId();
|
|
577
|
+
if (nodeOrNodeId instanceof NodeId) {
|
|
584
578
|
nodeId = nodeOrNodeId;
|
|
585
579
|
node = this.findNode(nodeId);
|
|
586
580
|
// c8 ignore next
|
|
@@ -588,7 +582,7 @@ class NamespaceImpl {
|
|
|
588
582
|
throw new Error(` deleteNode : cannot find node with nodeId${nodeId.toString()}`);
|
|
589
583
|
}
|
|
590
584
|
}
|
|
591
|
-
else if (nodeOrNodeId instanceof
|
|
585
|
+
else if (nodeOrNodeId instanceof BaseNodeImpl) {
|
|
592
586
|
node = nodeOrNodeId;
|
|
593
587
|
nodeId = node.nodeId;
|
|
594
588
|
}
|
|
@@ -603,11 +597,11 @@ class NamespaceImpl {
|
|
|
603
597
|
throw new Error("this node doesn't belong to this namespace");
|
|
604
598
|
}
|
|
605
599
|
// notify parent that node is being removed
|
|
606
|
-
const hierarchicalReferences = node.findReferencesEx("HierarchicalReferences",
|
|
600
|
+
const hierarchicalReferences = node.findReferencesEx("HierarchicalReferences", BrowseDirection.Inverse);
|
|
607
601
|
for (const ref of hierarchicalReferences) {
|
|
608
|
-
|
|
602
|
+
assert(!ref.isForward);
|
|
609
603
|
const parent = addressSpace.findNode(ref.nodeId);
|
|
610
|
-
|
|
604
|
+
assert(parent);
|
|
611
605
|
parent._on_child_removed(node);
|
|
612
606
|
}
|
|
613
607
|
function deleteNodePointedByReference(ref) {
|
|
@@ -616,10 +610,10 @@ class NamespaceImpl {
|
|
|
616
610
|
}
|
|
617
611
|
// recursively delete all nodes below in the hierarchy of nodes
|
|
618
612
|
// TODO : a better idea would be to extract any references of type "HasChild"
|
|
619
|
-
const components = node.findReferencesEx("HasComponent",
|
|
620
|
-
const properties = node.findReferencesEx("HasProperty",
|
|
613
|
+
const components = node.findReferencesEx("HasComponent", BrowseDirection.Forward);
|
|
614
|
+
const properties = node.findReferencesEx("HasProperty", BrowseDirection.Forward);
|
|
621
615
|
// TODO: shall we delete nodes pointed by "Organizes" links here ?
|
|
622
|
-
const subFolders = node.findReferencesEx("Organizes",
|
|
616
|
+
const subFolders = node.findReferencesEx("Organizes", BrowseDirection.Forward);
|
|
623
617
|
for (const r of components) {
|
|
624
618
|
deleteNodePointedByReference(r);
|
|
625
619
|
}
|
|
@@ -629,13 +623,89 @@ class NamespaceImpl {
|
|
|
629
623
|
for (const r of subFolders) {
|
|
630
624
|
deleteNodePointedByReference(r);
|
|
631
625
|
}
|
|
632
|
-
|
|
626
|
+
_handle_delete_node_model_change_event(node);
|
|
633
627
|
detachNode(node);
|
|
634
628
|
// delete nodes from global index
|
|
635
629
|
const namespace = addressSpace.getNamespace(node.nodeId.namespace);
|
|
636
630
|
namespace._deleteNode(node);
|
|
637
631
|
});
|
|
638
632
|
}
|
|
633
|
+
/**
|
|
634
|
+
* Empty the namespace: every node it holds goes, and so does every reference that crossed
|
|
635
|
+
* between one of them and a node of another namespace. The namespace object itself survives,
|
|
636
|
+
* registered under the same index and uri, ready to be populated again - this is a recycle,
|
|
637
|
+
* not a {@link dispose}.
|
|
638
|
+
*
|
|
639
|
+
* Only the references that cross out are severed. A reference between two nodes of this
|
|
640
|
+
* namespace needs no work at all: both ends are about to be dropped and nothing outside will
|
|
641
|
+
* ever ask about them again. On a model grafted onto loaded base nodesets the crossing
|
|
642
|
+
* references are a small fraction of the total, which is what makes this cheaper than
|
|
643
|
+
* deleting the nodes one by one.
|
|
644
|
+
*
|
|
645
|
+
* @internal
|
|
646
|
+
*
|
|
647
|
+
* Callers want {@link IAddressSpace.deleteNamespace}: the rest of the operation - the single
|
|
648
|
+
* model-change transaction, the DataType factory of this namespace, the address space's set
|
|
649
|
+
* of historizing nodes - is address-space state that a namespace has no business reaching
|
|
650
|
+
* into.
|
|
651
|
+
*/
|
|
652
|
+
_deleteAllNodes() {
|
|
653
|
+
const addressSpace = this.addressSpace;
|
|
654
|
+
const index = this.index;
|
|
655
|
+
// a node deleted while someone watches for model changes still has to say so; the probe
|
|
656
|
+
// is skipped wholesale when nobody is listening (see AddressSpace#suspendModelChangeEvents)
|
|
657
|
+
for (const node of this._nodeid_index.values()) {
|
|
658
|
+
_handle_delete_node_model_change_event(node);
|
|
659
|
+
}
|
|
660
|
+
for (const node of this._nodeid_index.values()) {
|
|
661
|
+
const _private = BaseNode_getPrivate(node);
|
|
662
|
+
// snapshot first: removing the far end of a reference mutates this node's own indexes
|
|
663
|
+
const crossing = [];
|
|
664
|
+
for (const ref of _private._referenceIdx.values()) {
|
|
665
|
+
if (ref.nodeId.namespace !== index) {
|
|
666
|
+
crossing.push(ref);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
for (const ref of _private._back_referenceIdx.values()) {
|
|
670
|
+
if (ref.nodeId.namespace !== index) {
|
|
671
|
+
crossing.push(ref);
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
for (const ref of crossing) {
|
|
675
|
+
const other = addressSpace.findNode(ref.nodeId);
|
|
676
|
+
if (!other) {
|
|
677
|
+
// the other end was never there, or has gone already: nothing holds this
|
|
678
|
+
continue;
|
|
679
|
+
}
|
|
680
|
+
// removeReference copes with the reference being held by either end, and undoes
|
|
681
|
+
// the child accessor, the hierarchical index and the memoized scans on both
|
|
682
|
+
other.removeReference({
|
|
683
|
+
isForward: !ref.isForward,
|
|
684
|
+
nodeId: node.nodeId,
|
|
685
|
+
referenceType: ref.referenceType
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
for (const node of this._nodeid_index.values()) {
|
|
690
|
+
node.dispose();
|
|
691
|
+
}
|
|
692
|
+
// the per-node unregister of _deleteNode would walk every map entry; emptying them
|
|
693
|
+
// outright says the same thing and is what makes the namespace reusable
|
|
694
|
+
this._nodeid_index = new Map();
|
|
695
|
+
this._aliases = new Map();
|
|
696
|
+
this._objectTypeMap = new Map();
|
|
697
|
+
this._variableTypeMap = new Map();
|
|
698
|
+
this._referenceTypeMap = new Map();
|
|
699
|
+
this._referenceTypeMapInv = new Map();
|
|
700
|
+
this._dataTypeMap = new Map();
|
|
701
|
+
// the counter restarts, so a second population hands out the same ids as the first; the
|
|
702
|
+
// symbolic name table is kept, for the same reason
|
|
703
|
+
this._nodeIdManager.reset();
|
|
704
|
+
// the header the nodeset carried, which the next population will set again
|
|
705
|
+
this._requiredModels = undefined;
|
|
706
|
+
this.version = "0.0.0";
|
|
707
|
+
this.publicationDate = new Date(Date.UTC(1900, 0, 1));
|
|
708
|
+
}
|
|
639
709
|
/**
|
|
640
710
|
* @internal
|
|
641
711
|
*/
|
|
@@ -698,7 +768,7 @@ class NamespaceImpl {
|
|
|
698
768
|
dataType,
|
|
699
769
|
typeDefinition: dataItemType.nodeId
|
|
700
770
|
});
|
|
701
|
-
|
|
771
|
+
add_dataItem_stuff(variable, options);
|
|
702
772
|
variable.install_extra_properties();
|
|
703
773
|
return variable;
|
|
704
774
|
}
|
|
@@ -737,7 +807,7 @@ class NamespaceImpl {
|
|
|
737
807
|
*/
|
|
738
808
|
addAnalogDataItem(options) {
|
|
739
809
|
const addressSpace = this.addressSpace;
|
|
740
|
-
|
|
810
|
+
assert(Object.hasOwn(options, "engineeringUnitsRange"), "expecting engineeringUnitsRange");
|
|
741
811
|
const dataType = options.dataType || "Number";
|
|
742
812
|
const analogItemType = addressSpace.findVariableType("AnalogItemType");
|
|
743
813
|
if (!analogItemType) {
|
|
@@ -749,7 +819,7 @@ class NamespaceImpl {
|
|
|
749
819
|
// silently downgrading the variable to a plain AnalogItemType.
|
|
750
820
|
let requestedTypeDefinition = analogItemType;
|
|
751
821
|
if (options.typeDefinition) {
|
|
752
|
-
const t = options.typeDefinition instanceof
|
|
822
|
+
const t = options.typeDefinition instanceof BaseNodeImpl
|
|
753
823
|
? options.typeDefinition
|
|
754
824
|
: addressSpace.findVariableType(options.typeDefinition);
|
|
755
825
|
if (!t) {
|
|
@@ -760,7 +830,7 @@ class NamespaceImpl {
|
|
|
760
830
|
}
|
|
761
831
|
requestedTypeDefinition = t;
|
|
762
832
|
}
|
|
763
|
-
const isStrictSubtype = !
|
|
833
|
+
const isStrictSubtype = !sameNodeId(requestedTypeDefinition.nodeId, analogItemType.nodeId);
|
|
764
834
|
let variable;
|
|
765
835
|
if (isStrictSubtype) {
|
|
766
836
|
// instantiate the requested subtype so that its own mandatory members
|
|
@@ -788,7 +858,7 @@ class NamespaceImpl {
|
|
|
788
858
|
const clone_options = { ...options, dataType, typeDefinition: analogItemType.nodeId };
|
|
789
859
|
variable = this.addVariable(clone_options);
|
|
790
860
|
}
|
|
791
|
-
|
|
861
|
+
add_dataItem_stuff(variable, options);
|
|
792
862
|
// mandatory (EURange in the specs)
|
|
793
863
|
// OPC Unified Architecture, Part 8 6 Release 1.02
|
|
794
864
|
// EURange defines the value range likely to be obtained in normal operation. It is intended for such
|
|
@@ -811,15 +881,15 @@ class NamespaceImpl {
|
|
|
811
881
|
modellingRule: options.modellingRule,
|
|
812
882
|
propertyOf: variable,
|
|
813
883
|
typeDefinition: "PropertyType",
|
|
814
|
-
value: new
|
|
815
|
-
dataType:
|
|
816
|
-
value: new
|
|
884
|
+
value: new Variant({
|
|
885
|
+
dataType: DataType.ExtensionObject,
|
|
886
|
+
value: new Range(options.engineeringUnitsRange)
|
|
817
887
|
})
|
|
818
888
|
});
|
|
819
889
|
if (euRangeExisting) {
|
|
820
|
-
euRange.setValueFromSource(new
|
|
890
|
+
euRange.setValueFromSource(new Variant({ dataType: DataType.ExtensionObject, value: new Range(options.engineeringUnitsRange) }), StatusCodes.Good);
|
|
821
891
|
}
|
|
822
|
-
|
|
892
|
+
assert(euRange.readValue().value.value instanceof Range);
|
|
823
893
|
// the SemanticsChanged wiring of EURange/InstrumentRange/EngineeringUnits is generic and
|
|
824
894
|
// lives in impl/data_access/semantics_changed.ts: it covers DataItems built any other way too.
|
|
825
895
|
if (Object.hasOwn(options, "instrumentRange")) {
|
|
@@ -833,19 +903,19 @@ class NamespaceImpl {
|
|
|
833
903
|
modellingRule: options.modellingRule ? "Mandatory" : undefined,
|
|
834
904
|
propertyOf: variable,
|
|
835
905
|
typeDefinition: "PropertyType",
|
|
836
|
-
value: new
|
|
837
|
-
dataType:
|
|
838
|
-
value: new
|
|
906
|
+
value: new Variant({
|
|
907
|
+
dataType: DataType.ExtensionObject,
|
|
908
|
+
value: new Range(options.instrumentRange)
|
|
839
909
|
})
|
|
840
910
|
});
|
|
841
911
|
if (instrumentRangeExisting) {
|
|
842
|
-
instrumentRange.setValueFromSource(new
|
|
912
|
+
instrumentRange.setValueFromSource(new Variant({ dataType: DataType.ExtensionObject, value: new Range(options.instrumentRange) }), StatusCodes.Good);
|
|
843
913
|
}
|
|
844
914
|
}
|
|
845
915
|
variable.acceptValueOutOfRange = options.acceptValueOutOfRange;
|
|
846
916
|
if (Object.hasOwn(options, "engineeringUnits")) {
|
|
847
|
-
const engineeringUnits = new
|
|
848
|
-
|
|
917
|
+
const engineeringUnits = new EUInformation(options.engineeringUnits);
|
|
918
|
+
assert(engineeringUnits instanceof EUInformation, "expecting engineering units");
|
|
849
919
|
// EngineeringUnits specifies the units for the DataItem‟s value (e.g., degree, hertz, seconds). The
|
|
850
920
|
// EUInformation type is specified in 5.6.3.
|
|
851
921
|
const euExisting = variable.getPropertyByName("EngineeringUnits");
|
|
@@ -858,13 +928,13 @@ class NamespaceImpl {
|
|
|
858
928
|
modellingRule: options.modellingRule ? "Mandatory" : undefined,
|
|
859
929
|
propertyOf: variable,
|
|
860
930
|
typeDefinition: "PropertyType",
|
|
861
|
-
value: new
|
|
862
|
-
dataType:
|
|
931
|
+
value: new Variant({
|
|
932
|
+
dataType: DataType.ExtensionObject,
|
|
863
933
|
value: engineeringUnits
|
|
864
934
|
})
|
|
865
935
|
});
|
|
866
936
|
if (euExisting) {
|
|
867
|
-
eu.setValueFromSource(new
|
|
937
|
+
eu.setValueFromSource(new Variant({ dataType: DataType.ExtensionObject, value: engineeringUnits }), StatusCodes.Good);
|
|
868
938
|
}
|
|
869
939
|
}
|
|
870
940
|
variable.install_extra_properties();
|
|
@@ -915,7 +985,7 @@ class NamespaceImpl {
|
|
|
915
985
|
* });
|
|
916
986
|
*/
|
|
917
987
|
addMultiStateValueDiscrete(options) {
|
|
918
|
-
return
|
|
988
|
+
return _addMultiStateValueDiscrete(this, options);
|
|
919
989
|
}
|
|
920
990
|
// -
|
|
921
991
|
/**
|
|
@@ -948,9 +1018,9 @@ class NamespaceImpl {
|
|
|
948
1018
|
* @param options.value
|
|
949
1019
|
*/
|
|
950
1020
|
addYArrayItem(options) {
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
1021
|
+
assert(Object.hasOwn(options, "engineeringUnitsRange"), "expecting engineeringUnitsRange");
|
|
1022
|
+
assert(Object.hasOwn(options, "axisScaleType"), "expecting axisScaleType");
|
|
1023
|
+
assert(options.xAxisDefinition !== null && typeof options.xAxisDefinition === "object", "expecting a xAxisDefinition");
|
|
954
1024
|
const addressSpace = this.addressSpace;
|
|
955
1025
|
const YArrayItemType = addressSpace.findVariableType("YArrayItemType");
|
|
956
1026
|
if (!YArrayItemType) {
|
|
@@ -968,33 +1038,33 @@ class NamespaceImpl {
|
|
|
968
1038
|
optionals
|
|
969
1039
|
});
|
|
970
1040
|
function coerceAxisScale(value) {
|
|
971
|
-
const ret =
|
|
972
|
-
|
|
1041
|
+
const ret = AxisScaleEnumeration[value];
|
|
1042
|
+
assert(!isNullOrUndefined(ret));
|
|
973
1043
|
return ret;
|
|
974
1044
|
}
|
|
975
|
-
variable.setValueFromSource(options.value,
|
|
976
|
-
variable.euRange.setValueFromSource(new
|
|
977
|
-
dataType:
|
|
978
|
-
value: new
|
|
1045
|
+
variable.setValueFromSource(options.value, StatusCodes.Good);
|
|
1046
|
+
variable.euRange.setValueFromSource(new Variant({
|
|
1047
|
+
dataType: DataType.ExtensionObject,
|
|
1048
|
+
value: new Range(options.engineeringUnitsRange)
|
|
979
1049
|
}));
|
|
980
1050
|
if (Object.hasOwn(options, "instrumentRange") && variable.instrumentRange) {
|
|
981
|
-
variable.instrumentRange.setValueFromSource(new
|
|
982
|
-
dataType:
|
|
983
|
-
value: new
|
|
1051
|
+
variable.instrumentRange.setValueFromSource(new Variant({
|
|
1052
|
+
dataType: DataType.ExtensionObject,
|
|
1053
|
+
value: new Range(options.instrumentRange)
|
|
984
1054
|
}));
|
|
985
1055
|
}
|
|
986
|
-
variable.title.setValueFromSource(new
|
|
987
|
-
dataType:
|
|
988
|
-
value:
|
|
1056
|
+
variable.title.setValueFromSource(new Variant({
|
|
1057
|
+
dataType: DataType.LocalizedText,
|
|
1058
|
+
value: coerceLocalizedText(options.title || "")
|
|
989
1059
|
}));
|
|
990
1060
|
// Linear/Log/Ln
|
|
991
|
-
variable.axisScaleType.setValueFromSource(new
|
|
992
|
-
dataType:
|
|
1061
|
+
variable.axisScaleType.setValueFromSource(new Variant({
|
|
1062
|
+
dataType: DataType.Int32,
|
|
993
1063
|
value: coerceAxisScale(options.axisScaleType)
|
|
994
1064
|
}));
|
|
995
|
-
variable.xAxisDefinition.setValueFromSource(new
|
|
996
|
-
dataType:
|
|
997
|
-
value: new
|
|
1065
|
+
variable.xAxisDefinition.setValueFromSource(new Variant({
|
|
1066
|
+
dataType: DataType.ExtensionObject,
|
|
1067
|
+
value: new AxisInformation(options.xAxisDefinition)
|
|
998
1068
|
}));
|
|
999
1069
|
return variable;
|
|
1000
1070
|
}
|
|
@@ -1012,17 +1082,17 @@ class NamespaceImpl {
|
|
|
1012
1082
|
*/
|
|
1013
1083
|
addMethod(parentObject, options) {
|
|
1014
1084
|
const addressSpace = this.addressSpace;
|
|
1015
|
-
|
|
1016
|
-
|
|
1085
|
+
assert(parentObject !== null && typeof parentObject === "object" && parentObject instanceof BaseNodeImpl, "expecting a valid parent object");
|
|
1086
|
+
assert(Object.hasOwn(options, "browseName"));
|
|
1017
1087
|
options.componentOf = parentObject;
|
|
1018
1088
|
const method = this._addMethod(options);
|
|
1019
1089
|
const propertyTypeId = addressSpace._coerce_VariableTypeIds("PropertyType");
|
|
1020
1090
|
const nodeId_ArgumentDataType = "Argument"; // makeNodeId(DataTypeIds.Argument);
|
|
1021
1091
|
if (options.inputArguments) {
|
|
1022
|
-
const _inputArgs = new
|
|
1023
|
-
arrayType:
|
|
1024
|
-
dataType:
|
|
1025
|
-
value: options.inputArguments.map((opt) => new
|
|
1092
|
+
const _inputArgs = new Variant({
|
|
1093
|
+
arrayType: VariantArrayType.Array,
|
|
1094
|
+
dataType: DataType.ExtensionObject,
|
|
1095
|
+
value: options.inputArguments.map((opt) => new Argument(opt))
|
|
1026
1096
|
});
|
|
1027
1097
|
const inputArguments = this.addVariable({
|
|
1028
1098
|
accessLevel: "CurrentRead",
|
|
@@ -1041,14 +1111,14 @@ class NamespaceImpl {
|
|
|
1041
1111
|
valueRank: 1
|
|
1042
1112
|
});
|
|
1043
1113
|
inputArguments.setValueFromSource(_inputArgs);
|
|
1044
|
-
|
|
1045
|
-
|
|
1114
|
+
assert(inputArguments.typeDefinition.toString() === propertyTypeId.toString());
|
|
1115
|
+
assert(Array.isArray(inputArguments.arrayDimensions));
|
|
1046
1116
|
}
|
|
1047
1117
|
if (options.outputArguments) {
|
|
1048
|
-
const _outputArgs = new
|
|
1049
|
-
arrayType:
|
|
1050
|
-
dataType:
|
|
1051
|
-
value: options.outputArguments.map((opts) => new
|
|
1118
|
+
const _outputArgs = new Variant({
|
|
1119
|
+
arrayType: VariantArrayType.Array,
|
|
1120
|
+
dataType: DataType.ExtensionObject,
|
|
1121
|
+
value: options.outputArguments.map((opts) => new Argument(opts))
|
|
1052
1122
|
});
|
|
1053
1123
|
const outputArguments = this.addVariable({
|
|
1054
1124
|
accessLevel: "CurrentRead",
|
|
@@ -1067,8 +1137,8 @@ class NamespaceImpl {
|
|
|
1067
1137
|
valueRank: 1
|
|
1068
1138
|
});
|
|
1069
1139
|
outputArguments.setValueFromSource(_outputArgs);
|
|
1070
|
-
|
|
1071
|
-
|
|
1140
|
+
assert(outputArguments.typeDefinition.toString() === propertyTypeId.toString());
|
|
1141
|
+
assert(Array.isArray(outputArguments.arrayDimensions));
|
|
1072
1142
|
}
|
|
1073
1143
|
// verifying post-conditions
|
|
1074
1144
|
parentObject.install_extra_properties();
|
|
@@ -1136,20 +1206,20 @@ class NamespaceImpl {
|
|
|
1136
1206
|
// When it is used to define the string representation of an Enumeration DataType, the value range
|
|
1137
1207
|
// is limited to Int32, because the Enumeration DataType is a subtype of Int32. Part 8 specifies
|
|
1138
1208
|
// other usages where the actual value might be between 8 and 64 Bit.
|
|
1139
|
-
|
|
1140
|
-
|
|
1209
|
+
assert(typeof options.browseName === "string");
|
|
1210
|
+
assert(Array.isArray(options.enumeration));
|
|
1141
1211
|
const addressSpace = this.addressSpace;
|
|
1142
1212
|
const enumerationType = addressSpace.findDataType("Enumeration");
|
|
1143
|
-
|
|
1144
|
-
|
|
1213
|
+
assert(enumerationType.nodeId instanceof NodeId);
|
|
1214
|
+
assert(enumerationType instanceof UADataTypeImpl);
|
|
1145
1215
|
const references = [{ referenceType: "HasSubtype", isForward: false, nodeId: enumerationType.nodeId }];
|
|
1146
1216
|
const opts = {
|
|
1147
1217
|
browseName: options.browseName,
|
|
1148
1218
|
definition: undefined,
|
|
1149
|
-
description:
|
|
1219
|
+
description: coerceLocalizedText(options.description) || null,
|
|
1150
1220
|
displayName: options.displayName || null,
|
|
1151
1221
|
isAbstract: false,
|
|
1152
|
-
nodeClass:
|
|
1222
|
+
nodeClass: NodeClass.DataType,
|
|
1153
1223
|
references
|
|
1154
1224
|
};
|
|
1155
1225
|
const enumType = this.internalCreateNode(opts); // as UAEnumeration;
|
|
@@ -1157,10 +1227,10 @@ class NamespaceImpl {
|
|
|
1157
1227
|
if (typeof options.enumeration[0] === "string") {
|
|
1158
1228
|
const enumeration = options.enumeration;
|
|
1159
1229
|
// enumeration is a array of string
|
|
1160
|
-
const definition = enumeration.map((str, _index) =>
|
|
1161
|
-
const value = new
|
|
1162
|
-
arrayType:
|
|
1163
|
-
dataType:
|
|
1230
|
+
const definition = enumeration.map((str, _index) => coerceLocalizedText(str));
|
|
1231
|
+
const value = new Variant({
|
|
1232
|
+
arrayType: VariantArrayType.Array,
|
|
1233
|
+
dataType: DataType.LocalizedText,
|
|
1164
1234
|
value: definition
|
|
1165
1235
|
});
|
|
1166
1236
|
const enumStrings = this.addVariable({
|
|
@@ -1172,7 +1242,7 @@ class NamespaceImpl {
|
|
|
1172
1242
|
value,
|
|
1173
1243
|
valueRank: 1
|
|
1174
1244
|
});
|
|
1175
|
-
|
|
1245
|
+
assert(enumStrings.browseName.toString() === "EnumStrings");
|
|
1176
1246
|
// set $definition
|
|
1177
1247
|
// EnumDefinition
|
|
1178
1248
|
// This Structured DataType is used to provide the metadata for a custom Enumeration or
|
|
@@ -1182,11 +1252,11 @@ class NamespaceImpl {
|
|
|
1182
1252
|
// or OptionSet DataType. It is derived from the DataType EnumValueType. If used for an
|
|
1183
1253
|
// OptionSet, the corresponding Value in the base type contains the number of the bit associated
|
|
1184
1254
|
// with the field. The EnumField is formally defined in Table 37.
|
|
1185
|
-
enumType.$fullDefinition = new
|
|
1186
|
-
fields: enumeration.map((x, index) => new
|
|
1255
|
+
enumType.$fullDefinition = new EnumDefinition({
|
|
1256
|
+
fields: enumeration.map((x, index) => new EnumField({
|
|
1187
1257
|
name: x,
|
|
1188
|
-
description:
|
|
1189
|
-
value:
|
|
1258
|
+
description: coerceLocalizedText(x),
|
|
1259
|
+
value: coerceInt64(index)
|
|
1190
1260
|
}))
|
|
1191
1261
|
});
|
|
1192
1262
|
}
|
|
@@ -1194,15 +1264,15 @@ class NamespaceImpl {
|
|
|
1194
1264
|
const enumeration = options.enumeration;
|
|
1195
1265
|
// construct the definition object
|
|
1196
1266
|
const definition = enumeration.map((enumItem) => {
|
|
1197
|
-
return new
|
|
1198
|
-
description:
|
|
1199
|
-
displayName:
|
|
1200
|
-
value:
|
|
1267
|
+
return new EnumValueType({
|
|
1268
|
+
description: coerceLocalizedText(enumItem.description),
|
|
1269
|
+
displayName: coerceLocalizedText(enumItem.displayName),
|
|
1270
|
+
value: coerceInt64(enumItem.value)
|
|
1201
1271
|
});
|
|
1202
1272
|
});
|
|
1203
|
-
const value = new
|
|
1204
|
-
arrayType:
|
|
1205
|
-
dataType:
|
|
1273
|
+
const value = new Variant({
|
|
1274
|
+
arrayType: VariantArrayType.Array,
|
|
1275
|
+
dataType: DataType.ExtensionObject,
|
|
1206
1276
|
value: definition
|
|
1207
1277
|
});
|
|
1208
1278
|
const enumValues = this.addVariable({
|
|
@@ -1214,12 +1284,12 @@ class NamespaceImpl {
|
|
|
1214
1284
|
value,
|
|
1215
1285
|
valueRank: 1
|
|
1216
1286
|
});
|
|
1217
|
-
|
|
1218
|
-
enumType.$fullDefinition = new
|
|
1219
|
-
fields: enumeration.map((x, _index) => new
|
|
1287
|
+
assert(enumValues.browseName.toString() === "EnumValues");
|
|
1288
|
+
enumType.$fullDefinition = new EnumDefinition({
|
|
1289
|
+
fields: enumeration.map((x, _index) => new EnumField({
|
|
1220
1290
|
name: x.displayName.toString(),
|
|
1221
1291
|
description: x.description || "",
|
|
1222
|
-
value:
|
|
1292
|
+
value: coerceInt64(x.value)
|
|
1223
1293
|
}))
|
|
1224
1294
|
});
|
|
1225
1295
|
}
|
|
@@ -1269,7 +1339,7 @@ class NamespaceImpl {
|
|
|
1269
1339
|
const addressSpace = this.addressSpace;
|
|
1270
1340
|
isInitialState = !!isInitialState;
|
|
1271
1341
|
const _component = component;
|
|
1272
|
-
|
|
1342
|
+
assert(_component.nodeClass === NodeClass.Object || _component.nodeClass === NodeClass.ObjectType);
|
|
1273
1343
|
const initialStateType = addressSpace.findObjectType("InitialStateType");
|
|
1274
1344
|
const stateType = addressSpace.findObjectType("StateType");
|
|
1275
1345
|
if (!initialStateType) {
|
|
@@ -1293,7 +1363,7 @@ class NamespaceImpl {
|
|
|
1293
1363
|
}
|
|
1294
1364
|
// ensure state number is unique
|
|
1295
1365
|
state.stateNumber.setValueFromSource({
|
|
1296
|
-
dataType:
|
|
1366
|
+
dataType: DataType.UInt32,
|
|
1297
1367
|
value: stateNumber
|
|
1298
1368
|
});
|
|
1299
1369
|
return state;
|
|
@@ -1303,22 +1373,22 @@ class NamespaceImpl {
|
|
|
1303
1373
|
addTransition(component, fromState, toState, transitionNumber, browseName) {
|
|
1304
1374
|
const addressSpace = this.addressSpace;
|
|
1305
1375
|
const _component = component;
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1376
|
+
assert(_component.nodeClass === NodeClass.Object || _component.nodeClass === NodeClass.ObjectType);
|
|
1377
|
+
assert(typeof fromState === "string");
|
|
1378
|
+
assert(typeof toState === "string");
|
|
1379
|
+
assert(Number.isFinite(transitionNumber));
|
|
1310
1380
|
const fromStateNode = _component.getComponentByName(fromState);
|
|
1311
1381
|
// c8 ignore next
|
|
1312
1382
|
if (!fromStateNode) {
|
|
1313
1383
|
throw new Error(`Cannot find state with name ${fromState}`);
|
|
1314
1384
|
}
|
|
1315
|
-
|
|
1385
|
+
assert(fromStateNode.browseName.name?.toString() === fromState);
|
|
1316
1386
|
const toStateNode = _component.getComponentByName(toState);
|
|
1317
1387
|
// c8 ignore next
|
|
1318
1388
|
if (!toStateNode) {
|
|
1319
1389
|
throw new Error(`Cannot find state with name ${toState}`);
|
|
1320
1390
|
}
|
|
1321
|
-
|
|
1391
|
+
assert(toStateNode.browseName.name?.toString() === toState);
|
|
1322
1392
|
const transitionType = addressSpace.findObjectType("TransitionType");
|
|
1323
1393
|
if (!transitionType) {
|
|
1324
1394
|
throw new Error("Cannot find TransitionType");
|
|
@@ -1339,7 +1409,7 @@ class NamespaceImpl {
|
|
|
1339
1409
|
referenceType: "FromState"
|
|
1340
1410
|
});
|
|
1341
1411
|
transition.transitionNumber.setValueFromSource({
|
|
1342
|
-
dataType:
|
|
1412
|
+
dataType: DataType.UInt32,
|
|
1343
1413
|
value: transitionNumber
|
|
1344
1414
|
});
|
|
1345
1415
|
return transition;
|
|
@@ -1350,7 +1420,7 @@ class NamespaceImpl {
|
|
|
1350
1420
|
* @return {UATwoStateVariable}
|
|
1351
1421
|
*/
|
|
1352
1422
|
addTwoStateVariable(options) {
|
|
1353
|
-
return
|
|
1423
|
+
return _addTwoStateVariable(this, options);
|
|
1354
1424
|
}
|
|
1355
1425
|
/**
|
|
1356
1426
|
|
|
@@ -1359,42 +1429,42 @@ class NamespaceImpl {
|
|
|
1359
1429
|
* @return {UATwoStateDiscrete}
|
|
1360
1430
|
*/
|
|
1361
1431
|
addTwoStateDiscrete(options) {
|
|
1362
|
-
return
|
|
1432
|
+
return _addTwoStateDiscrete(this, options);
|
|
1363
1433
|
}
|
|
1364
1434
|
// --- Alarms & Conditions -------------------------------------------------
|
|
1365
1435
|
instantiateCondition(conditionTypeId, options, data) {
|
|
1366
|
-
return
|
|
1436
|
+
return UAConditionImplBase.instantiate(this, conditionTypeId, options, data);
|
|
1367
1437
|
}
|
|
1368
1438
|
instantiateAcknowledgeableCondition(conditionTypeId, options, data) {
|
|
1369
|
-
return
|
|
1439
|
+
return UAAcknowledgeableConditionImplBase.instantiate(this, conditionTypeId, options, data);
|
|
1370
1440
|
}
|
|
1371
1441
|
instantiateAlarmCondition(alarmConditionTypeId, options, data) {
|
|
1372
|
-
return
|
|
1442
|
+
return UAAlarmConditionImplBase.instantiate(this, alarmConditionTypeId, options, data);
|
|
1373
1443
|
}
|
|
1374
1444
|
instantiateLimitAlarm(limitAlarmTypeId, options, data) {
|
|
1375
|
-
return
|
|
1445
|
+
return UALimitAlarmImplBase.instantiate(this, limitAlarmTypeId, options, data);
|
|
1376
1446
|
}
|
|
1377
1447
|
instantiateExclusiveLimitAlarm(exclusiveLimitAlarmTypeId, options, data) {
|
|
1378
|
-
return
|
|
1448
|
+
return UAExclusiveLimitAlarmImplBase.instantiate(this, exclusiveLimitAlarmTypeId, options, data);
|
|
1379
1449
|
}
|
|
1380
1450
|
instantiateExclusiveDeviationAlarm(options, data) {
|
|
1381
|
-
return
|
|
1451
|
+
return UAExclusiveDeviationAlarmImplBase.instantiate(this, "ExclusiveDeviationAlarmType", options, data);
|
|
1382
1452
|
}
|
|
1383
1453
|
instantiateNonExclusiveLimitAlarm(nonExclusiveLimitAlarmTypeId, options, data) {
|
|
1384
|
-
return
|
|
1454
|
+
return UANonExclusiveLimitAlarmImplBase.instantiate(this, nonExclusiveLimitAlarmTypeId, options, data);
|
|
1385
1455
|
}
|
|
1386
1456
|
instantiateNonExclusiveDeviationAlarm(options, data) {
|
|
1387
|
-
return
|
|
1457
|
+
return UANonExclusiveDeviationAlarmImplBase.instantiate(this, "NonExclusiveDeviationAlarmType", options, data);
|
|
1388
1458
|
}
|
|
1389
1459
|
instantiateDiscreteAlarm(discreteAlarmType, options, data) {
|
|
1390
|
-
return
|
|
1460
|
+
return UADiscreteAlarmImplBase.instantiate(this, discreteAlarmType, options, data);
|
|
1391
1461
|
}
|
|
1392
1462
|
instantiateOffNormalAlarm(options, data) {
|
|
1393
|
-
return
|
|
1463
|
+
return UAOffNormalAlarmImplBase.instantiate(this, "OffNormalAlarmType", options, data);
|
|
1394
1464
|
}
|
|
1395
1465
|
// default roles and permissions
|
|
1396
1466
|
setDefaultRolePermissions(rolePermissions) {
|
|
1397
|
-
this.defaultRolePermissions = rolePermissions ?
|
|
1467
|
+
this.defaultRolePermissions = rolePermissions ? coerceRolePermissions(rolePermissions) : undefined;
|
|
1398
1468
|
}
|
|
1399
1469
|
getDefaultRolePermissions() {
|
|
1400
1470
|
return this.defaultRolePermissions || null;
|
|
@@ -1403,7 +1473,7 @@ class NamespaceImpl {
|
|
|
1403
1473
|
this.defaultAccessRestrictions = accessRestrictions;
|
|
1404
1474
|
}
|
|
1405
1475
|
getDefaultAccessRestrictions() {
|
|
1406
|
-
return this.defaultAccessRestrictions ||
|
|
1476
|
+
return this.defaultAccessRestrictions || AccessRestrictionsFlag.None;
|
|
1407
1477
|
}
|
|
1408
1478
|
// --- internal stuff
|
|
1409
1479
|
constructNodeId(options) {
|
|
@@ -1413,8 +1483,8 @@ class NamespaceImpl {
|
|
|
1413
1483
|
});
|
|
1414
1484
|
}
|
|
1415
1485
|
_register(node) {
|
|
1416
|
-
|
|
1417
|
-
|
|
1486
|
+
assert(node instanceof BaseNodeImpl, "Expecting a instance of BaseNode in _register");
|
|
1487
|
+
assert(node.nodeId instanceof NodeId, "Expecting a NodeId");
|
|
1418
1488
|
// c8 ignore next
|
|
1419
1489
|
if (node.nodeId.namespace !== this.index) {
|
|
1420
1490
|
throw new Error("node must belong to this namespace : " +
|
|
@@ -1425,8 +1495,8 @@ class NamespaceImpl {
|
|
|
1425
1495
|
" this.index = " +
|
|
1426
1496
|
this.index);
|
|
1427
1497
|
}
|
|
1428
|
-
|
|
1429
|
-
|
|
1498
|
+
assert(node.nodeId.namespace === this.index, "node must belongs to this namespace");
|
|
1499
|
+
assert(Object.hasOwn(node, "browseName"), "Node must have a browseName");
|
|
1430
1500
|
const hashKey = _makeHashKey(node.nodeId);
|
|
1431
1501
|
// c8 ignore next
|
|
1432
1502
|
if (this._nodeid_index.has(hashKey)) {
|
|
@@ -1450,22 +1520,22 @@ class NamespaceImpl {
|
|
|
1450
1520
|
}
|
|
1451
1521
|
this._nodeid_index.set(hashKey, node);
|
|
1452
1522
|
switch (node.nodeClass) {
|
|
1453
|
-
case
|
|
1523
|
+
case NodeClass.ObjectType:
|
|
1454
1524
|
this._registerObjectType(node);
|
|
1455
1525
|
break;
|
|
1456
|
-
case
|
|
1526
|
+
case NodeClass.VariableType:
|
|
1457
1527
|
this._registerVariableType(node);
|
|
1458
1528
|
break;
|
|
1459
|
-
case
|
|
1529
|
+
case NodeClass.ReferenceType:
|
|
1460
1530
|
this._registerReferenceType(node);
|
|
1461
1531
|
break;
|
|
1462
|
-
case
|
|
1532
|
+
case NodeClass.DataType:
|
|
1463
1533
|
this._registerDataType(node);
|
|
1464
1534
|
break;
|
|
1465
|
-
case
|
|
1466
|
-
case
|
|
1467
|
-
case
|
|
1468
|
-
case
|
|
1535
|
+
case NodeClass.Object:
|
|
1536
|
+
case NodeClass.Variable:
|
|
1537
|
+
case NodeClass.Method:
|
|
1538
|
+
case NodeClass.View:
|
|
1469
1539
|
break;
|
|
1470
1540
|
default:
|
|
1471
1541
|
errorLog("Invalid class Name", node.nodeClass);
|
|
@@ -1477,24 +1547,24 @@ class NamespaceImpl {
|
|
|
1477
1547
|
* @internal
|
|
1478
1548
|
*/
|
|
1479
1549
|
internalCreateNode(options) {
|
|
1480
|
-
|
|
1481
|
-
|
|
1550
|
+
assert(options.nodeClass !== undefined, " options.nodeClass must be specified");
|
|
1551
|
+
assert(options.browseName, "options.browseName must be specified");
|
|
1482
1552
|
// xx assert(options.browseName instanceof QualifiedName
|
|
1483
1553
|
// ? (options.browseName.namespaceIndex === this.index): true,
|
|
1484
1554
|
// "Expecting browseName to have the same namespaceIndex as the namespace");
|
|
1485
|
-
options.description =
|
|
1555
|
+
options.description = coerceLocalizedText(options.description) || "";
|
|
1486
1556
|
// browseName adjustment
|
|
1487
1557
|
if (typeof options.browseName === "string") {
|
|
1488
1558
|
const match = options.browseName.match(regExpNamespaceDotBrowseName);
|
|
1489
1559
|
if (match) {
|
|
1490
1560
|
const correctedName = match[1];
|
|
1491
1561
|
// the application is using an old scheme
|
|
1492
|
-
warningLog(
|
|
1562
|
+
warningLog(chalk.green("Warning : since node-opcua 0.4.2 " + "namespace index should not be prepended to the browse name anymore"));
|
|
1493
1563
|
warningLog(" ", options.browseName, " will be replaced with ", correctedName);
|
|
1494
1564
|
warningLog(" Please update your code");
|
|
1495
1565
|
const indexVerify = parseInt(match[0], 10);
|
|
1496
1566
|
if (indexVerify !== this.index) {
|
|
1497
|
-
errorLog(
|
|
1567
|
+
errorLog(chalk.red.bold("Error: namespace index used at the front of the browseName " +
|
|
1498
1568
|
indexVerify +
|
|
1499
1569
|
" do not match the index of the current namespace (" +
|
|
1500
1570
|
this.index +
|
|
@@ -1503,29 +1573,29 @@ class NamespaceImpl {
|
|
|
1503
1573
|
" please refer to the NodeOPCUA documentation");
|
|
1504
1574
|
}
|
|
1505
1575
|
}
|
|
1506
|
-
options.browseName = new
|
|
1576
|
+
options.browseName = new QualifiedName({ name: options.browseName, namespaceIndex: this.index });
|
|
1507
1577
|
}
|
|
1508
|
-
else if (!(options.browseName instanceof
|
|
1509
|
-
options.browseName = new
|
|
1578
|
+
else if (!(options.browseName instanceof QualifiedName)) {
|
|
1579
|
+
options.browseName = new QualifiedName(options.browseName);
|
|
1510
1580
|
}
|
|
1511
|
-
|
|
1581
|
+
assert(options.browseName instanceof QualifiedName, "Expecting options.browseName to be instanceof QualifiedName ");
|
|
1512
1582
|
// ------------- set display name
|
|
1513
1583
|
if (!options.displayName) {
|
|
1514
|
-
|
|
1515
|
-
options.displayName =
|
|
1584
|
+
assert(typeof options.browseName.name === "string");
|
|
1585
|
+
options.displayName = coerceLocalizedText(options.browseName.name || "");
|
|
1516
1586
|
}
|
|
1517
1587
|
if (!options.nodeClass || options.nodeClass === undefined) {
|
|
1518
1588
|
throw new Error("nodeclass must be specified");
|
|
1519
1589
|
}
|
|
1520
1590
|
// --- nodeId adjustment
|
|
1521
1591
|
options.nodeId = this.constructNodeId(options);
|
|
1522
|
-
|
|
1523
|
-
|
|
1592
|
+
dumpIf(!options.nodeId, options); // missing node Id
|
|
1593
|
+
assert(options.nodeId instanceof NodeId);
|
|
1524
1594
|
// assert(options.browseName.namespaceIndex === this.index,"Expecting browseName to have
|
|
1525
1595
|
// the same namespaceIndex as the namespace");
|
|
1526
|
-
const Constructor = _constructors_map[
|
|
1596
|
+
const Constructor = _constructors_map[NodeClass[options.nodeClass]];
|
|
1527
1597
|
if (!Constructor) {
|
|
1528
|
-
throw new Error(` missing constructor for NodeClass ${
|
|
1598
|
+
throw new Error(` missing constructor for NodeClass ${NodeClass[options.nodeClass]}`);
|
|
1529
1599
|
}
|
|
1530
1600
|
options.addressSpace = this.addressSpace;
|
|
1531
1601
|
const node = new Constructor(options);
|
|
@@ -1533,60 +1603,66 @@ class NamespaceImpl {
|
|
|
1533
1603
|
// object shall now be registered
|
|
1534
1604
|
// c8 ignore next
|
|
1535
1605
|
if (doDebug) {
|
|
1536
|
-
|
|
1606
|
+
assert(this.findNode(node.nodeId) !== null && typeof this.findNode(node.nodeId) === "object");
|
|
1537
1607
|
}
|
|
1538
1608
|
return node;
|
|
1539
1609
|
}
|
|
1540
1610
|
_deleteNode(node) {
|
|
1541
|
-
|
|
1611
|
+
assert(node instanceof BaseNodeImpl);
|
|
1542
1612
|
const hashKey = _makeHashKey(node.nodeId);
|
|
1543
1613
|
// c8 ignore next
|
|
1544
1614
|
if (!this._nodeid_index.has(hashKey)) {
|
|
1545
1615
|
throw new Error(`deleteNode : nodeId ${node.nodeId.displayText()} is not registered ${node.nodeId.toString()}`);
|
|
1546
1616
|
}
|
|
1547
1617
|
switch (node.nodeClass) {
|
|
1548
|
-
case
|
|
1618
|
+
case NodeClass.ObjectType:
|
|
1549
1619
|
this._unregisterObjectType(node);
|
|
1550
1620
|
break;
|
|
1551
|
-
case
|
|
1621
|
+
case NodeClass.VariableType:
|
|
1552
1622
|
this._unregisterVariableType(node);
|
|
1553
1623
|
break;
|
|
1554
|
-
case
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
case
|
|
1624
|
+
case NodeClass.ReferenceType:
|
|
1625
|
+
this._unregisterReferenceType(node);
|
|
1626
|
+
break;
|
|
1627
|
+
case NodeClass.DataType:
|
|
1628
|
+
this._unregisterDataType(node);
|
|
1629
|
+
break;
|
|
1630
|
+
case NodeClass.Object:
|
|
1631
|
+
case NodeClass.Variable:
|
|
1632
|
+
case NodeClass.Method:
|
|
1633
|
+
case NodeClass.View:
|
|
1558
1634
|
break;
|
|
1559
1635
|
default:
|
|
1560
1636
|
warningLog("Invalid class Name", node.nodeClass);
|
|
1561
1637
|
throw new Error("Invalid class name specified");
|
|
1562
1638
|
}
|
|
1563
1639
|
const deleted = this._nodeid_index.delete(hashKey);
|
|
1564
|
-
|
|
1640
|
+
assert(deleted);
|
|
1565
1641
|
node.dispose();
|
|
1566
1642
|
}
|
|
1567
1643
|
// --- Private stuff
|
|
1568
1644
|
_addObjectOrVariableType(options1, topMostBaseType, nodeClass) {
|
|
1569
1645
|
const addressSpace = this.addressSpace;
|
|
1570
|
-
|
|
1571
|
-
|
|
1646
|
+
assert(typeof topMostBaseType === "string");
|
|
1647
|
+
assert(nodeClass === NodeClass.ObjectType || nodeClass === NodeClass.VariableType);
|
|
1572
1648
|
const options = options1;
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1649
|
+
assert(!options.nodeClass);
|
|
1650
|
+
assert(options.browseName);
|
|
1651
|
+
assert(typeof options.browseName === "string");
|
|
1576
1652
|
if (Object.hasOwn(options, "references")) {
|
|
1577
1653
|
throw new Error("options.references should not be provided, use options.subtypeOf instead");
|
|
1578
1654
|
}
|
|
1579
1655
|
const references = [];
|
|
1580
1656
|
function process_subtypeOf_options(options2, references1) {
|
|
1581
1657
|
// check common misspelling mistake
|
|
1582
|
-
|
|
1658
|
+
assert(!options2.subTypeOf, "misspell error : it should be 'subtypeOf' instead");
|
|
1583
1659
|
if (Object.hasOwn(options2, "hasTypeDefinition")) {
|
|
1584
1660
|
throw new Error("hasTypeDefinition option is invalid. Do you mean typeDefinition instead ?");
|
|
1585
1661
|
}
|
|
1586
|
-
|
|
1662
|
+
assert(!options2.typeDefinition, " do you mean subtypeOf ?");
|
|
1587
1663
|
// subtypeOf is optional: _coerceType defaults to topMostBaseType when it's falsy.
|
|
1588
1664
|
const subtypeOfNodeId = addressSpace._coerceType(options2.subtypeOf, topMostBaseType, nodeClass);
|
|
1589
|
-
|
|
1665
|
+
assert(subtypeOfNodeId);
|
|
1590
1666
|
references1.push({
|
|
1591
1667
|
isForward: false,
|
|
1592
1668
|
nodeId: subtypeOfNodeId,
|
|
@@ -1627,7 +1703,7 @@ class NamespaceImpl {
|
|
|
1627
1703
|
// return options;
|
|
1628
1704
|
// }
|
|
1629
1705
|
_registerObjectType(node) {
|
|
1630
|
-
|
|
1706
|
+
assert(this.index === node.nodeId.namespace);
|
|
1631
1707
|
const key = node.browseName.name || "";
|
|
1632
1708
|
if (this._objectTypeMap.has(key)) {
|
|
1633
1709
|
throw new Error(` UAObjectType already declared ${node.browseName.toString()} ${node.nodeId.toString()}`);
|
|
@@ -1635,23 +1711,23 @@ class NamespaceImpl {
|
|
|
1635
1711
|
this._objectTypeMap.set(key, node);
|
|
1636
1712
|
}
|
|
1637
1713
|
_registerVariableType(node) {
|
|
1638
|
-
|
|
1714
|
+
assert(this.index === node.nodeId.namespace);
|
|
1639
1715
|
const key = node.browseName.name || "";
|
|
1640
|
-
|
|
1716
|
+
assert(!this._variableTypeMap.has(key), " UAVariableType already declared");
|
|
1641
1717
|
this._variableTypeMap.set(key, node);
|
|
1642
1718
|
}
|
|
1643
1719
|
_registerReferenceType(node) {
|
|
1644
|
-
|
|
1645
|
-
|
|
1720
|
+
assert(this.index === node.nodeId.namespace);
|
|
1721
|
+
assert(node.browseName instanceof QualifiedName);
|
|
1646
1722
|
const key = node.browseName.name || "";
|
|
1647
1723
|
this._referenceTypeMap.set(key, node);
|
|
1648
1724
|
this._referenceTypeMapInv.set(node.inverseName.text || "", node);
|
|
1649
1725
|
}
|
|
1650
1726
|
_registerDataType(node) {
|
|
1651
|
-
|
|
1727
|
+
assert(this.index === node.nodeId.namespace);
|
|
1652
1728
|
const key = node.browseName.name || "";
|
|
1653
|
-
|
|
1654
|
-
|
|
1729
|
+
assert(node.browseName instanceof QualifiedName);
|
|
1730
|
+
assert(!this._dataTypeMap.has(key), " DataType already declared");
|
|
1655
1731
|
this._dataTypeMap.set(key, node);
|
|
1656
1732
|
}
|
|
1657
1733
|
_unregisterObjectType(node) {
|
|
@@ -1662,6 +1738,31 @@ class NamespaceImpl {
|
|
|
1662
1738
|
const key = node.browseName.name || "";
|
|
1663
1739
|
this._variableTypeMap.delete(key);
|
|
1664
1740
|
}
|
|
1741
|
+
/**
|
|
1742
|
+
* the mirror of `_registerReferenceType`: both maps it fills have to be emptied, the inverse
|
|
1743
|
+
* one keyed on the inverse name rather than the browse name.
|
|
1744
|
+
*
|
|
1745
|
+
* Only an entry that still points at this very node goes: `_registerReferenceType` does not
|
|
1746
|
+
* refuse a duplicate key the way the object/variable/dataType ones do, so a second reference
|
|
1747
|
+
* type of the same browse name (or the same inverse name) would otherwise have its entry
|
|
1748
|
+
* removed by the deletion of the first.
|
|
1749
|
+
*/
|
|
1750
|
+
_unregisterReferenceType(node) {
|
|
1751
|
+
const key = node.browseName.name || "";
|
|
1752
|
+
if (this._referenceTypeMap.get(key) === node) {
|
|
1753
|
+
this._referenceTypeMap.delete(key);
|
|
1754
|
+
}
|
|
1755
|
+
const inverseKey = node.inverseName?.text || "";
|
|
1756
|
+
if (this._referenceTypeMapInv.get(inverseKey) === node) {
|
|
1757
|
+
this._referenceTypeMapInv.delete(inverseKey);
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
_unregisterDataType(node) {
|
|
1761
|
+
const key = node.browseName.name || "";
|
|
1762
|
+
if (this._dataTypeMap.get(key) === node) {
|
|
1763
|
+
this._dataTypeMap.delete(key);
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1665
1766
|
/**
|
|
1666
1767
|
* @private
|
|
1667
1768
|
*/
|
|
@@ -1672,8 +1773,8 @@ class NamespaceImpl {
|
|
|
1672
1773
|
throw new Error("cannot find BaseDataVariableType");
|
|
1673
1774
|
}
|
|
1674
1775
|
const baseDataVariableTypeId = baseDataVariableType.nodeId;
|
|
1675
|
-
|
|
1676
|
-
|
|
1776
|
+
assert(Object.hasOwn(options, "browseName"), "options.browseName must be provided");
|
|
1777
|
+
assert(Object.hasOwn(options, "dataType"), "options.dataType must be provided");
|
|
1677
1778
|
options.historizing = !!options.historizing;
|
|
1678
1779
|
// c8 ignore next
|
|
1679
1780
|
if (Object.hasOwn(options, "hasTypeDefinition")) {
|
|
@@ -1681,26 +1782,26 @@ class NamespaceImpl {
|
|
|
1681
1782
|
}
|
|
1682
1783
|
// ------------------------------------------ TypeDefinition
|
|
1683
1784
|
let typeDefinition = options.typeDefinition || baseDataVariableTypeId;
|
|
1684
|
-
if (typeDefinition instanceof
|
|
1785
|
+
if (typeDefinition instanceof BaseNodeImpl) {
|
|
1685
1786
|
// c8 ignore next
|
|
1686
|
-
if (typeDefinition.nodeClass !==
|
|
1687
|
-
const message = `invalid typeDefinition expecting a VariableType got ${
|
|
1787
|
+
if (typeDefinition.nodeClass !== NodeClass.VariableType) {
|
|
1788
|
+
const message = `invalid typeDefinition expecting a VariableType got ${NodeClass[typeDefinition.nodeClass]}`;
|
|
1688
1789
|
errorLog(message);
|
|
1689
1790
|
throw new Error(message);
|
|
1690
1791
|
}
|
|
1691
1792
|
}
|
|
1692
1793
|
typeDefinition = addressSpace._coerce_VariableTypeIds(typeDefinition);
|
|
1693
|
-
|
|
1794
|
+
assert(typeDefinition instanceof NodeId);
|
|
1694
1795
|
// ------------------------------------------ DataType
|
|
1695
|
-
options.dataType = addressSpace._coerce_DataType(options.dataType ||
|
|
1696
|
-
options.valueRank =
|
|
1796
|
+
options.dataType = addressSpace._coerce_DataType(options.dataType || DataType.Null);
|
|
1797
|
+
options.valueRank = isNullOrUndefined(options.valueRank)
|
|
1697
1798
|
? options.arrayDimensions
|
|
1698
1799
|
? options.arrayDimensions.length
|
|
1699
1800
|
: -1
|
|
1700
1801
|
: options.valueRank;
|
|
1701
|
-
|
|
1802
|
+
assert(typeof options.valueRank === "number" && Number.isFinite(options.valueRank));
|
|
1702
1803
|
options.arrayDimensions = options.arrayDimensions || null;
|
|
1703
|
-
|
|
1804
|
+
assert(options.arrayDimensions === null || Array.isArray(options.arrayDimensions));
|
|
1704
1805
|
// -----------------------------------------------------
|
|
1705
1806
|
const hasGetter = (options) => {
|
|
1706
1807
|
return typeof options.value?.get === "function" || typeof options.value?.timestamped_get === "function";
|
|
@@ -1725,8 +1826,8 @@ class NamespaceImpl {
|
|
|
1725
1826
|
referenceType: "HasTypeDefinition"
|
|
1726
1827
|
}
|
|
1727
1828
|
]);
|
|
1728
|
-
|
|
1729
|
-
options.nodeClass =
|
|
1829
|
+
assert(!options.nodeClass || options.nodeClass === NodeClass.Variable);
|
|
1830
|
+
options.nodeClass = NodeClass.Variable;
|
|
1730
1831
|
options.references = references;
|
|
1731
1832
|
const variable = this.createNode(options);
|
|
1732
1833
|
return variable;
|
|
@@ -1736,48 +1837,47 @@ class NamespaceImpl {
|
|
|
1736
1837
|
*/
|
|
1737
1838
|
_addMethod(options) {
|
|
1738
1839
|
const addressSpace = this.addressSpace;
|
|
1739
|
-
|
|
1840
|
+
assert(isNonEmptyQualifiedName(options.browseName));
|
|
1740
1841
|
const references = [];
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1842
|
+
assert(isNonEmptyQualifiedName(options.browseName));
|
|
1843
|
+
_handle_hierarchy_parent(addressSpace, references, options);
|
|
1844
|
+
UANamespace_process_modelling_rule(references, options.modellingRule);
|
|
1744
1845
|
const method = this.internalCreateNode({
|
|
1745
1846
|
browseName: options.browseName,
|
|
1746
1847
|
description: options.description || "",
|
|
1747
1848
|
displayName: options.displayName,
|
|
1748
1849
|
eventNotifier: +(options.eventNotifier || 0),
|
|
1749
1850
|
isAbstract: false,
|
|
1750
|
-
nodeClass:
|
|
1851
|
+
nodeClass: NodeClass.Method,
|
|
1751
1852
|
nodeId: options.nodeId,
|
|
1752
1853
|
references,
|
|
1753
1854
|
rolePermissions: options.rolePermissions
|
|
1754
1855
|
});
|
|
1755
|
-
|
|
1856
|
+
assert(method.nodeId !== null);
|
|
1756
1857
|
method.propagate_back_references();
|
|
1757
|
-
|
|
1858
|
+
assert(!method.typeDefinition);
|
|
1758
1859
|
return method;
|
|
1759
1860
|
}
|
|
1760
1861
|
}
|
|
1761
|
-
exports.NamespaceImpl = NamespaceImpl;
|
|
1762
1862
|
// each concrete constructor below takes a different, incompatible options type (UADataTypeOptions,
|
|
1763
1863
|
// UAVariableOptions, ...) — the map is only ever indexed by nodeClass and invoked with the matching
|
|
1764
1864
|
// options shape by the caller, so a wider `new (options: any) => ...` signature is required here.
|
|
1765
1865
|
// biome-ignore lint/suspicious/noExplicitAny: see comment above
|
|
1766
1866
|
const _constructors_map = {
|
|
1767
|
-
DataType:
|
|
1768
|
-
Method:
|
|
1769
|
-
Object:
|
|
1770
|
-
ObjectType:
|
|
1771
|
-
ReferenceType:
|
|
1772
|
-
Variable:
|
|
1773
|
-
VariableType:
|
|
1774
|
-
View:
|
|
1867
|
+
DataType: UADataTypeImpl,
|
|
1868
|
+
Method: UAMethodImpl,
|
|
1869
|
+
Object: UAObjectImpl,
|
|
1870
|
+
ObjectType: UAObjectTypeImpl,
|
|
1871
|
+
ReferenceType: UAReferenceTypeImpl,
|
|
1872
|
+
Variable: UAVariableImpl,
|
|
1873
|
+
VariableType: UAVariableTypeImpl,
|
|
1874
|
+
View: UAViewImpl
|
|
1775
1875
|
};
|
|
1776
1876
|
function _handle_event_hierarchy_parent(addressSpace, references, options) {
|
|
1777
|
-
options.eventSourceOf =
|
|
1778
|
-
options.notifierOf =
|
|
1877
|
+
options.eventSourceOf = _coerce_parent(addressSpace, options.eventSourceOf, addressSpace._coerceNode);
|
|
1878
|
+
options.notifierOf = _coerce_parent(addressSpace, options.notifierOf, addressSpace._coerceNode);
|
|
1779
1879
|
if (options.eventSourceOf) {
|
|
1780
|
-
|
|
1880
|
+
assert(!options.notifierOf, "notifierOf shall not be provided with eventSourceOf ");
|
|
1781
1881
|
references.push({
|
|
1782
1882
|
isForward: false,
|
|
1783
1883
|
nodeId: options.eventSourceOf.nodeId,
|
|
@@ -1786,7 +1886,7 @@ function _handle_event_hierarchy_parent(addressSpace, references, options) {
|
|
|
1786
1886
|
options.eventNotifier = options.eventNotifier || 1;
|
|
1787
1887
|
}
|
|
1788
1888
|
else if (options.notifierOf) {
|
|
1789
|
-
|
|
1889
|
+
assert(!options.eventSourceOf, "eventSourceOf shall not be provided with notifierOf ");
|
|
1790
1890
|
references.push({
|
|
1791
1891
|
isForward: false,
|
|
1792
1892
|
nodeId: options.notifierOf.nodeId,
|
|
@@ -1795,10 +1895,10 @@ function _handle_event_hierarchy_parent(addressSpace, references, options) {
|
|
|
1795
1895
|
}
|
|
1796
1896
|
}
|
|
1797
1897
|
function _copy_reference(reference) {
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1898
|
+
assert(Object.hasOwn(reference, "referenceType"));
|
|
1899
|
+
assert(Object.hasOwn(reference, "isForward"));
|
|
1900
|
+
assert(Object.hasOwn(reference, "nodeId"));
|
|
1901
|
+
assert(reference.nodeId instanceof NodeId);
|
|
1802
1902
|
return {
|
|
1803
1903
|
isForward: reference.isForward,
|
|
1804
1904
|
nodeId: reference.nodeId,
|
|
@@ -1809,31 +1909,31 @@ function _copy_references(references) {
|
|
|
1809
1909
|
references = references || [];
|
|
1810
1910
|
return references.map(_copy_reference);
|
|
1811
1911
|
}
|
|
1812
|
-
function isNonEmptyQualifiedName(browseName) {
|
|
1912
|
+
export function isNonEmptyQualifiedName(browseName) {
|
|
1813
1913
|
if (!browseName) {
|
|
1814
1914
|
return false;
|
|
1815
1915
|
}
|
|
1816
1916
|
if (typeof browseName === "string") {
|
|
1817
1917
|
return browseName.length >= 0;
|
|
1818
1918
|
}
|
|
1819
|
-
if (!(browseName instanceof
|
|
1820
|
-
browseName = new
|
|
1919
|
+
if (!(browseName instanceof QualifiedName)) {
|
|
1920
|
+
browseName = new QualifiedName(browseName);
|
|
1821
1921
|
}
|
|
1822
|
-
|
|
1922
|
+
assert(browseName instanceof QualifiedName);
|
|
1823
1923
|
return (browseName.name?.length || 0) > 0;
|
|
1824
1924
|
}
|
|
1825
1925
|
function _create_node_version_if_needed(node, options) {
|
|
1826
|
-
|
|
1926
|
+
assert(options);
|
|
1827
1927
|
if (typeof options.nodeVersion === "string") {
|
|
1828
|
-
|
|
1928
|
+
assert(node.nodeClass === NodeClass.Variable || node.nodeClass === NodeClass.Object);
|
|
1829
1929
|
// c8 ignore next
|
|
1830
1930
|
if (node.getNodeVersion()) {
|
|
1831
1931
|
return; // already exists
|
|
1832
1932
|
}
|
|
1833
1933
|
const namespace = node.namespace;
|
|
1834
1934
|
const nodeVersion = namespace.addVariable({
|
|
1835
|
-
browseName:
|
|
1836
|
-
dataType:
|
|
1935
|
+
browseName: coerceQualifiedName({ name: "NodeVersion", namespaceIndex: 0 }),
|
|
1936
|
+
dataType: DataType.String,
|
|
1837
1937
|
propertyOf: node
|
|
1838
1938
|
});
|
|
1839
1939
|
const initialValue = typeof options.nodeVersion === "string" ? options.nodeVersion : "0";
|