node-opcua-address-space 2.179.0 → 2.181.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/address_space_public.ts +63 -0
- package/api/address_space_ts.ts +129 -0
- package/api/continuation_points/continuation_point_manager.ts +271 -0
- package/api/helpers/argument_list.ts +310 -0
- package/api/helpers/call_helpers.ts +100 -0
- package/api/helpers/coerce_enum_value.ts +33 -0
- package/api/helpers/dump_tools.ts +90 -0
- package/api/helpers/ensure_secure_access.ts +78 -0
- package/api/helpers/multiform_func.ts +78 -0
- package/api/helpers/resolve_opaque_on_address_space.ts +26 -0
- package/api/index.ts +210 -0
- package/api/interfaces/alarms_and_conditions/condition_info_i.ts +60 -0
- package/api/interfaces/alarms_and_conditions/condition_snapshot.ts +236 -0
- package/api/interfaces/alarms_and_conditions/deviation_stuff.ts +16 -0
- package/api/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +8 -0
- package/api/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +6 -0
- package/api/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +6 -0
- package/api/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +13 -0
- package/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +6 -0
- package/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +6 -0
- package/api/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +21 -0
- package/api/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +28 -0
- package/api/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +72 -0
- package/api/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +36 -0
- package/api/interfaces/alarms_and_conditions/ua_condition_ex.ts +55 -0
- package/api/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +17 -0
- package/api/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +21 -0
- package/api/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +21 -0
- package/api/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +26 -0
- package/api/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +29 -0
- package/api/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +25 -0
- package/api/interfaces/data_access/ua_multistate_discrete_ex.ts +57 -0
- package/api/interfaces/data_access/ua_multistate_value_discrete_ex.ts +31 -0
- package/api/interfaces/data_access/ua_two_state_discrete_ex.ts +15 -0
- package/api/interfaces/nodeset_loader_options.ts +58 -0
- package/api/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +20 -0
- package/api/interfaces/state_machine/ua_finite_state_machine_type.ts +50 -0
- package/api/interfaces/state_machine/ua_program_state_machine_type.ts +14 -0
- package/api/interfaces/state_machine/ua_shelved_state_machine_ex.ts +35 -0
- package/api/interfaces/state_machine/ua_state_machine_type.ts +288 -0
- package/api/loader/decode_xml_extension_object.ts +80 -0
- package/api/loader/ensure_datatype_extracted.ts +122 -0
- package/api/loader/generateAddressSpaceRaw.ts +470 -0
- package/api/loader/load_nodeset2.ts +278 -0
- package/api/loader/make_xml_extension_object_parser.ts +518 -0
- package/api/loader/namespace_post_step.ts +68 -0
- package/api/loader/nodeset_image.ts +451 -0
- package/api/loader/nodeset_image_codec.ts +576 -0
- package/api/loader/nodeset_image_store.ts +78 -0
- package/api/loader/nodeset_record.ts +141 -0
- package/api/loader/nodeset_record_applier.ts +889 -0
- package/api/loader/nodeset_source.ts +367 -0
- package/api/loader/nodeset_source_helpers.ts +50 -0
- package/api/loader/nodeset_to_image.ts +29 -0
- package/api/loader/nodeset_xml_producer.ts +383 -0
- package/api/loader/parsers/extension_object_parser.ts +374 -0
- package/api/loader/parsers/variant_parser.ts +363 -0
- package/api/loader/register_node_promoter.ts +6 -0
- package/api/namespace.ts +25 -0
- package/api/namespace_alarm_and_condition.ts +78 -0
- package/api/namespace_data_access.ts +92 -0
- package/api/namespace_machine_state.ts +20 -0
- package/api/pseudo_session.ts +415 -0
- package/api/session_context.ts +729 -0
- package/api/ua_interface.ts +38 -0
- package/api/ua_two_state_variable_ex.ts +36 -0
- package/bin/opcua-nodeset-image.js +192 -0
- package/dist/api/address_space_public.d.ts +57 -0
- package/dist/api/address_space_public.js +19 -0
- package/dist/api/address_space_public.js.map +1 -0
- package/dist/api/address_space_ts.d.ts +79 -0
- package/dist/api/address_space_ts.js +13 -0
- package/dist/api/address_space_ts.js.map +1 -0
- package/dist/api/continuation_points/continuation_point_manager.js +230 -0
- package/dist/api/continuation_points/continuation_point_manager.js.map +1 -0
- package/dist/api/helpers/adjust_browse_direction.js.map +1 -0
- package/dist/api/helpers/argument_list.js +263 -0
- package/dist/api/helpers/argument_list.js.map +1 -0
- package/dist/api/helpers/call_helpers.js +80 -0
- package/dist/api/helpers/call_helpers.js.map +1 -0
- package/dist/api/helpers/coerce_enum_value.d.ts +6 -0
- package/dist/api/helpers/coerce_enum_value.js.map +1 -0
- package/dist/api/helpers/dump_tools.js +81 -0
- package/dist/api/helpers/dump_tools.js.map +1 -0
- package/dist/api/helpers/ensure_secure_access.d.ts +19 -0
- package/dist/api/helpers/ensure_secure_access.js +67 -0
- package/dist/api/helpers/ensure_secure_access.js.map +1 -0
- package/dist/api/helpers/make_optionals_map.js.map +1 -0
- package/dist/api/helpers/multiform_func.js +75 -0
- package/dist/api/helpers/multiform_func.js.map +1 -0
- package/dist/api/helpers/resolve_opaque_on_address_space.js +25 -0
- package/dist/api/helpers/resolve_opaque_on_address_space.js.map +1 -0
- package/dist/api/index.d.ts +113 -0
- package/dist/api/index.js +234 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/condition_info_i.d.ts +54 -0
- package/dist/api/interfaces/alarms_and_conditions/condition_info_i.js +28 -0
- package/dist/api/interfaces/alarms_and_conditions/condition_info_i.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/condition_snapshot.d.ts +151 -0
- package/dist/api/interfaces/alarms_and_conditions/condition_snapshot.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/deviation_stuff.d.ts +12 -0
- package/dist/api/interfaces/alarms_and_conditions/deviation_stuff.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/install_setpoint_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +7 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_condition_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +4 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +4 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +10 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +4 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +4 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +20 -0
- package/dist/api/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +21 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +56 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_base_event_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +19 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +44 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_condition_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +4 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +5 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +19 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +25 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +8 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js.map +1 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +10 -0
- package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js.map +1 -0
- package/dist/api/interfaces/data_access/ua_multistate_discrete_ex.d.ts +44 -0
- package/dist/api/interfaces/data_access/ua_multistate_discrete_ex.js.map +1 -0
- package/dist/api/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +22 -0
- package/dist/api/interfaces/data_access/ua_multistate_value_discrete_ex.js.map +1 -0
- package/dist/api/interfaces/data_access/ua_two_state_discrete_ex.d.ts +13 -0
- package/dist/api/interfaces/data_access/ua_two_state_discrete_ex.js.map +1 -0
- package/dist/api/interfaces/data_access/ua_y_array_item_ex.js.map +1 -0
- package/dist/api/interfaces/extension_object_constructor.js.map +1 -0
- package/dist/api/interfaces/i_condition_variable_type_setter_options.js.map +1 -0
- package/dist/api/interfaces/i_set_state_options.js.map +1 -0
- package/dist/api/interfaces/nodeset_loader_options.d.ts +56 -0
- package/dist/api/interfaces/nodeset_loader_options.js.map +1 -0
- package/dist/api/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +12 -0
- package/dist/api/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js.map +1 -0
- package/dist/api/interfaces/state_machine/ua_finite_state_machine_type.d.ts +49 -0
- package/dist/api/interfaces/state_machine/ua_finite_state_machine_type.js.map +1 -0
- package/dist/api/interfaces/state_machine/ua_program_state_machine_type.d.ts +11 -0
- package/dist/api/interfaces/state_machine/ua_program_state_machine_type.js.map +1 -0
- package/dist/api/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +29 -0
- package/dist/api/interfaces/state_machine/ua_shelved_state_machine_ex.js.map +1 -0
- package/dist/api/interfaces/state_machine/ua_state_machine_type.d.ts +236 -0
- package/dist/api/interfaces/state_machine/ua_state_machine_type.js.map +1 -0
- package/dist/api/interfaces/state_machine/ua_transition_ex.js.map +1 -0
- package/dist/api/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -0
- package/dist/api/loader/decode_xml_extension_object.d.ts +6 -0
- package/dist/api/loader/decode_xml_extension_object.js +69 -0
- package/dist/api/loader/decode_xml_extension_object.js.map +1 -0
- package/dist/api/loader/ensure_datatype_extracted.js +88 -0
- package/dist/api/loader/ensure_datatype_extracted.js.map +1 -0
- package/dist/api/loader/generateAddressSpaceRaw.d.ts +64 -0
- package/dist/api/loader/generateAddressSpaceRaw.js +379 -0
- package/dist/api/loader/generateAddressSpaceRaw.js.map +1 -0
- package/dist/api/loader/load_nodeset2.d.ts +38 -0
- package/dist/api/loader/load_nodeset2.js +245 -0
- package/dist/api/loader/load_nodeset2.js.map +1 -0
- package/dist/api/loader/make_semver_compatible.js.map +1 -0
- package/dist/api/loader/make_xml_extension_object_parser.js +417 -0
- package/dist/api/loader/make_xml_extension_object_parser.js.map +1 -0
- package/dist/api/loader/namespace_post_step.js +57 -0
- package/dist/api/loader/namespace_post_step.js.map +1 -0
- package/dist/api/loader/nodeset_image.d.ts +94 -0
- package/dist/api/loader/nodeset_image.js +406 -0
- package/dist/api/loader/nodeset_image.js.map +1 -0
- package/dist/api/loader/nodeset_image_codec.d.ts +104 -0
- package/dist/api/loader/nodeset_image_codec.js +489 -0
- package/dist/api/loader/nodeset_image_codec.js.map +1 -0
- package/dist/api/loader/nodeset_image_store.d.ts +27 -0
- package/dist/api/loader/nodeset_image_store.js +72 -0
- package/dist/api/loader/nodeset_image_store.js.map +1 -0
- package/dist/api/loader/nodeset_record.d.ts +125 -0
- package/dist/api/loader/nodeset_record.js +26 -0
- package/dist/api/loader/nodeset_record.js.map +1 -0
- package/dist/api/loader/nodeset_record_applier.d.ts +106 -0
- package/dist/api/loader/nodeset_record_applier.js +731 -0
- package/dist/api/loader/nodeset_record_applier.js.map +1 -0
- package/dist/api/loader/nodeset_source.d.ts +124 -0
- package/dist/api/loader/nodeset_source.js +307 -0
- package/dist/api/loader/nodeset_source.js.map +1 -0
- package/dist/api/loader/nodeset_source_helpers.d.ts +27 -0
- package/dist/api/loader/nodeset_source_helpers.js +30 -0
- package/dist/api/loader/nodeset_source_helpers.js.map +1 -0
- package/dist/api/loader/nodeset_to_image.d.ts +13 -0
- package/dist/api/loader/nodeset_to_image.js +30 -0
- package/dist/api/loader/nodeset_to_image.js.map +1 -0
- package/dist/api/loader/nodeset_xml_producer.d.ts +16 -0
- package/dist/api/loader/nodeset_xml_producer.js +349 -0
- package/dist/api/loader/nodeset_xml_producer.js.map +1 -0
- package/dist/api/loader/parsers/extension_object_parser.js +274 -0
- package/dist/api/loader/parsers/extension_object_parser.js.map +1 -0
- package/dist/api/loader/parsers/localized_text_parser.js.map +1 -0
- package/dist/api/loader/parsers/nodeid_parser.js.map +1 -0
- package/dist/api/loader/parsers/qualified_name_parser.js.map +1 -0
- package/dist/api/loader/parsers/variant_parser.d.ts +42 -0
- package/dist/api/loader/parsers/variant_parser.js +294 -0
- package/dist/api/loader/parsers/variant_parser.js.map +1 -0
- package/dist/api/loader/register_node_promoter.d.ts +2 -0
- package/dist/api/loader/register_node_promoter.js +9 -0
- package/dist/api/loader/register_node_promoter.js.map +1 -0
- package/dist/api/namespace.d.ts +18 -0
- package/dist/api/namespace.js.map +1 -0
- package/dist/api/namespace_alarm_and_condition.d.ts +33 -0
- package/dist/api/namespace_alarm_and_condition.js.map +1 -0
- package/dist/api/namespace_data_access.d.ts +67 -0
- package/dist/api/namespace_data_access.js.map +1 -0
- package/dist/api/namespace_machine_state.d.ts +8 -0
- package/dist/api/namespace_machine_state.js.map +1 -0
- package/dist/api/pseudo_session.d.ts +74 -0
- package/dist/api/pseudo_session.js +308 -0
- package/dist/api/pseudo_session.js.map +1 -0
- package/dist/api/session_context.d.ts +242 -0
- package/dist/api/session_context.js +524 -0
- package/dist/api/session_context.js.map +1 -0
- package/dist/api/set_namespace_meta_data.js.map +1 -0
- package/dist/api/ua_addin.js.map +1 -0
- package/dist/api/ua_interface.js +25 -0
- package/dist/api/ua_interface.js.map +1 -0
- package/dist/api/ua_root_folder.js.map +1 -0
- package/dist/api/ua_two_state_variable_ex.d.ts +24 -0
- package/dist/api/ua_two_state_variable_ex.js.map +1 -0
- package/dist/api/xml_writer.js.map +1 -0
- package/dist/impl/_instantiate_helpers.js +99 -0
- package/dist/impl/_instantiate_helpers.js.map +1 -0
- package/dist/impl/_mandatory_child_or_requested_optional_filter.js +82 -0
- package/dist/impl/_mandatory_child_or_requested_optional_filter.js.map +1 -0
- package/dist/impl/address_space.d.ts +379 -0
- package/dist/impl/address_space.js +1383 -0
- package/dist/impl/address_space.js.map +1 -0
- package/dist/impl/address_space_change_event_tools.d.ts +6 -0
- package/dist/impl/address_space_change_event_tools.js.map +1 -0
- package/dist/impl/address_space_private.d.ts +48 -0
- package/dist/impl/address_space_private.js.map +1 -0
- package/dist/impl/alarms_and_conditions/condition.js.map +1 -0
- package/dist/impl/alarms_and_conditions/condition_info_impl.d.ts +19 -0
- package/dist/impl/alarms_and_conditions/condition_info_impl.js +39 -0
- package/dist/impl/alarms_and_conditions/condition_info_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/condition_snapshot_impl.d.ts +271 -0
- package/dist/impl/alarms_and_conditions/condition_snapshot_impl.js +700 -0
- package/dist/impl/alarms_and_conditions/condition_snapshot_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/deviation_alarm_helper.d.ts +12 -0
- package/dist/impl/alarms_and_conditions/deviation_alarm_helper.js +66 -0
- package/dist/impl/alarms_and_conditions/deviation_alarm_helper.js.map +1 -0
- package/dist/impl/alarms_and_conditions/index.d.ts +16 -0
- package/dist/impl/alarms_and_conditions/index.js +33 -0
- package/dist/impl/alarms_and_conditions/index.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +54 -0
- package/dist/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +244 -0
- package/dist/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_alarm_condition_impl.d.ts +105 -0
- package/dist/impl/alarms_and_conditions/ua_alarm_condition_impl.js +428 -0
- package/dist/impl/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_base_event_impl.d.ts +36 -0
- package/dist/impl/alarms_and_conditions/ua_base_event_impl.js +32 -0
- package/dist/impl/alarms_and_conditions/ua_base_event_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +47 -0
- package/dist/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +204 -0
- package/dist/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_condition_impl.d.ts +152 -0
- package/dist/impl/alarms_and_conditions/ua_condition_impl.js +1016 -0
- package/dist/impl/alarms_and_conditions/ua_condition_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +22 -0
- package/dist/impl/alarms_and_conditions/ua_discrete_alarm_impl.js +41 -0
- package/dist/impl/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +30 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +54 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +12 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +13 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +28 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +86 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +10 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js +8 -0
- package/dist/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_limit_alarm_impl.d.ts +49 -0
- package/dist/impl/alarms_and_conditions/ua_limit_alarm_impl.js +207 -0
- package/dist/impl/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +28 -0
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +54 -0
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +38 -0
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +172 -0
- package/dist/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +44 -0
- package/dist/impl/alarms_and_conditions/ua_off_normal_alarm_impl.js +164 -0
- package/dist/impl/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -0
- package/dist/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +18 -0
- package/dist/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +18 -0
- package/dist/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -0
- package/dist/impl/apply_condition_refresh.d.ts +4 -0
- package/dist/impl/apply_condition_refresh.js +29 -0
- package/dist/impl/apply_condition_refresh.js.map +1 -0
- package/dist/impl/base_node_impl.d.ts +347 -0
- package/dist/impl/base_node_impl.js +1768 -0
- package/dist/impl/base_node_impl.js.map +1 -0
- package/dist/impl/base_node_private.d.ts +138 -0
- package/dist/impl/base_node_private.js +1028 -0
- package/dist/impl/base_node_private.js.map +1 -0
- package/dist/impl/check_value_rank_compatibility.js.map +1 -0
- package/dist/impl/child_accessors.d.ts +43 -0
- package/dist/impl/child_accessors.js +222 -0
- package/dist/impl/child_accessors.js.map +1 -0
- package/dist/impl/data_access/add_dataItem_stuff.js.map +1 -0
- package/dist/impl/data_access/adjust_datavalue_status_code.d.ts +7 -0
- package/dist/impl/data_access/adjust_datavalue_status_code.js.map +1 -0
- package/dist/impl/data_access/ua_multistate_discrete_impl.d.ts +38 -0
- package/dist/impl/data_access/ua_multistate_discrete_impl.js +143 -0
- package/dist/impl/data_access/ua_multistate_discrete_impl.js.map +1 -0
- package/dist/impl/data_access/ua_multistate_value_discrete_impl.d.ts +61 -0
- package/dist/impl/data_access/ua_multistate_value_discrete_impl.js +303 -0
- package/dist/impl/data_access/ua_multistate_value_discrete_impl.js.map +1 -0
- package/dist/impl/data_access/ua_two_state_discrete_impl.d.ts +30 -0
- package/dist/impl/data_access/ua_two_state_discrete_impl.js +164 -0
- package/dist/impl/data_access/ua_two_state_discrete_impl.js.map +1 -0
- package/dist/impl/event_data.d.ts +27 -0
- package/dist/impl/event_data.js +73 -0
- package/dist/impl/event_data.js.map +1 -0
- package/dist/impl/event_layout.d.ts +40 -0
- package/dist/impl/event_layout.js +103 -0
- package/dist/impl/event_layout.js.map +1 -0
- package/dist/impl/extension_object_array_node.d.ts +41 -0
- package/dist/impl/extension_object_array_node.js +274 -0
- package/dist/impl/extension_object_array_node.js.map +1 -0
- package/dist/impl/get_basic_datatype.js.map +1 -0
- package/dist/impl/handle_hierarchy_parent.d.ts +33 -0
- package/dist/impl/handle_hierarchy_parent.js +103 -0
- package/dist/impl/handle_hierarchy_parent.js.map +1 -0
- package/dist/impl/historical_access/address_space_historical_data_node.d.ts +21 -0
- package/dist/impl/historical_access/address_space_historical_data_node.js +658 -0
- package/dist/impl/historical_access/address_space_historical_data_node.js.map +1 -0
- package/dist/impl/historizer_factory.d.ts +18 -0
- package/dist/impl/historizer_factory.js +16 -0
- package/dist/impl/historizer_factory.js.map +1 -0
- package/dist/impl/idx_iterator.js.map +1 -0
- package/dist/impl/namespace_impl.d.ts +469 -0
- package/dist/impl/namespace_impl.js +1845 -0
- package/dist/impl/namespace_impl.js.map +1 -0
- package/dist/impl/namespace_private.d.ts +25 -0
- package/dist/impl/namespace_private.js.map +1 -0
- package/dist/impl/nodeid_manager.js +249 -0
- package/dist/impl/nodeid_manager.js.map +1 -0
- package/dist/impl/nodeset_tools/adjust_namespace_array.js.map +1 -0
- package/dist/impl/nodeset_tools/construct_namespace_dependency.d.ts +37 -0
- package/dist/impl/nodeset_tools/construct_namespace_dependency.js +352 -0
- package/dist/impl/nodeset_tools/construct_namespace_dependency.js.map +1 -0
- package/dist/impl/nodeset_tools/dump_to_bsd.d.ts +10 -0
- package/dist/impl/nodeset_tools/dump_to_bsd.js +176 -0
- package/dist/impl/nodeset_tools/dump_to_bsd.js.map +1 -0
- package/dist/impl/nodeset_tools/nodeset_to_records.d.ts +67 -0
- package/dist/impl/nodeset_tools/nodeset_to_records.js +773 -0
- package/dist/impl/nodeset_tools/nodeset_to_records.js.map +1 -0
- package/dist/impl/nodeset_tools/nodeset_to_xml.d.ts +28 -0
- package/dist/impl/nodeset_tools/nodeset_to_xml.js +1132 -0
- package/dist/impl/nodeset_tools/nodeset_to_xml.js.map +1 -0
- package/dist/impl/private_namespace.d.ts +5 -0
- package/dist/impl/private_namespace.js.map +1 -0
- package/dist/impl/reference_impl.d.ts +82 -0
- package/dist/impl/reference_impl.js +207 -0
- package/dist/impl/reference_impl.js.map +1 -0
- package/dist/impl/reference_type_version.d.ts +22 -0
- package/dist/impl/reference_type_version.js +22 -0
- package/dist/impl/reference_type_version.js.map +1 -0
- package/dist/impl/role_permissions.js.map +1 -0
- package/dist/impl/state_machine/finite_state_machine.d.ts +81 -0
- package/dist/impl/state_machine/finite_state_machine.js +573 -0
- package/dist/impl/state_machine/finite_state_machine.js.map +1 -0
- package/dist/impl/state_machine/ua_shelving_state_machine_ex.d.ts +64 -0
- package/dist/impl/state_machine/ua_shelving_state_machine_ex.js +249 -0
- package/dist/impl/state_machine/ua_shelving_state_machine_ex.js.map +1 -0
- package/dist/impl/state_machine/ua_two_state_variable.d.ts +55 -0
- package/dist/impl/state_machine/ua_two_state_variable.js +323 -0
- package/dist/impl/state_machine/ua_two_state_variable.js.map +1 -0
- package/dist/impl/tool_isSubtypeOf.d.ts +18 -0
- package/dist/impl/tool_isSubtypeOf.js +138 -0
- package/dist/impl/tool_isSubtypeOf.js.map +1 -0
- package/dist/impl/ua_condition_type.js.map +1 -0
- package/dist/impl/ua_data_type_impl.d.ts +87 -0
- package/dist/impl/ua_data_type_impl.js +391 -0
- package/dist/impl/ua_data_type_impl.js.map +1 -0
- package/dist/impl/ua_method_impl.d.ts +48 -0
- package/dist/impl/ua_method_impl.js +281 -0
- package/dist/impl/ua_method_impl.js.map +1 -0
- package/dist/impl/ua_object_impl.d.ts +38 -0
- package/dist/impl/ua_object_impl.js +214 -0
- package/dist/impl/ua_object_impl.js.map +1 -0
- package/dist/impl/ua_object_type_impl.d.ts +55 -0
- package/dist/impl/ua_object_type_impl.js +131 -0
- package/dist/impl/ua_object_type_impl.js.map +1 -0
- package/dist/impl/ua_reference_type_impl.d.ts +42 -0
- package/dist/impl/ua_reference_type_impl.js +157 -0
- package/dist/impl/ua_reference_type_impl.js.map +1 -0
- package/dist/impl/ua_variable_impl.d.ts +391 -0
- package/dist/impl/ua_variable_impl.js +2001 -0
- package/dist/impl/ua_variable_impl.js.map +1 -0
- package/dist/impl/ua_variable_impl_ext_obj.d.ts +23 -0
- package/dist/impl/ua_variable_impl_ext_obj.js +753 -0
- package/dist/impl/ua_variable_impl_ext_obj.js.map +1 -0
- package/dist/impl/ua_variable_type_impl.d.ts +79 -0
- package/dist/impl/ua_variable_type_impl.js +279 -0
- package/dist/impl/ua_variable_type_impl.js.map +1 -0
- package/dist/impl/ua_view_impl.d.ts +18 -0
- package/dist/impl/ua_view_impl.js +45 -0
- package/dist/impl/ua_view_impl.js.map +1 -0
- package/dist/impl/validate_data_type_correctness.d.ts +6 -0
- package/dist/impl/validate_data_type_correctness.js +123 -0
- package/dist/impl/validate_data_type_correctness.js.map +1 -0
- package/dist/tsconfig_base.tsbuildinfo +1 -1
- package/distHelpers/address_space_digest.d.ts +4 -0
- package/distHelpers/address_space_digest.js +9 -0
- package/distHelpers/address_space_digest.js.map +1 -0
- package/distHelpers/alarms_and_conditions_demo.d.ts +1 -1
- package/distHelpers/assertHasMatchingReference.d.ts +1 -1
- package/distHelpers/boiler_system.d.ts +1 -1
- package/distHelpers/boiler_system.js +3 -3
- package/distHelpers/boiler_system.js.map +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.d.ts +1 -1
- package/distHelpers/get_address_space_fixture.js +38 -22
- package/distHelpers/get_address_space_fixture.js.map +1 -1
- package/distHelpers/get_mini_address_space.d.ts +1 -1
- package/distHelpers/get_mini_address_space.js +7 -7
- package/distHelpers/get_mini_address_space.js.map +1 -1
- package/distHelpers/index.d.ts +9 -9
- package/distHelpers/index.js +9 -9
- package/distHelpers/index.js.map +1 -1
- package/distHelpers/mock_session.d.ts +1 -1
- package/distHelpers/mock_session.js +2 -2
- package/distHelpers/mock_session.js.map +1 -1
- package/distNodeJS/address_space_digest.d.ts +13 -0
- package/distNodeJS/address_space_digest.js +31 -0
- package/distNodeJS/address_space_digest.js.map +1 -0
- package/distNodeJS/generate_address_space.d.ts +35 -2
- package/distNodeJS/generate_address_space.js +201 -7
- package/distNodeJS/generate_address_space.js.map +1 -1
- package/distNodeJS/index.d.ts +3 -1
- package/distNodeJS/index.js +3 -1
- package/distNodeJS/index.js.map +1 -1
- package/distNodeJS/nodeset_image_file_store.d.ts +29 -0
- package/distNodeJS/nodeset_image_file_store.js +120 -0
- package/distNodeJS/nodeset_image_file_store.js.map +1 -0
- package/impl/_instantiate_helpers.ts +197 -0
- package/impl/_mandatory_child_or_requested_optional_filter.ts +100 -0
- package/impl/address_space.ts +1572 -0
- package/impl/address_space_change_event_tools.ts +177 -0
- package/impl/address_space_private.ts +100 -0
- package/impl/alarms_and_conditions/condition_info_impl.ts +45 -0
- package/impl/alarms_and_conditions/condition_snapshot_impl.ts +793 -0
- package/impl/alarms_and_conditions/deviation_alarm_helper.ts +73 -0
- package/impl/alarms_and_conditions/index.ts +16 -0
- package/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +351 -0
- package/impl/alarms_and_conditions/ua_alarm_condition_impl.ts +515 -0
- package/impl/alarms_and_conditions/ua_base_event_impl.ts +61 -0
- package/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +246 -0
- package/impl/alarms_and_conditions/ua_condition_impl.ts +1286 -0
- package/impl/alarms_and_conditions/ua_discrete_alarm_impl.ts +60 -0
- package/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +95 -0
- package/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +21 -0
- package/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +112 -0
- package/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +25 -0
- package/impl/alarms_and_conditions/ua_limit_alarm_impl.ts +265 -0
- package/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +94 -0
- package/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +232 -0
- package/impl/alarms_and_conditions/ua_off_normal_alarm_impl.ts +216 -0
- package/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +26 -0
- package/impl/apply_condition_refresh.ts +56 -0
- package/impl/base_node_impl.ts +2165 -0
- package/impl/base_node_private.ts +1420 -0
- package/impl/child_accessors.ts +239 -0
- package/impl/data_access/adjust_datavalue_status_code.ts +36 -0
- package/impl/data_access/ua_multistate_discrete_impl.ts +198 -0
- package/impl/data_access/ua_multistate_value_discrete_impl.ts +384 -0
- package/impl/data_access/ua_two_state_discrete_impl.ts +195 -0
- package/impl/event_data.ts +80 -0
- package/impl/event_layout.ts +141 -0
- package/impl/extension_object_array_node.ts +343 -0
- package/impl/handle_hierarchy_parent.ts +133 -0
- package/impl/historical_access/address_space_historical_data_node.ts +849 -0
- package/impl/historizer_factory.ts +17 -0
- package/impl/namespace_impl.ts +2323 -0
- package/impl/namespace_private.ts +68 -0
- package/impl/nodeid_manager.ts +293 -0
- package/impl/nodeset_tools/construct_namespace_dependency.ts +381 -0
- package/impl/nodeset_tools/dump_to_bsd.ts +210 -0
- package/impl/nodeset_tools/nodeset_to_records.ts +846 -0
- package/impl/nodeset_tools/nodeset_to_xml.ts +1326 -0
- package/impl/private_namespace.ts +21 -0
- package/impl/reference_impl.ts +244 -0
- package/impl/reference_type_version.ts +19 -0
- package/impl/state_machine/finite_state_machine.ts +676 -0
- package/impl/state_machine/ua_shelving_state_machine_ex.ts +356 -0
- package/impl/state_machine/ua_two_state_variable.ts +421 -0
- package/impl/tool_isSubtypeOf.ts +168 -0
- package/impl/ua_data_type_impl.ts +486 -0
- package/impl/ua_method_impl.ts +364 -0
- package/impl/ua_object_impl.ts +278 -0
- package/impl/ua_object_type_impl.ts +179 -0
- package/impl/ua_reference_type_impl.ts +179 -0
- package/impl/ua_variable_impl.ts +2559 -0
- package/impl/ua_variable_impl_ext_obj.ts +904 -0
- package/impl/ua_variable_type_impl.ts +390 -0
- package/impl/ua_view_impl.ts +53 -0
- package/impl/validate_data_type_correctness.ts +142 -0
- package/package.json +49 -44
- package/source_nodejs/address_space_digest.ts +35 -0
- package/source_nodejs/generate_address_space.ts +181 -8
- package/source_nodejs/index.ts +3 -1
- package/source_nodejs/nodeset_image_file_store.ts +127 -0
- package/dist/source/address_space_ts.d.ts +0 -128
- package/dist/source/address_space_ts.js +0 -23
- package/dist/source/address_space_ts.js.map +0 -1
- package/dist/source/continuation_points/continuation_point_manager.js +0 -230
- package/dist/source/continuation_points/continuation_point_manager.js.map +0 -1
- package/dist/source/helpers/adjust_browse_direction.js.map +0 -1
- package/dist/source/helpers/argument_list.js +0 -263
- package/dist/source/helpers/argument_list.js.map +0 -1
- package/dist/source/helpers/call_helpers.js +0 -80
- package/dist/source/helpers/call_helpers.js.map +0 -1
- package/dist/source/helpers/coerce_enum_value.d.ts +0 -6
- package/dist/source/helpers/coerce_enum_value.js.map +0 -1
- package/dist/source/helpers/dump_tools.js +0 -81
- package/dist/source/helpers/dump_tools.js.map +0 -1
- package/dist/source/helpers/ensure_secure_access.d.ts +0 -9
- package/dist/source/helpers/ensure_secure_access.js +0 -58
- package/dist/source/helpers/ensure_secure_access.js.map +0 -1
- package/dist/source/helpers/make_optionals_map.js.map +0 -1
- package/dist/source/helpers/multiform_func.js +0 -75
- package/dist/source/helpers/multiform_func.js.map +0 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js +0 -25
- package/dist/source/helpers/resolve_opaque_on_address_space.js.map +0 -1
- package/dist/source/index.d.ts +0 -66
- package/dist/source/index.js +0 -97
- package/dist/source/index.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +0 -21
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js +0 -3
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +0 -150
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +0 -12
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +0 -7
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +0 -4
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +0 -4
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +0 -10
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +0 -4
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +0 -4
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +0 -20
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +0 -21
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +0 -33
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +0 -19
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +0 -44
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +0 -4
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +0 -5
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +0 -19
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +0 -25
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +0 -8
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js.map +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +0 -10
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +0 -44
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +0 -22
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +0 -13
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_y_array_item_ex.js.map +0 -1
- package/dist/source/interfaces/extension_object_constructor.js.map +0 -1
- package/dist/source/interfaces/i_condition_variable_type_setter_options.js.map +0 -1
- package/dist/source/interfaces/i_set_state_options.js.map +0 -1
- package/dist/source/interfaces/nodeset_loader_options.d.ts +0 -37
- package/dist/source/interfaces/nodeset_loader_options.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +0 -12
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +0 -49
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +0 -11
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +0 -29
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +0 -236
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_transition_ex.js.map +0 -1
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +0 -1
- package/dist/source/loader/decode_xml_extension_object.d.ts +0 -6
- package/dist/source/loader/decode_xml_extension_object.js +0 -69
- package/dist/source/loader/decode_xml_extension_object.js.map +0 -1
- package/dist/source/loader/ensure_datatype_extracted.js +0 -88
- package/dist/source/loader/ensure_datatype_extracted.js.map +0 -1
- package/dist/source/loader/generateAddressSpaceRaw.d.ts +0 -29
- package/dist/source/loader/generateAddressSpaceRaw.js +0 -188
- package/dist/source/loader/generateAddressSpaceRaw.js.map +0 -1
- package/dist/source/loader/load_nodeset2.d.ts +0 -15
- package/dist/source/loader/load_nodeset2.js +0 -1047
- package/dist/source/loader/load_nodeset2.js.map +0 -1
- package/dist/source/loader/make_semver_compatible.js.map +0 -1
- package/dist/source/loader/make_xml_extension_object_parser.js +0 -422
- package/dist/source/loader/make_xml_extension_object_parser.js.map +0 -1
- package/dist/source/loader/namespace_post_step.js +0 -57
- package/dist/source/loader/namespace_post_step.js.map +0 -1
- package/dist/source/loader/parsers/extension_object_parser.js +0 -274
- package/dist/source/loader/parsers/extension_object_parser.js.map +0 -1
- package/dist/source/loader/parsers/localized_text_parser.js.map +0 -1
- package/dist/source/loader/parsers/nodeid_parser.js.map +0 -1
- package/dist/source/loader/parsers/qualified_name_parser.js.map +0 -1
- package/dist/source/loader/parsers/variant_parser.d.ts +0 -35
- package/dist/source/loader/parsers/variant_parser.js +0 -331
- package/dist/source/loader/parsers/variant_parser.js.map +0 -1
- package/dist/source/loader/register_node_promoter.d.ts +0 -2
- package/dist/source/loader/register_node_promoter.js +0 -9
- package/dist/source/loader/register_node_promoter.js.map +0 -1
- package/dist/source/namespace.d.ts +0 -6
- package/dist/source/namespace.js.map +0 -1
- package/dist/source/namespace_alarm_and_condition.d.ts +0 -33
- package/dist/source/namespace_alarm_and_condition.js.map +0 -1
- package/dist/source/namespace_data_access.d.ts +0 -67
- package/dist/source/namespace_data_access.js.map +0 -1
- package/dist/source/namespace_machine_state.d.ts +0 -8
- package/dist/source/namespace_machine_state.js.map +0 -1
- package/dist/source/pseudo_session.d.ts +0 -74
- package/dist/source/pseudo_session.js +0 -308
- package/dist/source/pseudo_session.js.map +0 -1
- package/dist/source/session_context.d.ts +0 -241
- package/dist/source/session_context.js +0 -517
- package/dist/source/session_context.js.map +0 -1
- package/dist/source/set_namespace_meta_data.js.map +0 -1
- package/dist/source/ua_addin.js.map +0 -1
- package/dist/source/ua_interface.js +0 -25
- package/dist/source/ua_interface.js.map +0 -1
- package/dist/source/ua_root_folder.js.map +0 -1
- package/dist/source/ua_two_state_variable_ex.d.ts +0 -24
- package/dist/source/ua_two_state_variable_ex.js.map +0 -1
- package/dist/source/xml_writer.js.map +0 -1
- package/dist/src/_instantiate_helpers.js +0 -99
- package/dist/src/_instantiate_helpers.js.map +0 -1
- package/dist/src/_mandatory_child_or_requested_optional_filter.js +0 -82
- package/dist/src/_mandatory_child_or_requested_optional_filter.js.map +0 -1
- package/dist/src/address_space.d.ts +0 -369
- package/dist/src/address_space.js +0 -1416
- package/dist/src/address_space.js.map +0 -1
- package/dist/src/address_space_change_event_tools.d.ts +0 -6
- package/dist/src/address_space_change_event_tools.js.map +0 -1
- package/dist/src/address_space_private.d.ts +0 -45
- package/dist/src/address_space_private.js.map +0 -1
- package/dist/src/alarms_and_conditions/condition.js.map +0 -1
- package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +0 -18
- package/dist/src/alarms_and_conditions/condition_info_impl.js +0 -38
- package/dist/src/alarms_and_conditions/condition_info_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +0 -269
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +0 -699
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +0 -12
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +0 -66
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +0 -1
- package/dist/src/alarms_and_conditions/index.d.ts +0 -16
- package/dist/src/alarms_and_conditions/index.js +0 -33
- package/dist/src/alarms_and_conditions/index.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +0 -42
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +0 -243
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +0 -80
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +0 -415
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +0 -18
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js +0 -33
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +0 -44
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +0 -203
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +0 -104
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +0 -1017
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +0 -19
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +0 -39
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +0 -25
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +0 -55
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +0 -11
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +0 -12
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +0 -23
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +0 -87
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +0 -10
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js +0 -8
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +0 -26
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +0 -208
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +0 -23
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +0 -55
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +0 -27
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +0 -173
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +0 -43
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +0 -168
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +0 -18
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +0 -18
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +0 -1
- package/dist/src/apply_condition_refresh.d.ts +0 -4
- package/dist/src/apply_condition_refresh.js +0 -27
- package/dist/src/apply_condition_refresh.js.map +0 -1
- package/dist/src/base_node_impl.d.ts +0 -287
- package/dist/src/base_node_impl.js +0 -1538
- package/dist/src/base_node_impl.js.map +0 -1
- package/dist/src/base_node_private.d.ts +0 -87
- package/dist/src/base_node_private.js +0 -925
- package/dist/src/base_node_private.js.map +0 -1
- package/dist/src/check_value_rank_compatibility.js.map +0 -1
- package/dist/src/data_access/add_dataItem_stuff.js.map +0 -1
- package/dist/src/data_access/adjust_datavalue_status_code.d.ts +0 -7
- package/dist/src/data_access/adjust_datavalue_status_code.js.map +0 -1
- package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +0 -35
- package/dist/src/data_access/ua_multistate_discrete_impl.js +0 -142
- package/dist/src/data_access/ua_multistate_discrete_impl.js.map +0 -1
- package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +0 -51
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js +0 -302
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +0 -1
- package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +0 -20
- package/dist/src/data_access/ua_two_state_discrete_impl.js +0 -163
- package/dist/src/data_access/ua_two_state_discrete_impl.js.map +0 -1
- package/dist/src/event_data.d.ts +0 -18
- package/dist/src/event_data.js +0 -70
- package/dist/src/event_data.js.map +0 -1
- package/dist/src/extension_object_array_node.d.ts +0 -34
- package/dist/src/extension_object_array_node.js +0 -262
- package/dist/src/extension_object_array_node.js.map +0 -1
- package/dist/src/get_basic_datatype.js.map +0 -1
- package/dist/src/historical_access/address_space_historical_data_node.d.ts +0 -21
- package/dist/src/historical_access/address_space_historical_data_node.js +0 -654
- package/dist/src/historical_access/address_space_historical_data_node.js.map +0 -1
- package/dist/src/idx_iterator.js.map +0 -1
- package/dist/src/index_current.d.ts +0 -50
- package/dist/src/index_current.js +0 -82
- package/dist/src/index_current.js.map +0 -1
- package/dist/src/namespace_impl.d.ts +0 -450
- package/dist/src/namespace_impl.js +0 -1876
- package/dist/src/namespace_impl.js.map +0 -1
- package/dist/src/namespace_private.d.ts +0 -31
- package/dist/src/namespace_private.js.map +0 -1
- package/dist/src/nodeid_manager.js +0 -249
- package/dist/src/nodeid_manager.js.map +0 -1
- package/dist/src/nodeset_tools/adjust_namespace_array.js.map +0 -1
- package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +0 -33
- package/dist/src/nodeset_tools/construct_namespace_dependency.js +0 -347
- package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +0 -1
- package/dist/src/nodeset_tools/dump_to_bsd.d.ts +0 -2
- package/dist/src/nodeset_tools/dump_to_bsd.js +0 -164
- package/dist/src/nodeset_tools/dump_to_bsd.js.map +0 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +0 -12
- package/dist/src/nodeset_tools/nodeset_to_xml.js +0 -1381
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +0 -1
- package/dist/src/private_namespace.d.ts +0 -5
- package/dist/src/private_namespace.js.map +0 -1
- package/dist/src/reference_impl.d.ts +0 -43
- package/dist/src/reference_impl.js +0 -152
- package/dist/src/reference_impl.js.map +0 -1
- package/dist/src/role_permissions.js.map +0 -1
- package/dist/src/state_machine/finite_state_machine.d.ts +0 -70
- package/dist/src/state_machine/finite_state_machine.js +0 -574
- package/dist/src/state_machine/finite_state_machine.js.map +0 -1
- package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +0 -39
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js +0 -249
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +0 -1
- package/dist/src/state_machine/ua_two_state_variable.d.ts +0 -55
- package/dist/src/state_machine/ua_two_state_variable.js +0 -323
- package/dist/src/state_machine/ua_two_state_variable.js.map +0 -1
- package/dist/src/tool_isSubtypeOf.d.ts +0 -18
- package/dist/src/tool_isSubtypeOf.js +0 -130
- package/dist/src/tool_isSubtypeOf.js.map +0 -1
- package/dist/src/ua_condition_type.js.map +0 -1
- package/dist/src/ua_data_type_impl.d.ts +0 -87
- package/dist/src/ua_data_type_impl.js +0 -393
- package/dist/src/ua_data_type_impl.js.map +0 -1
- package/dist/src/ua_method_impl.d.ts +0 -48
- package/dist/src/ua_method_impl.js +0 -280
- package/dist/src/ua_method_impl.js.map +0 -1
- package/dist/src/ua_object_impl.d.ts +0 -38
- package/dist/src/ua_object_impl.js +0 -214
- package/dist/src/ua_object_impl.js.map +0 -1
- package/dist/src/ua_object_type_impl.d.ts +0 -55
- package/dist/src/ua_object_type_impl.js +0 -131
- package/dist/src/ua_object_type_impl.js.map +0 -1
- package/dist/src/ua_reference_type_impl.d.ts +0 -42
- package/dist/src/ua_reference_type_impl.js +0 -146
- package/dist/src/ua_reference_type_impl.js.map +0 -1
- package/dist/src/ua_variable_impl.d.ts +0 -379
- package/dist/src/ua_variable_impl.js +0 -1940
- package/dist/src/ua_variable_impl.js.map +0 -1
- package/dist/src/ua_variable_impl_ext_obj.d.ts +0 -23
- package/dist/src/ua_variable_impl_ext_obj.js +0 -752
- package/dist/src/ua_variable_impl_ext_obj.js.map +0 -1
- package/dist/src/ua_variable_type_impl.d.ts +0 -79
- package/dist/src/ua_variable_type_impl.js +0 -276
- package/dist/src/ua_variable_type_impl.js.map +0 -1
- package/dist/src/ua_view_impl.d.ts +0 -18
- package/dist/src/ua_view_impl.js +0 -45
- package/dist/src/ua_view_impl.js.map +0 -1
- package/dist/src/validate_data_type_correctness.d.ts +0 -6
- package/dist/src/validate_data_type_correctness.js +0 -106
- package/dist/src/validate_data_type_correctness.js.map +0 -1
- package/source/address_space_ts.ts +0 -220
- package/source/continuation_points/continuation_point_manager.ts +0 -271
- package/source/helpers/argument_list.ts +0 -310
- package/source/helpers/call_helpers.ts +0 -100
- package/source/helpers/coerce_enum_value.ts +0 -33
- package/source/helpers/dump_tools.ts +0 -90
- package/source/helpers/ensure_secure_access.ts +0 -57
- package/source/helpers/multiform_func.ts +0 -78
- package/source/helpers/resolve_opaque_on_address_space.ts +0 -26
- package/source/index.ts +0 -72
- package/source/interfaces/alarms_and_conditions/condition_info_i.ts +0 -24
- package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +0 -235
- package/source/interfaces/alarms_and_conditions/deviation_stuff.ts +0 -16
- package/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +0 -8
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +0 -6
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +0 -6
- package/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +0 -13
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +0 -6
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +0 -6
- package/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +0 -21
- package/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +0 -28
- package/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +0 -43
- package/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +0 -36
- package/source/interfaces/alarms_and_conditions/ua_condition_ex.ts +0 -55
- package/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +0 -17
- package/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +0 -21
- package/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +0 -21
- package/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +0 -26
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +0 -29
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +0 -25
- package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +0 -57
- package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +0 -31
- package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +0 -15
- package/source/interfaces/nodeset_loader_options.ts +0 -38
- package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +0 -20
- package/source/interfaces/state_machine/ua_finite_state_machine_type.ts +0 -50
- package/source/interfaces/state_machine/ua_program_state_machine_type.ts +0 -14
- package/source/interfaces/state_machine/ua_shelved_state_machine_ex.ts +0 -35
- package/source/interfaces/state_machine/ua_state_machine_type.ts +0 -288
- package/source/loader/decode_xml_extension_object.ts +0 -80
- package/source/loader/ensure_datatype_extracted.ts +0 -122
- package/source/loader/generateAddressSpaceRaw.ts +0 -219
- package/source/loader/load_nodeset2.ts +0 -1275
- package/source/loader/make_xml_extension_object_parser.ts +0 -524
- package/source/loader/namespace_post_step.ts +0 -68
- package/source/loader/parsers/extension_object_parser.ts +0 -374
- package/source/loader/parsers/variant_parser.ts +0 -433
- package/source/loader/register_node_promoter.ts +0 -6
- package/source/namespace.ts +0 -7
- package/source/namespace_alarm_and_condition.ts +0 -78
- package/source/namespace_data_access.ts +0 -92
- package/source/namespace_machine_state.ts +0 -20
- package/source/pseudo_session.ts +0 -415
- package/source/session_context.ts +0 -717
- package/source/ua_interface.ts +0 -38
- package/source/ua_two_state_variable_ex.ts +0 -36
- package/src/_instantiate_helpers.ts +0 -197
- package/src/_mandatory_child_or_requested_optional_filter.ts +0 -100
- package/src/address_space.ts +0 -1631
- package/src/address_space_change_event_tools.ts +0 -177
- package/src/address_space_private.ts +0 -96
- package/src/alarms_and_conditions/condition_info_impl.ts +0 -44
- package/src/alarms_and_conditions/condition_snapshot_impl.ts +0 -792
- package/src/alarms_and_conditions/deviation_alarm_helper.ts +0 -73
- package/src/alarms_and_conditions/index.ts +0 -16
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +0 -331
- package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +0 -479
- package/src/alarms_and_conditions/ua_base_event_impl.ts +0 -42
- package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +0 -244
- package/src/alarms_and_conditions/ua_condition_impl.ts +0 -1261
- package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +0 -57
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +0 -94
- package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +0 -20
- package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +0 -109
- package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +0 -25
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +0 -244
- package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +0 -88
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +0 -223
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +0 -218
- package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +0 -26
- package/src/apply_condition_refresh.ts +0 -29
- package/src/base_node_impl.ts +0 -1907
- package/src/base_node_private.ts +0 -1287
- package/src/data_access/adjust_datavalue_status_code.ts +0 -36
- package/src/data_access/ua_multistate_discrete_impl.ts +0 -189
- package/src/data_access/ua_multistate_value_discrete_impl.ts +0 -369
- package/src/data_access/ua_two_state_discrete_impl.ts +0 -184
- package/src/event_data.ts +0 -83
- package/src/extension_object_array_node.ts +0 -331
- package/src/historical_access/address_space_historical_data_node.ts +0 -842
- package/src/index_current.ts +0 -51
- package/src/namespace_impl.ts +0 -2380
- package/src/namespace_private.ts +0 -77
- package/src/nodeid_manager.ts +0 -293
- package/src/nodeset_tools/construct_namespace_dependency.ts +0 -375
- package/src/nodeset_tools/dump_to_bsd.ts +0 -201
- package/src/nodeset_tools/nodeset_to_xml.ts +0 -1652
- package/src/private_namespace.ts +0 -21
- package/src/reference_impl.ts +0 -171
- package/src/state_machine/finite_state_machine.ts +0 -668
- package/src/state_machine/ua_shelving_state_machine_ex.ts +0 -330
- package/src/state_machine/ua_two_state_variable.ts +0 -421
- package/src/tool_isSubtypeOf.ts +0 -160
- package/src/ua_data_type_impl.ts +0 -483
- package/src/ua_method_impl.ts +0 -362
- package/src/ua_object_impl.ts +0 -278
- package/src/ua_object_type_impl.ts +0 -179
- package/src/ua_reference_type_impl.ts +0 -170
- package/src/ua_variable_impl.ts +0 -2489
- package/src/ua_variable_impl_ext_obj.ts +0 -903
- package/src/ua_variable_type_impl.ts +0 -385
- package/src/ua_view_impl.ts +0 -53
- package/src/validate_data_type_correctness.ts +0 -124
- /package/{source → api}/helpers/adjust_browse_direction.ts +0 -0
- /package/{source → api}/helpers/make_optionals_map.ts +0 -0
- /package/{source → api}/interfaces/alarms_and_conditions/install_setpoint_options.ts +0 -0
- /package/{source → api}/interfaces/alarms_and_conditions/instantiate_condition_options.ts +0 -0
- /package/{source → api}/interfaces/alarms_and_conditions/ua_base_event_ex.ts +0 -0
- /package/{source → api}/interfaces/data_access/ua_y_array_item_ex.ts +0 -0
- /package/{source → api}/interfaces/extension_object_constructor.ts +0 -0
- /package/{source → api}/interfaces/i_condition_variable_type_setter_options.ts +0 -0
- /package/{source → api}/interfaces/i_set_state_options.ts +0 -0
- /package/{source → api}/interfaces/state_machine/ua_transition_ex.ts +0 -0
- /package/{source → api}/interfaces/ua_subscription_diagnostics_variable_ex.ts +0 -0
- /package/{source → api}/loader/make_semver_compatible.ts +0 -0
- /package/{source → api}/loader/parsers/localized_text_parser.ts +0 -0
- /package/{source → api}/loader/parsers/nodeid_parser.ts +0 -0
- /package/{source → api}/loader/parsers/qualified_name_parser.ts +0 -0
- /package/{source → api}/set_namespace_meta_data.ts +0 -0
- /package/{source → api}/ua_addin.ts +0 -0
- /package/{source → api}/ua_root_folder.ts +0 -0
- /package/{source → api}/xml_writer.ts +0 -0
- /package/dist/{source → api}/continuation_points/continuation_point_manager.d.ts +0 -0
- /package/dist/{source → api}/helpers/adjust_browse_direction.d.ts +0 -0
- /package/dist/{source → api}/helpers/adjust_browse_direction.js +0 -0
- /package/dist/{source → api}/helpers/argument_list.d.ts +0 -0
- /package/dist/{source → api}/helpers/call_helpers.d.ts +0 -0
- /package/dist/{source → api}/helpers/coerce_enum_value.js +0 -0
- /package/dist/{source → api}/helpers/dump_tools.d.ts +0 -0
- /package/dist/{source → api}/helpers/make_optionals_map.d.ts +0 -0
- /package/dist/{source → api}/helpers/make_optionals_map.js +0 -0
- /package/dist/{source → api}/helpers/multiform_func.d.ts +0 -0
- /package/dist/{source → api}/helpers/resolve_opaque_on_address_space.d.ts +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/condition_snapshot.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/deviation_stuff.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/install_setpoint_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_condition_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_base_event_ex.d.ts +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_base_event_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_condition_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js +0 -0
- /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js +0 -0
- /package/dist/{source → api}/interfaces/data_access/ua_multistate_discrete_ex.js +0 -0
- /package/dist/{source → api}/interfaces/data_access/ua_multistate_value_discrete_ex.js +0 -0
- /package/dist/{source → api}/interfaces/data_access/ua_two_state_discrete_ex.js +0 -0
- /package/dist/{source → api}/interfaces/data_access/ua_y_array_item_ex.d.ts +0 -0
- /package/dist/{source → api}/interfaces/data_access/ua_y_array_item_ex.js +0 -0
- /package/dist/{source → api}/interfaces/extension_object_constructor.d.ts +0 -0
- /package/dist/{source → api}/interfaces/extension_object_constructor.js +0 -0
- /package/dist/{source → api}/interfaces/i_condition_variable_type_setter_options.d.ts +0 -0
- /package/dist/{source → api}/interfaces/i_condition_variable_type_setter_options.js +0 -0
- /package/dist/{source → api}/interfaces/i_set_state_options.d.ts +0 -0
- /package/dist/{source → api}/interfaces/i_set_state_options.js +0 -0
- /package/dist/{source → api}/interfaces/nodeset_loader_options.js +0 -0
- /package/dist/{source → api}/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js +0 -0
- /package/dist/{source → api}/interfaces/state_machine/ua_finite_state_machine_type.js +0 -0
- /package/dist/{source → api}/interfaces/state_machine/ua_program_state_machine_type.js +0 -0
- /package/dist/{source → api}/interfaces/state_machine/ua_shelved_state_machine_ex.js +0 -0
- /package/dist/{source → api}/interfaces/state_machine/ua_state_machine_type.js +0 -0
- /package/dist/{source → api}/interfaces/state_machine/ua_transition_ex.d.ts +0 -0
- /package/dist/{source → api}/interfaces/state_machine/ua_transition_ex.js +0 -0
- /package/dist/{source → api}/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +0 -0
- /package/dist/{source → api}/interfaces/ua_subscription_diagnostics_variable_ex.js +0 -0
- /package/dist/{source → api}/loader/ensure_datatype_extracted.d.ts +0 -0
- /package/dist/{source → api}/loader/make_semver_compatible.d.ts +0 -0
- /package/dist/{source → api}/loader/make_semver_compatible.js +0 -0
- /package/dist/{source → api}/loader/make_xml_extension_object_parser.d.ts +0 -0
- /package/dist/{source → api}/loader/namespace_post_step.d.ts +0 -0
- /package/dist/{source → api}/loader/parsers/extension_object_parser.d.ts +0 -0
- /package/dist/{source → api}/loader/parsers/localized_text_parser.d.ts +0 -0
- /package/dist/{source → api}/loader/parsers/localized_text_parser.js +0 -0
- /package/dist/{source → api}/loader/parsers/nodeid_parser.d.ts +0 -0
- /package/dist/{source → api}/loader/parsers/nodeid_parser.js +0 -0
- /package/dist/{source → api}/loader/parsers/qualified_name_parser.d.ts +0 -0
- /package/dist/{source → api}/loader/parsers/qualified_name_parser.js +0 -0
- /package/dist/{source → api}/namespace.js +0 -0
- /package/dist/{source → api}/namespace_alarm_and_condition.js +0 -0
- /package/dist/{source → api}/namespace_data_access.js +0 -0
- /package/dist/{source → api}/namespace_machine_state.js +0 -0
- /package/dist/{source → api}/set_namespace_meta_data.d.ts +0 -0
- /package/dist/{source → api}/set_namespace_meta_data.js +0 -0
- /package/dist/{source → api}/ua_addin.d.ts +0 -0
- /package/dist/{source → api}/ua_addin.js +0 -0
- /package/dist/{source → api}/ua_interface.d.ts +0 -0
- /package/dist/{source → api}/ua_root_folder.d.ts +0 -0
- /package/dist/{source → api}/ua_root_folder.js +0 -0
- /package/dist/{source → api}/ua_two_state_variable_ex.js +0 -0
- /package/dist/{source → api}/xml_writer.d.ts +0 -0
- /package/dist/{source → api}/xml_writer.js +0 -0
- /package/dist/{src → impl}/_instantiate_helpers.d.ts +0 -0
- /package/dist/{src → impl}/_mandatory_child_or_requested_optional_filter.d.ts +0 -0
- /package/dist/{src → impl}/address_space_change_event_tools.js +0 -0
- /package/dist/{src → impl}/address_space_private.js +0 -0
- /package/dist/{src → impl}/alarms_and_conditions/condition.d.ts +0 -0
- /package/dist/{src → impl}/alarms_and_conditions/condition.js +0 -0
- /package/dist/{src → impl}/check_value_rank_compatibility.d.ts +0 -0
- /package/dist/{src → impl}/check_value_rank_compatibility.js +0 -0
- /package/dist/{src → impl}/data_access/add_dataItem_stuff.d.ts +0 -0
- /package/dist/{src → impl}/data_access/add_dataItem_stuff.js +0 -0
- /package/dist/{src → impl}/data_access/adjust_datavalue_status_code.js +0 -0
- /package/dist/{src → impl}/get_basic_datatype.d.ts +0 -0
- /package/dist/{src → impl}/get_basic_datatype.js +0 -0
- /package/dist/{src → impl}/idx_iterator.d.ts +0 -0
- /package/dist/{src → impl}/idx_iterator.js +0 -0
- /package/dist/{src → impl}/namespace_private.js +0 -0
- /package/dist/{src → impl}/nodeid_manager.d.ts +0 -0
- /package/dist/{src → impl}/nodeset_tools/adjust_namespace_array.d.ts +0 -0
- /package/dist/{src → impl}/nodeset_tools/adjust_namespace_array.js +0 -0
- /package/dist/{src → impl}/private_namespace.js +0 -0
- /package/dist/{src → impl}/role_permissions.d.ts +0 -0
- /package/dist/{src → impl}/role_permissions.js +0 -0
- /package/dist/{src → impl}/ua_condition_type.d.ts +0 -0
- /package/dist/{src → impl}/ua_condition_type.js +0 -0
- /package/{src → impl}/alarms_and_conditions/condition.ts +0 -0
- /package/{src → impl}/check_value_rank_compatibility.ts +0 -0
- /package/{src → impl}/data_access/add_dataItem_stuff.ts +0 -0
- /package/{src → impl}/get_basic_datatype.ts +0 -0
- /package/{src → impl}/idx_iterator.ts +0 -0
- /package/{src → impl}/nodeset_tools/adjust_namespace_array.ts +0 -0
- /package/{src → impl}/role_permissions.ts +0 -0
- /package/{src → impl}/ua_condition_type.ts +0 -0
|
@@ -0,0 +1,1286 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
|
+
*/
|
|
4
|
+
import chalk from "chalk";
|
|
5
|
+
import {
|
|
6
|
+
type BaseNode,
|
|
7
|
+
fullPath2,
|
|
8
|
+
type INamespace,
|
|
9
|
+
type ISessionContext,
|
|
10
|
+
type ListenerSignature,
|
|
11
|
+
type UAEventType,
|
|
12
|
+
type UAMethod,
|
|
13
|
+
type UAObject,
|
|
14
|
+
type UAProperty,
|
|
15
|
+
type UAVariable
|
|
16
|
+
} from "node-opcua-address-space-base";
|
|
17
|
+
import { assert } from "node-opcua-assert";
|
|
18
|
+
import { type ByteString, getMinOPCUADate, minDate, randomGuid, type UAString, type UInt16 } from "node-opcua-basic-types";
|
|
19
|
+
import {
|
|
20
|
+
AttributeIds,
|
|
21
|
+
BrowseDirection,
|
|
22
|
+
coerceLocalizedText,
|
|
23
|
+
LocalizedText,
|
|
24
|
+
type LocalizedTextLike,
|
|
25
|
+
makeAccessLevelFlag,
|
|
26
|
+
NodeClass,
|
|
27
|
+
QualifiedName
|
|
28
|
+
} from "node-opcua-data-model";
|
|
29
|
+
import { checkDebugFlag, make_debugLog, make_errorLog, make_warningLog } from "node-opcua-debug";
|
|
30
|
+
import { coerceNodeId, makeNodeId, NodeId, resolveNodeId, sameNodeId } from "node-opcua-nodeid";
|
|
31
|
+
import type { UAConditionVariable } from "node-opcua-nodeset-ua";
|
|
32
|
+
import { type CallbackT, StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
33
|
+
import { type CallMethodResultOptions, TimeZoneDataType } from "node-opcua-types";
|
|
34
|
+
import { DataType, Variant, type VariantLike, type VariantOptions } from "node-opcua-variant";
|
|
35
|
+
|
|
36
|
+
import type { ConditionInfoOptions } from "../../api/interfaces/alarms_and_conditions/condition_info_i.js";
|
|
37
|
+
import type { ConditionSnapshot } from "../../api/interfaces/alarms_and_conditions/condition_snapshot.js";
|
|
38
|
+
import type { InstantiateConditionOptions } from "../../api/interfaces/alarms_and_conditions/instantiate_condition_options.js";
|
|
39
|
+
import type { UAConditionEvents, UAConditionEx } from "../../api/interfaces/alarms_and_conditions/ua_condition_ex.js";
|
|
40
|
+
import type { ISetStateOptions } from "../../api/interfaces/i_set_state_options.js";
|
|
41
|
+
import type { UATwoStateVariableEx } from "../../api/ua_two_state_variable_ex.js";
|
|
42
|
+
import type { AddressSpacePrivate } from "../address_space_private.js";
|
|
43
|
+
import { resolveChildAccessor } from "../base_node_impl.js";
|
|
44
|
+
import { _install_TwoStateVariable_machinery } from "../state_machine/ua_two_state_variable.js";
|
|
45
|
+
import type { UAConditionType } from "../ua_condition_type.js";
|
|
46
|
+
import { UAObjectImpl } from "../ua_object_impl.js";
|
|
47
|
+
import type { UAVariableImpl } from "../ua_variable_impl.js";
|
|
48
|
+
import { ConditionSnapshotImpl } from "./condition_snapshot_impl.js";
|
|
49
|
+
import { UABaseEventImplBase } from "./ua_base_event_impl.js";
|
|
50
|
+
|
|
51
|
+
const debugLog = make_debugLog("ua_condition_impl");
|
|
52
|
+
const errorLog = make_errorLog("ua_condition_impl");
|
|
53
|
+
const doDebug = checkDebugFlag("ua_condition_impl");
|
|
54
|
+
const warningLog = make_warningLog("ua_condition_impl");
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* └─ ConditionType
|
|
59
|
+
* ├─ DialogConditionType
|
|
60
|
+
* └─ AcknowledgeableConditionType
|
|
61
|
+
* └─ AlarmConditionType
|
|
62
|
+
* ├─ LimitAlarmType
|
|
63
|
+
* │ ├─ ExclusiveLimitAlarmType
|
|
64
|
+
* │ │ ├─ ExclusiveLevelAlarmType
|
|
65
|
+
* │ │ ├─ ExclusiveDeviationAlarmType
|
|
66
|
+
* │ │ └─ ExclusiveRateOfChangeAlarmType
|
|
67
|
+
* │ └─ NonExclusiveLimitAlarmType
|
|
68
|
+
* │ ├─ NonExclusiveLevelAlarmType
|
|
69
|
+
* │ ├─ NonExclusiveDeviationAlarmType
|
|
70
|
+
* │ └─ NonExclusiveRateOfChangeAlarmType
|
|
71
|
+
* └─ DiscreteAlarmType
|
|
72
|
+
* ├─ OffNormalAlarmType
|
|
73
|
+
* │ ├─ SystemOffNormalAlarmType
|
|
74
|
+
* │ │ └─ CertificateExpirationAlarmType
|
|
75
|
+
* │ └─ TripAlarmType
|
|
76
|
+
*
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export class UAConditionImplBase<T extends UAConditionEvents & ListenerSignature<T> = UAConditionEvents>
|
|
81
|
+
extends UABaseEventImplBase<T>
|
|
82
|
+
implements UAConditionEx<T>
|
|
83
|
+
{
|
|
84
|
+
/**
|
|
85
|
+
* The condition's own child nodes, on top of the ones UABaseEventImplBase declares.
|
|
86
|
+
* Installed by the address space, not by this constructor - hence `declare`.
|
|
87
|
+
*/
|
|
88
|
+
public declare readonly conditionClassId: UAProperty<NodeId, DataType.NodeId>;
|
|
89
|
+
public declare readonly conditionClassName: UAProperty<LocalizedText, DataType.LocalizedText>;
|
|
90
|
+
public declare readonly conditionSubClassId?: UAProperty<NodeId[], DataType.NodeId>;
|
|
91
|
+
public declare readonly conditionSubClassName?: UAProperty<LocalizedText[], DataType.LocalizedText>;
|
|
92
|
+
public declare readonly conditionName: UAProperty<UAString, DataType.String>;
|
|
93
|
+
public declare readonly branchId: UAProperty<NodeId, DataType.NodeId>;
|
|
94
|
+
public declare readonly retain: UAProperty<boolean, DataType.Boolean>;
|
|
95
|
+
public declare readonly supportsFilteredRetain: UAProperty<boolean, DataType.Boolean>;
|
|
96
|
+
public declare readonly enabledState: UATwoStateVariableEx;
|
|
97
|
+
public declare readonly quality: UAConditionVariable<StatusCode, DataType.StatusCode>;
|
|
98
|
+
public declare readonly lastSeverity: UAConditionVariable<UInt16, DataType.UInt16>;
|
|
99
|
+
public declare readonly comment: UAConditionVariable<LocalizedText, DataType.LocalizedText>;
|
|
100
|
+
public declare readonly clientUserId: UAProperty<UAString, DataType.String>;
|
|
101
|
+
public declare readonly disable: UAMethod;
|
|
102
|
+
public declare readonly enable: UAMethod;
|
|
103
|
+
public declare readonly addComment: UAMethod;
|
|
104
|
+
public declare readonly conditionRefresh: UAMethod;
|
|
105
|
+
public declare readonly conditionRefresh2: UAMethod;
|
|
106
|
+
|
|
107
|
+
public static defaultSeverity = 250;
|
|
108
|
+
public static typeDefinition = resolveNodeId("ConditionType");
|
|
109
|
+
|
|
110
|
+
public static instantiate(
|
|
111
|
+
namespace: INamespace,
|
|
112
|
+
conditionTypeId: NodeId | string | UAEventType,
|
|
113
|
+
options: InstantiateConditionOptions,
|
|
114
|
+
data?: Record<string, VariantOptions>
|
|
115
|
+
): UAConditionImpl {
|
|
116
|
+
return UACondition_instantiate(namespace, conditionTypeId, options, data) as UAConditionImpl;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
public static install_condition_refresh_handle(addressSpace: AddressSpacePrivate): void {
|
|
120
|
+
//
|
|
121
|
+
// install ConditionRefresh
|
|
122
|
+
//
|
|
123
|
+
// NOTE:
|
|
124
|
+
// OPCUA doesn't implement the condition refresh method ! yet
|
|
125
|
+
// .5.7 ConditionRefresh Method
|
|
126
|
+
// ConditionRefresh allows a Client to request a Refresh of all Condition instances that currently
|
|
127
|
+
// are in an interesting state (they have the Retain flag set). This includes previous states of a
|
|
128
|
+
// Condition instance for which the Server maintains Branches. A Client would typically invoke
|
|
129
|
+
// this Method when it initially connects to a Server and following any situations, such as
|
|
130
|
+
// communication disruptions, in which it would require resynchronization with the Server. This
|
|
131
|
+
// Method is only available on the ConditionType or its subtypes. To invoke this Method, the call
|
|
132
|
+
// shall pass the well known MethodId of the Method on the ConditionType and the ObjectId
|
|
133
|
+
// shall be the well known ObjectId of the ConditionType Object.
|
|
134
|
+
|
|
135
|
+
const conditionType = addressSpace.findEventType("ConditionType") as UAConditionType;
|
|
136
|
+
assert(conditionType !== null);
|
|
137
|
+
|
|
138
|
+
conditionType.disable.bindMethod(_disable_method);
|
|
139
|
+
conditionType.enable.bindMethod(_enable_method);
|
|
140
|
+
|
|
141
|
+
conditionType.conditionRefresh.bindMethod(_condition_refresh_method);
|
|
142
|
+
|
|
143
|
+
conditionType.conditionRefresh2.bindMethod(_condition_refresh2_method);
|
|
144
|
+
|
|
145
|
+
// those methods can be call on the ConditionType or on the ConditionInstance itself...
|
|
146
|
+
conditionType.addComment.bindMethod(_add_comment_method);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
*
|
|
151
|
+
* Helper method to handle condition methods that takes a branchId and a comment
|
|
152
|
+
*
|
|
153
|
+
*/
|
|
154
|
+
public static with_condition_method(
|
|
155
|
+
inputArguments: VariantLike[],
|
|
156
|
+
context: ISessionContext,
|
|
157
|
+
callback: (err: Error | null, result?: { statusCode: StatusCode }) => void,
|
|
158
|
+
inner_func: (
|
|
159
|
+
eventId: ByteString,
|
|
160
|
+
comment: LocalizedText,
|
|
161
|
+
branch: ConditionSnapshot,
|
|
162
|
+
conditionNode: UAConditionImpl
|
|
163
|
+
) => StatusCode
|
|
164
|
+
): void {
|
|
165
|
+
const conditionNode = context.object;
|
|
166
|
+
|
|
167
|
+
if (!(conditionNode instanceof UAConditionImpl)) {
|
|
168
|
+
callback(null, {
|
|
169
|
+
statusCode: StatusCodes.BadNodeIdInvalid
|
|
170
|
+
});
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (!conditionNode.getEnabledState()) {
|
|
175
|
+
callback(null, {
|
|
176
|
+
statusCode: StatusCodes.BadConditionDisabled
|
|
177
|
+
});
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// inputArguments has 2 arguments
|
|
182
|
+
// EventId => ByteString The Identifier of the event to comment
|
|
183
|
+
// Comment => LocalizedText The Comment to add to the condition
|
|
184
|
+
assert(inputArguments.length === 2);
|
|
185
|
+
assert(inputArguments[0].dataType === DataType.ByteString);
|
|
186
|
+
assert(inputArguments[1].dataType === DataType.LocalizedText);
|
|
187
|
+
|
|
188
|
+
const eventId = inputArguments[0].value;
|
|
189
|
+
assert(!eventId || eventId instanceof Buffer);
|
|
190
|
+
|
|
191
|
+
const comment = inputArguments[1].value;
|
|
192
|
+
assert(comment instanceof LocalizedText);
|
|
193
|
+
|
|
194
|
+
const branch = conditionNode.findBranchForEventId(eventId);
|
|
195
|
+
if (!branch) {
|
|
196
|
+
callback(null, {
|
|
197
|
+
statusCode: StatusCodes.BadEventIdUnknown
|
|
198
|
+
});
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
assert(branch instanceof ConditionSnapshotImpl);
|
|
202
|
+
|
|
203
|
+
const statusCode = inner_func(eventId, comment, branch, conditionNode);
|
|
204
|
+
|
|
205
|
+
// record also who did the call
|
|
206
|
+
branch.setClientUserId(context.getUserName());
|
|
207
|
+
|
|
208
|
+
callback(null, {
|
|
209
|
+
statusCode
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
private _branch0: ConditionSnapshot = null as unknown as ConditionSnapshot;
|
|
213
|
+
private _previousRetainFlag = false;
|
|
214
|
+
private _branches: Map<string, ConditionSnapshot> = new Map();
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* @private
|
|
218
|
+
*/
|
|
219
|
+
public initialize(): void {
|
|
220
|
+
this._branches = new Map();
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* @private
|
|
225
|
+
*/
|
|
226
|
+
public post_initialize(): void {
|
|
227
|
+
assert(!this._branch0);
|
|
228
|
+
this._branch0 = new ConditionSnapshotImpl(this, new NodeId());
|
|
229
|
+
// the condition OPCUA object alway reflects the default branch states
|
|
230
|
+
// so we set a mechanism that automatically keeps self in sync
|
|
231
|
+
// with the default branch.
|
|
232
|
+
|
|
233
|
+
// the implication of this convention is that interacting with the condition variable
|
|
234
|
+
// shall be made by using branch0, any value change made
|
|
235
|
+
// using the standard setValueFromSource mechanism will not be work properly.
|
|
236
|
+
this._branch0.on("valueChanged", (node: UAVariable, variant: Variant, options: { sourceTimestamp: Date }) => {
|
|
237
|
+
node.setValueFromSource(variant, StatusCodes.Good, options.sourceTimestamp);
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
public getBranchCount(): number {
|
|
242
|
+
return this._branches.size;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
public getBranches(): ConditionSnapshot[] {
|
|
246
|
+
return [...this._branches.values()];
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
public getBranchIds(): NodeId[] {
|
|
250
|
+
return this.getBranches().map((b) => b.getBranchId());
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
*/
|
|
255
|
+
public createBranch(): ConditionSnapshot {
|
|
256
|
+
const branchId = _create_new_branch_id();
|
|
257
|
+
const snapshot = new ConditionSnapshotImpl(this, branchId);
|
|
258
|
+
this._branches.set(branchId.toString(), snapshot);
|
|
259
|
+
return snapshot;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
*/
|
|
264
|
+
public deleteBranch(branch: ConditionSnapshot): void {
|
|
265
|
+
const key = branch.getBranchId().toString();
|
|
266
|
+
assert(!sameNodeId(branch.getBranchId(), NodeId.nullNodeId), "cannot delete branch zero");
|
|
267
|
+
assert(this._branches.has(key));
|
|
268
|
+
this._branches.delete(key);
|
|
269
|
+
(this as UAConditionImplBase).emit("branch_deleted", key);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
*/
|
|
274
|
+
public getEnabledState(): boolean {
|
|
275
|
+
if (!this.enabledState) {
|
|
276
|
+
// ua variable is missing
|
|
277
|
+
return false;
|
|
278
|
+
}
|
|
279
|
+
if (typeof this.enabledState.getValue !== "function") {
|
|
280
|
+
// the enabledState is not initialized yet, probably because the addressSpace is not fully initialized
|
|
281
|
+
// try the id that contains the flag status as a boolean DataValue
|
|
282
|
+
if (!this.enabledState.id) {
|
|
283
|
+
return false;
|
|
284
|
+
}
|
|
285
|
+
return this.enabledState.id.readValue().value.value as boolean;
|
|
286
|
+
}
|
|
287
|
+
return this.enabledState.getValue();
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
*/
|
|
292
|
+
public getEnabledStateAsString(): string {
|
|
293
|
+
return this.enabledState.getValueAsString();
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* returns {StatusCode} StatusCodes.Good if successful or BadConditionAlreadyEnabled/BadConditionAlreadyDisabled
|
|
298
|
+
* @private
|
|
299
|
+
*/
|
|
300
|
+
public _setEnabledState(requestedEnabledState: boolean, options?: ISetStateOptions): StatusCode {
|
|
301
|
+
assert(typeof requestedEnabledState === "boolean");
|
|
302
|
+
|
|
303
|
+
const enabledState = this.getEnabledState();
|
|
304
|
+
if (enabledState && requestedEnabledState) {
|
|
305
|
+
return StatusCodes.BadConditionAlreadyEnabled;
|
|
306
|
+
}
|
|
307
|
+
if (!enabledState && !requestedEnabledState) {
|
|
308
|
+
return StatusCodes.BadConditionAlreadyDisabled;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
let _previousRetainFlag = false;
|
|
312
|
+
if (enabledState) {
|
|
313
|
+
// record previousRetain flag before disabling the condition (so it can be restored on re-enable)
|
|
314
|
+
_previousRetainFlag = this.currentBranch().getRetain();
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
this._branch0.setEnabledState(requestedEnabledState, options);
|
|
318
|
+
// conditionNode.enabledState.setValue(requestedEnabledState);
|
|
319
|
+
|
|
320
|
+
// xx assert(conditionNode.enabledState.id.readValue().value.value === requestedEnabledState,"sanity check 1");
|
|
321
|
+
// xx assert(conditionNode.currentBranch().getEnabledState() === requestedEnabledState,"sanity check 2");
|
|
322
|
+
|
|
323
|
+
if (!requestedEnabledState) {
|
|
324
|
+
// as per Spec 1.0.3 part 9:
|
|
325
|
+
// * When the Condition instance enters the Disabled state, the Retain Property of this
|
|
326
|
+
// Condition shall be set to FALSE by the Server to indicate to the Client that the
|
|
327
|
+
// Condition instance is currently not of interest to Clients.
|
|
328
|
+
// TODO : shall we really set retain to false or artificially expose the retain false as false
|
|
329
|
+
// whist enabled state is false ?
|
|
330
|
+
this._previousRetainFlag = _previousRetainFlag;
|
|
331
|
+
this.currentBranch().setRetain(false);
|
|
332
|
+
|
|
333
|
+
// todo: install the mechanism by which all condition values will be return
|
|
334
|
+
// as Null | BadConditionDisabled;
|
|
335
|
+
const _statusCode = StatusCodes.BadConditionDisabled;
|
|
336
|
+
|
|
337
|
+
// a notification must be send
|
|
338
|
+
this.raiseConditionEvent(this.currentBranch(), true);
|
|
339
|
+
} else {
|
|
340
|
+
// * When the Condition instance enters the enabled state, the Condition shall be
|
|
341
|
+
// evaluated and all of its Properties updated to reflect the current values. If this
|
|
342
|
+
// evaluation causes the Retain Property to transition to TRUE for any ConditionBranch,
|
|
343
|
+
// then an Event Notification shall be generated for that ConditionBranch.
|
|
344
|
+
|
|
345
|
+
this.evaluateConditionsAfterEnabled();
|
|
346
|
+
|
|
347
|
+
// todo evaluate branches
|
|
348
|
+
// conditionNode.evaluateBranches();
|
|
349
|
+
|
|
350
|
+
// restore retain flag
|
|
351
|
+
if (Object.hasOwn(this, "_previousRetainFlag")) {
|
|
352
|
+
this.currentBranch().setRetain(this._previousRetainFlag);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// todo send notification for branches with retain = true
|
|
356
|
+
let nb_condition_resent = 0;
|
|
357
|
+
if (this.currentBranch().getRetain()) {
|
|
358
|
+
nb_condition_resent += this._resend_conditionEvents();
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
if (nb_condition_resent === 0) {
|
|
362
|
+
// a notification must be send
|
|
363
|
+
this.raiseConditionEvent(this.currentBranch(), true);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
return StatusCodes.Good;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
*
|
|
371
|
+
* @private
|
|
372
|
+
*/
|
|
373
|
+
public setEnabledState(requestedEnabledState: boolean, options?: ISetStateOptions): StatusCode {
|
|
374
|
+
return this._setEnabledState(requestedEnabledState, options);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
*/
|
|
379
|
+
public setReceiveTime(time: Date): void {
|
|
380
|
+
this._branch0.setReceiveTime(time);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
*/
|
|
385
|
+
public setLocalTime(time: TimeZoneDataType): void {
|
|
386
|
+
this._branch0.setLocalTime(time);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
*/
|
|
391
|
+
public setTime(time: Date): void {
|
|
392
|
+
this._branch0.setTime(time);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
public _assert_valid(): void {
|
|
396
|
+
assert(this.receiveTime.readValue().value.dataType === DataType.DateTime);
|
|
397
|
+
assert(this.receiveTime.readValue().value.value instanceof Date);
|
|
398
|
+
|
|
399
|
+
assert(this.message.readValue().value.dataType === DataType.LocalizedText);
|
|
400
|
+
assert(this.severity.readValue().value.dataType === DataType.UInt16);
|
|
401
|
+
|
|
402
|
+
assert(this.time.readValue().value.dataType === DataType.DateTime);
|
|
403
|
+
assert(this.time.readValue().value.value instanceof Date);
|
|
404
|
+
|
|
405
|
+
assert(this.quality.readValue().value.dataType === DataType.StatusCode);
|
|
406
|
+
|
|
407
|
+
assert(this.enabledState.readValue().value.dataType === DataType.LocalizedText);
|
|
408
|
+
assert(this.branchId.readValue().value.dataType === DataType.NodeId);
|
|
409
|
+
|
|
410
|
+
// note localTime has been made optional in 1.04
|
|
411
|
+
assert(!this.localTime || this.localTime?.readValue().value.dataType === DataType.ExtensionObject);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
*/
|
|
416
|
+
public conditionOfNode(): UAObject | UAVariable | null {
|
|
417
|
+
const refs = this.findReferencesExAsObject("HasCondition", BrowseDirection.Inverse);
|
|
418
|
+
if (refs.length === 0) {
|
|
419
|
+
return null;
|
|
420
|
+
}
|
|
421
|
+
assert(refs.length !== 0, "UACondition must be the condition of some node");
|
|
422
|
+
assert(refs.length === 1, "expecting only one ConditionOf");
|
|
423
|
+
const node = refs[0];
|
|
424
|
+
assert(
|
|
425
|
+
node.nodeClass === NodeClass.Object || node.nodeClass === NodeClass.Variable,
|
|
426
|
+
"node for which we are the condition shall be an UAObject or UAVariable"
|
|
427
|
+
);
|
|
428
|
+
return node as UAObject | UAVariable;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* Raise a Instance Event
|
|
433
|
+
* (see also UAObject#raiseEvent to raise a transient event)
|
|
434
|
+
* @param branch the condition branch to raise
|
|
435
|
+
* @param renewEventId true if event Id of the condition branch should be renewed
|
|
436
|
+
*/
|
|
437
|
+
public raiseConditionEvent(branch: ConditionSnapshot, renewEventId: boolean): void {
|
|
438
|
+
if (renewEventId) {
|
|
439
|
+
branch.renewEventId();
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
// branch.getBranchId().toString() + " eventId = " + branch.getEventId().toString("hex"));
|
|
443
|
+
|
|
444
|
+
assert(branch instanceof ConditionSnapshotImpl);
|
|
445
|
+
|
|
446
|
+
this._assert_valid();
|
|
447
|
+
|
|
448
|
+
// In fact the event is raised by the object of which we are the condition
|
|
449
|
+
const conditionOfNode = this.conditionOfNode();
|
|
450
|
+
|
|
451
|
+
if (conditionOfNode) {
|
|
452
|
+
const eventData = (branch as ConditionSnapshotImpl)._constructEventData();
|
|
453
|
+
|
|
454
|
+
(this as UAConditionImplBase).emit("event", eventData);
|
|
455
|
+
|
|
456
|
+
if (conditionOfNode instanceof UAObjectImpl) {
|
|
457
|
+
// xx assert(conditionOfNode.eventNotifier === 0x01);
|
|
458
|
+
conditionOfNode._bubble_up_event(eventData);
|
|
459
|
+
} else {
|
|
460
|
+
assert(conditionOfNode.nodeClass === NodeClass.Variable);
|
|
461
|
+
// in this case
|
|
462
|
+
const eventOfs = conditionOfNode.getEventSourceOfs();
|
|
463
|
+
assert(eventOfs.length === 1);
|
|
464
|
+
const node = eventOfs[0] as UAObject;
|
|
465
|
+
if (node instanceof UAObjectImpl) {
|
|
466
|
+
node._bubble_up_event(eventData);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
} else {
|
|
470
|
+
warningLog(
|
|
471
|
+
"raiseConditionEvent: the condition ",
|
|
472
|
+
fullPath2(this),
|
|
473
|
+
"is not linked to a Object with a IsConditionOf(reversed(HasCondition)) reference",
|
|
474
|
+
"therefore event cannot bubble-up to the server object"
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
// branch.getBranchId().toString() + " eventId = " + branch.getEventId().toString("hex"));
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
*
|
|
482
|
+
* @param conditionInfo {ConditionInfo}
|
|
483
|
+
*
|
|
484
|
+
*/
|
|
485
|
+
public raiseNewCondition(conditionInfo: ConditionInfoOptions): void {
|
|
486
|
+
if (!this.getEnabledState()) {
|
|
487
|
+
throw new Error("UACondition#raiseNewCondition Condition is not enabled");
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
conditionInfo = conditionInfo || { severity: UAConditionImplBase.defaultSeverity };
|
|
491
|
+
|
|
492
|
+
conditionInfo.severity = Object.hasOwn(conditionInfo, "severity")
|
|
493
|
+
? conditionInfo.severity
|
|
494
|
+
: UAConditionImplBase.defaultSeverity;
|
|
495
|
+
|
|
496
|
+
// only valid for ConditionObjects
|
|
497
|
+
// todo check that object is of type ConditionType
|
|
498
|
+
|
|
499
|
+
const addressSpace = this.addressSpace;
|
|
500
|
+
|
|
501
|
+
const selfConditionType = this.typeDefinitionObj;
|
|
502
|
+
const conditionType = addressSpace.findObjectType("ConditionType");
|
|
503
|
+
if (!conditionType || !selfConditionType.isSubtypeOf(conditionType)) {
|
|
504
|
+
throw new Error("UACondition#raiseNewCondition ConditionType not found or invalid");
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
const branch = this.currentBranch();
|
|
508
|
+
if (!branch) {
|
|
509
|
+
warningLog("UACondition#raiseNewCondition currentBranch is not defined for node ", fullPath2(this));
|
|
510
|
+
throw new Error("UACondition#raiseNewCondition currentBranch is not defined");
|
|
511
|
+
}
|
|
512
|
+
const currentDefaultDate = new Date();
|
|
513
|
+
const time = conditionInfo.time || currentDefaultDate;
|
|
514
|
+
const receiveTime = conditionInfo.receiveTime || currentDefaultDate;
|
|
515
|
+
// install the eventTimestamp
|
|
516
|
+
// set the received Time
|
|
517
|
+
|
|
518
|
+
branch.setTime(time || minDate);
|
|
519
|
+
|
|
520
|
+
branch.setReceiveTime(receiveTime);
|
|
521
|
+
|
|
522
|
+
// note : in 1.04 LocalTime property is optional
|
|
523
|
+
if (this.getPropertyByName("LocalTime")) {
|
|
524
|
+
branch.setLocalTime(
|
|
525
|
+
new TimeZoneDataType({
|
|
526
|
+
daylightSavingInOffset: false,
|
|
527
|
+
offset: 0
|
|
528
|
+
})
|
|
529
|
+
);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
if (Object.hasOwn(conditionInfo, "message") && conditionInfo.message) {
|
|
533
|
+
branch.setMessage(conditionInfo.message);
|
|
534
|
+
}
|
|
535
|
+
// todo receive time : when the server received the event from the underlying system.
|
|
536
|
+
// self.receiveTime.setValueFromSource();
|
|
537
|
+
|
|
538
|
+
if (Object.hasOwn(conditionInfo, "severity") && conditionInfo.severity !== null) {
|
|
539
|
+
assert(Number.isFinite(conditionInfo.severity));
|
|
540
|
+
branch.setSeverity(conditionInfo.severity || 0, { sourceTimestamp: time });
|
|
541
|
+
}
|
|
542
|
+
if (Object.hasOwn(conditionInfo, "quality") && conditionInfo.quality !== null) {
|
|
543
|
+
assert(conditionInfo.quality instanceof StatusCode);
|
|
544
|
+
branch.setQuality(conditionInfo.quality || StatusCodes.Good, { sourceTimestamp: time });
|
|
545
|
+
}
|
|
546
|
+
if (Object.hasOwn(conditionInfo, "retain") && conditionInfo.retain !== null) {
|
|
547
|
+
assert(typeof conditionInfo.retain === "boolean");
|
|
548
|
+
branch.setRetain(!!conditionInfo.retain || false);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
this.raiseConditionEvent(branch, true);
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
public raiseNewBranchState(branch: ConditionSnapshot): void {
|
|
555
|
+
this.raiseConditionEvent(branch, true);
|
|
556
|
+
|
|
557
|
+
if (!sameNodeId(branch.getBranchId(), NodeId.nullNodeId) && !branch.getRetain()) {
|
|
558
|
+
// branch can be deleted
|
|
559
|
+
this.deleteBranch(branch);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
*/
|
|
565
|
+
public currentBranch(): ConditionSnapshot {
|
|
566
|
+
return this._branch0;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
public _resend_conditionEvents(): 0 | 1 {
|
|
570
|
+
// for the time being , only current branch
|
|
571
|
+
const currentBranch = this.currentBranch();
|
|
572
|
+
if (currentBranch.getRetain()) {
|
|
573
|
+
// c8 ignore next
|
|
574
|
+
doDebug && debugLog(` resending condition event for ${this.browseName.toString()}`);
|
|
575
|
+
this.raiseConditionEvent(currentBranch, false);
|
|
576
|
+
return 1;
|
|
577
|
+
}
|
|
578
|
+
return 0;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
// ------------------------------------------------------------------------------------
|
|
582
|
+
// Acknowledgeable
|
|
583
|
+
// ------------------------------------------------------------------------------------
|
|
584
|
+
/**
|
|
585
|
+
* @private
|
|
586
|
+
*/
|
|
587
|
+
public _raiseAuditConditionCommentEvent(sourceName: string, conditionEventId: Buffer, comment: LocalizedTextLike): void {
|
|
588
|
+
assert(conditionEventId === null || conditionEventId instanceof Buffer);
|
|
589
|
+
assert(comment instanceof LocalizedText);
|
|
590
|
+
const server = this.addressSpace.rootFolder.objects.server;
|
|
591
|
+
|
|
592
|
+
const now = new Date();
|
|
593
|
+
|
|
594
|
+
// xx if (true || server.isAuditing) {
|
|
595
|
+
// ----------------------------------------------------------------------------------------------------
|
|
596
|
+
server.raiseEvent("AuditConditionCommentEventType", {
|
|
597
|
+
// AuditEventType
|
|
598
|
+
/* part 5 - 6.4.3 AuditEventType */
|
|
599
|
+
actionTimeStamp: {
|
|
600
|
+
dataType: "DateTime",
|
|
601
|
+
value: now
|
|
602
|
+
},
|
|
603
|
+
status: {
|
|
604
|
+
dataType: "Boolean",
|
|
605
|
+
value: true
|
|
606
|
+
},
|
|
607
|
+
|
|
608
|
+
serverId: {
|
|
609
|
+
dataType: "String",
|
|
610
|
+
value: ""
|
|
611
|
+
},
|
|
612
|
+
|
|
613
|
+
// ClientAuditEntryId contains the human-readable AuditEntryId defined in Part 3.
|
|
614
|
+
clientAuditEntryId: {
|
|
615
|
+
dataType: "String",
|
|
616
|
+
value: ""
|
|
617
|
+
},
|
|
618
|
+
|
|
619
|
+
// The ClientUserId identifies the user of the client requesting an action. The ClientUserId can be
|
|
620
|
+
// obtained from the UserIdentityToken passed in the ActivateSession call.
|
|
621
|
+
clientUserId: {
|
|
622
|
+
dataType: "String",
|
|
623
|
+
value: ""
|
|
624
|
+
},
|
|
625
|
+
sourceName: {
|
|
626
|
+
dataType: "String",
|
|
627
|
+
value: sourceName
|
|
628
|
+
},
|
|
629
|
+
|
|
630
|
+
// AuditUpdateMethodEventType
|
|
631
|
+
methodId: {
|
|
632
|
+
dataType: "Null"
|
|
633
|
+
},
|
|
634
|
+
|
|
635
|
+
inputArguments: {
|
|
636
|
+
dataType: "Null"
|
|
637
|
+
},
|
|
638
|
+
|
|
639
|
+
// AuditConditionCommentEventType
|
|
640
|
+
conditionEventId: {
|
|
641
|
+
dataType: "ByteString",
|
|
642
|
+
value: conditionEventId
|
|
643
|
+
},
|
|
644
|
+
|
|
645
|
+
comment: {
|
|
646
|
+
dataType: "LocalizedText",
|
|
647
|
+
value: comment
|
|
648
|
+
}
|
|
649
|
+
});
|
|
650
|
+
// xx }
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
public findBranchForEventId(eventId: Buffer | null): ConditionSnapshot | null {
|
|
654
|
+
if (sameBuffer(this.eventId?.readValue().value.value, eventId)) {
|
|
655
|
+
return this.currentBranch();
|
|
656
|
+
}
|
|
657
|
+
const e = [...this._branches.values()].filter((branch: ConditionSnapshot) => sameBuffer(branch.getEventId(), eventId));
|
|
658
|
+
if (e.length === 1) {
|
|
659
|
+
return e[0];
|
|
660
|
+
}
|
|
661
|
+
assert(e.length === 0, "cannot have 2 branches with same eventId");
|
|
662
|
+
return null; // not found
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
protected evaluateConditionsAfterEnabled(): void {
|
|
666
|
+
assert(this.getEnabledState() === true);
|
|
667
|
+
throw new Error("Unimplemented , please override");
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
/** @internal */
|
|
671
|
+
export type UAConditionImpl = UAConditionImplBase;
|
|
672
|
+
/** @internal */
|
|
673
|
+
export const UAConditionImpl = UAConditionImplBase;
|
|
674
|
+
|
|
675
|
+
/**²
|
|
676
|
+
* instantiate a Condition.
|
|
677
|
+
* this will create the unique EventId and will set eventType
|
|
678
|
+
* @param namespace {INamespace}
|
|
679
|
+
* @param conditionTypeId {String|NodeId} the EventType to instantiate
|
|
680
|
+
* @param options {object}
|
|
681
|
+
* @param options.browseName {String|QualifiedName}
|
|
682
|
+
* @param options.componentOf {NodeId|UAObject}
|
|
683
|
+
* @param options.conditionOf {NodeId|UAObject} Mandatory
|
|
684
|
+
* @param options.organizedBy {NodeId|UAObject} ( only provide componentOf or organizedBy but not both)
|
|
685
|
+
* @param [options.conditionClass =BaseConditionClassType] {NodeId|UAObject}
|
|
686
|
+
* The condition Class nodeId or object used to set the ConditionClassId and
|
|
687
|
+
* ConditionClassName properties of the condition.
|
|
688
|
+
*
|
|
689
|
+
* @param options.conditionSource {NodeId|UAObject} the condition source node.
|
|
690
|
+
* this node must be marked a EventSource.
|
|
691
|
+
* the conditionSource is used to populate the sourceNode and
|
|
692
|
+
* sourceName variables defined by BaseEventType
|
|
693
|
+
* @param options.conditionName {String} the condition Name
|
|
694
|
+
* @param [options.optionals] [Array<String>] an Array of optionals fields
|
|
695
|
+
*
|
|
696
|
+
* @param data a object containing the value to set
|
|
697
|
+
* @param data.eventId {String|NodeId} the EventType Identifier to instantiate (type cannot be abstract)
|
|
698
|
+
* @return a instantiated UAConditionEx
|
|
699
|
+
*/
|
|
700
|
+
function UACondition_instantiate(
|
|
701
|
+
namespace: INamespace,
|
|
702
|
+
conditionTypeId: UAEventType | NodeId | string,
|
|
703
|
+
options: InstantiateConditionOptions,
|
|
704
|
+
data?: Record<string, VariantOptions>
|
|
705
|
+
): UAConditionEx {
|
|
706
|
+
/* eslint max-statements: ["error", 100] */
|
|
707
|
+
const addressSpace = namespace.addressSpace as AddressSpacePrivate;
|
|
708
|
+
|
|
709
|
+
const conditionType = addressSpace.findEventType(conditionTypeId);
|
|
710
|
+
|
|
711
|
+
/* c8 ignore next */
|
|
712
|
+
if (!conditionType) {
|
|
713
|
+
throw new Error(` cannot find Condition Type for ${conditionTypeId}`);
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
// reminder : abstract event type cannot be instantiated directly !
|
|
717
|
+
assert(!conditionType.isAbstract, "Cannot instantiate abstract conditionType");
|
|
718
|
+
|
|
719
|
+
const baseConditionEventType = addressSpace.findEventType("ConditionType");
|
|
720
|
+
/* c8 ignore next */
|
|
721
|
+
if (!baseConditionEventType) {
|
|
722
|
+
throw new Error("cannot find ConditionType");
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
assert(conditionType.isSubtypeOf(baseConditionEventType));
|
|
726
|
+
|
|
727
|
+
// assert((typeof options.browseName === "string"));
|
|
728
|
+
options.browseName = options.browseName || "??? instantiateCondition - missing browseName";
|
|
729
|
+
|
|
730
|
+
options.optionals = options.optionals || [];
|
|
731
|
+
|
|
732
|
+
// now optionals in 1.04
|
|
733
|
+
options.optionals.push("EventType");
|
|
734
|
+
options.optionals.push("BranchId");
|
|
735
|
+
|
|
736
|
+
//
|
|
737
|
+
options.optionals.push("Comment");
|
|
738
|
+
options.optionals.push("Comment.SourceTimestamp");
|
|
739
|
+
options.optionals.push("EnabledState.TrueState");
|
|
740
|
+
options.optionals.push("EnabledState.TrueState");
|
|
741
|
+
options.optionals.push("EnabledState.FalseState");
|
|
742
|
+
|
|
743
|
+
options.optionals.push("EnabledState.TransitionTime");
|
|
744
|
+
options.optionals.push("EnabledState.EffectiveTransitionTime");
|
|
745
|
+
options.optionals.push("EnabledState.EffectiveDisplayName");
|
|
746
|
+
|
|
747
|
+
const options2 = {
|
|
748
|
+
...options,
|
|
749
|
+
namespace: options.namespace || namespace
|
|
750
|
+
};
|
|
751
|
+
const conditionNode = conditionType.instantiate(options2) as unknown as UAConditionImpl;
|
|
752
|
+
Object.setPrototypeOf(conditionNode, UAConditionImpl.prototype);
|
|
753
|
+
conditionNode.initialize();
|
|
754
|
+
|
|
755
|
+
assert(Object.hasOwn(options, "conditionSource"), "must specify a condition source either as null or as a UAObject");
|
|
756
|
+
if (!options.conditionOf) {
|
|
757
|
+
options.conditionOf = options.conditionSource;
|
|
758
|
+
}
|
|
759
|
+
if (options.conditionOf) {
|
|
760
|
+
assert(Object.hasOwn(options, "conditionOf")); // must provide a conditionOf
|
|
761
|
+
options.conditionOf = addressSpace._coerceNode(options.conditionOf);
|
|
762
|
+
|
|
763
|
+
// HasCondition References can be used in the Type definition of an Object or a Variable.
|
|
764
|
+
assert(options.conditionOf?.nodeClass === NodeClass.Object || options.conditionOf?.nodeClass === NodeClass.Variable);
|
|
765
|
+
|
|
766
|
+
conditionNode.addReference({
|
|
767
|
+
isForward: false,
|
|
768
|
+
nodeId: options.conditionOf || NodeId.nullNodeId,
|
|
769
|
+
referenceType: "HasCondition"
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
// the constant property of this condition
|
|
774
|
+
conditionNode.eventType.setValueFromSource({
|
|
775
|
+
dataType: DataType.NodeId,
|
|
776
|
+
value: conditionType.nodeId
|
|
777
|
+
});
|
|
778
|
+
|
|
779
|
+
data = data || Object.create(null);
|
|
780
|
+
// install initial branch ID (null NodeId);
|
|
781
|
+
conditionNode.branchId.setValueFromSource({
|
|
782
|
+
dataType: DataType.NodeId,
|
|
783
|
+
value: new NodeId()
|
|
784
|
+
});
|
|
785
|
+
|
|
786
|
+
// install 'Comment' condition variable
|
|
787
|
+
_install_condition_variable_type(conditionNode.comment);
|
|
788
|
+
|
|
789
|
+
// install 'Quality' condition variable
|
|
790
|
+
_install_condition_variable_type(conditionNode.quality);
|
|
791
|
+
// xx conditionNode.quality.setValueFromSource({dataType: DataType.StatusCode,value: StatusCodes.Good });
|
|
792
|
+
|
|
793
|
+
// install 'LastSeverity' condition variable
|
|
794
|
+
_install_condition_variable_type(conditionNode.lastSeverity);
|
|
795
|
+
// xx conditionNode.severity.setValueFromSource({dataType: DataType.UInt16,value: 0 });
|
|
796
|
+
// xx conditionNode.lastSeverity.setValueFromSource({dataType: DataType.UInt16,value: 0 });
|
|
797
|
+
|
|
798
|
+
// install 'EnabledState' TwoStateVariable
|
|
799
|
+
/**
|
|
800
|
+
* @property enabledState
|
|
801
|
+
* @type {UATwoStateVariable}
|
|
802
|
+
*/
|
|
803
|
+
// -------------- fixing missing EnabledState.EffectiveDisplayName
|
|
804
|
+
if (!conditionNode.enabledState.effectiveDisplayName) {
|
|
805
|
+
namespace.addVariable({
|
|
806
|
+
browseName: new QualifiedName({ namespaceIndex: 0, name: "EffectiveDisplayName" }),
|
|
807
|
+
dataType: "LocalizedText",
|
|
808
|
+
propertyOf: conditionNode.enabledState
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
_install_TwoStateVariable_machinery(conditionNode.enabledState, {
|
|
812
|
+
falseState: "Disabled",
|
|
813
|
+
trueState: "Enabled"
|
|
814
|
+
});
|
|
815
|
+
|
|
816
|
+
// installing sourceName and sourceNode
|
|
817
|
+
conditionNode.enabledState.setValue(true);
|
|
818
|
+
|
|
819
|
+
// set properties to in initial values
|
|
820
|
+
Object.entries(data || {}).forEach(([key, value]) => {
|
|
821
|
+
const varNode = _getCompositeKey(conditionNode, key);
|
|
822
|
+
assert(varNode.nodeClass === NodeClass.Variable);
|
|
823
|
+
|
|
824
|
+
const variant = new Variant(value);
|
|
825
|
+
|
|
826
|
+
// check that Variant DataType is compatible with the UAVariable dataType
|
|
827
|
+
// xx var nodeDataType = addressSpace.findNode(varNode.dataType).browseName;
|
|
828
|
+
|
|
829
|
+
/* c8 ignore next */
|
|
830
|
+
if (!varNode._validate_DataType(variant.dataType)) {
|
|
831
|
+
throw new Error(` Invalid variant dataType ${variant} ${varNode.browseName.toString()}`);
|
|
832
|
+
}
|
|
833
|
+
varNode.setValueFromSource(variant);
|
|
834
|
+
});
|
|
835
|
+
|
|
836
|
+
// bind condition methods -
|
|
837
|
+
/**
|
|
838
|
+
* @property enable
|
|
839
|
+
* @type {UAMethod}
|
|
840
|
+
*/
|
|
841
|
+
conditionNode.enable.bindMethod(_enable_method);
|
|
842
|
+
|
|
843
|
+
/**
|
|
844
|
+
* @property disable
|
|
845
|
+
* @type {UAMethod}
|
|
846
|
+
*/
|
|
847
|
+
conditionNode.disable.bindMethod(_disable_method);
|
|
848
|
+
|
|
849
|
+
// bind condition methods - AddComment
|
|
850
|
+
/**
|
|
851
|
+
* @property addComment
|
|
852
|
+
* @type {UAMethod}
|
|
853
|
+
*/
|
|
854
|
+
conditionNode.addComment.bindMethod(_add_comment_method);
|
|
855
|
+
|
|
856
|
+
assert(conditionNode instanceof UAConditionImpl);
|
|
857
|
+
|
|
858
|
+
// ConditionSource => cf SourceNode
|
|
859
|
+
// As per spec OPCUA 1.03 part 9 page 54:
|
|
860
|
+
// The ConditionType inherits all Properties of the BaseEventType. Their semantic is defined in
|
|
861
|
+
// Part 5. SourceNode identifies the ConditionSource.
|
|
862
|
+
// The SourceNode is the Node which the condition is associated with, it may be the same as the
|
|
863
|
+
// InputNode for an alarm, but it may be a separate node. For example a motor, which is a
|
|
864
|
+
// variable with a value that is an RPM, may be the ConditionSource for Conditions that are
|
|
865
|
+
// related to the motor as well as a temperature sensor associated with the motor. In the former
|
|
866
|
+
// the InputNode for the High RPM alarm is the value of the Motor RPM, while in the later the
|
|
867
|
+
// InputNode of the High Alarm would be the value of the temperature sensor that is associated
|
|
868
|
+
// with the motor.
|
|
869
|
+
|
|
870
|
+
if (options.conditionSource) {
|
|
871
|
+
options.conditionSource = addressSpace._coerceNode(options.conditionSource);
|
|
872
|
+
|
|
873
|
+
if (
|
|
874
|
+
!options.conditionSource ||
|
|
875
|
+
(options.conditionSource.nodeClass !== NodeClass.Object && options.conditionSource.nodeClass !== NodeClass.Variable)
|
|
876
|
+
) {
|
|
877
|
+
// c8 ignore next
|
|
878
|
+
doDebug && debugLog(options.conditionSource);
|
|
879
|
+
throw new Error("Expecting condition source to be NodeClass.Object or Variable");
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
const conditionSourceNode = addressSpace.findNode(options.conditionSource.nodeId) as BaseNode;
|
|
883
|
+
if (conditionSourceNode) {
|
|
884
|
+
conditionNode.sourceNode.setValueFromSource({
|
|
885
|
+
dataType: DataType.NodeId,
|
|
886
|
+
value: conditionSourceNode.nodeId
|
|
887
|
+
});
|
|
888
|
+
|
|
889
|
+
// conditionSourceNode node must be registered as a EventSource of an other node.
|
|
890
|
+
// As per spec OPCUA 1.03 part 9 page 54:
|
|
891
|
+
// HasNotifier and HasEventSource References are used to expose the hierarchical organization
|
|
892
|
+
// of Event notifying Objects and ConditionSources. An Event notifying Object represents
|
|
893
|
+
// typically an area of Operator responsibility. The definition of such an area configuration is
|
|
894
|
+
// outside the scope of this standard. If areas are available they shall be linked together and
|
|
895
|
+
// with the included ConditionSources using the HasNotifier and the HasEventSource Reference
|
|
896
|
+
// Types. The Server Object shall be the root of this hierarchy.
|
|
897
|
+
if (!sameNodeId(conditionSourceNode.nodeId, coerceNodeId("ns=0;i=2253"))) {
|
|
898
|
+
// server object
|
|
899
|
+
/* c8 ignore next */
|
|
900
|
+
if (conditionSourceNode.getEventSourceOfs().length === 0) {
|
|
901
|
+
errorLog("conditionSourceNode = ", conditionSourceNode.browseName.toString());
|
|
902
|
+
errorLog("conditionSourceNode = ", conditionSourceNode.nodeId.toString());
|
|
903
|
+
throw new Error(
|
|
904
|
+
"conditionSourceNode must be an event source " +
|
|
905
|
+
conditionSourceNode.browseName.toString() +
|
|
906
|
+
conditionSourceNode.nodeId.toString()
|
|
907
|
+
);
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
// set source Node (defined in UABaseEventType)
|
|
912
|
+
conditionNode.sourceNode.setValueFromSource(conditionSourceNode.readAttribute(null, AttributeIds.NodeId).value);
|
|
913
|
+
|
|
914
|
+
// set source Name (defined in UABaseEventType)
|
|
915
|
+
const displayName: LocalizedText = conditionSourceNode.readAttribute(null, AttributeIds.DisplayName).value
|
|
916
|
+
.value as LocalizedText;
|
|
917
|
+
conditionNode.sourceName.setValueFromSource({ dataType: DataType.String, value: displayName.text });
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
conditionNode.eventType.setValueFromSource({
|
|
922
|
+
dataType: DataType.NodeId,
|
|
923
|
+
value: conditionType.nodeId
|
|
924
|
+
});
|
|
925
|
+
// as per spec:
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
*
|
|
929
|
+
* dataType: DataType.NodeId
|
|
930
|
+
*
|
|
931
|
+
* As per spec OPCUA 1.03 part 9:
|
|
932
|
+
* ConditionClassId specifies in which domain this Condition is used. It is the NodeId of the
|
|
933
|
+
* corresponding ConditionClassType. See 5.9 for the definition of ConditionClass and a set of
|
|
934
|
+
* ConditionClasses defined in this standard. When using this Property for filtering, Clients have
|
|
935
|
+
* to specify all individual ConditionClassType NodeIds. The OfType operator cannot be applied.
|
|
936
|
+
* BaseConditionClassType is used as class whenever a Condition cannot be assigned to a
|
|
937
|
+
* more concrete class.
|
|
938
|
+
*
|
|
939
|
+
* BaseConditionClassType
|
|
940
|
+
* |
|
|
941
|
+
* +---------------------------+----------------------------+
|
|
942
|
+
* | | |
|
|
943
|
+
* ProcessConditionClassType MaintenanceConditionClassType SystemConditionClassType
|
|
944
|
+
*
|
|
945
|
+
* @property conditionName
|
|
946
|
+
* @type {UAVariable}
|
|
947
|
+
*/
|
|
948
|
+
const baseConditionClassType = addressSpace.findObjectType("ProcessConditionClassType");
|
|
949
|
+
// assert(baseConditionClassType,"Expecting BaseConditionClassType to be in addressSpace");
|
|
950
|
+
let conditionClassId = baseConditionClassType ? baseConditionClassType.nodeId : new NodeId();
|
|
951
|
+
let conditionClassName = baseConditionClassType ? baseConditionClassType.displayName[0] : "";
|
|
952
|
+
if (options.conditionClass) {
|
|
953
|
+
if (typeof options.conditionClass === "string") {
|
|
954
|
+
options.conditionClass = addressSpace.findObjectType(options.conditionClass);
|
|
955
|
+
if (!options.conditionClass) {
|
|
956
|
+
throw new Error(`cannot find condition class ${options.conditionClass}`);
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
const conditionClassNode = addressSpace._coerceNode(options.conditionClass);
|
|
960
|
+
if (!conditionClassNode) {
|
|
961
|
+
throw new Error(`cannot find condition class ${options.conditionClass.toString()}`);
|
|
962
|
+
}
|
|
963
|
+
conditionClassId = conditionClassNode.nodeId;
|
|
964
|
+
conditionClassName = conditionClassNode.displayName[0];
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
conditionNode.conditionClassId.setValueFromSource({
|
|
968
|
+
dataType: DataType.NodeId,
|
|
969
|
+
value: conditionClassId
|
|
970
|
+
});
|
|
971
|
+
|
|
972
|
+
// as per spec:
|
|
973
|
+
// ConditionClassName provides the display name of the ConditionClassType.
|
|
974
|
+
conditionNode.conditionClassName.setValueFromSource({
|
|
975
|
+
dataType: DataType.LocalizedText,
|
|
976
|
+
value: coerceLocalizedText(conditionClassName)
|
|
977
|
+
});
|
|
978
|
+
|
|
979
|
+
// as per spec:
|
|
980
|
+
/**
|
|
981
|
+
*
|
|
982
|
+
* dataType: DataType.String
|
|
983
|
+
*
|
|
984
|
+
* As per spec OPCUA 1.03 part 9:
|
|
985
|
+
* ConditionName identifies the Condition instance that the Event originated from. It can be used
|
|
986
|
+
* together with the SourceName in a user display to distinguish between different Condition
|
|
987
|
+
* instances. If a ConditionSource has only one instance of a ConditionType, and the Server has
|
|
988
|
+
* no instance name, the Server shall supply the ConditionType browse name.
|
|
989
|
+
* @property conditionName
|
|
990
|
+
* @type {UAVariable}
|
|
991
|
+
*/
|
|
992
|
+
const conditionName = options.conditionName || "Unset Condition Name";
|
|
993
|
+
assert(typeof conditionName === "string");
|
|
994
|
+
conditionNode.conditionName.setValueFromSource({
|
|
995
|
+
dataType: DataType.String,
|
|
996
|
+
value: conditionName
|
|
997
|
+
});
|
|
998
|
+
|
|
999
|
+
// set SourceNode and SourceName based on HasCondition node
|
|
1000
|
+
const sourceNodes = conditionNode.findReferencesAsObject("HasCondition", false);
|
|
1001
|
+
if (sourceNodes.length) {
|
|
1002
|
+
assert(sourceNodes.length === 1);
|
|
1003
|
+
conditionNode.setSourceNode(sourceNodes[0].nodeId);
|
|
1004
|
+
conditionNode.setSourceName(sourceNodes[0].browseName.toString());
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
conditionNode.post_initialize();
|
|
1008
|
+
|
|
1009
|
+
const branch0 = conditionNode.currentBranch();
|
|
1010
|
+
branch0.setRetain(false);
|
|
1011
|
+
branch0.setComment("");
|
|
1012
|
+
branch0.setQuality(StatusCodes.Good);
|
|
1013
|
+
branch0.setSeverity(0);
|
|
1014
|
+
branch0.setLocalTime(
|
|
1015
|
+
new TimeZoneDataType({
|
|
1016
|
+
daylightSavingInOffset: false,
|
|
1017
|
+
offset: 0
|
|
1018
|
+
})
|
|
1019
|
+
);
|
|
1020
|
+
branch0.setMessage("");
|
|
1021
|
+
|
|
1022
|
+
branch0.setReceiveTime(getMinOPCUADate());
|
|
1023
|
+
branch0.setTime(getMinOPCUADate());
|
|
1024
|
+
|
|
1025
|
+
return conditionNode;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
function _disable_method(inputArguments: VariantLike[], context: ISessionContext, callback: CallbackT<CallMethodResultOptions>) {
|
|
1029
|
+
assert(inputArguments.length === 0);
|
|
1030
|
+
|
|
1031
|
+
const conditionNode = context.object;
|
|
1032
|
+
assert(conditionNode);
|
|
1033
|
+
|
|
1034
|
+
// c8 ignore next
|
|
1035
|
+
if (!(conditionNode instanceof UAConditionImpl)) {
|
|
1036
|
+
// c8 ignore next
|
|
1037
|
+
doDebug && debugLog("conditionNode is not a UACondition ", conditionNode?.toString());
|
|
1038
|
+
return callback(null, {
|
|
1039
|
+
statusCode: StatusCodes.BadNodeIdInvalid
|
|
1040
|
+
});
|
|
1041
|
+
}
|
|
1042
|
+
const statusCode = conditionNode._setEnabledState(false);
|
|
1043
|
+
return callback(null, {
|
|
1044
|
+
statusCode
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
function _enable_method(inputArguments: VariantLike[], context: ISessionContext, callback: CallbackT<CallMethodResultOptions>) {
|
|
1049
|
+
assert(inputArguments.length === 0);
|
|
1050
|
+
const conditionNode = context.object;
|
|
1051
|
+
assert(conditionNode);
|
|
1052
|
+
|
|
1053
|
+
if (!(conditionNode instanceof UAConditionImpl)) {
|
|
1054
|
+
return callback(null, {
|
|
1055
|
+
statusCode: StatusCodes.BadNodeIdInvalid
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
const statusCode = conditionNode._setEnabledState(true);
|
|
1059
|
+
return callback(null, {
|
|
1060
|
+
statusCode
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
function _condition_refresh_method(
|
|
1065
|
+
inputArguments: VariantLike[],
|
|
1066
|
+
context: ISessionContext,
|
|
1067
|
+
callback: CallbackT<CallMethodResultOptions>
|
|
1068
|
+
) {
|
|
1069
|
+
// arguments : IntegerId SubscriptionId
|
|
1070
|
+
assert(inputArguments.length === 1);
|
|
1071
|
+
const addressSpace = context.object?.addressSpace as AddressSpacePrivate;
|
|
1072
|
+
// c8 ignore next
|
|
1073
|
+
if (doDebug) {
|
|
1074
|
+
debugLog(chalk.red(" ConditionType.ConditionRefresh ! subscriptionId ="), inputArguments[0].toString());
|
|
1075
|
+
}
|
|
1076
|
+
const subscriptionId = inputArguments[0].value;
|
|
1077
|
+
|
|
1078
|
+
let statusCode = _check_subscription_id_is_valid(subscriptionId, context);
|
|
1079
|
+
if (statusCode.isNotGood()) {
|
|
1080
|
+
return statusCode;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
statusCode = _perform_condition_refresh(addressSpace, inputArguments, context);
|
|
1084
|
+
return callback(null, {
|
|
1085
|
+
statusCode
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
function _perform_condition_refresh(addressSpace: AddressSpacePrivate, _inputArguments: VariantLike[], context: ISessionContext) {
|
|
1090
|
+
// --- possible StatusCodes:
|
|
1091
|
+
//
|
|
1092
|
+
// Bad_SubscriptionIdInvalid See Part 4 for the description of this result code
|
|
1093
|
+
// Bad_RefreshInProgress See Table 74 for the description of this result code
|
|
1094
|
+
// Bad_UserAccessDenied The Method was not called in the context of the Session
|
|
1095
|
+
// that owns the Subscription
|
|
1096
|
+
//
|
|
1097
|
+
|
|
1098
|
+
// c8 ignore next
|
|
1099
|
+
if (addressSpace._condition_refresh_in_progress) {
|
|
1100
|
+
// a refresh operation is already in progress....
|
|
1101
|
+
return StatusCodes.BadRefreshInProgress;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
addressSpace._condition_refresh_in_progress = true;
|
|
1105
|
+
|
|
1106
|
+
const server = context.object?.addressSpace.rootFolder.objects.server;
|
|
1107
|
+
const refreshStartEventType = addressSpace.findEventType("RefreshStartEventType");
|
|
1108
|
+
if (!refreshStartEventType) {
|
|
1109
|
+
throw new Error("cannot find RefreshStartEventType");
|
|
1110
|
+
}
|
|
1111
|
+
const refreshEndEventType = addressSpace.findEventType("RefreshEndEventType");
|
|
1112
|
+
if (!refreshEndEventType) {
|
|
1113
|
+
throw new Error("cannot find RefreshEndEventType");
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
server?.raiseEvent(refreshStartEventType, {});
|
|
1117
|
+
// todo : resend retained conditions
|
|
1118
|
+
|
|
1119
|
+
const _server = server as unknown as { _conditionRefresh: () => void };
|
|
1120
|
+
// starting from server object ..
|
|
1121
|
+
// evaluated all --> hasNotifier/hasEventSource -> node
|
|
1122
|
+
_server._conditionRefresh();
|
|
1123
|
+
|
|
1124
|
+
server?.raiseEvent(refreshEndEventType, {});
|
|
1125
|
+
|
|
1126
|
+
addressSpace._condition_refresh_in_progress = false;
|
|
1127
|
+
|
|
1128
|
+
return StatusCodes.Good;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
function _condition_refresh2_method(
|
|
1132
|
+
inputArguments: VariantLike[],
|
|
1133
|
+
context: ISessionContext,
|
|
1134
|
+
callback: CallbackT<CallMethodResultOptions>
|
|
1135
|
+
) {
|
|
1136
|
+
// arguments : IntegerId SubscriptionId
|
|
1137
|
+
// arguments : IntegerId MonitoredItemId
|
|
1138
|
+
assert(inputArguments.length === 2);
|
|
1139
|
+
if (!context.object) {
|
|
1140
|
+
throw new Error("Invalid context => missing Object");
|
|
1141
|
+
}
|
|
1142
|
+
const addressSpace = context.object.addressSpace as AddressSpacePrivate;
|
|
1143
|
+
|
|
1144
|
+
// c8 ignore next
|
|
1145
|
+
if (doDebug) {
|
|
1146
|
+
debugLog(chalk.cyan.bgWhite(" ConditionType.conditionRefresh2 !"));
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
// xx var subscriptionId = inputArguments[0].value;
|
|
1150
|
+
// xx var monitoredItemId = inputArguments[1].value;
|
|
1151
|
+
|
|
1152
|
+
const statusCode = _perform_condition_refresh(addressSpace, inputArguments, context);
|
|
1153
|
+
return callback(null, {
|
|
1154
|
+
statusCode
|
|
1155
|
+
});
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
function _add_comment_method(
|
|
1159
|
+
inputArguments: VariantLike[],
|
|
1160
|
+
context: ISessionContext,
|
|
1161
|
+
callback: CallbackT<CallMethodResultOptions>
|
|
1162
|
+
) {
|
|
1163
|
+
//
|
|
1164
|
+
// The AddComment Method is used to apply a comment to a specific state of a Condition
|
|
1165
|
+
// instance. Normally, the NodeId of the Object instance is passed as the ObjectId to the Call
|
|
1166
|
+
// Service. However, some Servers do not expose Condition instances in the AddressSpace.
|
|
1167
|
+
// Therefore, all Servers shall also allow Clients to call the AddComment Method by specifying
|
|
1168
|
+
// ConditionId as the ObjectId. The Method cannot be called with an ObjectId of the
|
|
1169
|
+
// ConditionType Node.
|
|
1170
|
+
// Signature
|
|
1171
|
+
// - EventId EventId identifying a particular Event Notification where a state was reported for a
|
|
1172
|
+
// Condition.
|
|
1173
|
+
// - Comment A localized text to be applied to the Condition.
|
|
1174
|
+
//
|
|
1175
|
+
// AlwaysGeneratesEvent AuditConditionCommentEventType
|
|
1176
|
+
//
|
|
1177
|
+
UAConditionImplBase.with_condition_method(
|
|
1178
|
+
inputArguments,
|
|
1179
|
+
context,
|
|
1180
|
+
callback,
|
|
1181
|
+
(conditionEventId: ByteString, comment: LocalizedText, branch: ConditionSnapshot, conditionNode: UAConditionImpl) => {
|
|
1182
|
+
assert(Array.isArray(inputArguments));
|
|
1183
|
+
assert(Buffer.isBuffer(conditionEventId) || conditionEventId === null);
|
|
1184
|
+
assert(branch instanceof ConditionSnapshotImpl);
|
|
1185
|
+
branch.setComment(comment);
|
|
1186
|
+
|
|
1187
|
+
const sourceName = "Method/AddComment";
|
|
1188
|
+
|
|
1189
|
+
conditionNode._raiseAuditConditionCommentEvent(sourceName, conditionEventId, comment);
|
|
1190
|
+
|
|
1191
|
+
// raise new event
|
|
1192
|
+
conditionNode.raiseConditionEvent(branch, true);
|
|
1193
|
+
|
|
1194
|
+
/**
|
|
1195
|
+
* raised when the branch has been added a comment
|
|
1196
|
+
* @event addComment
|
|
1197
|
+
* @param conditionEventId NodeId|null
|
|
1198
|
+
* @param comment {LocalizedText}
|
|
1199
|
+
* @param branch {ConditionSnapshot}
|
|
1200
|
+
*/
|
|
1201
|
+
conditionNode.emit("addComment", conditionEventId, comment, branch);
|
|
1202
|
+
|
|
1203
|
+
return StatusCodes.Good;
|
|
1204
|
+
}
|
|
1205
|
+
);
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
function sameBuffer(b1: Buffer | null, b2: Buffer | null) {
|
|
1209
|
+
if (!b1 && !b2) {
|
|
1210
|
+
return true;
|
|
1211
|
+
}
|
|
1212
|
+
if (b1 && !b2) {
|
|
1213
|
+
return false;
|
|
1214
|
+
}
|
|
1215
|
+
if (!b1 && b2) {
|
|
1216
|
+
return false;
|
|
1217
|
+
}
|
|
1218
|
+
assert(b1 instanceof Buffer);
|
|
1219
|
+
assert(b2 instanceof Buffer);
|
|
1220
|
+
if (b1?.length !== b2?.length) {
|
|
1221
|
+
return false;
|
|
1222
|
+
}
|
|
1223
|
+
/*
|
|
1224
|
+
var bb1 = (Buffer.from(b1)).toString("hex");
|
|
1225
|
+
var bb2 = (Buffer.from(b2)).toString("hex");
|
|
1226
|
+
return bb1 === bb2;
|
|
1227
|
+
*/
|
|
1228
|
+
const n = b1?.length || 0;
|
|
1229
|
+
for (let i = 0; i < n; i++) {
|
|
1230
|
+
if (b1?.[i] !== b2?.[i]) {
|
|
1231
|
+
return false;
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
return true;
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
function _create_new_branch_id() {
|
|
1238
|
+
return makeNodeId(randomGuid(), 1);
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
function _install_condition_variable_type<T, DT extends DataType>(node: UAConditionVariable<T, DT>) {
|
|
1242
|
+
// from spec 1.03 : 5.3 condition variables
|
|
1243
|
+
// However, a change in their value is considered important and supposed to trigger
|
|
1244
|
+
// an Event Notification. These information elements are called ConditionVariables.
|
|
1245
|
+
if (node.sourceTimestamp) {
|
|
1246
|
+
node.sourceTimestamp.accessLevel = makeAccessLevelFlag("CurrentRead");
|
|
1247
|
+
} else {
|
|
1248
|
+
console.warn("cannot find node.sourceTimestamp", node.browseName.toString());
|
|
1249
|
+
}
|
|
1250
|
+
node.accessLevel = makeAccessLevelFlag("CurrentRead");
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
/**
|
|
1254
|
+
* @param node {BaseNode}
|
|
1255
|
+
* @param key {String}
|
|
1256
|
+
* @return {BaseNode}
|
|
1257
|
+
* @private
|
|
1258
|
+
*
|
|
1259
|
+
* @example
|
|
1260
|
+
*
|
|
1261
|
+
* var node = _getComposite(node,"enabledState.id");
|
|
1262
|
+
*
|
|
1263
|
+
*/
|
|
1264
|
+
function _getCompositeKey(node: BaseNode, key: string): UAVariableImpl {
|
|
1265
|
+
let cur: BaseNode = node;
|
|
1266
|
+
for (const e of key.split(".")) {
|
|
1267
|
+
const next = resolveChildAccessor(cur, e);
|
|
1268
|
+
// c8 ignore next
|
|
1269
|
+
if (!next) {
|
|
1270
|
+
throw new Error(` cannot extract '${key}' from ${node.browseName.toString()}`);
|
|
1271
|
+
}
|
|
1272
|
+
cur = next;
|
|
1273
|
+
}
|
|
1274
|
+
return cur as UAVariableImpl;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* verify that the subscription id belongs to the session that make the call.
|
|
1279
|
+
* @param subscriptionId {Number}
|
|
1280
|
+
* @param context {Object}
|
|
1281
|
+
* @private
|
|
1282
|
+
*/
|
|
1283
|
+
function _check_subscription_id_is_valid(_subscriptionId: number, _context: ISessionContext) {
|
|
1284
|
+
/// todo: return StatusCodes.BadSubscriptionIdInvalid; if subscriptionId doesn't belong to session...
|
|
1285
|
+
return StatusCodes.Good;
|
|
1286
|
+
}
|