node-opcua-address-space 2.74.0 → 2.76.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/source/address_space_ts.d.ts +118 -118
- package/dist/source/address_space_ts.js +17 -17
- package/dist/source/continuation_points/continuation_point_manager.d.ts +32 -32
- package/dist/source/continuation_points/continuation_point_manager.js +195 -195
- package/dist/source/helpers/adjust_browse_direction.d.ts +5 -5
- package/dist/source/helpers/adjust_browse_direction.js +11 -11
- package/dist/source/helpers/argument_list.d.ts +33 -33
- package/dist/source/helpers/argument_list.js +258 -257
- package/dist/source/helpers/argument_list.js.map +1 -1
- package/dist/source/helpers/call_helpers.d.ts +6 -6
- package/dist/source/helpers/call_helpers.js +70 -70
- package/dist/source/helpers/coerce_enum_value.d.ts +6 -6
- package/dist/source/helpers/coerce_enum_value.js +33 -33
- package/dist/source/helpers/dump_tools.d.ts +14 -14
- package/dist/source/helpers/dump_tools.js +78 -78
- package/dist/source/helpers/ensure_secure_access.d.ts +9 -9
- package/dist/source/helpers/ensure_secure_access.js +76 -76
- package/dist/source/helpers/make_optionals_map.d.ts +21 -21
- package/dist/source/helpers/make_optionals_map.js +29 -29
- package/dist/source/helpers/multiform_func.d.ts +11 -11
- package/dist/source/helpers/multiform_func.js +75 -73
- package/dist/source/helpers/multiform_func.js.map +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.d.ts +3 -3
- package/dist/source/helpers/resolve_opaque_on_address_space.js +36 -36
- package/dist/source/index.d.ts +56 -58
- package/dist/source/index.js +83 -87
- package/dist/source/index.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +19 -19
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js +2 -2
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +193 -199
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.js +2 -9
- package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.js.map +1 -1
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +12 -14
- package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.js +2 -2
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +10 -6
- package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.js +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +7 -7
- package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +7 -7
- package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.js +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +4 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +4 -4
- package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +9 -9
- package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js +2 -2
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +4 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +4 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js +3 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js.map +1 -0
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +20 -5
- package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js +2 -2
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +23 -23
- package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js +2 -2
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +32 -32
- package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js +2 -2
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +19 -15
- package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js +2 -2
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +42 -42
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.js +2 -2
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +7 -7
- package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +25 -25
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +5 -5
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js +2 -2
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +20 -20
- package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js +2 -2
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +26 -26
- package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js +2 -2
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +8 -10
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js +2 -2
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +10 -10
- package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js +2 -2
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +21 -21
- package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js +2 -2
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +24 -24
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js +2 -2
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +12 -12
- package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js +2 -2
- package/dist/source/interfaces/data_access/ua_y_array_item_ex.d.ts +8 -8
- package/dist/source/interfaces/data_access/ua_y_array_item_ex.js +2 -2
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +12 -12
- package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js +2 -2
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +49 -49
- package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js +2 -2
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +11 -11
- package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js +2 -2
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +30 -30
- package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.js +2 -2
- package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +222 -222
- package/dist/source/interfaces/state_machine/ua_state_machine_type.js +2 -2
- package/dist/source/interfaces/state_machine/ua_transition_ex.d.ts +6 -6
- package/dist/source/interfaces/state_machine/ua_transition_ex.js +2 -2
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +8 -8
- package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js +2 -2
- package/dist/source/loader/decode_xml_extension_object.d.ts +6 -6
- package/dist/source/loader/decode_xml_extension_object.js +71 -71
- package/dist/source/loader/ensure_datatype_extracted.d.ts +5 -5
- package/dist/source/loader/ensure_datatype_extracted.js +45 -45
- package/dist/source/loader/generateAddressSpaceRaw.d.ts +10 -10
- package/dist/source/loader/generateAddressSpaceRaw.js +45 -45
- package/dist/source/loader/load_nodeset2.d.ts +16 -16
- package/dist/source/loader/load_nodeset2.js +1461 -1461
- package/dist/source/loader/make_semver_compatible.d.ts +6 -6
- package/dist/source/loader/make_semver_compatible.js +25 -25
- package/dist/source/loader/make_xml_extension_object_parser.d.ts +28 -28
- package/dist/source/loader/make_xml_extension_object_parser.js +325 -325
- package/dist/source/loader/namespace_post_step.d.ts +10 -6
- package/dist/source/loader/namespace_post_step.js +61 -47
- package/dist/source/loader/namespace_post_step.js.map +1 -1
- package/dist/source/loader/register_node_promoter.d.ts +2 -3
- package/dist/source/loader/register_node_promoter.js +9 -9
- package/dist/source/loader/register_node_promoter.js.map +1 -1
- package/dist/source/namespace.d.ts +6 -6
- package/dist/source/namespace.js +2 -2
- package/dist/source/namespace_alarm_and_condition.d.ts +32 -24
- package/dist/source/namespace_alarm_and_condition.js +2 -2
- package/dist/source/namespace_data_access.d.ts +42 -42
- package/dist/source/namespace_data_access.js +2 -2
- package/dist/source/namespace_machine_state.d.ts +7 -7
- package/dist/source/namespace_machine_state.js +2 -2
- package/dist/source/pseudo_session.d.ts +55 -55
- package/dist/source/pseudo_session.js +203 -203
- package/dist/source/session_context.d.ts +111 -111
- package/dist/source/session_context.js +265 -265
- package/dist/source/set_namespace_meta_data.d.ts +2 -2
- package/dist/source/set_namespace_meta_data.js +59 -59
- package/dist/source/ua_root_folder.d.ts +9 -9
- package/dist/source/ua_root_folder.js +2 -2
- package/dist/source/ua_two_state_variable_ex.d.ts +23 -23
- package/dist/source/ua_two_state_variable_ex.js +2 -2
- package/dist/source/xml_writer.d.ts +9 -9
- package/dist/source/xml_writer.js +2 -2
- package/dist/src/address_space.d.ts +392 -392
- package/dist/src/address_space.js +1392 -1387
- package/dist/src/address_space.js.map +1 -1
- package/dist/src/address_space_change_event_tools.d.ts +6 -6
- package/dist/src/address_space_change_event_tools.js +149 -149
- package/dist/src/address_space_private.d.ts +43 -43
- package/dist/src/address_space_private.js +2 -2
- package/dist/src/alarms_and_conditions/condition.d.ts +5 -5
- package/dist/src/alarms_and_conditions/condition.js +78 -78
- package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +26 -26
- package/dist/src/alarms_and_conditions/condition_info_impl.js +54 -54
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +222 -231
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +657 -666
- package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +9 -8
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +61 -46
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -1
- package/dist/src/alarms_and_conditions/index.d.ts +16 -18
- package/dist/src/alarms_and_conditions/index.js +32 -34
- package/dist/src/alarms_and_conditions/index.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +44 -44
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +244 -244
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +93 -93
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +419 -416
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +26 -26
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js +38 -38
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +44 -36
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +183 -118
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +153 -153
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +1028 -1024
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +14 -14
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +34 -34
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +24 -26
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +56 -56
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +11 -11
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +11 -11
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +23 -23
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +86 -86
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +11 -11
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js +7 -7
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +79 -79
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +250 -250
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +24 -24
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +50 -50
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +19 -19
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +162 -162
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +46 -46
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +166 -161
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +18 -18
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +17 -17
- package/dist/src/apply_condition_refresh.d.ts +6 -6
- package/dist/src/apply_condition_refresh.js +27 -27
- package/dist/src/base_node_impl.d.ts +281 -281
- package/dist/src/base_node_impl.js +1395 -1395
- package/dist/src/base_node_private.d.ts +61 -61
- package/dist/src/base_node_private.js +705 -705
- package/dist/src/data_access/add_dataItem_stuff.d.ts +11 -11
- package/dist/src/data_access/add_dataItem_stuff.js +61 -61
- package/dist/src/data_access/check_variant_compatibility_ua_analog_item.d.ts +1 -1
- package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js +34 -34
- package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +32 -32
- package/dist/src/data_access/ua_multistate_discrete_impl.js +130 -130
- package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +51 -51
- package/dist/src/data_access/ua_multistate_value_discrete_impl.js +249 -249
- package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +25 -25
- package/dist/src/data_access/ua_two_state_discrete_impl.js +153 -153
- package/dist/src/event_data.d.ts +34 -29
- package/dist/src/event_data.js +64 -95
- package/dist/src/event_data.js.map +1 -1
- package/dist/src/extension_object_array_node.d.ts +61 -61
- package/dist/src/extension_object_array_node.js +276 -276
- package/dist/src/historical_access/address_space_historical_data_node.d.ts +26 -26
- package/dist/src/historical_access/address_space_historical_data_node.js +630 -630
- package/dist/src/index_current.d.ts +43 -44
- package/dist/src/index_current.js +74 -75
- package/dist/src/index_current.js.map +1 -1
- package/dist/src/namespace_impl.d.ts +461 -458
- package/dist/src/namespace_impl.js +1732 -1732
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/namespace_private.d.ts +21 -21
- package/dist/src/namespace_private.js +32 -32
- package/dist/src/nodeid_manager.d.ts +36 -36
- package/dist/src/nodeid_manager.js +197 -197
- package/dist/src/nodeset_tools/adjust_namespace_array.d.ts +2 -2
- package/dist/src/nodeset_tools/adjust_namespace_array.js +13 -13
- package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +2 -2
- package/dist/src/nodeset_tools/construct_namespace_dependency.js +83 -83
- package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +2 -2
- package/dist/src/nodeset_tools/nodeset_to_xml.js +1155 -1155
- package/dist/src/nodeset_tools/typedictionary_to_xml.d.ts +2 -2
- package/dist/src/nodeset_tools/typedictionary_to_xml.js +154 -154
- package/dist/src/reference_impl.d.ts +43 -43
- package/dist/src/reference_impl.js +139 -139
- package/dist/src/role_permissions.d.ts +2 -2
- package/dist/src/role_permissions.js +10 -10
- package/dist/src/state_machine/finite_state_machine.d.ts +67 -67
- package/dist/src/state_machine/finite_state_machine.js +353 -353
- package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +38 -38
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js +250 -250
- package/dist/src/state_machine/ua_two_state_variable.d.ts +61 -61
- package/dist/src/state_machine/ua_two_state_variable.js +331 -331
- package/dist/src/state_machine/ua_two_state_variable.js.map +1 -1
- package/dist/src/tool_isSupertypeOf.d.ts +17 -17
- package/dist/src/tool_isSupertypeOf.js +108 -108
- package/dist/src/ua_condition_type.d.ts +8 -8
- package/dist/src/ua_condition_type.js +2 -2
- package/dist/src/ua_data_type_impl.d.ts +93 -93
- package/dist/src/ua_data_type_impl.js +371 -371
- package/dist/src/ua_method_impl.d.ts +41 -41
- package/dist/src/ua_method_impl.js +208 -208
- package/dist/src/ua_object_impl.d.ts +35 -35
- package/dist/src/ua_object_impl.js +161 -162
- package/dist/src/ua_object_impl.js.map +1 -1
- package/dist/src/ua_object_type_impl.d.ts +48 -48
- package/dist/src/ua_object_type_impl.js +124 -124
- package/dist/src/ua_reference_type_impl.d.ts +43 -43
- package/dist/src/ua_reference_type_impl.js +139 -139
- package/dist/src/ua_variable_impl.d.ts +351 -351
- package/dist/src/ua_variable_impl.js +1604 -1604
- package/dist/src/ua_variable_impl_ext_obj.d.ts +17 -17
- package/dist/src/ua_variable_impl_ext_obj.js +437 -437
- package/dist/src/ua_variable_type_impl.d.ts +62 -62
- package/dist/src/ua_variable_type_impl.js +570 -570
- package/dist/src/ua_view_impl.d.ts +19 -19
- package/dist/src/ua_view_impl.js +43 -43
- package/distHelpers/add_event_generator_object.d.ts +3 -3
- package/distHelpers/add_event_generator_object.js +64 -65
- package/distHelpers/add_event_generator_object.js.map +1 -1
- package/distHelpers/alarms_and_conditions_demo.d.ts +9 -9
- package/distHelpers/alarms_and_conditions_demo.js +115 -114
- package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
- package/distHelpers/assertHasMatchingReference.d.ts +19 -19
- package/distHelpers/assertHasMatchingReference.js +40 -40
- package/distHelpers/boiler_system.d.ts +113 -113
- package/distHelpers/boiler_system.js +395 -395
- package/distHelpers/create_minimalist_address_space_nodeset.d.ts +5 -5
- package/distHelpers/create_minimalist_address_space_nodeset.js +171 -171
- package/distHelpers/date_utils.d.ts +3 -3
- package/distHelpers/date_utils.js +9 -9
- package/distHelpers/dump_statemachine.js +127 -127
- package/distHelpers/get_address_space_fixture.d.ts +1 -1
- package/distHelpers/get_address_space_fixture.js +30 -30
- package/distHelpers/get_mini_address_space.d.ts +7 -7
- package/distHelpers/get_mini_address_space.js +36 -36
- package/distHelpers/index.d.ts +12 -12
- package/distHelpers/index.js +28 -28
- package/distHelpers/mock_session.d.ts +14 -14
- package/distHelpers/mock_session.js +25 -25
- package/distNodeJS/generate_address_space.d.ts +4 -4
- package/distNodeJS/generate_address_space.js +41 -41
- package/distNodeJS/index.d.ts +1 -1
- package/distNodeJS/index.js +17 -17
- package/generate.js +1 -1
- package/package.json +36 -37
- package/source/helpers/argument_list.ts +2 -0
- package/source/helpers/multiform_func.ts +5 -3
- package/source/index.ts +0 -2
- package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +12 -30
- package/source/interfaces/alarms_and_conditions/deviation_stuff.ts +8 -6
- package/source/interfaces/alarms_and_conditions/install_setpoint_options.ts +9 -0
- package/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +4 -0
- package/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +2 -2
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +4 -0
- package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +4 -0
- package/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +16 -1
- package/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +5 -0
- package/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +1 -0
- package/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +1 -2
- package/source/loader/namespace_post_step.ts +26 -3
- package/source/loader/register_node_promoter.ts +5 -4
- package/source/namespace_alarm_and_condition.ts +48 -23
- package/src/address_space.ts +22 -16
- package/src/alarms_and_conditions/condition.ts +1 -1
- package/src/alarms_and_conditions/condition_snapshot_impl.ts +95 -102
- package/src/alarms_and_conditions/deviation_alarm_helper.ts +33 -18
- package/src/alarms_and_conditions/index.ts +0 -2
- package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +4 -1
- package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +106 -49
- package/src/alarms_and_conditions/ua_condition_impl.ts +9 -6
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +5 -6
- package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +1 -1
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +6 -8
- package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +5 -3
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +3 -3
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +30 -26
- package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +1 -1
- package/src/event_data.ts +47 -77
- package/src/index_current.ts +0 -1
- package/src/namespace_impl.ts +47 -26
- package/src/state_machine/ua_two_state_variable.ts +2 -3
- package/src/ua_object_impl.ts +1 -2
- package/test_helpers/add_event_generator_object.ts +0 -1
- package/test_helpers/alarms_and_conditions_demo.ts +4 -1
- package/dist/source/helpers/check_event_clause.d.ts +0 -17
- package/dist/source/helpers/check_event_clause.js +0 -53
- package/dist/source/helpers/check_event_clause.js.map +0 -1
- package/dist/src/alarms_and_conditions/check_where_clause.d.ts +0 -4
- package/dist/src/alarms_and_conditions/check_where_clause.js +0 -110
- package/dist/src/alarms_and_conditions/check_where_clause.js.map +0 -1
- package/dist/src/alarms_and_conditions/condition_info.d.ts +0 -27
- package/dist/src/alarms_and_conditions/condition_info.js +0 -55
- package/dist/src/alarms_and_conditions/condition_info.js.map +0 -1
- package/dist/src/alarms_and_conditions/condition_snapshot.d.ts +0 -233
- package/dist/src/alarms_and_conditions/condition_snapshot.js +0 -667
- package/dist/src/alarms_and_conditions/condition_snapshot.js.map +0 -1
- package/dist/src/alarms_and_conditions/extract_event_fields.d.ts +0 -10
- package/dist/src/alarms_and_conditions/extract_event_fields.js +0 -90
- package/dist/src/alarms_and_conditions/extract_event_fields.js.map +0 -1
- package/dist/src/data_access/ua_multistate_value_discrete.d.ts +0 -51
- package/dist/src/data_access/ua_multistate_value_discrete.js +0 -250
- package/dist/src/data_access/ua_multistate_value_discrete.js.map +0 -1
- package/dist/src/data_access/ua_two_state_discrete.d.ts +0 -25
- package/dist/src/data_access/ua_two_state_discrete.js +0 -154
- package/dist/src/data_access/ua_two_state_discrete.js.map +0 -1
- package/source/helpers/check_event_clause.ts +0 -55
- package/src/alarms_and_conditions/check_where_clause.ts +0 -147
- package/src/alarms_and_conditions/extract_event_fields.ts +0 -103
package/src/event_data.ts
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
* @module node-opcua-address-space.Private
|
|
3
3
|
*/
|
|
4
4
|
import { assert } from "node-opcua-assert";
|
|
5
|
-
import {
|
|
6
|
-
import { DataValue } from "node-opcua-data-value";
|
|
7
|
-
import { NodeId } from "node-opcua-nodeid";
|
|
8
|
-
import { constructBrowsePathFromQualifiedName } from "node-opcua-service-translate-browse-path";
|
|
5
|
+
import { coerceExpandedNodeId, NodeId, sameNodeId } from "node-opcua-nodeid";
|
|
9
6
|
import { StatusCodes } from "node-opcua-status-code";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { BrowsePath, BrowsePathResult } from "node-opcua-types";
|
|
8
|
+
import { Variant, VariantLike } from "node-opcua-variant";
|
|
12
9
|
|
|
13
|
-
import {
|
|
10
|
+
import { BaseNode, IEventData } from "node-opcua-address-space-base";
|
|
11
|
+
import { lowerFirstLetter } from "node-opcua-utils";
|
|
14
12
|
|
|
13
|
+
type NodeIdString = string;
|
|
14
|
+
type FullBrowsePath = string;
|
|
15
15
|
/**
|
|
16
16
|
* @class EventData
|
|
17
17
|
* @param eventTypeNode {BaseNode}
|
|
@@ -21,91 +21,61 @@ export class EventData implements IEventData {
|
|
|
21
21
|
public eventId: NodeId;
|
|
22
22
|
public $eventDataSource: BaseNode;
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
public $cache: {
|
|
25
|
+
__values: { [key: NodeIdString]: Variant };
|
|
26
|
+
__nodeIdToNode: { [key: NodeIdString]: BaseNode };
|
|
27
|
+
__pathToNodeId: { [key: FullBrowsePath]: NodeId };
|
|
28
|
+
__nodeIdToFullPath: { [key: NodeIdString]: FullBrowsePath };
|
|
29
|
+
};
|
|
25
30
|
|
|
26
31
|
constructor(eventTypeNode: BaseNode) {
|
|
27
|
-
this
|
|
32
|
+
this.$cache = {
|
|
33
|
+
__values: {},
|
|
34
|
+
__nodeIdToNode: {},
|
|
35
|
+
__pathToNodeId: {},
|
|
36
|
+
__nodeIdToFullPath: {}
|
|
37
|
+
};
|
|
38
|
+
|
|
28
39
|
this.eventId = new NodeId();
|
|
29
40
|
this.$eventDataSource = eventTypeNode;
|
|
30
41
|
}
|
|
31
42
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* @return {NodeId|null}
|
|
36
|
-
*/
|
|
37
|
-
public resolveSelectClause(selectClause: SimpleAttributeOperand): NodeId | null {
|
|
38
|
-
assert(selectClause instanceof SimpleAttributeOperand);
|
|
39
|
-
const addressSpace = this.$eventDataSource.addressSpace;
|
|
40
|
-
|
|
41
|
-
if (selectClause.browsePath!.length === 0 && selectClause.attributeId === AttributeIds.NodeId) {
|
|
42
|
-
assert(!"Cannot use resolveSelectClause on this selectClause as it has no browsePath");
|
|
43
|
-
}
|
|
44
|
-
// navigate to the innerNode specified by the browsePath [ QualifiedName]
|
|
45
|
-
const browsePath = constructBrowsePathFromQualifiedName(this.$eventDataSource, selectClause.browsePath);
|
|
43
|
+
public _createValue(fullBrowsePath: string, node: BaseNode, variant: VariantLike): void {
|
|
44
|
+
const eventData = this as any;
|
|
45
|
+
assert(!eventData[fullBrowsePath], "already exists " + fullBrowsePath);
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
// xx console.log("xx browse Path", browsePath.toString());
|
|
47
|
+
const lowerName = fullBrowsePath.split(".").map(lowerFirstLetter).join(".");
|
|
49
48
|
|
|
50
|
-
|
|
49
|
+
eventData[lowerName] = Variant.coerce(variant);
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
this.$cache.__pathToNodeId[fullBrowsePath] = node.nodeId;
|
|
52
|
+
this.$cache.__nodeIdToNode[node.nodeId.toString()] = node;
|
|
53
|
+
this.$cache.__nodeIdToFullPath[node.nodeId.toString()] = fullBrowsePath;
|
|
54
|
+
this.$cache.__values[node.nodeId.toString()] = eventData[lowerName];
|
|
55
|
+
}
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
if (!browsePathResult.targets) {
|
|
57
|
+
public _browse(browsePath: BrowsePath): BrowsePathResult | null {
|
|
58
|
+
if (!sameNodeId(browsePath.startingNode, this.$eventDataSource.nodeId)) {
|
|
61
59
|
return null;
|
|
62
60
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
61
|
+
const fullBrowsePath = (browsePath.relativePath.elements || []).map((b=>b.targetName.toString())).join(".");
|
|
62
|
+
const nodeId = this.$cache.__pathToNodeId[fullBrowsePath];
|
|
63
|
+
if (!nodeId) return null;
|
|
64
|
+
return new BrowsePathResult({
|
|
65
|
+
statusCode: StatusCodes.Good,
|
|
66
|
+
targets: [{
|
|
67
|
+
remainingPathIndex: 0,
|
|
68
|
+
targetId: coerceExpandedNodeId(nodeId),
|
|
69
|
+
}]
|
|
70
|
+
})
|
|
70
71
|
}
|
|
71
72
|
|
|
72
|
-
public
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
eventData.__nodes[node.nodeId.toString()] = eventData[lowerName];
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* @method readValue
|
|
79
|
-
* @param nodeId {NodeId}
|
|
80
|
-
* @param selectClause {SimpleAttributeOperand}
|
|
81
|
-
* @return {Variant}
|
|
82
|
-
*/
|
|
83
|
-
public readValue(sessionContext: ISessionContext, nodeId: NodeId, selectClause: SimpleAttributeOperand): Variant {
|
|
84
|
-
assert(nodeId instanceof NodeId);
|
|
85
|
-
assert(selectClause instanceof SimpleAttributeOperand);
|
|
86
|
-
assert(nodeId instanceof NodeId);
|
|
87
|
-
const addressSpace = this.$eventDataSource.addressSpace;
|
|
88
|
-
|
|
89
|
-
const node = addressSpace.findNode(nodeId)!;
|
|
90
|
-
const key = node.nodeId.toString();
|
|
91
|
-
|
|
92
|
-
// if the value exists in cache ... we read it from cache...
|
|
93
|
-
const cached_value = this.__nodes[key];
|
|
73
|
+
public _readValue(nodeId: NodeId): Variant | null {
|
|
74
|
+
const key = nodeId.toString();
|
|
75
|
+
const cached_value = this.$cache.__values[key];
|
|
94
76
|
if (cached_value) {
|
|
95
77
|
return cached_value;
|
|
96
78
|
}
|
|
97
|
-
|
|
98
|
-
if (node.nodeClass === NodeClass.Variable && selectClause.attributeId === AttributeIds.Value) {
|
|
99
|
-
const nodeVariable = node as UAVariable;
|
|
100
|
-
return prepare(nodeVariable.readValue(sessionContext, selectClause.indexRange));
|
|
101
|
-
}
|
|
102
|
-
return prepare(node.readAttribute(sessionContext, selectClause.attributeId));
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function prepare(dataValue: DataValue): Variant {
|
|
107
|
-
if (dataValue.statusCode === StatusCodes.Good) {
|
|
108
|
-
return dataValue.value;
|
|
79
|
+
return null;
|
|
109
80
|
}
|
|
110
|
-
|
|
111
|
-
}
|
|
81
|
+
}
|
package/src/index_current.ts
CHANGED
|
@@ -7,7 +7,6 @@ export * from "../source/helpers/dump_tools";
|
|
|
7
7
|
export * from "../source/helpers/adjust_browse_direction";
|
|
8
8
|
export * from "../source/pseudo_session";
|
|
9
9
|
export * from "../source/helpers/make_optionals_map";
|
|
10
|
-
export * from "../source/helpers/check_event_clause";
|
|
11
10
|
export * from "../source/helpers/argument_list";
|
|
12
11
|
export * from "../source/helpers/call_helpers";
|
|
13
12
|
export * from "../source/helpers/ensure_secure_access";
|
package/src/namespace_impl.ts
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
RolePermissionTypeOptions
|
|
29
29
|
} from "node-opcua-types";
|
|
30
30
|
import * as utils from "node-opcua-utils";
|
|
31
|
-
import { DataType, Variant, VariantArrayType, verifyRankAndDimensions } from "node-opcua-variant";
|
|
31
|
+
import { DataType, Variant, VariantArrayType, VariantOptions, verifyRankAndDimensions } from "node-opcua-variant";
|
|
32
32
|
import {
|
|
33
33
|
AddBaseNodeOptions,
|
|
34
34
|
AddEnumerationTypeOptions,
|
|
@@ -67,7 +67,14 @@ import {
|
|
|
67
67
|
} from "../source/address_space_ts";
|
|
68
68
|
import { UAStateMachineEx } from "../source/interfaces/state_machine/ua_state_machine_type";
|
|
69
69
|
import { UATransitionEx } from "../source/interfaces/state_machine/ua_transition_ex";
|
|
70
|
-
import {
|
|
70
|
+
import {
|
|
71
|
+
InstantiateAlarmConditionOptions,
|
|
72
|
+
InstantiateExclusiveLimitAlarmOptions,
|
|
73
|
+
InstantiateLimitAlarmOptions,
|
|
74
|
+
InstantiateOffNormalAlarmOptions,
|
|
75
|
+
UATwoStateDiscreteEx,
|
|
76
|
+
UAYArrayItemEx
|
|
77
|
+
} from "../source";
|
|
71
78
|
import { AddAnalogDataItemOptions, AddDataItemOptions } from "../source/namespace_data_access";
|
|
72
79
|
import { UATwoStateVariableEx } from "../source/ua_two_state_variable_ex";
|
|
73
80
|
import { UAMultiStateValueDiscreteEx } from "../source/interfaces/data_access/ua_multistate_value_discrete_ex";
|
|
@@ -79,22 +86,19 @@ import { UALimitAlarmEx } from "../source/interfaces/alarms_and_conditions/ua_li
|
|
|
79
86
|
import { UANonExclusiveDeviationAlarmEx } from "../source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex";
|
|
80
87
|
import { UANonExclusiveLimitAlarmEx } from "../source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex";
|
|
81
88
|
import { UAConditionEx } from "../source/interfaces/alarms_and_conditions/ua_condition_ex";
|
|
89
|
+
import { InstantiateExclusiveDeviationAlarmOptions } from "../source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options";
|
|
90
|
+
import { InstantiateNonExclusiveLimitAlarmOptions } from "../source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options";
|
|
91
|
+
import { InstantiateNonExclusiveDeviationAlarmOptions } from "../source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options";
|
|
82
92
|
|
|
83
93
|
import { _handle_delete_node_model_change_event, _handle_model_change_event } from "./address_space_change_event_tools";
|
|
84
94
|
import { AddressSpacePrivate } from "./address_space_private";
|
|
85
95
|
import { UAConditionImpl } from "./alarms_and_conditions/ua_condition_impl";
|
|
86
96
|
import { UADiscreteAlarmImpl } from "./alarms_and_conditions/ua_discrete_alarm_impl";
|
|
87
|
-
import {
|
|
88
|
-
|
|
89
|
-
} from "./alarms_and_conditions/
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
UANonExclusiveDeviationAlarmImpl
|
|
94
|
-
} from "./alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl";
|
|
95
|
-
import {
|
|
96
|
-
UANonExclusiveLimitAlarmImpl
|
|
97
|
-
} from "./alarms_and_conditions/ua_non_exclusive_limit_alarm_impl";
|
|
97
|
+
import { UAExclusiveDeviationAlarmImpl } from "./alarms_and_conditions/ua_exclusive_deviation_alarm_impl";
|
|
98
|
+
import { UAExclusiveLimitAlarmImpl } from "./alarms_and_conditions/ua_exclusive_limit_alarm_impl";
|
|
99
|
+
import { UALimitAlarmImpl } from "./alarms_and_conditions/ua_limit_alarm_impl";
|
|
100
|
+
import { UANonExclusiveDeviationAlarmImpl } from "./alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl";
|
|
101
|
+
import { UANonExclusiveLimitAlarmImpl } from "./alarms_and_conditions/ua_non_exclusive_limit_alarm_impl";
|
|
98
102
|
import { UAAcknowledgeableConditionImpl, UAAlarmConditionImpl } from "./alarms_and_conditions";
|
|
99
103
|
import { UAOffNormalAlarmEx, UAOffNormalAlarmImpl } from "./alarms_and_conditions/ua_off_normal_alarm_impl";
|
|
100
104
|
import { add_dataItem_stuff } from "./data_access/add_dataItem_stuff";
|
|
@@ -1541,52 +1545,69 @@ export class NamespaceImpl implements NamespacePrivate {
|
|
|
1541
1545
|
|
|
1542
1546
|
public instantiateAcknowledgeableCondition(
|
|
1543
1547
|
conditionTypeId: UAEventType | NodeId | string,
|
|
1544
|
-
options:
|
|
1545
|
-
data
|
|
1548
|
+
options: InstantiateAlarmConditionOptions,
|
|
1549
|
+
data?: Record<string, VariantOptions>
|
|
1546
1550
|
): UAAcknowledgeableConditionImpl {
|
|
1547
1551
|
return UAAcknowledgeableConditionImpl.instantiate(this, conditionTypeId, options, data);
|
|
1548
1552
|
}
|
|
1549
1553
|
|
|
1550
1554
|
public instantiateAlarmCondition(
|
|
1551
1555
|
alarmConditionTypeId: UAEventType | NodeId | string,
|
|
1552
|
-
options:
|
|
1553
|
-
data
|
|
1556
|
+
options: InstantiateAlarmConditionOptions,
|
|
1557
|
+
data?: Record<string, VariantOptions>
|
|
1554
1558
|
): UAAlarmConditionEx {
|
|
1555
1559
|
return UAAlarmConditionImpl.instantiate(this, alarmConditionTypeId, options, data);
|
|
1556
1560
|
}
|
|
1557
1561
|
|
|
1558
|
-
public instantiateLimitAlarm(
|
|
1562
|
+
public instantiateLimitAlarm(
|
|
1563
|
+
limitAlarmTypeId: UAEventType | NodeId | string,
|
|
1564
|
+
options: InstantiateLimitAlarmOptions,
|
|
1565
|
+
data?: Record<string, VariantOptions>
|
|
1566
|
+
): UALimitAlarmEx {
|
|
1559
1567
|
return UALimitAlarmImpl.instantiate(this, limitAlarmTypeId, options, data);
|
|
1560
1568
|
}
|
|
1561
1569
|
|
|
1562
1570
|
public instantiateExclusiveLimitAlarm(
|
|
1563
1571
|
exclusiveLimitAlarmTypeId: UAEventType | NodeId | string,
|
|
1564
|
-
options:
|
|
1565
|
-
data
|
|
1572
|
+
options: InstantiateLimitAlarmOptions,
|
|
1573
|
+
data?: Record<string, VariantOptions>
|
|
1566
1574
|
): UAExclusiveLimitAlarmEx {
|
|
1567
1575
|
return UAExclusiveLimitAlarmImpl.instantiate(this, exclusiveLimitAlarmTypeId, options, data);
|
|
1568
1576
|
}
|
|
1569
1577
|
|
|
1570
|
-
public instantiateExclusiveDeviationAlarm(
|
|
1578
|
+
public instantiateExclusiveDeviationAlarm(
|
|
1579
|
+
options: InstantiateExclusiveDeviationAlarmOptions,
|
|
1580
|
+
data?: Record<string, VariantOptions>
|
|
1581
|
+
): UAExclusiveDeviationAlarmEx {
|
|
1571
1582
|
return UAExclusiveDeviationAlarmImpl.instantiate(this, "ExclusiveDeviationAlarmType", options, data);
|
|
1572
1583
|
}
|
|
1573
1584
|
|
|
1574
1585
|
public instantiateNonExclusiveLimitAlarm(
|
|
1575
1586
|
nonExclusiveLimitAlarmTypeId: UAEventType | NodeId | string,
|
|
1576
|
-
options:
|
|
1577
|
-
data
|
|
1587
|
+
options: InstantiateNonExclusiveLimitAlarmOptions,
|
|
1588
|
+
data?: Record<string, VariantOptions>
|
|
1578
1589
|
): UANonExclusiveLimitAlarmEx {
|
|
1579
1590
|
return UANonExclusiveLimitAlarmImpl.instantiate(this, nonExclusiveLimitAlarmTypeId, options, data);
|
|
1580
1591
|
}
|
|
1581
1592
|
|
|
1582
|
-
public instantiateNonExclusiveDeviationAlarm(
|
|
1593
|
+
public instantiateNonExclusiveDeviationAlarm(
|
|
1594
|
+
options: InstantiateNonExclusiveDeviationAlarmOptions,
|
|
1595
|
+
data?: Record<string, VariantOptions>
|
|
1596
|
+
): UANonExclusiveDeviationAlarmEx {
|
|
1583
1597
|
return UANonExclusiveDeviationAlarmImpl.instantiate(this, "NonExclusiveDeviationAlarmType", options, data);
|
|
1584
1598
|
}
|
|
1585
1599
|
|
|
1586
|
-
public instantiateDiscreteAlarm(
|
|
1600
|
+
public instantiateDiscreteAlarm(
|
|
1601
|
+
discreteAlarmType: UAEventType | NodeId | string,
|
|
1602
|
+
options: InstantiateAlarmConditionOptions,
|
|
1603
|
+
data?: Record<string, VariantOptions>
|
|
1604
|
+
): UADiscreteAlarmEx {
|
|
1587
1605
|
return UADiscreteAlarmImpl.instantiate(this, discreteAlarmType, options, data);
|
|
1588
1606
|
}
|
|
1589
|
-
public instantiateOffNormalAlarm(
|
|
1607
|
+
public instantiateOffNormalAlarm(
|
|
1608
|
+
options: InstantiateOffNormalAlarmOptions,
|
|
1609
|
+
data?: Record<string, VariantOptions>
|
|
1610
|
+
): UAOffNormalAlarmEx {
|
|
1590
1611
|
return UAOffNormalAlarmImpl.instantiate(this, "OffNormalAlarmType", options, data);
|
|
1591
1612
|
}
|
|
1592
1613
|
|
|
@@ -5,14 +5,13 @@ import { assert } from "node-opcua-assert";
|
|
|
5
5
|
|
|
6
6
|
import { VariableTypeIds } from "node-opcua-constants";
|
|
7
7
|
import { BrowseDirection, coerceLocalizedText, LocalizedText, LocalizedTextLike } from "node-opcua-data-model";
|
|
8
|
-
import { DataValueT
|
|
8
|
+
import { DataValueT } from "node-opcua-data-value";
|
|
9
9
|
import { NodeId, resolveNodeId } from "node-opcua-nodeid";
|
|
10
10
|
import { sameNodeId } from "node-opcua-nodeid";
|
|
11
11
|
import { StatusCodes, StatusCode, StatusCodeCallback } from "node-opcua-status-code";
|
|
12
12
|
import { Variant, VariantLike, VariantT } from "node-opcua-variant";
|
|
13
13
|
import { DataType } from "node-opcua-variant";
|
|
14
14
|
import { BaseNode, BindVariableOptions, INamespace, UAReference, UAVariable, ISessionContext } from "node-opcua-address-space-base";
|
|
15
|
-
import { UATwoStateVariable } from "node-opcua-nodeset-ua";
|
|
16
15
|
import { NumericRange } from "node-opcua-numeric-range";
|
|
17
16
|
import { QualifiedNameLike } from "node-opcua-data-model";
|
|
18
17
|
|
|
@@ -297,7 +296,7 @@ export class UATwoStateVariableImpl extends UAVariableImplT<LocalizedText, DataT
|
|
|
297
296
|
// for which state or sub-state should be used. It is up to the Server and will depend on the
|
|
298
297
|
// semantics of the StateMachineType
|
|
299
298
|
//
|
|
300
|
-
// EffectiveDisplayName will be constructed by adding the
|
|
299
|
+
// EffectiveDisplayName will be constructed by adding the EnabledState
|
|
301
300
|
// and the State of the addTrue state
|
|
302
301
|
if (this.effectiveDisplayName) {
|
|
303
302
|
this.id.on("value_changed", () => {
|
package/src/ua_object_impl.ts
CHANGED
|
@@ -156,8 +156,7 @@ export class UAObjectImpl extends BaseNodeImpl implements UAObject {
|
|
|
156
156
|
// coerce EventType
|
|
157
157
|
eventTypeNode = addressSpace.findEventType(eventType as UAEventType) as UAEventType;
|
|
158
158
|
const baseEventType = addressSpace.findEventType("BaseEventType")!;
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
|
|
161
160
|
data.$eventDataSource = eventTypeNode;
|
|
162
161
|
data.sourceNode = data.sourceNode || { dataType: DataType.NodeId, value: this.nodeId };
|
|
163
162
|
|
|
@@ -69,7 +69,10 @@ export function construct_demo_alarm_in_address_space(test: IAlarmTestData, addr
|
|
|
69
69
|
optionals: [
|
|
70
70
|
"ConfirmedState",
|
|
71
71
|
"Confirm" // confirm state and confirm Method
|
|
72
|
-
]
|
|
72
|
+
],
|
|
73
|
+
|
|
74
|
+
setpointNode: null,
|
|
75
|
+
|
|
73
76
|
}) as UAExclusiveLimitAlarmEx;
|
|
74
77
|
|
|
75
78
|
assert(tankLevelCondition.browseName.toString() === "1:TankLevelCondition");
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SimpleAttributeOperand } from "node-opcua-service-filter";
|
|
2
|
-
import { StatusCode } from "node-opcua-status-code";
|
|
3
|
-
import { BaseNode, UAObjectType } from "node-opcua-address-space-base";
|
|
4
|
-
/**
|
|
5
|
-
* @method checkSelectClause
|
|
6
|
-
* @param parentNode
|
|
7
|
-
* @param selectClause
|
|
8
|
-
* @return {Array<StatusCode>}
|
|
9
|
-
*/
|
|
10
|
-
export declare function checkSelectClause(parentNode: BaseNode, selectClause: SimpleAttributeOperand): StatusCode;
|
|
11
|
-
/**
|
|
12
|
-
* @method checkSelectClauses
|
|
13
|
-
* @param eventTypeNode
|
|
14
|
-
* @param selectClauses
|
|
15
|
-
* @return an array of StatusCode
|
|
16
|
-
*/
|
|
17
|
-
export declare function checkSelectClauses(eventTypeNode: UAObjectType, selectClauses: SimpleAttributeOperand[]): StatusCode[];
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.checkSelectClauses = exports.checkSelectClause = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @module node-opcua-address-space
|
|
6
|
-
*/
|
|
7
|
-
// tslint:disable:no-console
|
|
8
|
-
const node_opcua_data_model_1 = require("node-opcua-data-model");
|
|
9
|
-
const node_opcua_service_translate_browse_path_1 = require("node-opcua-service-translate-browse-path");
|
|
10
|
-
const node_opcua_status_code_1 = require("node-opcua-status-code");
|
|
11
|
-
/**
|
|
12
|
-
* @method checkSelectClause
|
|
13
|
-
* @param parentNode
|
|
14
|
-
* @param selectClause
|
|
15
|
-
* @return {Array<StatusCode>}
|
|
16
|
-
*/
|
|
17
|
-
function checkSelectClause(parentNode, selectClause) {
|
|
18
|
-
//
|
|
19
|
-
const addressSpace = parentNode.addressSpace;
|
|
20
|
-
// istanbul ignore next
|
|
21
|
-
if (selectClause.typeDefinitionId.isEmpty()) {
|
|
22
|
-
return node_opcua_status_code_1.StatusCodes.Good;
|
|
23
|
-
}
|
|
24
|
-
const eventTypeNode = addressSpace.findEventType(selectClause.typeDefinitionId);
|
|
25
|
-
if (!eventTypeNode || !(eventTypeNode.nodeClass === node_opcua_data_model_1.NodeClass.ObjectType)) {
|
|
26
|
-
// xx console.log("eventTypeNode = ",selectClause.typeDefinitionId.toString());
|
|
27
|
-
// xx console.log("eventTypeNode = ",eventTypeNode);
|
|
28
|
-
// istanbul ignore next
|
|
29
|
-
if (eventTypeNode) {
|
|
30
|
-
console.log(eventTypeNode.toString());
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
// istanbul ignore next
|
|
34
|
-
if (eventTypeNode.nodeClass !== node_opcua_data_model_1.NodeClass.ObjectType) {
|
|
35
|
-
throw new Error("Expecting a ObjectType");
|
|
36
|
-
}
|
|
37
|
-
// navigate to the innerNode specified by the browsePath [ QualifiedName]
|
|
38
|
-
const browsePath = (0, node_opcua_service_translate_browse_path_1.constructBrowsePathFromQualifiedName)(eventTypeNode, selectClause.browsePath);
|
|
39
|
-
const browsePathResult = addressSpace.browsePath(browsePath);
|
|
40
|
-
return browsePathResult.statusCode;
|
|
41
|
-
}
|
|
42
|
-
exports.checkSelectClause = checkSelectClause;
|
|
43
|
-
/**
|
|
44
|
-
* @method checkSelectClauses
|
|
45
|
-
* @param eventTypeNode
|
|
46
|
-
* @param selectClauses
|
|
47
|
-
* @return an array of StatusCode
|
|
48
|
-
*/
|
|
49
|
-
function checkSelectClauses(eventTypeNode, selectClauses) {
|
|
50
|
-
return selectClauses.map(checkSelectClause.bind(null, eventTypeNode));
|
|
51
|
-
}
|
|
52
|
-
exports.checkSelectClauses = checkSelectClauses;
|
|
53
|
-
//# sourceMappingURL=check_event_clause.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check_event_clause.js","sourceRoot":"","sources":["../../../source/helpers/check_event_clause.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,4BAA4B;AAC5B,iEAAkD;AAElD,uGAAgG;AAChG,mEAAiE;AAGjE;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,UAAoB,EAAE,YAAoC;IACxF,EAAE;IACF,MAAM,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;IAE7C,uBAAuB;IACvB,IAAI,YAAY,CAAC,gBAAgB,CAAC,OAAO,EAAE,EAAE;QACzC,OAAO,oCAAW,CAAC,IAAI,CAAC;KAC3B;IACD,MAAM,aAAa,GAAG,YAAY,CAAC,aAAa,CAAC,YAAY,CAAC,gBAAgB,CAAE,CAAC;IAEjF,IAAI,CAAC,aAAa,IAAI,CAAC,CAAC,aAAa,CAAC,SAAS,KAAK,iCAAS,CAAC,UAAU,CAAC,EAAE;QACvE,+EAA+E;QAC/E,oDAAoD;QACpD,uBAAuB;QACvB,IAAI,aAAa,EAAE;YACf,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC;SACzC;KACJ;IAED,uBAAuB;IACvB,IAAI,aAAa,CAAC,SAAS,KAAK,iCAAS,CAAC,UAAU,EAAE;QAClD,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;KAC7C;IAED,yEAAyE;IACzE,MAAM,UAAU,GAAG,IAAA,+EAAoC,EAAC,aAAa,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IAChG,MAAM,gBAAgB,GAAG,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC7D,OAAO,gBAAgB,CAAC,UAAU,CAAC;AACvC,CAAC;AA5BD,8CA4BC;AAED;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,aAA2B,EAAE,aAAuC;IACnG,OAAO,aAAa,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;AAC1E,CAAC;AAFD,gDAEC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ContentFilter } from "node-opcua-types";
|
|
2
|
-
import { IAddressSpace, IEventData, ISessionContext } from "node-opcua-address-space-base";
|
|
3
|
-
export declare function __checkWhereClause(addressSpace: IAddressSpace, sessionContext: ISessionContext, whereClause: ContentFilter, index: number, eventData: IEventData): boolean;
|
|
4
|
-
export declare function checkWhereClause(addressSpace: IAddressSpace, sessionContext: ISessionContext, whereClause: ContentFilter, eventData: IEventData): boolean;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.checkWhereClause = exports.__checkWhereClause = void 0;
|
|
4
|
-
const node_opcua_types_1 = require("node-opcua-types");
|
|
5
|
-
const node_opcua_variant_1 = require("node-opcua-variant");
|
|
6
|
-
const node_opcua_data_model_1 = require("node-opcua-data-model");
|
|
7
|
-
const node_opcua_nodeid_1 = require("node-opcua-nodeid");
|
|
8
|
-
const session_context_1 = require("../../source/session_context");
|
|
9
|
-
const extract_event_fields_1 = require("./extract_event_fields");
|
|
10
|
-
function checkNot(addressSpace, sessionContext, whereClause, eventData, filteredOperands) {
|
|
11
|
-
if (filteredOperands[0] instanceof node_opcua_types_1.ElementOperand) {
|
|
12
|
-
const index = filteredOperands[0].index;
|
|
13
|
-
return !__checkWhereClause(addressSpace, sessionContext, whereClause, index, eventData);
|
|
14
|
-
}
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
function checkOfType(addressSpace, ofType, eventData) {
|
|
18
|
-
var _a;
|
|
19
|
-
// istanbul ignore next
|
|
20
|
-
if (!ofType) {
|
|
21
|
-
throw new Error("invalid operand");
|
|
22
|
-
}
|
|
23
|
-
// istanbul ignore next
|
|
24
|
-
if (ofType.value.dataType !== node_opcua_variant_1.DataType.NodeId) {
|
|
25
|
-
throw new Error("invalid operand type (expecting Nodeid");
|
|
26
|
-
}
|
|
27
|
-
const ofTypeNode = addressSpace.findNode(ofType.value.value);
|
|
28
|
-
// istanbul ignore next
|
|
29
|
-
if (!ofTypeNode) {
|
|
30
|
-
return false; // the ofType node is not known, we don't know what to do
|
|
31
|
-
}
|
|
32
|
-
// istanbul ignore next
|
|
33
|
-
if (ofTypeNode.nodeClass !== node_opcua_data_model_1.NodeClass.ObjectType) {
|
|
34
|
-
throw new Error("operand should be a ObjectType " + ofTypeNode.nodeId.toString());
|
|
35
|
-
}
|
|
36
|
-
const node = eventData.$eventDataSource;
|
|
37
|
-
if (!node) {
|
|
38
|
-
throw new Error("cannot find node " + ((_a = eventData.$eventDataSource) === null || _a === void 0 ? void 0 : _a.toString()));
|
|
39
|
-
}
|
|
40
|
-
if (node.nodeClass === node_opcua_data_model_1.NodeClass.ObjectType) {
|
|
41
|
-
return node.isSupertypeOf(ofTypeNode);
|
|
42
|
-
}
|
|
43
|
-
if (node.nodeClass === node_opcua_data_model_1.NodeClass.Object && node.typeDefinitionObj) {
|
|
44
|
-
return node.typeDefinitionObj.isSupertypeOf(ofTypeNode);
|
|
45
|
-
}
|
|
46
|
-
return true;
|
|
47
|
-
}
|
|
48
|
-
function _extractValue(operand, eventData) {
|
|
49
|
-
// eventData.readValue;
|
|
50
|
-
const v = (0, extract_event_fields_1.extractEventFields)(session_context_1.SessionContext.defaultContext, [operand], eventData)[0];
|
|
51
|
-
return v.value;
|
|
52
|
-
}
|
|
53
|
-
function checkInList(addressSpace, filterOperands, eventData) {
|
|
54
|
-
const operand0 = filterOperands[0];
|
|
55
|
-
if (!(operand0 instanceof node_opcua_types_1.SimpleAttributeOperand)) {
|
|
56
|
-
// unsupported case
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
const nodeId = _extractValue(operand0, eventData);
|
|
60
|
-
if (!nodeId) {
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
function _is(nodeId1, operandX) {
|
|
64
|
-
const operandNode = addressSpace.findNode(operandX.value.value);
|
|
65
|
-
if (!operandNode) {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
return (0, node_opcua_nodeid_1.sameNodeId)(nodeId1, operandNode.nodeId);
|
|
69
|
-
}
|
|
70
|
-
for (let i = 1; i < filterOperands.length; i++) {
|
|
71
|
-
const filterOperand = filterOperands[i];
|
|
72
|
-
if (filterOperand instanceof node_opcua_types_1.LiteralOperand && _is(nodeId, filterOperand)) {
|
|
73
|
-
return true;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
function __checkWhereClause(addressSpace, sessionContext, whereClause, index, eventData) {
|
|
79
|
-
if (!whereClause.elements || whereClause.elements.length === 0) {
|
|
80
|
-
return true;
|
|
81
|
-
}
|
|
82
|
-
const element = whereClause.elements[index];
|
|
83
|
-
if (!element) {
|
|
84
|
-
return true;
|
|
85
|
-
}
|
|
86
|
-
switch (element.filterOperator) {
|
|
87
|
-
case node_opcua_types_1.FilterOperator.Not:
|
|
88
|
-
return checkNot(addressSpace, sessionContext, whereClause, eventData, element.filterOperands);
|
|
89
|
-
case node_opcua_types_1.FilterOperator.OfType:
|
|
90
|
-
return checkOfType(addressSpace, element.filterOperands[0], eventData);
|
|
91
|
-
case node_opcua_types_1.FilterOperator.InList:
|
|
92
|
-
return checkInList(addressSpace, element.filterOperands, eventData);
|
|
93
|
-
default:
|
|
94
|
-
// from Spec OPC Unified Architecture, Part 4 133 Release 1.04
|
|
95
|
-
// Any basic FilterOperator in Table 119 may be used in the whereClause, however, only the
|
|
96
|
-
// OfType_14 FilterOperator from Table 120 is permitted.
|
|
97
|
-
// tslint:disable-next-line: no-console
|
|
98
|
-
console.log("whereClause = ", whereClause.toString());
|
|
99
|
-
throw new Error("Only OfType operator are allowed in checkWhereClause");
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
exports.__checkWhereClause = __checkWhereClause;
|
|
103
|
-
function checkWhereClause(addressSpace, sessionContext, whereClause, eventData) {
|
|
104
|
-
if (!whereClause.elements || whereClause.elements.length === 0) {
|
|
105
|
-
return true;
|
|
106
|
-
}
|
|
107
|
-
return __checkWhereClause(addressSpace, sessionContext, whereClause, 0, eventData);
|
|
108
|
-
}
|
|
109
|
-
exports.checkWhereClause = checkWhereClause;
|
|
110
|
-
//# sourceMappingURL=check_where_clause.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check_where_clause.js","sourceRoot":"","sources":["../../../src/alarms_and_conditions/check_where_clause.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { UInt16 } from "node-opcua-basic-types";
|
|
2
|
-
import { LocalizedText } from "node-opcua-data-model";
|
|
3
|
-
import { StatusCode } from "node-opcua-status-code";
|
|
4
|
-
import { ConditionInfoOptions } from "../../source/interfaces/alarms_and_conditions/condition_info_i";
|
|
5
|
-
export interface ConditionInfo {
|
|
6
|
-
message: LocalizedText | null;
|
|
7
|
-
quality: StatusCode | null;
|
|
8
|
-
severity: UInt16 | null;
|
|
9
|
-
retain: boolean | null;
|
|
10
|
-
isDifferentFrom(otherConditionInfo: ConditionInfo): boolean;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* @class ConditionInfo
|
|
14
|
-
* @param options {Object}
|
|
15
|
-
* @param options.message {String|LocalizedText} the event message
|
|
16
|
-
* @param options.severity {UInt16} severity
|
|
17
|
-
* @param options.quality {StatusCode} quality
|
|
18
|
-
* @param options.retain {Boolean} retain flag
|
|
19
|
-
* @constructor
|
|
20
|
-
*/
|
|
21
|
-
export declare class ConditionInfo {
|
|
22
|
-
message: LocalizedText | null;
|
|
23
|
-
quality: StatusCode | null;
|
|
24
|
-
severity: UInt16 | null;
|
|
25
|
-
retain: boolean | null;
|
|
26
|
-
constructor(options: ConditionInfoOptions);
|
|
27
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConditionInfo = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* @module node-opcua-address-space.AlarmsAndConditions
|
|
6
|
-
*/
|
|
7
|
-
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
8
|
-
const node_opcua_data_model_1 = require("node-opcua-data-model");
|
|
9
|
-
/**
|
|
10
|
-
* @class ConditionInfo
|
|
11
|
-
* @param options {Object}
|
|
12
|
-
* @param options.message {String|LocalizedText} the event message
|
|
13
|
-
* @param options.severity {UInt16} severity
|
|
14
|
-
* @param options.quality {StatusCode} quality
|
|
15
|
-
* @param options.retain {Boolean} retain flag
|
|
16
|
-
* @constructor
|
|
17
|
-
*/
|
|
18
|
-
class ConditionInfo {
|
|
19
|
-
constructor(options) {
|
|
20
|
-
this.message = null;
|
|
21
|
-
this.quality = null;
|
|
22
|
-
this.severity = 0;
|
|
23
|
-
this.retain = false;
|
|
24
|
-
this.severity = null;
|
|
25
|
-
this.quality = null;
|
|
26
|
-
this.message = null;
|
|
27
|
-
this.retain = null;
|
|
28
|
-
if (Object.prototype.hasOwnProperty.call(options, "message") && options.message) {
|
|
29
|
-
this.message = node_opcua_data_model_1.LocalizedText.coerce(options.message);
|
|
30
|
-
}
|
|
31
|
-
if (Object.prototype.hasOwnProperty.call(options, "quality") && options.quality !== null) {
|
|
32
|
-
this.quality = options.quality;
|
|
33
|
-
}
|
|
34
|
-
if (Object.prototype.hasOwnProperty.call(options, "severity") && options.severity !== null) {
|
|
35
|
-
(0, node_opcua_assert_1.assert)(typeof options.severity === "number");
|
|
36
|
-
this.severity = options.severity;
|
|
37
|
-
}
|
|
38
|
-
if (Object.prototype.hasOwnProperty.call(options, "retain") && options.retain !== null) {
|
|
39
|
-
(0, node_opcua_assert_1.assert)(typeof options.retain === "boolean");
|
|
40
|
-
this.retain = options.retain;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* @method isDifferentFrom
|
|
45
|
-
* @param otherConditionInfo {ConditionInfo}
|
|
46
|
-
* @return {Boolean}
|
|
47
|
-
*/
|
|
48
|
-
isDifferentFrom(otherConditionInfo) {
|
|
49
|
-
return (this.severity !== otherConditionInfo.severity ||
|
|
50
|
-
this.quality !== otherConditionInfo.quality ||
|
|
51
|
-
this.message !== otherConditionInfo.message);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
exports.ConditionInfo = ConditionInfo;
|
|
55
|
-
//# sourceMappingURL=condition_info.js.map
|