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
|
@@ -1,47 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
|
+
*/
|
|
1
4
|
import { EventEmitter } from "events";
|
|
2
5
|
import { Variant } from "node-opcua-variant";
|
|
3
|
-
import { IEventData, UAVariable, BaseNode
|
|
4
|
-
import { assert } from "node-opcua-assert";
|
|
6
|
+
import { IEventData, UAVariable, BaseNode } from "node-opcua-address-space-base";
|
|
5
7
|
import { UInt16 } from "node-opcua-basic-types";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { UAAcknowledgeableCondition } from "node-opcua-nodeset-ua";
|
|
11
|
-
import { StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
12
|
-
import { SimpleAttributeOperand, TimeZoneDataType } from "node-opcua-types";
|
|
13
|
-
import * as utils from "node-opcua-utils";
|
|
8
|
+
import { LocalizedText, LocalizedTextLike } from "node-opcua-data-model";
|
|
9
|
+
import { NodeId } from "node-opcua-nodeid";
|
|
10
|
+
import { StatusCode } from "node-opcua-status-code";
|
|
11
|
+
import { TimeZoneDataType } from "node-opcua-types";
|
|
14
12
|
import { UtcTime } from "../state_machine/ua_state_machine_type";
|
|
15
13
|
|
|
16
14
|
export interface ConditionSnapshot {
|
|
17
15
|
on(eventName: "value_changed", eventHandler: (node: UAVariable, variant: Variant) => void): this;
|
|
18
16
|
}
|
|
19
|
-
/**
|
|
20
|
-
* @module node-opcua-address-space.AlarmsAndConditions
|
|
21
|
-
*/
|
|
22
17
|
|
|
23
|
-
function normalizeName(str: string): string {
|
|
24
|
-
return str.split(".").map(utils.lowerFirstLetter).join(".");
|
|
25
|
-
}
|
|
26
18
|
|
|
27
19
|
export interface ConditionSnapshot extends EventEmitter {
|
|
28
20
|
// static normalizeName = normalizeName;
|
|
29
21
|
|
|
30
22
|
condition: BaseNode;
|
|
31
|
-
eventData: IEventData| null;
|
|
32
|
-
branchId: NodeId| null;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @method resolveSelectClause
|
|
36
|
-
* @param selectClause {SelectClause}
|
|
37
|
-
*/
|
|
38
|
-
resolveSelectClause(selectClause: SimpleAttributeOperand): NodeId | null;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
*/
|
|
43
|
-
readValue(sessionContext: ISessionContext, nodeId: NodeId, selectClause: SimpleAttributeOperand): Variant;
|
|
23
|
+
eventData: IEventData | null;
|
|
24
|
+
branchId: NodeId | null;
|
|
44
25
|
|
|
26
|
+
|
|
45
27
|
/**
|
|
46
28
|
* @method getBrandId
|
|
47
29
|
* @return {NodeId}
|
|
@@ -293,5 +275,5 @@ export interface ConditionSnapshot extends EventEmitter {
|
|
|
293
275
|
/**
|
|
294
276
|
* @private
|
|
295
277
|
*/
|
|
296
|
-
_constructEventData(): IEventData
|
|
278
|
+
_constructEventData(): IEventData;
|
|
297
279
|
}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { UAVariableT, UAVariable, IAddressSpace } from "node-opcua-address-space-base";
|
|
2
2
|
import { DataType } from "node-opcua-basic-types";
|
|
3
3
|
import { DataValue } from "node-opcua-data-value";
|
|
4
|
-
import {
|
|
4
|
+
import { SetPointSupport } from "./install_setpoint_options";
|
|
5
5
|
|
|
6
|
-
export interface DeviationStuff {
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export interface DeviationStuff extends SetPointSupport {
|
|
7
|
+
|
|
8
|
+
|
|
9
9
|
_onSetpointDataValueChange(dataValue: DataValue): void;
|
|
10
10
|
_setStateBasedOnInputValue(value: any): void;
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
getSetpointNodeNode(): UAVariableT<number, DataType.Double> | UAVariableT<number, DataType.Float> | undefined ;
|
|
13
|
+
|
|
12
14
|
getInputNodeValue(): any;
|
|
13
15
|
getSetpointValue(): number | null;
|
|
14
16
|
|
|
15
17
|
readonly addressSpace: IAddressSpace;
|
|
16
|
-
}
|
|
18
|
+
}
|
|
@@ -3,5 +3,14 @@ import { DataType } from "node-opcua-basic-types";
|
|
|
3
3
|
import { NodeId } from "node-opcua-nodeid";
|
|
4
4
|
|
|
5
5
|
export interface InstallSetPointOptions {
|
|
6
|
+
|
|
7
|
+
// the set point used in the deviation calculation.
|
|
8
|
+
// In cases where the Alarm is generated by an underlying system and if the Variable is not in the AddressSpace
|
|
9
|
+
// a NULL NodeId shall be provided.
|
|
10
|
+
setpointNode?: UAVariableT<number, DataType.Double> | UAVariableT<number, DataType.Float> | null;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface SetPointSupport {
|
|
14
|
+
setpointNodeNode?: UAVariableT<number, DataType.Double> | UAVariableT<number, DataType.Float>;
|
|
6
15
|
setpointNode: UAVariableT<NodeId, DataType.NodeId>;
|
|
7
16
|
}
|
package/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InstallSetPointOptions } from "./install_setpoint_options";
|
|
2
|
+
import { InstantiateLimitAlarmOptions } from "./instantiate_limit_alarm_options";
|
|
3
|
+
|
|
4
|
+
export interface InstantiateExclusiveDeviationAlarmOptions extends InstantiateLimitAlarmOptions, InstallSetPointOptions {}
|
|
@@ -2,9 +2,9 @@ import { UAVariable } from "node-opcua-address-space-base";
|
|
|
2
2
|
import { InstantiateAlarmConditionOptions } from "./instantiate_alarm_condition_options";
|
|
3
3
|
|
|
4
4
|
export interface InstantiateLimitAlarmOptions extends InstantiateAlarmConditionOptions {
|
|
5
|
-
highHighLimit
|
|
5
|
+
highHighLimit?: number;
|
|
6
6
|
highLimit: number;
|
|
7
7
|
lowLimit: number;
|
|
8
|
-
lowLowLimit
|
|
8
|
+
lowLowLimit?: number;
|
|
9
9
|
inputNode: UAVariable;
|
|
10
10
|
}
|
package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InstallSetPointOptions } from "./install_setpoint_options";
|
|
2
|
+
import { InstantiateLimitAlarmOptions } from "./instantiate_limit_alarm_options";
|
|
3
|
+
|
|
4
|
+
export interface InstantiateNonExclusiveDeviationAlarmOptions extends InstantiateLimitAlarmOptions, InstallSetPointOptions {}
|
package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InstallSetPointOptions } from "./install_setpoint_options";
|
|
2
|
+
import { InstantiateLimitAlarmOptions } from "./instantiate_limit_alarm_options";
|
|
3
|
+
|
|
4
|
+
export interface InstantiateNonExclusiveLimitAlarmOptions extends InstantiateLimitAlarmOptions, InstallSetPointOptions {}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
+
import { UAVariable } from "node-opcua-address-space-base";
|
|
1
2
|
import { NodeIdLike } from "node-opcua-nodeid";
|
|
2
3
|
import { InstantiateAlarmConditionOptions } from "./instantiate_alarm_condition_options";
|
|
3
4
|
|
|
4
5
|
export interface InstantiateOffNormalAlarmOptions extends InstantiateAlarmConditionOptions {
|
|
5
|
-
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* https://reference.opcfoundation.org/v105/Core/docs/Part9/5.8.23/#5.8.23.2
|
|
9
|
+
*
|
|
10
|
+
* The NormalState Property is a Property that points to a Variable which has a value that corresponds
|
|
11
|
+
* to one of the possible values of the Variable pointed to by the InputNode Property where the NormalState
|
|
12
|
+
* Property Variable value is the value that is considered to be the normal state of the Variable
|
|
13
|
+
* pointed to by the InputNode Property.
|
|
14
|
+
*
|
|
15
|
+
* When the value of the Variable referenced by the InputNode Property is not equal to the value of
|
|
16
|
+
* the NormalState Property the Alarm is Active. If this Variable is not in the AddressSpace,
|
|
17
|
+
* a NULL NodeId shall be provided.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
normalState?: NodeIdLike | UAVariable | null;
|
|
6
21
|
}
|
|
@@ -28,4 +28,9 @@ export interface UACertificateExpirationAlarmEx
|
|
|
28
28
|
setExpirationLimit(value: number): void;
|
|
29
29
|
setCertificate(certificate: Certificate | null): void;
|
|
30
30
|
getCertificate(): Certificate | null;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* update the status of the alarm
|
|
34
|
+
*/
|
|
35
|
+
update(): void;
|
|
31
36
|
}
|
|
@@ -26,6 +26,5 @@ export interface UANonExclusiveDeviationAlarmEx
|
|
|
26
26
|
>,
|
|
27
27
|
UANonExclusiveLimitAlarmEx,
|
|
28
28
|
DeviationStuff {
|
|
29
|
-
|
|
30
|
-
setpointNodeNode: UAVariable;
|
|
29
|
+
setpointNodeNode: UAVariableT<number, DataType.Double> | UAVariableT<number, DataType.Float>;
|
|
31
30
|
}
|
|
@@ -1,24 +1,47 @@
|
|
|
1
1
|
import { NodeClass } from "node-opcua-data-model";
|
|
2
2
|
import { make_debugLog, checkDebugFlag } from "node-opcua-debug";
|
|
3
3
|
|
|
4
|
-
import { UAObject, UAVariable, IAddressSpace, INamespace } from "node-opcua-address-space-base";
|
|
4
|
+
import { UAObject, UAVariable, IAddressSpace, INamespace, UAVariableType } from "node-opcua-address-space-base";
|
|
5
5
|
import { NamespacePrivate } from "../../src/namespace_private";
|
|
6
6
|
|
|
7
7
|
const debugLog = make_debugLog(__filename);
|
|
8
8
|
const doDebug = checkDebugFlag(__filename);
|
|
9
9
|
|
|
10
|
-
export
|
|
10
|
+
export type Promoter = ((node: UAVariable) => UAVariable) | ((node: UAObject) => UAObject);
|
|
11
|
+
|
|
12
|
+
export const g_promotableObject: {
|
|
13
|
+
[key: string]: {
|
|
14
|
+
promoter: Promoter;
|
|
15
|
+
onInstanceOnly: boolean;
|
|
16
|
+
};
|
|
17
|
+
} = {};
|
|
18
|
+
|
|
19
|
+
function parentIsObjectOrVariableType(node: UAVariable | UAObject): boolean {
|
|
20
|
+
if (node.parent && (node.parent.nodeClass === NodeClass.VariableType || node.parent?.nodeClass === NodeClass.ObjectType)) {
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
if (!node.parent) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
return parentIsObjectOrVariableType(node.parent as UAVariable | UAObject);
|
|
27
|
+
}
|
|
11
28
|
|
|
12
29
|
export async function promoteObjectAndVariablesInNamespace(namespace: INamespace): Promise<void> {
|
|
13
30
|
const namespaceP = namespace as NamespacePrivate;
|
|
14
31
|
for (const a of namespaceP.nodeIterator()) {
|
|
15
32
|
if (a.nodeClass === NodeClass.Object || a.nodeClass === NodeClass.Variable) {
|
|
33
|
+
// skip object & variable that belong to a ObjectType or VariableType
|
|
16
34
|
const aa = a as UAObject | UAVariable;
|
|
35
|
+
|
|
17
36
|
if (aa.typeDefinition) {
|
|
18
37
|
const promoter = g_promotableObject[aa.typeDefinition.toString()];
|
|
19
38
|
if (promoter) {
|
|
39
|
+
if (promoter.onInstanceOnly && parentIsObjectOrVariableType(aa)) {
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
20
42
|
const before = a.constructor.name;
|
|
21
|
-
|
|
43
|
+
|
|
44
|
+
promoter.promoter(a as any);
|
|
22
45
|
const after = a.constructor.name;
|
|
23
46
|
if (doDebug) {
|
|
24
47
|
debugLog(`promoting ${a.browseName.toString()} from ${before} to ${after}`);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { NodeIdLike, resolveNodeId } from "node-opcua-nodeid";
|
|
2
2
|
import { UAObject, UAVariable } from "node-opcua-address-space-base";
|
|
3
3
|
|
|
4
|
-
import { g_promotableObject } from "./namespace_post_step";
|
|
4
|
+
import { g_promotableObject, Promoter } from "./namespace_post_step";
|
|
5
5
|
|
|
6
6
|
export function registerNodePromoter(
|
|
7
|
-
|
|
8
|
-
promoter:
|
|
7
|
+
standardNodeId: number,
|
|
8
|
+
promoter: Promoter,
|
|
9
|
+
applyOnTypes = false
|
|
9
10
|
): void {
|
|
10
|
-
g_promotableObject[resolveNodeId(
|
|
11
|
+
g_promotableObject[resolveNodeId(standardNodeId).toString()] = { promoter, onInstanceOnly: applyOnTypes };
|
|
11
12
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { UAEventType } from "node-opcua-address-space-base";
|
|
2
1
|
import { NodeId } from "node-opcua-nodeid";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
} from "./interfaces/alarms_and_conditions/
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
} from "./interfaces/alarms_and_conditions/
|
|
2
|
+
import { UAEventType } from "node-opcua-address-space-base";
|
|
3
|
+
import { VariantOptions } from "node-opcua-variant";
|
|
4
|
+
|
|
5
|
+
import { UAOffNormalAlarmEx } from "../src/alarms_and_conditions/ua_off_normal_alarm_impl";
|
|
6
|
+
import { InstantiateAlarmConditionOptions } from "./interfaces/alarms_and_conditions/instantiate_alarm_condition_options";
|
|
7
|
+
import { InstantiateExclusiveLimitAlarmOptions } from "./interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options";
|
|
8
|
+
import { InstantiateLimitAlarmOptions } from "./interfaces/alarms_and_conditions/instantiate_limit_alarm_options";
|
|
9
|
+
import { InstantiateNonExclusiveDeviationAlarmOptions } from "./interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options";
|
|
10
|
+
import { InstantiateOffNormalAlarmOptions } from "./interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options";
|
|
11
|
+
import { UAAcknowledgeableConditionEx } from "./interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex";
|
|
12
|
+
import { UAAlarmConditionEx } from "./interfaces/alarms_and_conditions/ua_alarm_condition_ex";
|
|
12
13
|
import { UAConditionEx } from "./interfaces/alarms_and_conditions/ua_condition_ex";
|
|
13
14
|
import { UADiscreteAlarmEx } from "./interfaces/alarms_and_conditions/ua_discrete_alarm_ex";
|
|
14
15
|
import { UAExclusiveDeviationAlarmEx } from "./interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex";
|
|
@@ -16,38 +17,62 @@ import { UAExclusiveLimitAlarmEx } from "./interfaces/alarms_and_conditions/ua_e
|
|
|
16
17
|
import { UALimitAlarmEx } from "./interfaces/alarms_and_conditions/ua_limit_alarm_ex";
|
|
17
18
|
import { UANonExclusiveDeviationAlarmEx } from "./interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex";
|
|
18
19
|
import { UANonExclusiveLimitAlarmEx } from "./interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex";
|
|
20
|
+
import { InstantiateNonExclusiveLimitAlarmOptions } from "./interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options";
|
|
21
|
+
import { InstantiateExclusiveDeviationAlarmOptions } from "./interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options";
|
|
19
22
|
|
|
20
23
|
export interface INamespaceAlarmAndCondition {
|
|
21
24
|
// --- Alarms & Conditions -------------------------------------------------
|
|
22
|
-
instantiateCondition(
|
|
25
|
+
instantiateCondition(
|
|
26
|
+
conditionTypeId: UAEventType | NodeId | string,
|
|
27
|
+
options: any,
|
|
28
|
+
data?: Record<string, VariantOptions>
|
|
29
|
+
): UAConditionEx;
|
|
23
30
|
|
|
24
31
|
instantiateAcknowledgeableCondition(
|
|
25
32
|
conditionTypeId: UAEventType | NodeId | string,
|
|
26
|
-
options:
|
|
27
|
-
data?:
|
|
33
|
+
options: InstantiateAlarmConditionOptions,
|
|
34
|
+
data?: Record<string, VariantOptions>
|
|
28
35
|
): UAAcknowledgeableConditionEx;
|
|
29
36
|
|
|
30
|
-
instantiateAlarmCondition(
|
|
37
|
+
instantiateAlarmCondition(
|
|
38
|
+
alarmConditionTypeId: UAEventType | NodeId | string,
|
|
39
|
+
options: InstantiateAlarmConditionOptions,
|
|
40
|
+
data?: Record<string, VariantOptions>
|
|
41
|
+
): UAAlarmConditionEx;
|
|
31
42
|
|
|
32
|
-
instantiateLimitAlarm(
|
|
43
|
+
instantiateLimitAlarm(
|
|
44
|
+
limitAlarmTypeId: UAEventType | NodeId | string,
|
|
45
|
+
options: InstantiateLimitAlarmOptions,
|
|
46
|
+
data?: Record<string, VariantOptions>
|
|
47
|
+
): UALimitAlarmEx;
|
|
33
48
|
|
|
34
49
|
instantiateExclusiveLimitAlarm(
|
|
35
50
|
exclusiveLimitAlarmTypeId: UAEventType | NodeId | string,
|
|
36
|
-
options:
|
|
37
|
-
data?:
|
|
51
|
+
options: InstantiateExclusiveLimitAlarmOptions,
|
|
52
|
+
data?: Record<string, VariantOptions>
|
|
38
53
|
): UAExclusiveLimitAlarmEx;
|
|
39
54
|
|
|
40
|
-
instantiateExclusiveDeviationAlarm(
|
|
55
|
+
instantiateExclusiveDeviationAlarm(
|
|
56
|
+
options: InstantiateExclusiveDeviationAlarmOptions,
|
|
57
|
+
data?: Record<string, VariantOptions>
|
|
58
|
+
): UAExclusiveDeviationAlarmEx;
|
|
41
59
|
|
|
42
60
|
instantiateNonExclusiveLimitAlarm(
|
|
43
61
|
nonExclusiveLimitAlarmTypeId: UAEventType | NodeId | string,
|
|
44
|
-
options:
|
|
45
|
-
data?:
|
|
62
|
+
options: InstantiateNonExclusiveLimitAlarmOptions,
|
|
63
|
+
data?: Record<string, VariantOptions>
|
|
46
64
|
): UANonExclusiveLimitAlarmEx;
|
|
47
65
|
|
|
48
|
-
instantiateNonExclusiveDeviationAlarm(
|
|
66
|
+
instantiateNonExclusiveDeviationAlarm(
|
|
67
|
+
options: InstantiateNonExclusiveDeviationAlarmOptions,
|
|
68
|
+
data?: Record<string, VariantOptions>
|
|
69
|
+
): UANonExclusiveDeviationAlarmEx;
|
|
49
70
|
|
|
50
|
-
instantiateDiscreteAlarm(
|
|
71
|
+
instantiateDiscreteAlarm(
|
|
72
|
+
discreteAlarmType: UAEventType | NodeId | string,
|
|
73
|
+
options: InstantiateAlarmConditionOptions,
|
|
74
|
+
data?: Record<string, VariantOptions>
|
|
75
|
+
): UADiscreteAlarmEx;
|
|
51
76
|
|
|
52
|
-
instantiateOffNormalAlarm(options:
|
|
77
|
+
instantiateOffNormalAlarm(options: InstantiateOffNormalAlarmOptions, data?: Record<string, VariantOptions>): UAOffNormalAlarmEx;
|
|
53
78
|
}
|
package/src/address_space.ts
CHANGED
|
@@ -740,20 +740,25 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
740
740
|
throw new Error("BaseObjectType must be defined in the address space");
|
|
741
741
|
}
|
|
742
742
|
|
|
743
|
-
const
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
743
|
+
const hasProperty = (data: any, propertyName: string): boolean => Object.prototype.hasOwnProperty.call(data, propertyName);
|
|
744
|
+
|
|
745
|
+
const visitedProperties: { [key: string]: number } = {};
|
|
746
|
+
const alreadyVisited=(key: string) => Object.prototype.hasOwnProperty.call(visitedProperties, key);
|
|
747
|
+
const markAsVisited=(key: string) => visitedProperties[key] = 1;
|
|
748
|
+
|
|
749
|
+
function _process_var(self: BaseNode, prefixLower: string, prefixStandard: string, node: BaseNode) {
|
|
750
|
+
const lowerName = prefixLower + lowerFirstLetter(node.browseName!.name!);
|
|
751
|
+
const fullBrowsePath = prefixStandard + node.browseName.toString();
|
|
752
|
+
if(alreadyVisited(lowerName)) {
|
|
753
|
+
return;
|
|
754
|
+
}
|
|
755
|
+
markAsVisited(lowerName);
|
|
756
|
+
|
|
757
|
+
if (hasProperty(data, lowerName)) {
|
|
758
|
+
eventData._createValue(fullBrowsePath, node, data[lowerName] as VariantOptions);
|
|
754
759
|
} else {
|
|
755
760
|
// add a property , but with a null variant
|
|
756
|
-
eventData.
|
|
761
|
+
eventData._createValue(fullBrowsePath, node, { dataType: DataType.Null });
|
|
757
762
|
|
|
758
763
|
if (doDebug) {
|
|
759
764
|
if (node.modellingRule === "Mandatory") {
|
|
@@ -779,13 +784,13 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
779
784
|
}
|
|
780
785
|
|
|
781
786
|
// verify that all elements of data are valid
|
|
782
|
-
function verify_data_is_valid(data1:
|
|
787
|
+
function verify_data_is_valid(data1: Record<string, unknown>) {
|
|
783
788
|
Object.keys(data1).map((k: string) => {
|
|
784
789
|
if (k === "$eventDataSource") {
|
|
785
790
|
return;
|
|
786
791
|
}
|
|
787
792
|
/* istanbul ignore next */
|
|
788
|
-
if (!
|
|
793
|
+
if (!alreadyVisited(k)) {
|
|
789
794
|
throw new Error(
|
|
790
795
|
" cannot find property '" +
|
|
791
796
|
k +
|
|
@@ -839,7 +844,7 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
839
844
|
continue;
|
|
840
845
|
}
|
|
841
846
|
|
|
842
|
-
_process_var(self, "", node);
|
|
847
|
+
_process_var(self, "", "", node);
|
|
843
848
|
|
|
844
849
|
// also store value in index
|
|
845
850
|
// xx eventData.__nodes[node.nodeId.toString()] = eventData[lowerName];
|
|
@@ -847,10 +852,11 @@ export class AddressSpace implements AddressSpacePrivate {
|
|
|
847
852
|
const children2 = node.getAggregates();
|
|
848
853
|
if (children2.length > 0) {
|
|
849
854
|
const lowerName = lowerFirstLetter(node.browseName.name!);
|
|
855
|
+
const standardName = node.browseName.toString();
|
|
850
856
|
// console.log(" Children to visit = ",lowerName,
|
|
851
857
|
// children.map(function(a){ return a.browseName.toString();}).join(" "));
|
|
852
858
|
for (const child2 of children2) {
|
|
853
|
-
_process_var(self, lowerName + ".", child2);
|
|
859
|
+
_process_var(self, lowerName + ".", standardName + ".", child2);
|
|
854
860
|
}
|
|
855
861
|
}
|
|
856
862
|
}
|
|
@@ -21,7 +21,7 @@ export function _setAckedState(
|
|
|
21
21
|
if (ackedState && requestedAckedState) {
|
|
22
22
|
return StatusCodes.BadConditionBranchAlreadyAcked;
|
|
23
23
|
}
|
|
24
|
-
self._set_twoStateVariable("
|
|
24
|
+
self._set_twoStateVariable("AckedState", requestedAckedState);
|
|
25
25
|
return StatusCodes.Good;
|
|
26
26
|
}
|
|
27
27
|
|