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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { EventEmitter } from "events";
|
|
5
5
|
|
|
6
|
-
import { IEventData, UAVariable, BaseNode,
|
|
6
|
+
import { IEventData, UAVariable, BaseNode, UAObject } from "node-opcua-address-space-base";
|
|
7
7
|
import { assert } from "node-opcua-assert";
|
|
8
8
|
import { UInt16 } from "node-opcua-basic-types";
|
|
9
9
|
import { coerceLocalizedText, LocalizedText, LocalizedTextLike, NodeClass } from "node-opcua-data-model";
|
|
@@ -12,8 +12,7 @@ import { checkDebugFlag, make_debugLog } from "node-opcua-debug";
|
|
|
12
12
|
import { NodeId, sameNodeId } from "node-opcua-nodeid";
|
|
13
13
|
import { UAAcknowledgeableCondition } from "node-opcua-nodeset-ua";
|
|
14
14
|
import { StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
15
|
-
import {
|
|
16
|
-
import * as utils from "node-opcua-utils";
|
|
15
|
+
import { TimeZoneDataType } from "node-opcua-types";
|
|
17
16
|
import { DataType, Variant } from "node-opcua-variant";
|
|
18
17
|
|
|
19
18
|
import { ConditionSnapshot } from "../../source/interfaces/alarms_and_conditions/condition_snapshot";
|
|
@@ -26,18 +25,17 @@ import { UAConditionImpl } from "./ua_condition_impl";
|
|
|
26
25
|
const debugLog = make_debugLog(__filename);
|
|
27
26
|
const doDebug = checkDebugFlag(__filename);
|
|
28
27
|
|
|
29
|
-
|
|
30
28
|
function normalizeName(str: string): string {
|
|
31
|
-
return str.split(".").map(utils.lowerFirstLetter).join(".");
|
|
29
|
+
// return str.split(".").map(utils.lowerFirstLetter).join(".");
|
|
30
|
+
return str;
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
function _visit(self: any, node: BaseNode, prefix: string): void {
|
|
35
34
|
const aggregates = node.getAggregates();
|
|
36
35
|
for (const aggregate of aggregates) {
|
|
37
36
|
if (aggregate.nodeClass === NodeClass.Variable) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
const name = aggregate.browseName.toString();
|
|
38
|
+
|
|
41
39
|
const key = prefix + name;
|
|
42
40
|
|
|
43
41
|
// istanbul ignore next
|
|
@@ -65,9 +63,8 @@ function _installOnChangeEventHandlers(self: any, node: BaseNode, prefix: string
|
|
|
65
63
|
const aggregates = node.getAggregates();
|
|
66
64
|
for (const aggregate of aggregates) {
|
|
67
65
|
if (aggregate.nodeClass === NodeClass.Variable) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
const name = aggregate.browseName.toString();
|
|
67
|
+
|
|
71
68
|
const key = prefix + name;
|
|
72
69
|
|
|
73
70
|
// istanbul ignore next
|
|
@@ -93,9 +90,8 @@ function _ensure_condition_values_correctness(self: any, node: BaseNode, prefix:
|
|
|
93
90
|
|
|
94
91
|
for (const aggregate of aggregates) {
|
|
95
92
|
if (aggregate.nodeClass === NodeClass.Variable) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
93
|
+
const name = aggregate.browseName.toString();
|
|
94
|
+
|
|
99
95
|
const key = prefix + name;
|
|
100
96
|
|
|
101
97
|
const snapshot_value = self._map[key].toString();
|
|
@@ -132,29 +128,31 @@ const disabledVar = new Variant({
|
|
|
132
128
|
// list of Condition variables that should not be published as BadConditionDisabled when the condition
|
|
133
129
|
// is in a disabled state.
|
|
134
130
|
const _varTable = {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
131
|
+
BranchId: 1,
|
|
132
|
+
ConditionClassId: 1,
|
|
133
|
+
ConditionClassName: 1,
|
|
134
|
+
ConditionName: 1,
|
|
135
|
+
EnabledState: 1,
|
|
136
|
+
"EnabledState.EffectiveDisplayName": 1,
|
|
137
|
+
"EnabledState.Id": 1,
|
|
138
|
+
"EnabledState.TransitionTime": 1,
|
|
139
|
+
EventId: 1,
|
|
140
|
+
EventType: 1,
|
|
141
|
+
LocalTime: 1,
|
|
142
|
+
SourceName: 1,
|
|
143
|
+
SourceNode: 1,
|
|
144
|
+
Time: 1
|
|
149
145
|
};
|
|
146
|
+
type FullBrowsePath = string;
|
|
150
147
|
export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnapshot {
|
|
151
148
|
public static normalizeName = normalizeName;
|
|
152
149
|
|
|
153
150
|
public condition: BaseNode;
|
|
154
151
|
public eventData: IEventData | null = null;
|
|
155
152
|
public branchId: NodeId | null = null;
|
|
156
|
-
|
|
157
|
-
private
|
|
153
|
+
|
|
154
|
+
private _map: Record<FullBrowsePath, Variant> = {};
|
|
155
|
+
private _node_index: Record<FullBrowsePath, UAVariable> = {};
|
|
158
156
|
|
|
159
157
|
/**
|
|
160
158
|
* @class ConditionSnapshot
|
|
@@ -175,7 +173,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
175
173
|
if (sameNodeId(branchId, NodeId.nullNodeId)) {
|
|
176
174
|
_installOnChangeEventHandlers(this, condition, "");
|
|
177
175
|
}
|
|
178
|
-
this._set_var("
|
|
176
|
+
this._set_var("BranchId", DataType.NodeId, branchId);
|
|
179
177
|
}
|
|
180
178
|
|
|
181
179
|
public _constructEventData(): IEventData {
|
|
@@ -185,49 +183,41 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
185
183
|
const c = this.condition as UAConditionImpl;
|
|
186
184
|
const isDisabled = !c.getEnabledState();
|
|
187
185
|
const eventData = new EventData(this.condition!);
|
|
188
|
-
|
|
189
|
-
|
|
186
|
+
|
|
187
|
+
for (const fullBrowsePath of Object.keys(this._map)) {
|
|
188
|
+
const node = this._node_index[fullBrowsePath];
|
|
190
189
|
if (!node) {
|
|
191
|
-
debugLog("cannot node for find key",
|
|
190
|
+
debugLog("cannot node for find key", fullBrowsePath);
|
|
192
191
|
continue;
|
|
193
192
|
}
|
|
194
|
-
if (isDisabled && !Object.prototype.hasOwnProperty.call(_varTable,
|
|
195
|
-
eventData.
|
|
193
|
+
if (isDisabled && !Object.prototype.hasOwnProperty.call(_varTable, fullBrowsePath)) {
|
|
194
|
+
eventData._createValue(fullBrowsePath, node, disabledVar);
|
|
196
195
|
} else {
|
|
197
|
-
eventData.
|
|
196
|
+
eventData._createValue(fullBrowsePath, node, this._map[fullBrowsePath]);
|
|
198
197
|
}
|
|
199
198
|
}
|
|
200
|
-
|
|
201
199
|
return eventData;
|
|
202
200
|
}
|
|
203
201
|
|
|
204
|
-
/**
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
const variant = this._map[key];
|
|
224
|
-
if (!variant) {
|
|
225
|
-
// the value is not handled by us .. let's delegate
|
|
226
|
-
// to the eventData helper object
|
|
227
|
-
return this.eventData?.readValue(sessionContext, nodeId, selectClause) || disabledVar;
|
|
228
|
-
}
|
|
229
|
-
return variant;
|
|
230
|
-
}
|
|
202
|
+
// /**
|
|
203
|
+
// *
|
|
204
|
+
// */
|
|
205
|
+
// public readValue(sessionContext: ISessionContext, nodeId: NodeId, selectClause: SimpleAttributeOperand): Variant {
|
|
206
|
+
// const c = this.condition as UAConditionImpl;
|
|
207
|
+
// const isDisabled = !c.getEnabledState();
|
|
208
|
+
// if (isDisabled) {
|
|
209
|
+
// return disabledVar;
|
|
210
|
+
// }
|
|
211
|
+
|
|
212
|
+
// const key = nodeId.toString();
|
|
213
|
+
// const variant = this._map[key];
|
|
214
|
+
// if (!variant) {
|
|
215
|
+
// // the value is not handled by us .. let's delegate
|
|
216
|
+
// // to the eventData helper object
|
|
217
|
+
// return this.eventData?.readValue(sessionContext, nodeId, selectClause) || disabledVar;
|
|
218
|
+
// }
|
|
219
|
+
// return variant;
|
|
220
|
+
// }
|
|
231
221
|
|
|
232
222
|
public _get_var(varName: string): any {
|
|
233
223
|
const c = this.condition as UAConditionImpl;
|
|
@@ -238,6 +228,9 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
238
228
|
|
|
239
229
|
const key = normalizeName(varName);
|
|
240
230
|
const variant = this._map[key];
|
|
231
|
+
if (!variant) {
|
|
232
|
+
throw new Error("cannot find key " + key);
|
|
233
|
+
}
|
|
241
234
|
return variant.value;
|
|
242
235
|
}
|
|
243
236
|
|
|
@@ -255,8 +248,8 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
255
248
|
value
|
|
256
249
|
});
|
|
257
250
|
|
|
258
|
-
if (this._map[key + ".
|
|
259
|
-
this._map[key + ".
|
|
251
|
+
if (this._map[key + ".SourceTimestamp"]) {
|
|
252
|
+
this._map[key + ".SourceTimestamp"] = new Variant({
|
|
260
253
|
dataType: DataType.DateTime,
|
|
261
254
|
value: new Date()
|
|
262
255
|
});
|
|
@@ -278,7 +271,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
278
271
|
* @return {NodeId}
|
|
279
272
|
*/
|
|
280
273
|
public getBranchId(): NodeId {
|
|
281
|
-
return this._get_var("
|
|
274
|
+
return this._get_var("BranchId") as NodeId;
|
|
282
275
|
}
|
|
283
276
|
|
|
284
277
|
/**
|
|
@@ -286,7 +279,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
286
279
|
* @return {ByteString}
|
|
287
280
|
*/
|
|
288
281
|
public getEventId(): Buffer {
|
|
289
|
-
return this._get_var("
|
|
282
|
+
return this._get_var("EventId") as Buffer;
|
|
290
283
|
}
|
|
291
284
|
|
|
292
285
|
/**
|
|
@@ -294,7 +287,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
294
287
|
* @return {Boolean}
|
|
295
288
|
*/
|
|
296
289
|
public getRetain(): boolean {
|
|
297
|
-
return this._get_var("
|
|
290
|
+
return this._get_var("Retain") as boolean;
|
|
298
291
|
}
|
|
299
292
|
|
|
300
293
|
/**
|
|
@@ -304,7 +297,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
304
297
|
*/
|
|
305
298
|
public setRetain(retainFlag: boolean): void {
|
|
306
299
|
retainFlag = !!retainFlag;
|
|
307
|
-
return this._set_var("
|
|
300
|
+
return this._set_var("Retain", DataType.Boolean, retainFlag);
|
|
308
301
|
}
|
|
309
302
|
|
|
310
303
|
/**
|
|
@@ -315,7 +308,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
315
308
|
const addressSpace = this.condition.addressSpace;
|
|
316
309
|
// create a new event Id for this new condition
|
|
317
310
|
const eventId = addressSpace.generateEventId();
|
|
318
|
-
const ret = this._set_var("
|
|
311
|
+
const ret = this._set_var("EventId", DataType.ByteString, eventId.value);
|
|
319
312
|
|
|
320
313
|
// xx var branch = self; console.log("MMMMMMMMrenewEventId branch " +
|
|
321
314
|
// branch.getBranchId().toString() + " eventId = " + branch.getEventId().toString("hex"));
|
|
@@ -328,7 +321,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
328
321
|
* @return {Boolean}
|
|
329
322
|
*/
|
|
330
323
|
public getEnabledState(): boolean {
|
|
331
|
-
return this._get_twoStateVariable("
|
|
324
|
+
return this._get_twoStateVariable("EnabledState");
|
|
332
325
|
}
|
|
333
326
|
|
|
334
327
|
/**
|
|
@@ -337,7 +330,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
337
330
|
* @return void
|
|
338
331
|
*/
|
|
339
332
|
public setEnabledState(value: boolean): void {
|
|
340
|
-
return this._set_twoStateVariable("
|
|
333
|
+
return this._set_twoStateVariable("EnabledState", value);
|
|
341
334
|
}
|
|
342
335
|
|
|
343
336
|
/**
|
|
@@ -345,7 +338,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
345
338
|
* @return {String}
|
|
346
339
|
*/
|
|
347
340
|
public getEnabledStateAsString(): string {
|
|
348
|
-
return this._get_var("
|
|
341
|
+
return this._get_var("EnabledState").text;
|
|
349
342
|
}
|
|
350
343
|
|
|
351
344
|
/**
|
|
@@ -353,7 +346,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
353
346
|
* @return {LocalizedText}
|
|
354
347
|
*/
|
|
355
348
|
public getComment(): LocalizedText {
|
|
356
|
-
return this._get_var("
|
|
349
|
+
return this._get_var("Comment");
|
|
357
350
|
}
|
|
358
351
|
|
|
359
352
|
/**
|
|
@@ -370,7 +363,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
370
363
|
*/
|
|
371
364
|
public setComment(txtMessage: LocalizedTextLike): void {
|
|
372
365
|
const txtMessage1 = coerceLocalizedText(txtMessage);
|
|
373
|
-
this._set_var("
|
|
366
|
+
this._set_var("Comment", DataType.LocalizedText, txtMessage1);
|
|
374
367
|
}
|
|
375
368
|
|
|
376
369
|
/**
|
|
@@ -380,7 +373,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
380
373
|
*/
|
|
381
374
|
public setMessage(txtMessage: LocalizedTextLike | LocalizedText): void {
|
|
382
375
|
const txtMessage1 = coerceLocalizedText(txtMessage);
|
|
383
|
-
return this._set_var("
|
|
376
|
+
return this._set_var("Message", DataType.LocalizedText, txtMessage1);
|
|
384
377
|
}
|
|
385
378
|
|
|
386
379
|
/**
|
|
@@ -388,7 +381,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
388
381
|
* @param userIdentity {String}
|
|
389
382
|
*/
|
|
390
383
|
public setClientUserId(userIdentity: string): void {
|
|
391
|
-
return this._set_var("
|
|
384
|
+
return this._set_var("ClientUserId", DataType.String, userIdentity.toString());
|
|
392
385
|
}
|
|
393
386
|
|
|
394
387
|
/*
|
|
@@ -422,7 +415,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
422
415
|
* @param quality {StatusCode}
|
|
423
416
|
*/
|
|
424
417
|
public setQuality(quality: StatusCode): void {
|
|
425
|
-
this._set_var("
|
|
418
|
+
this._set_var("Quality", DataType.StatusCode, quality);
|
|
426
419
|
}
|
|
427
420
|
|
|
428
421
|
/**
|
|
@@ -430,7 +423,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
430
423
|
* @return {StatusCode}
|
|
431
424
|
*/
|
|
432
425
|
public getQuality(): StatusCode {
|
|
433
|
-
return this._get_var("
|
|
426
|
+
return this._get_var("Quality") as StatusCode;
|
|
434
427
|
}
|
|
435
428
|
|
|
436
429
|
/*
|
|
@@ -473,7 +466,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
473
466
|
// record automatically last severity
|
|
474
467
|
const lastSeverity = this.getSeverity();
|
|
475
468
|
this.setLastSeverity(lastSeverity);
|
|
476
|
-
this._set_var("
|
|
469
|
+
this._set_var("Severity", DataType.UInt16, severity);
|
|
477
470
|
}
|
|
478
471
|
|
|
479
472
|
/**
|
|
@@ -483,7 +476,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
483
476
|
public getSeverity(): UInt16 {
|
|
484
477
|
const c = this.condition as UAConditionImpl;
|
|
485
478
|
assert(c.getEnabledState(), "condition must be enabled");
|
|
486
|
-
const value = this._get_var("
|
|
479
|
+
const value = this._get_var("Severity");
|
|
487
480
|
return +value;
|
|
488
481
|
}
|
|
489
482
|
|
|
@@ -500,7 +493,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
500
493
|
*/
|
|
501
494
|
public setLastSeverity(severity: UInt16): void {
|
|
502
495
|
severity = +severity;
|
|
503
|
-
return this._set_var("
|
|
496
|
+
return this._set_var("LastSeverity", DataType.UInt16, severity);
|
|
504
497
|
}
|
|
505
498
|
|
|
506
499
|
/**
|
|
@@ -508,7 +501,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
508
501
|
* @return {UInt16}
|
|
509
502
|
*/
|
|
510
503
|
public getLastSeverity(): UInt16 {
|
|
511
|
-
const value = this._get_var("
|
|
504
|
+
const value = this._get_var("LastSeverity");
|
|
512
505
|
return +value;
|
|
513
506
|
}
|
|
514
507
|
|
|
@@ -533,7 +526,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
533
526
|
*/
|
|
534
527
|
public setReceiveTime(time: UtcTime): void {
|
|
535
528
|
assert(time instanceof Date);
|
|
536
|
-
return this._set_var("
|
|
529
|
+
return this._set_var("ReceiveTime", DataType.DateTime, time);
|
|
537
530
|
}
|
|
538
531
|
|
|
539
532
|
/**
|
|
@@ -547,7 +540,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
547
540
|
*/
|
|
548
541
|
public setTime(time: Date): void {
|
|
549
542
|
assert(time instanceof Date);
|
|
550
|
-
return this._set_var("
|
|
543
|
+
return this._set_var("Time", DataType.DateTime, time);
|
|
551
544
|
}
|
|
552
545
|
|
|
553
546
|
/**
|
|
@@ -562,12 +555,12 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
562
555
|
*/
|
|
563
556
|
public setLocalTime(localTime: TimeZoneDataType): void {
|
|
564
557
|
assert(localTime instanceof TimeZoneDataType);
|
|
565
|
-
return this._set_var("
|
|
558
|
+
return this._set_var("LocalTime", DataType.ExtensionObject, new TimeZoneDataType(localTime));
|
|
566
559
|
}
|
|
567
560
|
|
|
568
561
|
// read only !
|
|
569
562
|
public getSourceName(): LocalizedText {
|
|
570
|
-
return this._get_var("
|
|
563
|
+
return this._get_var("SourceName");
|
|
571
564
|
}
|
|
572
565
|
|
|
573
566
|
/**
|
|
@@ -575,7 +568,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
575
568
|
* return {NodeId}
|
|
576
569
|
*/
|
|
577
570
|
public getSourceNode(): NodeId {
|
|
578
|
-
return this._get_var("
|
|
571
|
+
return this._get_var("SourceNode");
|
|
579
572
|
}
|
|
580
573
|
|
|
581
574
|
/**
|
|
@@ -583,15 +576,15 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
583
576
|
* return {NodeId}
|
|
584
577
|
*/
|
|
585
578
|
public getEventType(): NodeId {
|
|
586
|
-
return this._get_var("
|
|
579
|
+
return this._get_var("EventType");
|
|
587
580
|
}
|
|
588
581
|
|
|
589
582
|
public getMessage(): LocalizedText {
|
|
590
|
-
return this._get_var("
|
|
583
|
+
return this._get_var("Message");
|
|
591
584
|
}
|
|
592
585
|
|
|
593
586
|
public isCurrentBranch(): boolean {
|
|
594
|
-
return sameNodeId(this._get_var("
|
|
587
|
+
return sameNodeId(this._get_var("BranchId"), NodeId.nullNodeId);
|
|
595
588
|
}
|
|
596
589
|
|
|
597
590
|
// -- ACKNOWLEDGEABLE -------------------------------------------------------------------
|
|
@@ -607,7 +600,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
607
600
|
" has no AckedState"
|
|
608
601
|
);
|
|
609
602
|
}
|
|
610
|
-
return this._get_twoStateVariable("
|
|
603
|
+
return this._get_twoStateVariable("AckedState");
|
|
611
604
|
}
|
|
612
605
|
|
|
613
606
|
public setAckedState(ackedState: boolean): StatusCode {
|
|
@@ -619,7 +612,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
619
612
|
public getConfirmedState(): boolean {
|
|
620
613
|
const acknowledgeableCondition = this.condition as UAAcknowledgeableCondition;
|
|
621
614
|
assert(acknowledgeableCondition.confirmedState, "Must have a confirmed state");
|
|
622
|
-
return this._get_twoStateVariable("
|
|
615
|
+
return this._get_twoStateVariable("ConfirmedState");
|
|
623
616
|
}
|
|
624
617
|
|
|
625
618
|
public setConfirmedStateIfExists(confirmedState: boolean): void {
|
|
@@ -631,7 +624,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
631
624
|
return;
|
|
632
625
|
}
|
|
633
626
|
// todo deal with Error code BadConditionBranchAlreadyConfirmed
|
|
634
|
-
return this._set_twoStateVariable("
|
|
627
|
+
return this._set_twoStateVariable("ConfirmedState", confirmedState);
|
|
635
628
|
}
|
|
636
629
|
|
|
637
630
|
public setConfirmedState(confirmedState: boolean): void {
|
|
@@ -649,7 +642,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
649
642
|
* @return {Boolean}
|
|
650
643
|
*/
|
|
651
644
|
public getSuppressedState(): boolean {
|
|
652
|
-
return this._get_twoStateVariable("
|
|
645
|
+
return this._get_twoStateVariable("SuppressedState");
|
|
653
646
|
}
|
|
654
647
|
|
|
655
648
|
/**
|
|
@@ -658,11 +651,11 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
658
651
|
*/
|
|
659
652
|
public setSuppressedState(suppressed: boolean): void {
|
|
660
653
|
suppressed = !!suppressed;
|
|
661
|
-
this._set_twoStateVariable("
|
|
654
|
+
this._set_twoStateVariable("SuppressedState", suppressed);
|
|
662
655
|
}
|
|
663
656
|
|
|
664
657
|
public getActiveState(): boolean {
|
|
665
|
-
return this._get_twoStateVariable("
|
|
658
|
+
return this._get_twoStateVariable("ActiveState");
|
|
666
659
|
}
|
|
667
660
|
|
|
668
661
|
public setActiveState(newActiveState: boolean): StatusCode {
|
|
@@ -670,7 +663,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
670
663
|
// xx if (activeState === newActiveState) {
|
|
671
664
|
// xx return StatusCodes.Bad;
|
|
672
665
|
// xx }
|
|
673
|
-
this._set_twoStateVariable("
|
|
666
|
+
this._set_twoStateVariable("ActiveState", newActiveState);
|
|
674
667
|
return StatusCodes.Good;
|
|
675
668
|
}
|
|
676
669
|
|
|
@@ -717,7 +710,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
717
710
|
value = !!value;
|
|
718
711
|
|
|
719
712
|
const hrKey = ConditionSnapshotImpl.normalizeName(varName);
|
|
720
|
-
const idKey = ConditionSnapshotImpl.normalizeName(varName
|
|
713
|
+
const idKey = ConditionSnapshotImpl.normalizeName(varName + ".Id");
|
|
721
714
|
|
|
722
715
|
const variant = new Variant({ dataType: DataType.Boolean, value });
|
|
723
716
|
this._map[idKey] = variant;
|
|
@@ -750,7 +743,7 @@ export class ConditionSnapshotImpl extends EventEmitter implements ConditionSnap
|
|
|
750
743
|
}
|
|
751
744
|
|
|
752
745
|
protected _get_twoStateVariable(varName: string): any {
|
|
753
|
-
const key = ConditionSnapshotImpl.normalizeName(varName) + ".
|
|
746
|
+
const key = ConditionSnapshotImpl.normalizeName(varName) + ".Id";
|
|
754
747
|
const variant = this._map[key];
|
|
755
748
|
|
|
756
749
|
// istanbul ignore next
|
|
@@ -5,29 +5,42 @@ import { assert } from "node-opcua-assert";
|
|
|
5
5
|
import { DataValue } from "node-opcua-data-value";
|
|
6
6
|
import { StatusCodes } from "node-opcua-status-code";
|
|
7
7
|
import { DataType } from "node-opcua-variant";
|
|
8
|
-
import {
|
|
8
|
+
import { UAVariableT } from "node-opcua-address-space-base";
|
|
9
|
+
import { NodeId } from "node-opcua-nodeid";
|
|
9
10
|
|
|
10
11
|
import { AddressSpacePrivate } from "../address_space_private";
|
|
11
12
|
import { DeviationStuff } from "../../source/interfaces/alarms_and_conditions/deviation_stuff";
|
|
12
13
|
import { InstallSetPointOptions } from "../../source/interfaces/alarms_and_conditions/install_setpoint_options";
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
export function DeviationAlarmHelper_getSetpointNodeNode(
|
|
16
|
+
this: DeviationStuff
|
|
17
|
+
): UAVariableT<number, DataType.Double> | UAVariableT<number, DataType.Float> | undefined {
|
|
17
18
|
assert(this.setpointNode.readValue().value.dataType === DataType.NodeId);
|
|
19
|
+
|
|
18
20
|
const nodeId = this.setpointNode.readValue().value.value;
|
|
19
21
|
const node = this.addressSpace.findNode(nodeId);
|
|
20
22
|
assert(node === this.setpointNodeNode);
|
|
23
|
+
if (!node) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
21
26
|
return this.setpointNodeNode;
|
|
22
27
|
}
|
|
28
|
+
|
|
23
29
|
export function DeviationAlarmHelper_getSetpointValue(this: DeviationStuff): number | null {
|
|
24
30
|
assert(Object.prototype.hasOwnProperty.call(this, "setpointNode"));
|
|
25
31
|
assert(Object.prototype.hasOwnProperty.call(this, "setpointNodeNode"));
|
|
32
|
+
if (! this.setpointNodeNode) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
26
35
|
const setpointDataValue = this.setpointNodeNode.readValue();
|
|
27
36
|
if (setpointDataValue.statusCode !== StatusCodes.Good) {
|
|
28
37
|
return null;
|
|
29
38
|
}
|
|
30
|
-
|
|
39
|
+
const node = this.getSetpointNodeNode();
|
|
40
|
+
if (!node) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
return node.readValue().value.value;
|
|
31
44
|
}
|
|
32
45
|
|
|
33
46
|
export function DeviationAlarmHelper_onSetpointDataValueChange(this: DeviationStuff, dataValue: DataValue): void {
|
|
@@ -35,20 +48,22 @@ export function DeviationAlarmHelper_onSetpointDataValueChange(this: DeviationSt
|
|
|
35
48
|
}
|
|
36
49
|
|
|
37
50
|
export function DeviationAlarmHelper_install_setpoint(this: DeviationStuff, options: InstallSetPointOptions): void {
|
|
38
|
-
|
|
39
|
-
assert(Object.prototype.hasOwnProperty.call(options, "setpointNode"), "must provide a setpointNode");
|
|
40
|
-
|
|
41
|
-
const addressSpace = this.addressSpace as AddressSpacePrivate;
|
|
42
|
-
const setpointNodeNode = addressSpace._coerceNode(options.setpointNode);
|
|
43
|
-
assert(setpointNodeNode, "Expecting a valid setpoint node");
|
|
44
|
-
|
|
51
|
+
|
|
45
52
|
assert(this.setpointNode.browseName.toString() === "SetpointNode");
|
|
46
53
|
|
|
47
|
-
|
|
48
|
-
this.setpointNode.setValueFromSource({ dataType: "NodeId", value: this.setpointNodeNode.nodeId });
|
|
54
|
+
const addressSpace = this.addressSpace as AddressSpacePrivate;
|
|
49
55
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
if (options.setpointNode) {
|
|
57
|
+
const setpointNodeNode = addressSpace._coerceNode(options.setpointNode);
|
|
58
|
+
assert(setpointNodeNode, "Expecting a valid setpoint node");
|
|
59
|
+
this.setpointNodeNode = addressSpace._coerceNode(options.setpointNode)! as UAVariableT<number, DataType.Double>;
|
|
60
|
+
this.setpointNode.setValueFromSource({ dataType: "NodeId", value: this.setpointNodeNode.nodeId });
|
|
61
|
+
// install inputNode monitoring for change
|
|
62
|
+
this.setpointNodeNode.on("value_changed", (newDataValue: DataValue) => {
|
|
63
|
+
this._onSetpointDataValueChange(newDataValue);
|
|
64
|
+
});
|
|
65
|
+
} else {
|
|
66
|
+
this.setpointNodeNode = undefined;
|
|
67
|
+
this.setpointNode.setValueFromSource({ dataType: "NodeId", value: NodeId.nullNodeId });
|
|
68
|
+
}
|
|
54
69
|
}
|
|
@@ -14,5 +14,3 @@ export * from "./ua_non_exclusive_deviation_alarm_impl";
|
|
|
14
14
|
export * from "./ua_non_exclusive_limit_alarm_impl";
|
|
15
15
|
export * from "./ua_alarm_condition_impl";
|
|
16
16
|
export * from "./ua_certificate_expiration_alarm_impl";
|
|
17
|
-
export * from "./extract_event_fields";
|
|
18
|
-
export * from "./check_where_clause";
|
|
@@ -191,6 +191,9 @@ export class UAAlarmConditionImpl extends UAAcknowledgeableConditionImpl impleme
|
|
|
191
191
|
public activateAlarm(): void {
|
|
192
192
|
// will set acknowledgeable to false and retain to true
|
|
193
193
|
const branch = this.currentBranch();
|
|
194
|
+
if (!branch) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
194
197
|
branch.setRetain(true);
|
|
195
198
|
branch.setActiveState(true);
|
|
196
199
|
branch.setAckedState(false);
|
|
@@ -418,7 +421,7 @@ export class UAAlarmConditionImpl extends UAAcknowledgeableConditionImpl impleme
|
|
|
418
421
|
});
|
|
419
422
|
} else {
|
|
420
423
|
return new ConditionInfoImpl({
|
|
421
|
-
message: "Condition
|
|
424
|
+
message: "Condition is " + value + " and state is " + stateData,
|
|
422
425
|
quality: StatusCodes.Good,
|
|
423
426
|
retain: true,
|
|
424
427
|
severity: 150
|