node-opcua-address-space 2.98.0 → 2.98.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/source/address_space_ts.d.ts +118 -0
- package/dist/source/address_space_ts.js +18 -0
- package/dist/source/address_space_ts.js.map +1 -0
- package/dist/source/continuation_points/continuation_point_manager.d.ts +91 -0
- package/dist/source/continuation_points/continuation_point_manager.js +201 -0
- package/dist/source/continuation_points/continuation_point_manager.js.map +1 -0
- package/dist/source/helpers/adjust_browse_direction.d.ts +5 -0
- package/dist/source/helpers/adjust_browse_direction.js +12 -0
- package/dist/source/helpers/adjust_browse_direction.js.map +1 -0
- package/dist/source/helpers/argument_list.d.ts +33 -0
- package/dist/source/helpers/argument_list.js +255 -0
- package/dist/source/helpers/argument_list.js.map +1 -0
- package/dist/source/helpers/call_helpers.d.ts +6 -0
- package/dist/source/helpers/call_helpers.js +72 -0
- package/dist/source/helpers/call_helpers.js.map +1 -0
- package/dist/source/helpers/coerce_enum_value.d.ts +6 -0
- package/dist/source/helpers/coerce_enum_value.js +34 -0
- package/dist/source/helpers/coerce_enum_value.js.map +1 -0
- package/dist/source/helpers/dump_tools.d.ts +14 -0
- package/dist/source/helpers/dump_tools.js +79 -0
- package/dist/source/helpers/dump_tools.js.map +1 -0
- package/dist/source/helpers/ensure_secure_access.d.ts +9 -0
- package/dist/source/helpers/ensure_secure_access.js +77 -0
- package/dist/source/helpers/ensure_secure_access.js.map +1 -0
- package/dist/source/helpers/make_optionals_map.d.ts +21 -0
- package/dist/source/helpers/make_optionals_map.js +30 -0
- package/dist/source/helpers/make_optionals_map.js.map +1 -0
- package/dist/source/helpers/multiform_func.d.ts +11 -0
- package/dist/source/helpers/multiform_func.js +76 -0
- package/dist/source/helpers/multiform_func.js.map +1 -0
- package/dist/source/helpers/resolve_opaque_on_address_space.d.ts +3 -0
- package/dist/source/helpers/resolve_opaque_on_address_space.js +37 -0
- package/dist/source/helpers/resolve_opaque_on_address_space.js.map +1 -0
- package/dist/source/index.d.ts +61 -0
- package/dist/source/index.js +90 -0
- package/dist/source/index.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +19 -0
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +193 -0
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +12 -0
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +10 -0
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +7 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +7 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +4 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +4 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +9 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +4 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +4 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +20 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +23 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +32 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +19 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +45 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +7 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +26 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +5 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +20 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +26 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +8 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +10 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js.map +1 -0
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +21 -0
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js +3 -0
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js.map +1 -0
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +24 -0
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js +3 -0
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js.map +1 -0
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +12 -0
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js +3 -0
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js.map +1 -0
- package/dist/source/interfaces/data_access/ua_y_array_item_ex.d.ts +8 -0
- package/dist/source/interfaces/data_access/ua_y_array_item_ex.js +3 -0
- package/dist/source/interfaces/data_access/ua_y_array_item_ex.js.map +1 -0
- package/dist/source/interfaces/extension_object_constructor.d.ts +10 -0
- package/dist/source/interfaces/extension_object_constructor.js +3 -0
- package/dist/source/interfaces/extension_object_constructor.js.map +1 -0
- package/dist/source/interfaces/nodeset_loader_options.d.ts +4 -0
- package/dist/source/interfaces/nodeset_loader_options.js +3 -0
- package/dist/source/interfaces/nodeset_loader_options.js.map +1 -0
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +12 -0
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js +3 -0
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js.map +1 -0
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +49 -0
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js +3 -0
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js.map +1 -0
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +11 -0
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js +3 -0
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js.map +1 -0
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +30 -0
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.js +3 -0
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.js.map +1 -0
- package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +234 -0
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js +3 -0
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +1 -0
- package/dist/source/interfaces/state_machine/ua_transition_ex.d.ts +6 -0
- package/dist/source/interfaces/state_machine/ua_transition_ex.js +3 -0
- package/dist/source/interfaces/state_machine/ua_transition_ex.js.map +1 -0
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +8 -0
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js +3 -0
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -0
- package/dist/source/loader/decode_xml_extension_object.d.ts +6 -0
- package/dist/source/loader/decode_xml_extension_object.js +72 -0
- package/dist/source/loader/decode_xml_extension_object.js.map +1 -0
- package/dist/source/loader/ensure_datatype_extracted.d.ts +5 -0
- package/dist/source/loader/ensure_datatype_extracted.js +71 -0
- package/dist/source/loader/ensure_datatype_extracted.js.map +1 -0
- package/dist/source/loader/generateAddressSpaceRaw.d.ts +11 -0
- package/dist/source/loader/generateAddressSpaceRaw.js +46 -0
- package/dist/source/loader/generateAddressSpaceRaw.js.map +1 -0
- package/dist/source/loader/load_nodeset2.d.ts +17 -0
- package/dist/source/loader/load_nodeset2.js +1484 -0
- package/dist/source/loader/load_nodeset2.js.map +1 -0
- package/dist/source/loader/make_semver_compatible.d.ts +6 -0
- package/dist/source/loader/make_semver_compatible.js +26 -0
- package/dist/source/loader/make_semver_compatible.js.map +1 -0
- package/dist/source/loader/make_xml_extension_object_parser.d.ts +28 -0
- package/dist/source/loader/make_xml_extension_object_parser.js +327 -0
- package/dist/source/loader/make_xml_extension_object_parser.js.map +1 -0
- package/dist/source/loader/namespace_post_step.d.ts +10 -0
- package/dist/source/loader/namespace_post_step.js +62 -0
- package/dist/source/loader/namespace_post_step.js.map +1 -0
- package/dist/source/loader/register_node_promoter.d.ts +2 -0
- package/dist/source/loader/register_node_promoter.js +10 -0
- package/dist/source/loader/register_node_promoter.js.map +1 -0
- package/dist/source/namespace.d.ts +6 -0
- package/dist/source/namespace.js +3 -0
- package/dist/source/namespace.js.map +1 -0
- package/dist/source/namespace_alarm_and_condition.d.ts +32 -0
- package/dist/source/namespace_alarm_and_condition.js +3 -0
- package/dist/source/namespace_alarm_and_condition.js.map +1 -0
- package/dist/source/namespace_data_access.d.ts +42 -0
- package/dist/source/namespace_data_access.js +3 -0
- package/dist/source/namespace_data_access.js.map +1 -0
- package/dist/source/namespace_machine_state.d.ts +8 -0
- package/dist/source/namespace_machine_state.js +3 -0
- package/dist/source/namespace_machine_state.js.map +1 -0
- package/dist/source/pseudo_session.d.ts +72 -0
- package/dist/source/pseudo_session.js +255 -0
- package/dist/source/pseudo_session.js.map +1 -0
- package/dist/source/session_context.d.ts +111 -0
- package/dist/source/session_context.js +265 -0
- package/dist/source/session_context.js.map +1 -0
- package/dist/source/set_namespace_meta_data.d.ts +2 -0
- package/dist/source/set_namespace_meta_data.js +60 -0
- package/dist/source/set_namespace_meta_data.js.map +1 -0
- package/dist/source/ua_root_folder.d.ts +9 -0
- package/dist/source/ua_root_folder.js +3 -0
- package/dist/source/ua_root_folder.js.map +1 -0
- package/dist/source/ua_two_state_variable_ex.d.ts +23 -0
- package/dist/source/ua_two_state_variable_ex.js +3 -0
- package/dist/source/ua_two_state_variable_ex.js.map +1 -0
- package/dist/source/xml_writer.d.ts +18 -0
- package/dist/source/xml_writer.js +3 -0
- package/dist/source/xml_writer.js.map +1 -0
- package/dist/src/address_space.d.ts +387 -0
- package/dist/src/address_space.js +1386 -0
- package/dist/src/address_space.js.map +1 -0
- package/dist/src/address_space_change_event_tools.d.ts +6 -0
- package/dist/src/address_space_change_event_tools.js +153 -0
- package/dist/src/address_space_change_event_tools.js.map +1 -0
- package/dist/src/address_space_private.d.ts +43 -0
- package/dist/src/address_space_private.js +3 -0
- package/dist/src/address_space_private.js.map +1 -0
- package/dist/src/alarms_and_conditions/condition.d.ts +5 -0
- package/dist/src/alarms_and_conditions/condition.js +79 -0
- package/dist/src/alarms_and_conditions/condition.js.map +1 -0
- package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +26 -0
- package/dist/src/alarms_and_conditions/condition_info_impl.js +55 -0
- package/dist/src/alarms_and_conditions/condition_info_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +222 -0
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +658 -0
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +9 -0
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +61 -0
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -0
- package/dist/src/alarms_and_conditions/index.d.ts +16 -0
- package/dist/src/alarms_and_conditions/index.js +33 -0
- package/dist/src/alarms_and_conditions/index.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +44 -0
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +245 -0
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +93 -0
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +419 -0
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +26 -0
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js +39 -0
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +44 -0
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +184 -0
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +155 -0
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +1029 -0
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +14 -0
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +35 -0
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +24 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +57 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +11 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +12 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +23 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +87 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +11 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js +8 -0
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +79 -0
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +251 -0
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +24 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +51 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +19 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +163 -0
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +46 -0
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +166 -0
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -0
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +18 -0
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +18 -0
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -0
- package/dist/src/apply_condition_refresh.d.ts +6 -0
- package/dist/src/apply_condition_refresh.js +28 -0
- package/dist/src/apply_condition_refresh.js.map +1 -0
- package/dist/src/base_node_impl.d.ts +284 -0
- package/dist/src/base_node_impl.js +1455 -0
- package/dist/src/base_node_impl.js.map +1 -0
- package/dist/src/base_node_private.d.ts +81 -0
- package/dist/src/base_node_private.js +833 -0
- package/dist/src/base_node_private.js.map +1 -0
- package/dist/src/check_value_rank_compatibility.d.ts +15 -0
- package/dist/src/check_value_rank_compatibility.js +82 -0
- package/dist/src/check_value_rank_compatibility.js.map +1 -0
- package/dist/src/data_access/add_dataItem_stuff.d.ts +11 -0
- package/dist/src/data_access/add_dataItem_stuff.js +62 -0
- package/dist/src/data_access/add_dataItem_stuff.js.map +1 -0
- package/dist/src/data_access/check_variant_compatibility_ua_analog_item.d.ts +1 -0
- package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js +35 -0
- package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js.map +1 -0
- package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +32 -0
- package/dist/src/data_access/ua_multistate_discrete_impl.js +131 -0
- package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -0
- package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +52 -0
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js +254 -0
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +1 -0
- package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +25 -0
- package/dist/src/data_access/ua_two_state_discrete_impl.js +156 -0
- package/dist/src/data_access/ua_two_state_discrete_impl.js.map +1 -0
- package/dist/src/event_data.d.ts +34 -0
- package/dist/src/event_data.js +65 -0
- package/dist/src/event_data.js.map +1 -0
- package/dist/src/extension_object_array_node.d.ts +23 -0
- package/dist/src/extension_object_array_node.js +249 -0
- package/dist/src/extension_object_array_node.js.map +1 -0
- package/dist/src/historical_access/address_space_historical_data_node.d.ts +26 -0
- package/dist/src/historical_access/address_space_historical_data_node.js +653 -0
- package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -0
- package/dist/src/idx_iterator.d.ts +8 -0
- package/dist/src/idx_iterator.js +51 -0
- package/dist/src/idx_iterator.js.map +1 -0
- package/dist/src/index_current.d.ts +46 -0
- package/dist/src/index_current.js +78 -0
- package/dist/src/index_current.js.map +1 -0
- package/dist/src/namespace_impl.d.ts +456 -0
- package/dist/src/namespace_impl.js +1763 -0
- package/dist/src/namespace_impl.js.map +1 -0
- package/dist/src/namespace_private.d.ts +23 -0
- package/dist/src/namespace_private.js +33 -0
- package/dist/src/namespace_private.js.map +1 -0
- package/dist/src/nodeid_manager.d.ts +37 -0
- package/dist/src/nodeid_manager.js +184 -0
- package/dist/src/nodeid_manager.js.map +1 -0
- package/dist/src/nodeset_tools/adjust_namespace_array.d.ts +2 -0
- package/dist/src/nodeset_tools/adjust_namespace_array.js +14 -0
- package/dist/src/nodeset_tools/adjust_namespace_array.js.map +1 -0
- package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +18 -0
- package/dist/src/nodeset_tools/construct_namespace_dependency.js +141 -0
- package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +1 -0
- package/dist/src/nodeset_tools/dump_to_bsd.d.ts +2 -0
- package/dist/src/nodeset_tools/dump_to_bsd.js +165 -0
- package/dist/src/nodeset_tools/dump_to_bsd.js.map +1 -0
- package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +10 -0
- package/dist/src/nodeset_tools/nodeset_to_xml.js +1288 -0
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -0
- package/dist/src/private_namespace.d.ts +5 -0
- package/dist/src/private_namespace.js +20 -0
- package/dist/src/private_namespace.js.map +1 -0
- package/dist/src/reference_impl.d.ts +43 -0
- package/dist/src/reference_impl.js +140 -0
- package/dist/src/reference_impl.js.map +1 -0
- package/dist/src/role_permissions.d.ts +2 -0
- package/dist/src/role_permissions.js +11 -0
- package/dist/src/role_permissions.js.map +1 -0
- package/dist/src/state_machine/finite_state_machine.d.ts +81 -0
- package/dist/src/state_machine/finite_state_machine.js +389 -0
- package/dist/src/state_machine/finite_state_machine.js.map +1 -0
- package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +38 -0
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js +251 -0
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -0
- package/dist/src/state_machine/ua_two_state_variable.d.ts +61 -0
- package/dist/src/state_machine/ua_two_state_variable.js +332 -0
- package/dist/src/state_machine/ua_two_state_variable.js.map +1 -0
- package/dist/src/tool_isSubtypeOf.d.ts +18 -0
- package/dist/src/tool_isSubtypeOf.js +125 -0
- package/dist/src/tool_isSubtypeOf.js.map +1 -0
- package/dist/src/ua_condition_type.d.ts +8 -0
- package/dist/src/ua_condition_type.js +3 -0
- package/dist/src/ua_condition_type.js.map +1 -0
- package/dist/src/ua_data_type_impl.d.ts +89 -0
- package/dist/src/ua_data_type_impl.js +369 -0
- package/dist/src/ua_data_type_impl.js.map +1 -0
- package/dist/src/ua_method_impl.d.ts +42 -0
- package/dist/src/ua_method_impl.js +218 -0
- package/dist/src/ua_method_impl.js.map +1 -0
- package/dist/src/ua_object_impl.d.ts +35 -0
- package/dist/src/ua_object_impl.js +169 -0
- package/dist/src/ua_object_impl.js.map +1 -0
- package/dist/src/ua_object_type_impl.d.ts +50 -0
- package/dist/src/ua_object_type_impl.js +127 -0
- package/dist/src/ua_object_type_impl.js.map +1 -0
- package/dist/src/ua_reference_type_impl.d.ts +45 -0
- package/dist/src/ua_reference_type_impl.js +142 -0
- package/dist/src/ua_reference_type_impl.js.map +1 -0
- package/dist/src/ua_variable_impl.d.ts +380 -0
- package/dist/src/ua_variable_impl.js +1739 -0
- package/dist/src/ua_variable_impl.js.map +1 -0
- package/dist/src/ua_variable_impl_ext_obj.d.ts +23 -0
- package/dist/src/ua_variable_impl_ext_obj.js +671 -0
- package/dist/src/ua_variable_impl_ext_obj.js.map +1 -0
- package/dist/src/ua_variable_type_impl.d.ts +74 -0
- package/dist/src/ua_variable_type_impl.js +598 -0
- package/dist/src/ua_variable_type_impl.js.map +1 -0
- package/dist/src/ua_view_impl.d.ts +19 -0
- package/dist/src/ua_view_impl.js +44 -0
- package/dist/src/ua_view_impl.js.map +1 -0
- package/dist/tsconfig_common.tsbuildinfo +1 -0
- package/distHelpers/add_event_generator_object.d.ts +3 -0
- package/{test_helpers/add_event_generator_object.ts → distHelpers/add_event_generator_object.js} +16 -22
- package/distHelpers/add_event_generator_object.js.map +1 -0
- package/distHelpers/alarms_and_conditions_demo.d.ts +9 -0
- package/{test_helpers/alarms_and_conditions_demo.ts → distHelpers/alarms_and_conditions_demo.js} +21 -56
- package/distHelpers/alarms_and_conditions_demo.js.map +1 -0
- package/distHelpers/assertHasMatchingReference.d.ts +19 -0
- package/{test_helpers/assertHasMatchingReference.ts → distHelpers/assertHasMatchingReference.js} +12 -14
- package/distHelpers/assertHasMatchingReference.js.map +1 -0
- package/distHelpers/boiler_system.d.ts +113 -0
- package/{test_helpers/boiler_system.ts → distHelpers/boiler_system.js} +81 -295
- package/distHelpers/boiler_system.js.map +1 -0
- package/distHelpers/create_minimalist_address_space_nodeset.d.ts +5 -0
- package/{test_helpers/create_minimalist_address_space_nodeset.ts → distHelpers/create_minimalist_address_space_nodeset.js} +51 -87
- package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -0
- package/distHelpers/date_utils.d.ts +3 -0
- package/distHelpers/date_utils.js +10 -0
- package/distHelpers/date_utils.js.map +1 -0
- package/distHelpers/dump_statemachine.d.ts +0 -0
- package/distHelpers/dump_statemachine.js +128 -0
- package/distHelpers/dump_statemachine.js.map +1 -0
- package/distHelpers/get_address_space_fixture.d.ts +1 -0
- package/{test_helpers/get_address_space_fixture.ts → distHelpers/get_address_space_fixture.js} +8 -7
- package/distHelpers/get_address_space_fixture.js.map +1 -0
- package/distHelpers/get_mini_address_space.d.ts +7 -0
- package/distHelpers/get_mini_address_space.js +37 -0
- package/distHelpers/get_mini_address_space.js.map +1 -0
- package/distHelpers/index.js +29 -0
- package/distHelpers/index.js.map +1 -0
- package/distHelpers/mock_session.d.ts +10 -0
- package/distHelpers/mock_session.js +26 -0
- package/distHelpers/mock_session.js.map +1 -0
- package/distNodeJS/generate_address_space.d.ts +6 -0
- package/distNodeJS/generate_address_space.js +53 -0
- package/distNodeJS/generate_address_space.js.map +1 -0
- package/distNodeJS/index.js +18 -0
- package/distNodeJS/index.js.map +1 -0
- package/package.json +49 -38
- package/source/helpers/dump_tools.ts +92 -0
- package/src/nodeset_tools/dump_to_bsd.ts +198 -0
- package/.mocharc.yml +0 -12
- package/generate.js +0 -1
- package/source_nodejs/generate_address_space.ts +0 -60
- package/test_helpers/date_utils.ts +0 -5
- package/test_helpers/get_mini_address_space.ts +0 -42
- package/test_helpers/mock_session.ts +0 -34
- package/test_helpers/test_fixtures/dataType_in_separateNamespace.xml +0 -150
- package/test_helpers/test_fixtures/dataType_in_separateNamespace_basic.xml +0 -57
- package/test_helpers/test_fixtures/dataType_in_separateNamespace_mix.xml +0 -136
- package/test_helpers/test_fixtures/dataType_issue.xml +0 -80
- package/test_helpers/test_fixtures/dataType_withEnumeration.xml +0 -82
- package/test_helpers/test_fixtures/dataType_with_isOptionSet.xml +0 -194
- package/test_helpers/test_fixtures/dataType_with_qualifiedname.xml +0 -71
- package/test_helpers/test_fixtures/dataType_with_recursive_structure.xml +0 -155
- package/test_helpers/test_fixtures/dataType_with_structures.xml +0 -605
- package/test_helpers/test_fixtures/dataType_with_union.xml +0 -90
- package/test_helpers/test_fixtures/datatype_as_per_1.04.xml +0 -118
- package/test_helpers/test_fixtures/datatype_with_allow_subtype.xml +0 -104
- package/test_helpers/test_fixtures/eurange_issue.xml +0 -74
- package/test_helpers/test_fixtures/example_issue1096.xml +0 -267
- package/test_helpers/test_fixtures/fixture_empty_nodeset2.xml +0 -106
- package/test_helpers/test_fixtures/fixture_simple_statemachine_nodeset2.xml +0 -1305
- package/test_helpers/test_fixtures/fixuture_nodeset_objects_with_some_methods.xml +0 -370
- package/test_helpers/test_fixtures/issue_1132_variable_with_nodeid_value.xml +0 -68
- package/test_helpers/test_fixtures/issue_846.xml +0 -3172
- package/test_helpers/test_fixtures/issue_899_variable_with_nodeid_value.xml +0 -33
- package/test_helpers/test_fixtures/mini.Node.Set2.xml +0 -4736
- package/test_helpers/test_fixtures/mini.nodeset.withVariousVariables.xml +0 -196
- package/test_helpers/test_fixtures/minimalist_nodeset_with_models.xml +0 -8
- package/test_helpers/test_fixtures/minimalist_nodeset_with_models_more_complex.xml +0 -20
- package/test_helpers/test_fixtures/nodeset_no_aliases.xml +0 -30
- package/test_helpers/test_fixtures/nodeset_no_aliases_with_aliases.xml +0 -31
- package/test_helpers/test_fixtures/nodeset_with_analog_items.xml +0 -45
- package/test_helpers/test_fixtures/nodeset_with_guid.xml +0 -1442
- package/test_helpers/test_fixtures/nodeset_with_int64_values.xml +0 -31
- package/test_helpers/test_fixtures/nodeset_with_special_char.xml +0 -34
- package/test_helpers/test_fixtures/nodeset_with_utf8_special_characters.xml +0 -20
- package/test_helpers/test_fixtures/variable_with_value.xml +0 -143
- package/test_helpers/test_fixtures/variabletype_with_value.xml +0 -324
- /package/{test_helpers/index.ts → distHelpers/index.d.ts} +0 -0
- /package/{source_nodejs/index.ts → distNodeJS/index.d.ts} +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.generateAddressSpace = exports.readNodeSet2XmlFile = void 0;
|
|
13
|
+
const fs = require("fs");
|
|
14
|
+
const util_1 = require("util");
|
|
15
|
+
const node_opcua_debug_1 = require("node-opcua-debug");
|
|
16
|
+
const __1 = require("..");
|
|
17
|
+
const doDebug = (0, node_opcua_debug_1.checkDebugFlag)(__filename);
|
|
18
|
+
const debugLog = (0, node_opcua_debug_1.make_debugLog)(__filename);
|
|
19
|
+
const errorLog = (0, node_opcua_debug_1.make_errorLog)(__filename);
|
|
20
|
+
function readNodeSet2XmlFile(xmlFile) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
// istanbul ignore next
|
|
23
|
+
if (!fs.existsSync(xmlFile)) {
|
|
24
|
+
const msg = "[NODE-OPCUA-E02] generateAddressSpace : cannot find nodeset2 xml file at " + xmlFile;
|
|
25
|
+
errorLog(msg);
|
|
26
|
+
throw new Error(msg);
|
|
27
|
+
}
|
|
28
|
+
debugLog(" parsing ", xmlFile);
|
|
29
|
+
const xmlData = yield fs.promises.readFile(xmlFile, "utf-8");
|
|
30
|
+
return xmlData;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
exports.readNodeSet2XmlFile = readNodeSet2XmlFile;
|
|
34
|
+
function generateAddressSpace(...args) {
|
|
35
|
+
const addressSpace = args[0];
|
|
36
|
+
const xmlFiles = args[1];
|
|
37
|
+
if (args.length === 4) {
|
|
38
|
+
const options = args[2];
|
|
39
|
+
const callback = args[3];
|
|
40
|
+
(0, util_1.callbackify)(__1.generateAddressSpaceRaw)(addressSpace, xmlFiles, readNodeSet2XmlFile, options || {}, callback);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
const options = {};
|
|
44
|
+
const callback = args[2];
|
|
45
|
+
(0, util_1.callbackify)(__1.generateAddressSpaceRaw)(addressSpace, xmlFiles, readNodeSet2XmlFile, options, callback);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.generateAddressSpace = generateAddressSpace;
|
|
49
|
+
// tslint:disable:no-var-requires
|
|
50
|
+
// tslint:disable:max-line-length
|
|
51
|
+
const thenify = require("thenify");
|
|
52
|
+
module.exports.generateAddressSpace = thenify.withCallback(module.exports.generateAddressSpace);
|
|
53
|
+
//# sourceMappingURL=generate_address_space.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate_address_space.js","sourceRoot":"","sources":["../source_nodejs/generate_address_space.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yBAAyB;AACzB,+BAAmC;AAEnC,uDAAgF;AAGhF,0BAA6C;AAG7C,MAAM,OAAO,GAAG,IAAA,iCAAc,EAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,QAAQ,GAAG,IAAA,gCAAa,EAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,QAAQ,GAAG,IAAA,gCAAa,EAAC,UAAU,CAAC,CAAC;AAE3C,SAAsB,mBAAmB,CAAC,OAAe;;QACrD,uBAAuB;QACvB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;YACzB,MAAM,GAAG,GAAG,2EAA2E,GAAG,OAAO,CAAC;YAClG,QAAQ,CAAC,GAAG,CAAC,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;SACxB;QACD,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC/B,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC7D,OAAO,OAAO,CAAC;IACnB,CAAC;CAAA;AAVD,kDAUC;AAiBD,SAAgB,oBAAoB,CAChC,GAAI,IAAW;IAEf,MAAM,YAAY,GAAG,IAAI,CAAC,CAAC,CAAkB,CAAC;IAC9C,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAsB,CAAC;IAC9C,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACnB,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAqC,CAAC;QAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAA2B,CAAC;QACnD,IAAA,kBAAW,EAAC,2BAAuB,CAAC,CAAC,YAAY,EAAE,QAAQ,EAAE,mBAAmB,EAAE,OAAO,IAAG,EAAE,EAAE,QAAS,CAAC,CAAC;KAC9G;SAAM;QACH,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAA2B,CAAC;QACnD,IAAA,kBAAW,EAAC,2BAAuB,CAAC,CAAC,YAAY,EAAE,QAAQ,EAAE,mBAAmB,EAAE,OAAO,EAAE,QAAS,CAAC,CAAC;KACzG;AACL,CAAC;AAdD,oDAcC;AAED,iCAAiC;AACjC,iCAAiC;AACjC,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,MAAM,CAAC,OAAe,CAAC,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAE,MAAM,CAAC,OAAe,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./generate_address_space"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../source_nodejs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-address-space",
|
|
3
|
-
"version": "2.98.
|
|
4
|
-
"description": "pure nodejs OPCUA SDK - module
|
|
3
|
+
"version": "2.98.2",
|
|
4
|
+
"description": "pure nodejs OPCUA SDK - module address-space",
|
|
5
5
|
"main": "./dist/src/index_current.js",
|
|
6
6
|
"types": "./dist/source/index.d.ts",
|
|
7
7
|
"engines": {
|
|
@@ -22,36 +22,36 @@
|
|
|
22
22
|
"chalk": "4.1.2",
|
|
23
23
|
"dequeue": "^1.0.5",
|
|
24
24
|
"lodash": "4.17.21",
|
|
25
|
-
"node-opcua-address-space-base": "2.98.
|
|
26
|
-
"node-opcua-assert": "2.
|
|
27
|
-
"node-opcua-basic-types": "2.98.
|
|
28
|
-
"node-opcua-binary-stream": "2.98.
|
|
29
|
-
"node-opcua-client-dynamic-extension-object": "2.98.
|
|
30
|
-
"node-opcua-constants": "2.
|
|
25
|
+
"node-opcua-address-space-base": "2.98.2",
|
|
26
|
+
"node-opcua-assert": "2.98.1",
|
|
27
|
+
"node-opcua-basic-types": "2.98.1",
|
|
28
|
+
"node-opcua-binary-stream": "2.98.1",
|
|
29
|
+
"node-opcua-client-dynamic-extension-object": "2.98.2",
|
|
30
|
+
"node-opcua-constants": "2.98.1",
|
|
31
31
|
"node-opcua-crypto": "^2.1.2",
|
|
32
|
-
"node-opcua-data-access": "2.98.
|
|
33
|
-
"node-opcua-data-model": "2.98.
|
|
34
|
-
"node-opcua-data-value": "2.98.
|
|
35
|
-
"node-opcua-date-time": "2.98.
|
|
36
|
-
"node-opcua-debug": "2.98.
|
|
37
|
-
"node-opcua-enum": "2.98.
|
|
38
|
-
"node-opcua-extension-object": "2.98.
|
|
39
|
-
"node-opcua-factory": "2.98.
|
|
40
|
-
"node-opcua-nodeid": "2.98.
|
|
41
|
-
"node-opcua-nodeset-ua": "2.98.
|
|
42
|
-
"node-opcua-numeric-range": "2.98.
|
|
43
|
-
"node-opcua-object-registry": "2.98.
|
|
44
|
-
"node-opcua-pseudo-session": "2.98.
|
|
45
|
-
"node-opcua-service-browse": "2.98.
|
|
46
|
-
"node-opcua-service-call": "2.98.
|
|
47
|
-
"node-opcua-service-history": "2.98.
|
|
48
|
-
"node-opcua-service-translate-browse-path": "2.98.
|
|
49
|
-
"node-opcua-service-write": "2.98.
|
|
50
|
-
"node-opcua-status-code": "2.98.
|
|
51
|
-
"node-opcua-types": "2.98.
|
|
52
|
-
"node-opcua-utils": "2.98.
|
|
53
|
-
"node-opcua-variant": "2.98.
|
|
54
|
-
"node-opcua-xml2json": "2.98.
|
|
32
|
+
"node-opcua-data-access": "2.98.2",
|
|
33
|
+
"node-opcua-data-model": "2.98.1",
|
|
34
|
+
"node-opcua-data-value": "2.98.1",
|
|
35
|
+
"node-opcua-date-time": "2.98.1",
|
|
36
|
+
"node-opcua-debug": "2.98.1",
|
|
37
|
+
"node-opcua-enum": "2.98.1",
|
|
38
|
+
"node-opcua-extension-object": "2.98.1",
|
|
39
|
+
"node-opcua-factory": "2.98.1",
|
|
40
|
+
"node-opcua-nodeid": "2.98.1",
|
|
41
|
+
"node-opcua-nodeset-ua": "2.98.2",
|
|
42
|
+
"node-opcua-numeric-range": "2.98.1",
|
|
43
|
+
"node-opcua-object-registry": "2.98.1",
|
|
44
|
+
"node-opcua-pseudo-session": "2.98.2",
|
|
45
|
+
"node-opcua-service-browse": "2.98.2",
|
|
46
|
+
"node-opcua-service-call": "2.98.2",
|
|
47
|
+
"node-opcua-service-history": "2.98.2",
|
|
48
|
+
"node-opcua-service-translate-browse-path": "2.98.2",
|
|
49
|
+
"node-opcua-service-write": "2.98.2",
|
|
50
|
+
"node-opcua-status-code": "2.98.1",
|
|
51
|
+
"node-opcua-types": "2.98.2",
|
|
52
|
+
"node-opcua-utils": "2.98.1",
|
|
53
|
+
"node-opcua-variant": "2.98.1",
|
|
54
|
+
"node-opcua-xml2json": "2.98.2",
|
|
55
55
|
"semver": "^7.3.8",
|
|
56
56
|
"set-prototype-of": "^1.0.0",
|
|
57
57
|
"thenify": "^3.3.1",
|
|
@@ -59,12 +59,12 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"mocha": "^10.2.0",
|
|
62
|
-
"node-opcua-benchmarker": "2.98.
|
|
63
|
-
"node-opcua-leak-detector": "2.98.
|
|
64
|
-
"node-opcua-nodesets": "2.98.
|
|
65
|
-
"node-opcua-packet-analyzer": "2.98.
|
|
66
|
-
"node-opcua-service-filter": "2.98.
|
|
67
|
-
"node-opcua-test-fixtures": "2.98.
|
|
62
|
+
"node-opcua-benchmarker": "2.98.1",
|
|
63
|
+
"node-opcua-leak-detector": "2.98.1",
|
|
64
|
+
"node-opcua-nodesets": "2.98.2",
|
|
65
|
+
"node-opcua-packet-analyzer": "2.98.1",
|
|
66
|
+
"node-opcua-service-filter": "2.98.2",
|
|
67
|
+
"node-opcua-test-fixtures": "2.98.2",
|
|
68
68
|
"should": "^13.2.3",
|
|
69
69
|
"sinon": "^15.0.3",
|
|
70
70
|
"source-map-support": "^0.5.21"
|
|
@@ -84,5 +84,16 @@
|
|
|
84
84
|
"internet of things"
|
|
85
85
|
],
|
|
86
86
|
"homepage": "http://node-opcua.github.io/",
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "6df8aa25475ba1235e585566cb2dec68b7e7a85f",
|
|
88
|
+
"files": [
|
|
89
|
+
"dist",
|
|
90
|
+
"distHelpers",
|
|
91
|
+
"distNodeJS",
|
|
92
|
+
"source",
|
|
93
|
+
"src",
|
|
94
|
+
"nodeJS.d.ts",
|
|
95
|
+
"nodeJS.js",
|
|
96
|
+
"testHelpers.js",
|
|
97
|
+
"testHelpers.d.ts"
|
|
98
|
+
]
|
|
88
99
|
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-address-space
|
|
3
|
+
*/
|
|
4
|
+
// tslint:disable:no-console
|
|
5
|
+
import * as chalk from "chalk";
|
|
6
|
+
|
|
7
|
+
import { assert } from "node-opcua-assert";
|
|
8
|
+
import { BrowseDirection } from "node-opcua-data-model";
|
|
9
|
+
import { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
10
|
+
import { BrowseDescription, BrowseDescriptionOptions, ReferenceDescription } from "node-opcua-types";
|
|
11
|
+
|
|
12
|
+
import { IAddressSpace, BaseNode, UAReference, UAReferenceType as UAReferenceTypePublic } from "node-opcua-address-space-base";
|
|
13
|
+
|
|
14
|
+
import { resolveReferenceType } from "../../src/reference_impl";
|
|
15
|
+
|
|
16
|
+
export function referenceTypeToString(addressSpace: IAddressSpace, referenceTypeId: NodeIdLike | null): string {
|
|
17
|
+
// istanbul ignore next
|
|
18
|
+
if (!referenceTypeId) {
|
|
19
|
+
return "<null> ";
|
|
20
|
+
} else {
|
|
21
|
+
const referenceType = addressSpace.findNode(referenceTypeId)! as UAReferenceTypePublic;
|
|
22
|
+
return referenceTypeId.toString() + " " + referenceType.browseName.toString() + "/" + referenceType.inverseName!.text;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function nodeIdInfo(addressSpace: IAddressSpace, nodeId: NodeId): string {
|
|
27
|
+
const obj = addressSpace.findNode(nodeId);
|
|
28
|
+
const name = obj ? obj.browseName.toString() : " <????>";
|
|
29
|
+
return nodeId.toString() + " [ " + name + " ]";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function dumpReferenceDescription(addressSpace: IAddressSpace, referenceDescription: ReferenceDescription): void {
|
|
33
|
+
assert(referenceDescription.referenceTypeId); // must be known;
|
|
34
|
+
|
|
35
|
+
console.log(chalk.red("referenceDescription"));
|
|
36
|
+
console.log(" referenceTypeId : ", referenceTypeToString(addressSpace, referenceDescription.referenceTypeId));
|
|
37
|
+
console.log(" isForward : ", referenceDescription.isForward ? "true" : "false");
|
|
38
|
+
console.log(" nodeId : ", nodeIdInfo(addressSpace, referenceDescription.nodeId));
|
|
39
|
+
console.log(" browseName : ", referenceDescription.browseName.toString());
|
|
40
|
+
console.log(" nodeClass : ", referenceDescription.nodeClass.toString());
|
|
41
|
+
console.log(" typeDefinition : ", nodeIdInfo(addressSpace, referenceDescription.typeDefinition));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function dumpReferenceDescriptions(addressSpace: IAddressSpace, referenceDescriptions: ReferenceDescription[]): void {
|
|
45
|
+
referenceDescriptions.forEach((r: ReferenceDescription) => dumpReferenceDescription(addressSpace, r));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function dumpBrowseDescription(node: BaseNode, _browseDescription: BrowseDescriptionOptions): void {
|
|
49
|
+
const browseDescription = new BrowseDescription(_browseDescription);
|
|
50
|
+
|
|
51
|
+
const addressSpace = node.addressSpace;
|
|
52
|
+
|
|
53
|
+
console.log(" Browse Node :");
|
|
54
|
+
|
|
55
|
+
if (browseDescription.nodeId) {
|
|
56
|
+
console.log(" nodeId : ", chalk.cyan(browseDescription.nodeId.toString()));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
console.log(" nodeId : ", chalk.cyan(node.browseName.toString()), "(", node.nodeId.toString(), ")");
|
|
60
|
+
console.log(" referenceTypeId :", referenceTypeToString(addressSpace, browseDescription.referenceTypeId));
|
|
61
|
+
|
|
62
|
+
console.log(" browseDirection :", chalk.cyan(BrowseDirection[browseDescription.browseDirection]));
|
|
63
|
+
console.log(" includeSubType :", browseDescription.includeSubtypes ? "true" : "false");
|
|
64
|
+
console.log(" nodeClassMask :", browseDescription.nodeClassMask);
|
|
65
|
+
console.log(" resultMask :", browseDescription.resultMask);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @method dumpReferences
|
|
70
|
+
* @param addressSpace {IAddressSpace}
|
|
71
|
+
* @param references {Array<Reference>|null}
|
|
72
|
+
* @static
|
|
73
|
+
*/
|
|
74
|
+
export function dumpReferences(addressSpace: IAddressSpace, references: UAReference[]): void {
|
|
75
|
+
assert(addressSpace);
|
|
76
|
+
for (const reference of references) {
|
|
77
|
+
const referenceType = resolveReferenceType(addressSpace, reference);
|
|
78
|
+
if (!referenceType) {
|
|
79
|
+
// unknown type ... this may happen when the address space is not fully build
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const dir = reference.isForward ? "(=>)" : "(<-)";
|
|
83
|
+
const objectName = nodeIdInfo(addressSpace, reference.nodeId);
|
|
84
|
+
console.log(
|
|
85
|
+
" referenceType : ",
|
|
86
|
+
dir,
|
|
87
|
+
referenceType ? referenceType.browseName.toString() : reference.referenceType.toString(),
|
|
88
|
+
" ",
|
|
89
|
+
objectName
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { IAddressSpace, INamespace, UADataType } from "node-opcua-address-space-base";
|
|
2
|
+
import { assert } from "node-opcua-assert";
|
|
3
|
+
import { StructureDefinition, EnumDefinition } from "node-opcua-types";
|
|
4
|
+
import { INodeId, NodeId, NodeIdType } from "node-opcua-nodeid";
|
|
5
|
+
import { AddressSpacePrivate } from "../address_space_private";
|
|
6
|
+
import { XmlWriter } from "../../source/xml_writer";
|
|
7
|
+
import { NamespacePrivate } from "../namespace_private";
|
|
8
|
+
import { constructNamespaceDependency } from "./construct_namespace_dependency";
|
|
9
|
+
|
|
10
|
+
// tslint:disable-next-line: no-var-requires
|
|
11
|
+
const XMLWriter = require("xml-writer");
|
|
12
|
+
|
|
13
|
+
function dumpEnumeratedType(xw: XmlWriter, e: EnumDefinition, name: string): void {
|
|
14
|
+
xw.startElement("opc:EnumeratedType");
|
|
15
|
+
xw.writeAttribute("Name", name);
|
|
16
|
+
xw.writeAttribute("LengthInBits", "32");
|
|
17
|
+
for (const f of e.fields || []) {
|
|
18
|
+
xw.startElement("opc:EnumeratedValue");
|
|
19
|
+
xw.writeAttribute("Name", f.name!);
|
|
20
|
+
assert(f.value[0] === 0, "unsupported 64 bit value !");
|
|
21
|
+
xw.writeAttribute("Value", f.value[1].toString());
|
|
22
|
+
xw.endElement();
|
|
23
|
+
}
|
|
24
|
+
xw.endElement();
|
|
25
|
+
}
|
|
26
|
+
function buildXmlName(addressSpace: AddressSpacePrivate, map: { [key: number]: string }, nodeId: NodeId): string {
|
|
27
|
+
if (NodeId.sameNodeId(nodeId, NodeId.nullNodeId)) {
|
|
28
|
+
return "ua:ExtensionObject";
|
|
29
|
+
}
|
|
30
|
+
const node = addressSpace.findNode(nodeId);
|
|
31
|
+
// istanbul ignore next
|
|
32
|
+
if (!node) {
|
|
33
|
+
throw new Error("Cannot find Node for" + nodeId?.toString());
|
|
34
|
+
}
|
|
35
|
+
const typeName = node.browseName.name!;
|
|
36
|
+
|
|
37
|
+
const n = node.nodeId as INodeId;
|
|
38
|
+
const prefix = (n.identifierType === NodeIdType.NUMERIC && n.namespace === 0) ? (n.value <= 15 ? "opc" : "ua") : map[node.nodeId.namespace];
|
|
39
|
+
return prefix + ":" + (typeName === "Structure" && prefix === "ua" ? "ExtensionObject" : typeName);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// eslint-disable-next-line max-statements
|
|
43
|
+
function dumpDataTypeStructure(
|
|
44
|
+
xw: XmlWriter,
|
|
45
|
+
addressSpace: IAddressSpace,
|
|
46
|
+
map: { [key: number]: string },
|
|
47
|
+
structureDefinition: StructureDefinition,
|
|
48
|
+
structureDefinitionBase: StructureDefinition | undefined | null,
|
|
49
|
+
name: string,
|
|
50
|
+
doc?: string
|
|
51
|
+
): void {
|
|
52
|
+
xw.startElement("opc:StructuredType");
|
|
53
|
+
xw.writeAttribute("Name", name);
|
|
54
|
+
xw.writeAttribute("BaseType", buildXmlName(addressSpace as AddressSpacePrivate, map, structureDefinition.baseDataType));
|
|
55
|
+
|
|
56
|
+
if (doc) {
|
|
57
|
+
xw.startElement("opc:Documentation");
|
|
58
|
+
xw.text(doc);
|
|
59
|
+
xw.endElement();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const fields = structureDefinition.fields || [];
|
|
63
|
+
// get base class
|
|
64
|
+
const nbFieldsInBase = structureDefinitionBase ? structureDefinitionBase.fields?.length || 0 : 0;
|
|
65
|
+
|
|
66
|
+
let optionalsCount = 0;
|
|
67
|
+
for (let index = nbFieldsInBase; index < fields.length; index++) {
|
|
68
|
+
const f = fields[index];
|
|
69
|
+
if (f.isOptional) {
|
|
70
|
+
xw.startElement("opc:Field");
|
|
71
|
+
xw.writeAttribute("Name", f.name + "Specified");
|
|
72
|
+
xw.writeAttribute("TypeName", "opc:Bit");
|
|
73
|
+
xw.endElement();
|
|
74
|
+
optionalsCount++;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// istanbul ignore next
|
|
79
|
+
if (optionalsCount >= 32) {
|
|
80
|
+
throw new Error("Too many optionals fields");
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (optionalsCount) {
|
|
84
|
+
/*
|
|
85
|
+
const padding = optionalsCount <= 8
|
|
86
|
+
? (8 - optionalsCount)
|
|
87
|
+
: (optionalsCount <= 16)
|
|
88
|
+
? (16 - optionalsCount)
|
|
89
|
+
: (32 - optionalsCount)
|
|
90
|
+
;
|
|
91
|
+
*/
|
|
92
|
+
const padding = 32 - optionalsCount;
|
|
93
|
+
if (padding !== 0) {
|
|
94
|
+
xw.startElement("opc:Field");
|
|
95
|
+
xw.writeAttribute("Name", "Reserved1");
|
|
96
|
+
xw.writeAttribute("TypeName", "opc:Bit");
|
|
97
|
+
xw.writeAttribute("Length", padding.toString());
|
|
98
|
+
xw.endElement();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
for (let index = nbFieldsInBase; index < fields.length; index++) {
|
|
102
|
+
const f = fields[index];
|
|
103
|
+
|
|
104
|
+
const isArray = f.valueRank > 0 && f.arrayDimensions?.length;
|
|
105
|
+
|
|
106
|
+
if (isArray) {
|
|
107
|
+
xw.startElement("opc:Field");
|
|
108
|
+
xw.writeAttribute("Name", "NoOf" + f.name!);
|
|
109
|
+
xw.writeAttribute("TypeName", "opc:Int32");
|
|
110
|
+
if (f.isOptional) {
|
|
111
|
+
xw.writeAttribute("SwitchField", f.name + "Specified");
|
|
112
|
+
}
|
|
113
|
+
xw.endElement();
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
xw.startElement("opc:Field");
|
|
117
|
+
xw.writeAttribute("Name", f.name!);
|
|
118
|
+
|
|
119
|
+
const typeName = buildXmlName(addressSpace as AddressSpacePrivate, map, f.dataType);
|
|
120
|
+
xw.writeAttribute("TypeName", typeName);
|
|
121
|
+
if (isArray) {
|
|
122
|
+
xw.writeAttribute("LengthField", "NoOf" + f.name!);
|
|
123
|
+
}
|
|
124
|
+
if (f.isOptional) {
|
|
125
|
+
xw.writeAttribute("SwitchField", f.name + "Specified");
|
|
126
|
+
}
|
|
127
|
+
xw.endElement();
|
|
128
|
+
}
|
|
129
|
+
xw.endElement();
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function dumpDataTypeToBSD(xw: XmlWriter, dataType: UADataType, map: { [key: number]: string }) {
|
|
133
|
+
const addressSpace = dataType.addressSpace;
|
|
134
|
+
|
|
135
|
+
const name: string = dataType.browseName.name!;
|
|
136
|
+
|
|
137
|
+
const definition = dataType.getDefinition();
|
|
138
|
+
if (definition instanceof StructureDefinition) {
|
|
139
|
+
const structureDefinitionBase = dataType.subtypeOfObj?.getStructureDefinition();
|
|
140
|
+
dumpDataTypeStructure(xw, addressSpace, map, definition, structureDefinitionBase, name);
|
|
141
|
+
}
|
|
142
|
+
if (definition instanceof EnumDefinition) {
|
|
143
|
+
dumpEnumeratedType(xw, definition, name);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function shortcut(namespace: INamespace) {
|
|
148
|
+
return "n" + namespace.index;
|
|
149
|
+
}
|
|
150
|
+
export function dumpToBSD(namespace: NamespacePrivate): string {
|
|
151
|
+
const dependency: INamespace[] = constructNamespaceDependency(namespace);
|
|
152
|
+
|
|
153
|
+
const addressSpace = namespace.addressSpace;
|
|
154
|
+
|
|
155
|
+
const xw: XmlWriter = new XMLWriter(true);
|
|
156
|
+
|
|
157
|
+
//xx xw.startDocument():// { encoding: "utf-8", version: "1.0" });
|
|
158
|
+
|
|
159
|
+
xw.startElement("opc:TypeDictionary");
|
|
160
|
+
|
|
161
|
+
xw.writeAttribute("xmlns:opc", "http://opcfoundation.org/BinarySchema/");
|
|
162
|
+
xw.writeAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
|
|
163
|
+
xw.writeAttribute("xmlns:ua", "http://opcfoundation.org/UA/");
|
|
164
|
+
xw.writeAttribute("xmlns:tns", namespace.namespaceUri);
|
|
165
|
+
|
|
166
|
+
const map: { [key: number]: string } = {};
|
|
167
|
+
|
|
168
|
+
map[namespace.index] = "tns";
|
|
169
|
+
|
|
170
|
+
for (const dependantNamespace of dependency) {
|
|
171
|
+
const namespaceIndex = dependantNamespace.index;
|
|
172
|
+
if (namespaceIndex === 0 || namespaceIndex === namespace.index) {
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
const ns = shortcut(dependantNamespace);
|
|
176
|
+
map[namespaceIndex] = ns;
|
|
177
|
+
xw.writeAttribute(`xmlns:${ns}`, dependantNamespace.namespaceUri);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
xw.writeAttribute("DefaultByteOrder", "LittleEndian");
|
|
181
|
+
xw.writeAttribute("TargetNamespace", namespace.namespaceUri);
|
|
182
|
+
|
|
183
|
+
// <opc:Import Namespace="http://opcfoundation.org/UA/"/>
|
|
184
|
+
for (const dependantNamespace of dependency) {
|
|
185
|
+
if (dependantNamespace.index === namespace.index) {
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
xw.startElement("opc:Import").writeAttribute("Namespace", dependantNamespace.namespaceUri).endElement();
|
|
189
|
+
}
|
|
190
|
+
//
|
|
191
|
+
for (const dataType of namespace._dataTypeIterator()) {
|
|
192
|
+
dumpDataTypeToBSD(xw, dataType, map);
|
|
193
|
+
}
|
|
194
|
+
xw.endElement();
|
|
195
|
+
// xw.endDocument();
|
|
196
|
+
|
|
197
|
+
return xw.toString();
|
|
198
|
+
}
|
package/.mocharc.yml
DELETED
package/generate.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// nothing
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import * as fs from "fs";
|
|
2
|
-
import { callbackify } from "util";
|
|
3
|
-
|
|
4
|
-
import { checkDebugFlag, make_debugLog, make_errorLog } from "node-opcua-debug";
|
|
5
|
-
import { IAddressSpace } from "node-opcua-address-space-base";
|
|
6
|
-
|
|
7
|
-
import { generateAddressSpaceRaw } from "..";
|
|
8
|
-
import { NodeSetLoaderOptions } from "../source/interfaces/nodeset_loader_options";
|
|
9
|
-
|
|
10
|
-
const doDebug = checkDebugFlag(__filename);
|
|
11
|
-
const debugLog = make_debugLog(__filename);
|
|
12
|
-
const errorLog = make_errorLog(__filename);
|
|
13
|
-
|
|
14
|
-
export async function readNodeSet2XmlFile(xmlFile: string): Promise<string> {
|
|
15
|
-
// istanbul ignore next
|
|
16
|
-
if (!fs.existsSync(xmlFile)) {
|
|
17
|
-
const msg = "[NODE-OPCUA-E02] generateAddressSpace : cannot find nodeset2 xml file at " + xmlFile;
|
|
18
|
-
errorLog(msg);
|
|
19
|
-
throw new Error(msg);
|
|
20
|
-
}
|
|
21
|
-
debugLog(" parsing ", xmlFile);
|
|
22
|
-
const xmlData = await fs.promises.readFile(xmlFile, "utf-8");
|
|
23
|
-
return xmlData;
|
|
24
|
-
}
|
|
25
|
-
export function generateAddressSpace(
|
|
26
|
-
addressSpace: IAddressSpace,
|
|
27
|
-
xmlFiles: string | string[],
|
|
28
|
-
callback: (err?: Error) => void
|
|
29
|
-
): void;
|
|
30
|
-
export function generateAddressSpace(
|
|
31
|
-
addressSpace: IAddressSpace,
|
|
32
|
-
xmlFiles: string | string[],
|
|
33
|
-
options: NodeSetLoaderOptions | undefined,
|
|
34
|
-
callback: (err?: Error) => void
|
|
35
|
-
): void;
|
|
36
|
-
export function generateAddressSpace(
|
|
37
|
-
addressSpace: IAddressSpace,
|
|
38
|
-
xmlFiles: string | string[],
|
|
39
|
-
options?: NodeSetLoaderOptions
|
|
40
|
-
): Promise<void>;
|
|
41
|
-
export function generateAddressSpace(
|
|
42
|
-
... args: any[]
|
|
43
|
-
): any {
|
|
44
|
-
const addressSpace = args[0] as IAddressSpace;
|
|
45
|
-
const xmlFiles = args[1] as string | string[];
|
|
46
|
-
if (args.length === 4) {
|
|
47
|
-
const options = args[2] as NodeSetLoaderOptions | undefined;
|
|
48
|
-
const callback = args[3] as (err?: Error) => void;
|
|
49
|
-
callbackify(generateAddressSpaceRaw)(addressSpace, xmlFiles, readNodeSet2XmlFile, options ||{}, callback!);
|
|
50
|
-
} else {
|
|
51
|
-
const options = {};
|
|
52
|
-
const callback = args[2] as (err?: Error) => void;
|
|
53
|
-
callbackify(generateAddressSpaceRaw)(addressSpace, xmlFiles, readNodeSet2XmlFile, options, callback!);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// tslint:disable:no-var-requires
|
|
58
|
-
// tslint:disable:max-line-length
|
|
59
|
-
const thenify = require("thenify");
|
|
60
|
-
(module.exports as any).generateAddressSpace = thenify.withCallback((module.exports as any).generateAddressSpace);
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module node-opcua-address-space
|
|
3
|
-
*/
|
|
4
|
-
import { assert } from "node-opcua-assert";
|
|
5
|
-
|
|
6
|
-
import { AddressSpace } from "..";
|
|
7
|
-
import { generateAddressSpace } from "../nodeJS";
|
|
8
|
-
|
|
9
|
-
import { getAddressSpaceFixture } from "./get_address_space_fixture";
|
|
10
|
-
|
|
11
|
-
export const mini_nodeset = "mini.Node.Set2.xml";
|
|
12
|
-
export const empty_nodeset = "fixture_empty_nodeset2.xml";
|
|
13
|
-
|
|
14
|
-
export const get_mini_nodeset_filename = (): string => getAddressSpaceFixture(mini_nodeset);
|
|
15
|
-
export const get_empty_nodeset_filename = (): string => getAddressSpaceFixture(empty_nodeset);
|
|
16
|
-
|
|
17
|
-
// tslint:disable:no-var-requires
|
|
18
|
-
// tslint:disable:max-line-length
|
|
19
|
-
const thenify = require("thenify");
|
|
20
|
-
|
|
21
|
-
export function getMiniAddressSpace(callback: (err: Error | null, addressSpace?: AddressSpace) => void): void;
|
|
22
|
-
export function getMiniAddressSpace(): Promise<AddressSpace>;
|
|
23
|
-
export function getMiniAddressSpace(...args: any[]): any {
|
|
24
|
-
const callback = args[0] as (err: Error | null, addressSpace?: AddressSpace) => void;
|
|
25
|
-
|
|
26
|
-
const addressSpace = AddressSpace.create();
|
|
27
|
-
|
|
28
|
-
// register namespace 1 (our namespace);
|
|
29
|
-
const serverNamespace = addressSpace.registerNamespace("http://MYNAMESPACE");
|
|
30
|
-
assert(serverNamespace.index === 1);
|
|
31
|
-
|
|
32
|
-
generateAddressSpace(addressSpace, get_mini_nodeset_filename(), {}, (err?: Error) => {
|
|
33
|
-
// istanbul ignore next
|
|
34
|
-
if (err) {
|
|
35
|
-
// tslint:disable:no-console
|
|
36
|
-
console.log("err =", err);
|
|
37
|
-
}
|
|
38
|
-
callback(err || null, addressSpace);
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
(module.exports as any).getMiniAddressSpace = thenify.withCallback((module.exports as any).getMiniAddressSpace);
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ContinuationData, IContinuationPointInfo, IContinuationPointManager, ISessionBase } from "node-opcua-address-space-base";
|
|
2
|
-
import { DataValue } from "node-opcua-data-value";
|
|
3
|
-
import { NodeId } from "node-opcua-nodeid";
|
|
4
|
-
import { ReferenceDescription } from "node-opcua-service-browse";
|
|
5
|
-
|
|
6
|
-
export class MockContinuationPointManager implements IContinuationPointManager {
|
|
7
|
-
public registerHistoryReadRaw(
|
|
8
|
-
maxElements: number,
|
|
9
|
-
dataValues: DataValue[],
|
|
10
|
-
cnt: ContinuationData
|
|
11
|
-
): IContinuationPointInfo<DataValue> {
|
|
12
|
-
throw new Error("Method not implemented.");
|
|
13
|
-
}
|
|
14
|
-
public getNextHistoryReadRaw(numValues: number, cnt: ContinuationData): IContinuationPointInfo<DataValue> {
|
|
15
|
-
throw new Error("Method not implemented.");
|
|
16
|
-
}
|
|
17
|
-
public registerReferences(
|
|
18
|
-
maxElements: number,
|
|
19
|
-
values: ReferenceDescription[],
|
|
20
|
-
cnt: ContinuationData
|
|
21
|
-
): IContinuationPointInfo<ReferenceDescription> {
|
|
22
|
-
throw new Error("Method not implemented.");
|
|
23
|
-
}
|
|
24
|
-
public getNextReferences(numValue: number, cnt: ContinuationData): IContinuationPointInfo<ReferenceDescription> {
|
|
25
|
-
throw new Error("Method not implemented.");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const mockSession: ISessionBase = {
|
|
30
|
-
getSessionId() {
|
|
31
|
-
return new NodeId();
|
|
32
|
-
},
|
|
33
|
-
continuationPointManager: new MockContinuationPointManager()
|
|
34
|
-
};
|