node-opcua-address-space 2.71.0 → 2.72.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/source/address_space_ts.d.ts +118 -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 +34 -34
- package/dist/source/helpers/argument_list.js +285 -285
- package/dist/source/helpers/call_helpers.d.ts +6 -6
- package/dist/source/helpers/call_helpers.js +70 -70
- package/dist/source/helpers/check_event_clause.d.ts +17 -17
- package/dist/source/helpers/check_event_clause.js +52 -52
- 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 +73 -73
- 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 +40 -40
- package/dist/source/index.js +66 -66
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +12 -12
- package/dist/source/interfaces/alarms_and_conditions/condition_info_i.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_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 +1468 -1464
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/source/loader/make_semver_compatible.d.ts +6 -0
- package/dist/source/loader/make_semver_compatible.js +26 -0
- package/dist/source/loader/make_semver_compatible.js.map +1 -0
- package/dist/source/loader/make_xml_extension_object_parser.d.ts +28 -28
- package/dist/source/loader/make_xml_extension_object_parser.js +325 -315
- package/dist/source/loader/make_xml_extension_object_parser.js.map +1 -1
- package/dist/source/loader/namespace_post_step.d.ts +6 -6
- package/dist/source/loader/namespace_post_step.js +47 -47
- package/dist/source/loader/register_node_promoter.d.ts +3 -3
- package/dist/source/loader/register_node_promoter.js +9 -9
- package/dist/source/namespace.d.ts +6 -6
- package/dist/source/namespace.js +2 -2
- package/dist/source/namespace_alarm_and_condition.d.ts +24 -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 +1387 -1387
- 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/check_where_clause.d.ts +4 -4
- package/dist/src/alarms_and_conditions/check_where_clause.js +109 -109
- package/dist/src/alarms_and_conditions/condition.d.ts +5 -5
- package/dist/src/alarms_and_conditions/condition.js +80 -80
- package/dist/src/alarms_and_conditions/condition_info.d.ts +27 -27
- package/dist/src/alarms_and_conditions/condition_info.js +54 -54
- package/dist/src/alarms_and_conditions/condition_snapshot.d.ts +233 -233
- package/dist/src/alarms_and_conditions/condition_snapshot.js +666 -666
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +21 -21
- package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +46 -46
- package/dist/src/alarms_and_conditions/extract_event_fields.d.ts +10 -10
- package/dist/src/alarms_and_conditions/extract_event_fields.js +89 -89
- package/dist/src/alarms_and_conditions/index.d.ts +18 -18
- package/dist/src/alarms_and_conditions/index.js +34 -34
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +64 -62
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +244 -244
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +124 -118
- package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +416 -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 +29 -29
- 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 +36 -21
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +115 -25
- 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 +187 -182
- package/dist/src/alarms_and_conditions/ua_condition_impl.js +1024 -1022
- 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 +18 -17
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +57 -57
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +30 -27
- 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 -9
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +11 -11
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +40 -38
- 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 +10 -10
- 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 +105 -97
- 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 +29 -28
- 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 +26 -25
- 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 +48 -39
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +161 -135
- 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 +17 -16
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +17 -17
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -1
- 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.d.ts +51 -51
- package/dist/src/data_access/ua_multistate_value_discrete.js +249 -249
- package/dist/src/data_access/ua_two_state_discrete.d.ts +25 -25
- package/dist/src/data_access/ua_two_state_discrete.js +153 -153
- package/dist/src/event_data.d.ts +29 -29
- package/dist/src/event_data.js +95 -95
- 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 +45 -45
- package/dist/src/index_current.js +77 -77
- package/dist/src/namespace_impl.d.ts +457 -457
- package/dist/src/namespace_impl.js +1733 -1733
- 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 +1143 -1143
- 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 +34 -34
- 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/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 +368 -368
- 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 -33
- package/dist/src/ua_object_impl.js +162 -156
- 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 -15
- package/dist/src/ua_view_impl.js +43 -36
- package/dist/src/ua_view_impl.js.map +1 -1
- package/distHelpers/add_event_generator_object.d.ts +3 -3
- package/distHelpers/add_event_generator_object.js +65 -65
- package/distHelpers/alarms_and_conditions_demo.d.ts +10 -10
- package/distHelpers/alarms_and_conditions_demo.js +114 -114
- 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/package.json +23 -23
- package/source/loader/load_nodeset2.ts +21 -17
- package/source/loader/make_semver_compatible.ts +23 -0
- package/source/loader/make_xml_extension_object_parser.ts +16 -6
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +13 -6
- package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +15 -10
- package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +126 -10
- package/src/alarms_and_conditions/ua_condition_impl.ts +26 -13
- package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +10 -4
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +7 -6
- package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +5 -3
- package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +7 -6
- package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +1 -1
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +23 -13
- package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +6 -7
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +6 -7
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +62 -30
- package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +5 -5
- package/src/ua_object_impl.ts +11 -3
- package/src/ua_view_impl.ts +6 -4
- package/test_helpers/test_fixtures/dataType_issue.xml +9 -9
- package/test_helpers/test_fixtures/nodeset_with_guid.xml +1442 -0
- package/test_helpers/test_fixtures/nodeset_with_int64_values.xml +31 -0
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.d.ts +0 -23
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js +0 -3
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_discrete_item.d.ts +0 -6
- package/dist/source/interfaces/data_access/ua_discrete_item.js +0 -3
- package/dist/source/interfaces/data_access/ua_discrete_item.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_multistate_discrete.d.ts +0 -25
- package/dist/source/interfaces/data_access/ua_multistate_discrete.js +0 -3
- package/dist/source/interfaces/data_access/ua_multistate_discrete.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete.d.ts +0 -27
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js +0 -3
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_two_state_discrete.d.ts +0 -17
- package/dist/source/interfaces/data_access/ua_two_state_discrete.js +0 -3
- package/dist/source/interfaces/data_access/ua_two_state_discrete.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_y_array_item.d.ts +0 -19
- package/dist/source/interfaces/data_access/ua_y_array_item.js +0 -3
- package/dist/source/interfaces/data_access/ua_y_array_item.js.map +0 -1
- package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.d.ts +0 -11
- package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js +0 -3
- package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js.map +0 -1
- package/dist/source/interfaces/state_machine/finite_state_machine.d.ts +0 -70
- package/dist/source/interfaces/state_machine/finite_state_machine.js +0 -3
- package/dist/source/interfaces/state_machine/finite_state_machine.js.map +0 -1
- package/dist/source/interfaces/state_machine/program_finite_state_machine.d.ts +0 -74
- package/dist/source/interfaces/state_machine/program_finite_state_machine.js +0 -3
- package/dist/source/interfaces/state_machine/program_finite_state_machine.js.map +0 -1
- package/dist/source/interfaces/state_machine/state_machine.d.ts +0 -342
- package/dist/source/interfaces/state_machine/state_machine.js +0 -3
- package/dist/source/interfaces/state_machine/state_machine.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_finite_state_variable.d.ts +0 -18
- package/dist/source/interfaces/state_machine/ua_finite_state_variable.js +0 -3
- package/dist/source/interfaces/state_machine/ua_finite_state_variable.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_state_variable.d.ts +0 -29
- package/dist/source/interfaces/state_machine/ua_state_variable.js +0 -3
- package/dist/source/interfaces/state_machine/ua_state_variable.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_two_state_variable.d.ts +0 -26
- package/dist/source/interfaces/state_machine/ua_two_state_variable.js +0 -3
- package/dist/source/interfaces/state_machine/ua_two_state_variable.js.map +0 -1
- package/dist/source/interfaces/subscription_diagnostics_variable.d.ts +0 -41
- package/dist/source/interfaces/subscription_diagnostics_variable.js +0 -3
- package/dist/source/interfaces/subscription_diagnostics_variable.js.map +0 -1
- package/dist/src/alarms_and_conditions/base_event_type.d.ts +0 -26
- package/dist/src/alarms_and_conditions/base_event_type.js +0 -41
- package/dist/src/alarms_and_conditions/base_event_type.js.map +0 -1
- package/dist/src/alarms_and_conditions/shelving_state_machine.d.ts +0 -22
- package/dist/src/alarms_and_conditions/shelving_state_machine.js +0 -241
- package/dist/src/alarms_and_conditions/shelving_state_machine.js.map +0 -1
- package/dist/src/alarms_and_conditions/trip_alarm.d.ts +0 -16
- package/dist/src/alarms_and_conditions/trip_alarm.js +0 -21
- package/dist/src/alarms_and_conditions/trip_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.d.ts +0 -54
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js +0 -255
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_base.d.ts +0 -138
- package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js +0 -460
- package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.d.ts +0 -35
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js +0 -32
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_condition_base.d.ts +0 -191
- package/dist/src/alarms_and_conditions/ua_condition_base.js +0 -1029
- package/dist/src/alarms_and_conditions/ua_condition_base.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm.d.ts +0 -11
- package/dist/src/alarms_and_conditions/ua_discrete_alarm.js +0 -58
- package/dist/src/alarms_and_conditions/ua_discrete_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.d.ts +0 -24
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js +0 -59
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.d.ts +0 -14
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js +0 -17
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.d.ts +0 -22
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js +0 -87
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.d.ts +0 -6
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js +0 -11
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm.d.ts +0 -76
- package/dist/src/alarms_and_conditions/ua_limit_alarm.js +0 -237
- package/dist/src/alarms_and_conditions/ua_limit_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.d.ts +0 -27
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js +0 -62
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.d.ts +0 -49
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js +0 -176
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm.d.ts +0 -47
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js +0 -151
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.d.ts +0 -16
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js +0 -18
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js.map +0 -1
- package/dist/src/base_node.d.ts +0 -270
- package/dist/src/base_node.js +0 -1299
- package/dist/src/base_node.js.map +0 -1
- package/dist/src/data_access/ua_analog_item.d.ts +0 -13
- package/dist/src/data_access/ua_analog_item.js +0 -37
- package/dist/src/data_access/ua_analog_item.js.map +0 -1
- package/dist/src/data_access/ua_data_item.d.ts +0 -16
- package/dist/src/data_access/ua_data_item.js +0 -66
- package/dist/src/data_access/ua_data_item.js.map +0 -1
- package/dist/src/data_access/ua_multistate_discrete.d.ts +0 -24
- package/dist/src/data_access/ua_multistate_discrete.js +0 -132
- package/dist/src/data_access/ua_multistate_discrete.js.map +0 -1
- package/dist/src/namespace.d.ts +0 -472
- package/dist/src/namespace.js +0 -1759
- package/dist/src/namespace.js.map +0 -1
- package/dist/src/reference.d.ts +0 -43
- package/dist/src/reference.js +0 -138
- package/dist/src/reference.js.map +0 -1
- package/dist/src/session_context.d.ts +0 -4
- package/dist/src/session_context.js +0 -9
- package/dist/src/session_context.js.map +0 -1
- package/dist/src/ua_data_type.d.ts +0 -81
- package/dist/src/ua_data_type.js +0 -259
- package/dist/src/ua_data_type.js.map +0 -1
- package/dist/src/ua_method.d.ts +0 -33
- package/dist/src/ua_method.js +0 -194
- package/dist/src/ua_method.js.map +0 -1
- package/dist/src/ua_object.d.ts +0 -27
- package/dist/src/ua_object.js +0 -153
- package/dist/src/ua_object.js.map +0 -1
- package/dist/src/ua_object_type.d.ts +0 -49
- package/dist/src/ua_object_type.js +0 -123
- package/dist/src/ua_object_type.js.map +0 -1
- package/dist/src/ua_reference_type.d.ts +0 -31
- package/dist/src/ua_reference_type.js +0 -108
- package/dist/src/ua_reference_type.js.map +0 -1
- package/dist/src/ua_variable.d.ts +0 -346
- package/dist/src/ua_variable.js +0 -1651
- package/dist/src/ua_variable.js.map +0 -1
- package/dist/src/ua_variable_type.d.ts +0 -57
- package/dist/src/ua_variable_type.js +0 -530
- package/dist/src/ua_variable_type.js.map +0 -1
- package/dist/src/ua_view.d.ts +0 -16
- package/dist/src/ua_view.js +0 -41
- package/dist/src/ua_view.js.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* take a OPCUA version string and make it compliant with the semver specification
|
|
3
|
+
* @param version
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
|
+
export function makeSemverCompatible(version?: string): string {
|
|
7
|
+
version = version || "0.0.0";
|
|
8
|
+
|
|
9
|
+
const matches = version.match(/[0-9]+(\.[0-9]+(\.[0-9]+)?)?/);
|
|
10
|
+
if (!matches) {
|
|
11
|
+
return "0.0.0";
|
|
12
|
+
}
|
|
13
|
+
version = matches[0];
|
|
14
|
+
const version_array = version.split(".").map((a) => parseInt(a, 10));
|
|
15
|
+
|
|
16
|
+
if (version_array.length === 1) {
|
|
17
|
+
version_array.push(0);
|
|
18
|
+
}
|
|
19
|
+
if (version_array.length === 2) {
|
|
20
|
+
version_array.push(0);
|
|
21
|
+
}
|
|
22
|
+
return version_array.map((a) => a.toString()).join(".");
|
|
23
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Byte, Int16, Int32, Int64, SByte, UAString, UInt16, UInt32 } from "node-opcua-basic-types";
|
|
1
|
+
import { Byte, coerceInt64, coerceUInt64, Int16, Int32, Int64, SByte, UAString, UInt16, UInt32, UInt64 } from "node-opcua-basic-types";
|
|
2
2
|
import { LocalizedTextLike, LocalizedTextOptions } from "node-opcua-data-model";
|
|
3
3
|
import { make_debugLog, make_warningLog } from "node-opcua-debug";
|
|
4
4
|
import { coerceNodeId, NodeId, NodeIdType, resolveNodeId } from "node-opcua-nodeid";
|
|
@@ -82,7 +82,7 @@ const localizedTextReader: ReaderStateParserLike = {
|
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
function clamp(value: number, minValue: number, maxValue: number) {
|
|
85
|
-
if (value
|
|
85
|
+
if (value< minValue) {
|
|
86
86
|
warningLog(`invalid value range : ${value} < ${minValue} but should be [${minValue} , ${maxValue}]`);
|
|
87
87
|
return minValue;
|
|
88
88
|
}
|
|
@@ -95,6 +95,7 @@ function clamp(value: number, minValue: number, maxValue: number) {
|
|
|
95
95
|
|
|
96
96
|
interface Parser<T> {
|
|
97
97
|
value: T | null;
|
|
98
|
+
parent: any;
|
|
98
99
|
text: string;
|
|
99
100
|
}
|
|
100
101
|
const partials: { [key: string]: ReaderStateParserLike } = {
|
|
@@ -105,6 +106,15 @@ const partials: { [key: string]: ReaderStateParserLike } = {
|
|
|
105
106
|
this.value = this.text;
|
|
106
107
|
}
|
|
107
108
|
},
|
|
109
|
+
Guid: {
|
|
110
|
+
parser: {
|
|
111
|
+
String: {
|
|
112
|
+
finish(this: Parser<string>) {
|
|
113
|
+
this.parent.value = this.text;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
108
118
|
|
|
109
119
|
Boolean: {
|
|
110
120
|
finish(this: Parser<boolean>) {
|
|
@@ -161,8 +171,8 @@ const partials: { [key: string]: ReaderStateParserLike } = {
|
|
|
161
171
|
}
|
|
162
172
|
},
|
|
163
173
|
Int64: {
|
|
164
|
-
finish(this: Parser<
|
|
165
|
-
this.value = parseInt(this.text, 10);
|
|
174
|
+
finish(this: Parser<Int64>) {
|
|
175
|
+
this.value = coerceInt64(parseInt(this.text, 10));
|
|
166
176
|
}
|
|
167
177
|
},
|
|
168
178
|
|
|
@@ -185,8 +195,8 @@ const partials: { [key: string]: ReaderStateParserLike } = {
|
|
|
185
195
|
},
|
|
186
196
|
|
|
187
197
|
UInt64: {
|
|
188
|
-
finish(this: Parser<
|
|
189
|
-
this.value = parseInt(this.text, 10);
|
|
198
|
+
finish(this: Parser<UInt64>) {
|
|
199
|
+
this.value = coerceUInt64(parseInt(this.text, 10));
|
|
190
200
|
}
|
|
191
201
|
},
|
|
192
202
|
|
|
@@ -6,7 +6,7 @@ import { assert } from "node-opcua-assert";
|
|
|
6
6
|
import { LocalizedText, LocalizedTextLike } from "node-opcua-data-model";
|
|
7
7
|
import { NodeId } from "node-opcua-nodeid";
|
|
8
8
|
import { CallbackT, StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
9
|
-
import { DataType, VariantLike } from "node-opcua-variant";
|
|
9
|
+
import { DataType, VariantLike, VariantOptions } from "node-opcua-variant";
|
|
10
10
|
import { INamespace, RaiseEventData, ISessionContext, UAEventType, UAMethod } from "node-opcua-address-space-base";
|
|
11
11
|
import { CallMethodResultOptions } from "node-opcua-service-call";
|
|
12
12
|
|
|
@@ -16,6 +16,7 @@ import { _install_TwoStateVariable_machinery } from "../state_machine/ua_two_sta
|
|
|
16
16
|
import { _setAckedState } from "./condition";
|
|
17
17
|
import { ConditionSnapshot } from "./condition_snapshot";
|
|
18
18
|
import { UAConditionHelper, UAConditionImpl, UAConditionEx } from "./ua_condition_impl";
|
|
19
|
+
import { InstantiateAlarmConditionOptions } from "./ua_alarm_condition_impl";
|
|
19
20
|
|
|
20
21
|
export interface UAAcknowledgeableConditionHelper extends UAConditionHelper {
|
|
21
22
|
///
|
|
@@ -53,8 +54,8 @@ export class UAAcknowledgeableConditionImpl extends UAConditionImpl implements U
|
|
|
53
54
|
public static instantiate(
|
|
54
55
|
namespace: INamespace,
|
|
55
56
|
conditionTypeId: UAEventType | NodeId | string,
|
|
56
|
-
options:
|
|
57
|
-
data
|
|
57
|
+
options: InstantiateAlarmConditionOptions,
|
|
58
|
+
data?: Record<string, VariantOptions>
|
|
58
59
|
): UAAcknowledgeableConditionImpl {
|
|
59
60
|
const conditionNode = UAConditionImpl.instantiate(
|
|
60
61
|
namespace,
|
|
@@ -107,7 +108,9 @@ export class UAAcknowledgeableConditionImpl extends UAConditionImpl implements U
|
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
public static install_method_handle_on_type(addressSpace: AddressSpacePrivate): void {
|
|
110
|
-
const acknowledgeableConditionType = addressSpace.findEventType(
|
|
111
|
+
const acknowledgeableConditionType = addressSpace.findEventType(
|
|
112
|
+
"AcknowledgeableConditionType"
|
|
113
|
+
) as unknown as UAAcknowledgeableCondition_Base;
|
|
111
114
|
assert(acknowledgeableConditionType !== null);
|
|
112
115
|
acknowledgeableConditionType.acknowledge.bindMethod(_acknowledge_method);
|
|
113
116
|
acknowledgeableConditionType.confirm?.bindMethod(_confirm_method);
|
|
@@ -297,7 +300,11 @@ export class UAAcknowledgeableConditionImpl extends UAConditionImpl implements U
|
|
|
297
300
|
}
|
|
298
301
|
}
|
|
299
302
|
|
|
300
|
-
function _acknowledge_method(
|
|
303
|
+
function _acknowledge_method(
|
|
304
|
+
inputArguments: VariantLike[],
|
|
305
|
+
context: ISessionContext,
|
|
306
|
+
callback: CallbackT<CallMethodResultOptions>
|
|
307
|
+
) {
|
|
301
308
|
UAConditionImpl.with_condition_method(
|
|
302
309
|
inputArguments,
|
|
303
310
|
context,
|
|
@@ -322,7 +329,7 @@ function _acknowledge_method(inputArguments: VariantLike[], context: ISessionCon
|
|
|
322
329
|
*
|
|
323
330
|
* @private
|
|
324
331
|
*/
|
|
325
|
-
function _confirm_method(inputArguments: VariantLike[], context: ISessionContext,
|
|
332
|
+
function _confirm_method(inputArguments: VariantLike[], context: ISessionContext, callback: CallbackT<CallMethodResultOptions>) {
|
|
326
333
|
UAConditionImpl.with_condition_method(
|
|
327
334
|
inputArguments,
|
|
328
335
|
context,
|
|
@@ -8,10 +8,10 @@ import { NodeClass } from "node-opcua-data-model";
|
|
|
8
8
|
import { DataValue } from "node-opcua-data-value";
|
|
9
9
|
import { NodeId, sameNodeId } from "node-opcua-nodeid";
|
|
10
10
|
import { StatusCodes } from "node-opcua-status-code";
|
|
11
|
-
import { DataType } from "node-opcua-variant";
|
|
11
|
+
import { DataType, VariantOptions } from "node-opcua-variant";
|
|
12
12
|
import { UAAlarmCondition_Base } from "node-opcua-nodeset-ua";
|
|
13
|
+
import { BaseNode, INamespace, UAEventType, UAVariable } from "node-opcua-address-space-base";
|
|
13
14
|
|
|
14
|
-
import { BaseNode, INamespace, UAEventType, UAVariable } from "../../source";
|
|
15
15
|
import { _install_TwoStateVariable_machinery } from "../state_machine/ua_two_state_variable";
|
|
16
16
|
import { UAShelvedStateMachineEx, _clear_timer_if_any } from "../state_machine/ua_shelving_state_machine_ex";
|
|
17
17
|
import { UATwoStateVariableEx } from "../../source/ua_two_state_variable_ex";
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
UAAcknowledgeableConditionHelper,
|
|
24
24
|
UAAcknowledgeableConditionImpl
|
|
25
25
|
} from "./ua_acknowledgeable_condition_impl";
|
|
26
|
+
import { InstantiateConditionOptions } from "./ua_condition_impl";
|
|
26
27
|
|
|
27
28
|
function _update_suppressedOrShelved(alarmNode: UAAlarmConditionImpl) {
|
|
28
29
|
alarmNode.suppressedOrShelved.setValueFromSource({
|
|
@@ -32,7 +33,7 @@ function _update_suppressedOrShelved(alarmNode: UAAlarmConditionImpl) {
|
|
|
32
33
|
}
|
|
33
34
|
export interface UAAlarmConditionHelper extends UAAcknowledgeableConditionHelper {
|
|
34
35
|
activateAlarm(): void;
|
|
35
|
-
deactivateAlarm(): void;
|
|
36
|
+
deactivateAlarm(retain?: boolean): void;
|
|
36
37
|
isSuppressedOrShelved(): boolean;
|
|
37
38
|
getSuppressedOrShelved(): boolean;
|
|
38
39
|
setMaxTimeShelved(duration: number): void;
|
|
@@ -65,14 +66,18 @@ export declare interface UAAlarmConditionImpl extends UAAlarmConditionEx, UAAckn
|
|
|
65
66
|
on(eventName: string, eventHandler: any): this;
|
|
66
67
|
}
|
|
67
68
|
|
|
69
|
+
export interface InstantiateAlarmConditionOptions extends InstantiateConditionOptions {
|
|
70
|
+
maxTimeShelved?: number;
|
|
71
|
+
inputNode: BaseNode | NodeId;
|
|
72
|
+
}
|
|
68
73
|
export class UAAlarmConditionImpl extends UAAcknowledgeableConditionImpl implements UAAlarmConditionEx {
|
|
69
74
|
public static MaxDuration = Math.pow(2, 31);
|
|
70
75
|
|
|
71
76
|
public static instantiate(
|
|
72
77
|
namespace: INamespace,
|
|
73
78
|
alarmConditionTypeId: UAEventType | string | NodeId,
|
|
74
|
-
options:
|
|
75
|
-
data
|
|
79
|
+
options: InstantiateAlarmConditionOptions,
|
|
80
|
+
data?: Record<string, VariantOptions>
|
|
76
81
|
): UAAlarmConditionImpl {
|
|
77
82
|
const addressSpace = namespace.addressSpace;
|
|
78
83
|
// xx assert(Object.prototype.hasOwnProperty.call(options,"conditionOf")); // must provide a conditionOf
|
|
@@ -93,7 +98,7 @@ export class UAAlarmConditionImpl extends UAAcknowledgeableConditionImpl impleme
|
|
|
93
98
|
options.optionals = options.optionals || [];
|
|
94
99
|
if (Object.prototype.hasOwnProperty.call(options, "maxTimeShelved")) {
|
|
95
100
|
options.optionals.push("MaxTimeShelved");
|
|
96
|
-
assert(isFinite(options.maxTimeShelved));
|
|
101
|
+
assert(isFinite(options.maxTimeShelved!));
|
|
97
102
|
}
|
|
98
103
|
|
|
99
104
|
assert(alarmConditionTypeBase === alarmConditionType || alarmConditionType.isSupertypeOf(alarmConditionTypeBase));
|
|
@@ -229,16 +234,16 @@ export class UAAlarmConditionImpl extends UAAcknowledgeableConditionImpl impleme
|
|
|
229
234
|
branch.setAckedState(false);
|
|
230
235
|
}
|
|
231
236
|
|
|
232
|
-
public deactivateAlarm(): void {
|
|
237
|
+
public deactivateAlarm(retain?: boolean): void {
|
|
233
238
|
const branch = this.currentBranch();
|
|
234
|
-
branch.setRetain(true);
|
|
239
|
+
branch.setRetain(retain === undefined ? true : retain);
|
|
235
240
|
branch.setActiveState(false);
|
|
236
241
|
}
|
|
237
242
|
|
|
238
243
|
/**
|
|
239
244
|
* @deprecated use deactivateAlarm instead (with no s after de-activate)
|
|
240
245
|
*/
|
|
241
|
-
|
|
246
|
+
protected desactivateAlarm(): void {
|
|
242
247
|
this.deactivateAlarm();
|
|
243
248
|
}
|
|
244
249
|
|
|
@@ -325,7 +330,7 @@ export class UAAlarmConditionImpl extends UAAcknowledgeableConditionImpl impleme
|
|
|
325
330
|
this._onInputDataValueChange(dataValue);
|
|
326
331
|
}
|
|
327
332
|
|
|
328
|
-
|
|
333
|
+
protected _onInputDataValueChange(newValue: DataValue): void {
|
|
329
334
|
// xx console.log("class=",this.constructor.name,this.browseName.toString());
|
|
330
335
|
// xx throw new Error("_onInputDataValueChange must be overridden");
|
|
331
336
|
}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { Certificate, exploreCertificate, makeSHA1Thumbprint } from "node-opcua-crypto";
|
|
5
|
+
import { DateTime, minOPCUADate } from "node-opcua-basic-types";
|
|
6
|
+
import { make_warningLog } from "node-opcua-debug";
|
|
7
|
+
import { DataType, VariantOptions } from "node-opcua-variant";
|
|
8
|
+
import { UACertificateExpirationAlarm_Base } from "node-opcua-nodeset-ua";
|
|
9
|
+
import { INamespace, UAObject } from "node-opcua-address-space-base";
|
|
10
|
+
import { ObjectTypeIds } from "node-opcua-constants";
|
|
11
|
+
import { AccessRestrictionsFlag, makeAccessLevelExFlag } from "node-opcua-data-model";
|
|
12
|
+
import { registerNodePromoter } from "../../source/loader/register_node_promoter";
|
|
13
|
+
import { InstantiateOffNormalAlarmOptions, UAOffNormalAlarmImpl } from "./ua_off_normal_alarm_impl";
|
|
8
14
|
import { UASystemOffNormalAlarmImpl } from "./ua_system_off_normal_alarm_impl";
|
|
9
15
|
|
|
16
|
+
const warningLog = make_warningLog("AlarmsAndConditions");
|
|
17
|
+
|
|
10
18
|
export interface UACertificateExpirationAlarmEx
|
|
11
19
|
extends Omit<
|
|
12
20
|
UACertificateExpirationAlarm_Base,
|
|
@@ -20,7 +28,15 @@ export interface UACertificateExpirationAlarmEx
|
|
|
20
28
|
| "shelvingState"
|
|
21
29
|
| "silenceState"
|
|
22
30
|
| "suppressedState"
|
|
23
|
-
> {
|
|
31
|
+
> {
|
|
32
|
+
getExpirationDate(): DateTime;
|
|
33
|
+
setExpirationDate(value: Date): void;
|
|
34
|
+
getExpirationLimit(): number;
|
|
35
|
+
setExpirationLimit(value: number): void;
|
|
36
|
+
setCertificate(certificate: Certificate | null): void;
|
|
37
|
+
getCertificate(): Certificate | null;
|
|
38
|
+
}
|
|
39
|
+
|
|
24
40
|
export declare interface UACertificateExpirationAlarmImpl extends UACertificateExpirationAlarmEx, UASystemOffNormalAlarmImpl {}
|
|
25
41
|
/**
|
|
26
42
|
* This UACertificateExpirationAlarm (SystemOffNormalAlarmType) is raised by the Server when the Server’s
|
|
@@ -28,23 +44,123 @@ export declare interface UACertificateExpirationAlarmImpl extends UACertificateE
|
|
|
28
44
|
* of expiration. This alarm automatically returns to normal when the certificate is updated.
|
|
29
45
|
*/
|
|
30
46
|
export class UACertificateExpirationAlarmImpl extends UASystemOffNormalAlarmImpl implements UACertificateExpirationAlarmEx {
|
|
31
|
-
public static instantiate(
|
|
32
|
-
|
|
47
|
+
public static instantiate(
|
|
48
|
+
namespace: INamespace,
|
|
49
|
+
alarmType: "CertificateExpirationAlarmType",
|
|
50
|
+
options: InstantiateOffNormalAlarmOptions,
|
|
51
|
+
data?: Record<string, VariantOptions>
|
|
52
|
+
): UACertificateExpirationAlarmImpl {
|
|
53
|
+
const alarm = UASystemOffNormalAlarmImpl.instantiate(
|
|
33
54
|
namespace,
|
|
34
|
-
"CertificateExpirationAlarmType",
|
|
55
|
+
alarmType || "CertificateExpirationAlarmType",
|
|
35
56
|
options,
|
|
36
57
|
data
|
|
37
58
|
) as UACertificateExpirationAlarmImpl;
|
|
59
|
+
Object.setPrototypeOf(alarm, UACertificateExpirationAlarmImpl.prototype);
|
|
60
|
+
alarm._post_initialize();
|
|
61
|
+
return alarm;
|
|
38
62
|
}
|
|
39
63
|
|
|
40
64
|
public getExpirationDate(): DateTime {
|
|
41
65
|
return this.expirationDate.readValue().value.value;
|
|
42
66
|
}
|
|
43
67
|
|
|
44
|
-
public setExpirationDate(
|
|
45
|
-
|
|
68
|
+
public setExpirationDate(expirationDate: Date): void {
|
|
69
|
+
this.expirationDate.setValueFromSource({
|
|
46
70
|
dataType: DataType.DateTime,
|
|
71
|
+
value: expirationDate
|
|
72
|
+
});
|
|
73
|
+
const now = new Date();
|
|
74
|
+
const expirationLimit = this.getExpirationLimit();
|
|
75
|
+
|
|
76
|
+
const checkDate = new Date(now.getTime() + +expirationLimit);
|
|
77
|
+
|
|
78
|
+
const thumbprint = makeSHA1Thumbprint(this.getCertificate() || Buffer.alloc(0)).toString("hex");
|
|
79
|
+
|
|
80
|
+
if (expirationDate.getTime() <= checkDate.getTime()) {
|
|
81
|
+
if (!this.currentBranch().getActiveState()) {
|
|
82
|
+
warningLog(
|
|
83
|
+
`CertificateExpirationAlarm: becomes active, certificate ${thumbprint} endDate ${expirationDate.toUTCString()} checkDate=${checkDate.toUTCString()} expirationLimit=${expirationLimit}`
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
// also raise the event
|
|
87
|
+
if (expirationDate.getTime() <= now.getTime()) {
|
|
88
|
+
this.updateAlarmState(
|
|
89
|
+
true,
|
|
90
|
+
`certificate ${thumbprint} has expired : end date is ${expirationDate.toUTCString()} checkDate=${checkDate.toUTCString()} expirationLimit=${expirationLimit}`
|
|
91
|
+
);
|
|
92
|
+
} else {
|
|
93
|
+
this.updateAlarmState(
|
|
94
|
+
true,
|
|
95
|
+
`certificate ${thumbprint} is about to expire : end date is ${expirationDate.toString()} checkDate=${checkDate.toUTCString()} expirationLimit=${expirationLimit}`
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
} else {
|
|
99
|
+
if (this.currentBranch().getActiveState()) {
|
|
100
|
+
warningLog(
|
|
101
|
+
`CertificateExpirationAlarm: becomes desactivated, certificate ${thumbprint} endDate ${expirationDate.toUTCString()} expirationLimit=${expirationLimit}`
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
// also raise the event
|
|
105
|
+
this.updateAlarmState(
|
|
106
|
+
false,
|
|
107
|
+
`certificate ${thumbprint} end date is OK: ${expirationDate.toString()} , expirationLimit=${expirationLimit}`
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
public getExpirationLimit(): number {
|
|
113
|
+
return (this.expirationLimit?.readValue().value.value as number) || 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
public setExpirationLimit(value: number): void {
|
|
117
|
+
this.expirationLimit?.setValueFromSource({
|
|
118
|
+
dataType: DataType.Double,
|
|
47
119
|
value
|
|
48
120
|
});
|
|
49
121
|
}
|
|
122
|
+
|
|
123
|
+
public getCertificate(): Certificate | null {
|
|
124
|
+
return (this.certificate.readValue().value.value as Certificate | null) || null;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
public setCertificate(certificate: Certificate | null): void {
|
|
128
|
+
if (certificate && certificate.length > 0) {
|
|
129
|
+
const info = exploreCertificate(certificate);
|
|
130
|
+
if (info.tbsCertificate.validity.notAfter instanceof Date) {
|
|
131
|
+
this.setExpirationDate(info.tbsCertificate.validity.notAfter);
|
|
132
|
+
} else {
|
|
133
|
+
this.setExpirationDate(minOPCUADate);
|
|
134
|
+
}
|
|
135
|
+
} else {
|
|
136
|
+
this.setExpirationDate(minOPCUADate);
|
|
137
|
+
}
|
|
138
|
+
this.certificate.setValueFromSource({
|
|
139
|
+
dataType: DataType.ByteString,
|
|
140
|
+
value: certificate
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
_post_initialize() {
|
|
145
|
+
if (this.expirationLimit) {
|
|
146
|
+
this.expirationLimit.accessLevel = makeAccessLevelExFlag("CurrentRead | CurrentWrite");
|
|
147
|
+
this.expirationLimit.userAccessLevel = makeAccessLevelExFlag("CurrentRead | CurrentWrite");
|
|
148
|
+
this.expirationLimit.on("value_changed", (dataValue) => {
|
|
149
|
+
// make sure we re-evaluate the certificfate
|
|
150
|
+
const certificate = this.getCertificate();
|
|
151
|
+
this.setCertificate(certificate);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function promoteToCertificateExpirationAlarm(node: UAObject): UACertificateExpirationAlarmImpl {
|
|
158
|
+
if (node instanceof UACertificateExpirationAlarmImpl) {
|
|
159
|
+
return node; // already promoted
|
|
160
|
+
}
|
|
161
|
+
Object.setPrototypeOf(node, UACertificateExpirationAlarmImpl.prototype);
|
|
162
|
+
const _node = node as unknown as UACertificateExpirationAlarmImpl;
|
|
163
|
+
_node._post_initialize();
|
|
164
|
+
return _node;
|
|
50
165
|
}
|
|
166
|
+
registerNodePromoter(ObjectTypeIds.CertificateExpirationAlarmType, promoteToCertificateExpirationAlarm);
|
|
@@ -23,17 +23,25 @@ import { minDate } from "node-opcua-factory";
|
|
|
23
23
|
import { coerceNodeId, makeNodeId, NodeId, resolveNodeId, sameNodeId } from "node-opcua-nodeid";
|
|
24
24
|
import { CallbackT, StatusCode, StatusCodes } from "node-opcua-status-code";
|
|
25
25
|
import { CallMethodResultOptions, TimeZoneDataType } from "node-opcua-types";
|
|
26
|
-
import { DataType, Variant, VariantLike } from "node-opcua-variant";
|
|
27
|
-
import {
|
|
26
|
+
import { DataType, Variant, VariantLike, VariantOptions } from "node-opcua-variant";
|
|
27
|
+
import {
|
|
28
|
+
UAVariable,
|
|
29
|
+
INamespace,
|
|
30
|
+
ISessionContext,
|
|
31
|
+
UAEventType,
|
|
32
|
+
BaseNode,
|
|
33
|
+
UAObject,
|
|
34
|
+
InstantiateObjectOptions
|
|
35
|
+
} from "node-opcua-address-space-base";
|
|
28
36
|
import { UACondition_Base, UAConditionVariable, UACondition } from "node-opcua-nodeset-ua";
|
|
29
37
|
|
|
30
38
|
import { ConditionInfoOptions } from "../../source/interfaces/alarms_and_conditions/condition_info_i";
|
|
39
|
+
import { UATwoStateVariableEx } from "../../source/ua_two_state_variable_ex";
|
|
31
40
|
import { AddressSpacePrivate } from "../address_space_private";
|
|
32
41
|
import { _install_TwoStateVariable_machinery } from "../state_machine/ua_two_state_variable";
|
|
33
42
|
import { UAObjectImpl } from "../ua_object_impl";
|
|
34
43
|
import { UAVariableImpl } from "../ua_variable_impl";
|
|
35
44
|
import { UAConditionType } from "../ua_condition_type";
|
|
36
|
-
import { UATwoStateVariableEx } from "../../source/ua_two_state_variable_ex";
|
|
37
45
|
import { UABaseEventHelper, UABaseEventImpl } from "./ua_base_event_impl";
|
|
38
46
|
import { ConditionSnapshot } from "./condition_snapshot";
|
|
39
47
|
|
|
@@ -680,6 +688,11 @@ export class UAConditionImpl extends UABaseEventImpl implements UAConditionEx {
|
|
|
680
688
|
}
|
|
681
689
|
}
|
|
682
690
|
|
|
691
|
+
export interface InstantiateConditionOptions extends InstantiateObjectOptions {
|
|
692
|
+
conditionOf?: UAObject | BaseNode | NodeId | null;
|
|
693
|
+
conditionClass?: UAObject | BaseNode | NodeId | null;
|
|
694
|
+
conditionName?: string;
|
|
695
|
+
}
|
|
683
696
|
/**
|
|
684
697
|
* instantiate a Condition.
|
|
685
698
|
* this will create the unique EventId and will set eventType
|
|
@@ -709,8 +722,8 @@ export class UAConditionImpl extends UABaseEventImpl implements UAConditionEx {
|
|
|
709
722
|
function UACondition_instantiate(
|
|
710
723
|
namespace: INamespace,
|
|
711
724
|
conditionTypeId: UAEventType | NodeId | string,
|
|
712
|
-
options:
|
|
713
|
-
data
|
|
725
|
+
options: InstantiateConditionOptions,
|
|
726
|
+
data?: Record<string, VariantOptions>
|
|
714
727
|
): UAConditionEx {
|
|
715
728
|
/* eslint max-statements: ["error", 100] */
|
|
716
729
|
const addressSpace = namespace.addressSpace as AddressSpacePrivate;
|
|
@@ -766,7 +779,7 @@ function UACondition_instantiate(
|
|
|
766
779
|
}
|
|
767
780
|
if (options.conditionOf) {
|
|
768
781
|
assert(Object.prototype.hasOwnProperty.call(options, "conditionOf")); // must provide a conditionOf
|
|
769
|
-
options.conditionOf = addressSpace._coerceNode(options.conditionOf)
|
|
782
|
+
options.conditionOf = addressSpace._coerceNode(options.conditionOf)!;
|
|
770
783
|
|
|
771
784
|
// HasCondition References can be used in the Type definition of an Object or a Variable.
|
|
772
785
|
assert(options.conditionOf.nodeClass === NodeClass.Object || options.conditionOf.nodeClass === NodeClass.Variable);
|
|
@@ -826,11 +839,11 @@ function UACondition_instantiate(
|
|
|
826
839
|
conditionNode.enabledState.setValue(true);
|
|
827
840
|
|
|
828
841
|
// set properties to in initial values
|
|
829
|
-
Object.
|
|
842
|
+
Object.entries(data).forEach(([key, value]) => {
|
|
830
843
|
const varNode = _getCompositeKey(conditionNode, key);
|
|
831
844
|
assert(varNode.nodeClass === NodeClass.Variable);
|
|
832
845
|
|
|
833
|
-
const variant = new Variant(
|
|
846
|
+
const variant = new Variant(value);
|
|
834
847
|
|
|
835
848
|
// check that Variant DataType is compatible with the UAVariable dataType
|
|
836
849
|
// xx var nodeDataType = addressSpace.findNode(varNode.dataType).browseName;
|
|
@@ -839,10 +852,7 @@ function UACondition_instantiate(
|
|
|
839
852
|
if (!varNode._validate_DataType(variant.dataType)) {
|
|
840
853
|
throw new Error(" Invalid variant dataType " + variant + " " + varNode.browseName.toString());
|
|
841
854
|
}
|
|
842
|
-
|
|
843
|
-
const value = new Variant(data[key]);
|
|
844
|
-
|
|
845
|
-
varNode.setValueFromSource(value);
|
|
855
|
+
varNode.setValueFromSource(variant);
|
|
846
856
|
});
|
|
847
857
|
|
|
848
858
|
// bind condition methods -
|
|
@@ -880,7 +890,7 @@ function UACondition_instantiate(
|
|
|
880
890
|
// with the motor.
|
|
881
891
|
|
|
882
892
|
if (options.conditionSource) {
|
|
883
|
-
options.conditionSource = addressSpace._coerceNode(options.conditionSource)
|
|
893
|
+
options.conditionSource = addressSpace._coerceNode(options.conditionSource)!;
|
|
884
894
|
if (options.conditionSource.nodeClass !== NodeClass.Object && options.conditionSource.nodeClass !== NodeClass.Variable) {
|
|
885
895
|
// tslint:disable:no-console
|
|
886
896
|
console.log(options.conditionSource);
|
|
@@ -960,6 +970,9 @@ function UACondition_instantiate(
|
|
|
960
970
|
if (options.conditionClass) {
|
|
961
971
|
if (typeof options.conditionClass === "string") {
|
|
962
972
|
options.conditionClass = addressSpace.findObjectType(options.conditionClass);
|
|
973
|
+
if (!options.conditionClass) {
|
|
974
|
+
throw new Error("cannot find condition class " + options.conditionClass);
|
|
975
|
+
}
|
|
963
976
|
}
|
|
964
977
|
const conditionClassNode = addressSpace._coerceNode(options.conditionClass);
|
|
965
978
|
if (!conditionClassNode) {
|
|
@@ -4,8 +4,14 @@
|
|
|
4
4
|
import { assert } from "node-opcua-assert";
|
|
5
5
|
import { NodeId } from "node-opcua-nodeid";
|
|
6
6
|
import { UADiscreteAlarm, UADiscreteAlarm_Base } from "node-opcua-nodeset-ua";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { VariantOptions } from "node-opcua-variant";
|
|
8
|
+
import { INamespace, UAEventType } from "node-opcua-address-space-base";
|
|
9
|
+
import {
|
|
10
|
+
InstantiateAlarmConditionOptions,
|
|
11
|
+
UAAlarmConditionEx,
|
|
12
|
+
UAAlarmConditionHelper,
|
|
13
|
+
UAAlarmConditionImpl
|
|
14
|
+
} from "./ua_alarm_condition_impl";
|
|
9
15
|
|
|
10
16
|
export interface UADiscreteAlarmHelper extends UAAlarmConditionHelper {
|
|
11
17
|
on(eventName: string, eventHandle: any): this;
|
|
@@ -59,8 +65,8 @@ export class UADiscreteAlarmImpl extends UAAlarmConditionImpl implements UADiscr
|
|
|
59
65
|
public static instantiate(
|
|
60
66
|
namespace: INamespace,
|
|
61
67
|
discreteAlarmTypeId: UAEventType | NodeId | string,
|
|
62
|
-
options:
|
|
63
|
-
data
|
|
68
|
+
options: InstantiateAlarmConditionOptions,
|
|
69
|
+
data?: Record<string, VariantOptions>
|
|
64
70
|
): UADiscreteAlarmImpl {
|
|
65
71
|
const addressSpace = namespace.addressSpace;
|
|
66
72
|
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
import { assert } from "node-opcua-assert";
|
|
5
5
|
import { DataValue } from "node-opcua-data-value";
|
|
6
6
|
import { NodeId } from "node-opcua-nodeid";
|
|
7
|
-
import { DataType } from "node-opcua-variant";
|
|
7
|
+
import { DataType, VariantOptions } from "node-opcua-variant";
|
|
8
8
|
import { UAExclusiveDeviationAlarm_Base } from "node-opcua-nodeset-ua";
|
|
9
|
-
|
|
10
|
-
import { UAVariable, UAVariableT } from "../../source";
|
|
9
|
+
import { UAVariable, UAVariableT } from "node-opcua-address-space-base";
|
|
11
10
|
import { AddressSpace } from "../address_space";
|
|
12
11
|
import { NamespacePrivate } from "../namespace_private";
|
|
13
12
|
import {
|
|
@@ -20,7 +19,7 @@ import {
|
|
|
20
19
|
} from "./deviation_alarm_helper";
|
|
21
20
|
|
|
22
21
|
import { UAExclusiveLimitAlarmEx, UAExclusiveLimitAlarmImpl } from "./ua_exclusive_limit_alarm_impl";
|
|
23
|
-
import { UALimitAlarmImpl } from "./ua_limit_alarm_impl";
|
|
22
|
+
import { InstantiateLimitAlarmOptions, UALimitAlarmImpl } from "./ua_limit_alarm_impl";
|
|
24
23
|
|
|
25
24
|
export interface UAExclusiveDeviationAlarmEx
|
|
26
25
|
extends Omit<
|
|
@@ -43,12 +42,14 @@ export declare interface UAExclusiveDeviationAlarmImpl extends UAExclusiveDeviat
|
|
|
43
42
|
on(eventName: string, eventHandler: any): this;
|
|
44
43
|
get addressSpace(): AddressSpace;
|
|
45
44
|
}
|
|
45
|
+
|
|
46
|
+
export interface InstantiateExclusiveLimitAlarmOptions extends InstantiateLimitAlarmOptions, InstallSetPointOptions {}
|
|
46
47
|
export class UAExclusiveDeviationAlarmImpl extends UAExclusiveLimitAlarmImpl implements UAExclusiveDeviationAlarmEx {
|
|
47
48
|
public static instantiate(
|
|
48
49
|
namespace: NamespacePrivate,
|
|
49
50
|
type: string | NodeId,
|
|
50
|
-
options:
|
|
51
|
-
data
|
|
51
|
+
options: InstantiateExclusiveLimitAlarmOptions,
|
|
52
|
+
data?: Record<string, VariantOptions>
|
|
52
53
|
): UAExclusiveDeviationAlarmImpl {
|
|
53
54
|
const addressSpace = namespace.addressSpace;
|
|
54
55
|
|
|
@@ -2,17 +2,19 @@
|
|
|
2
2
|
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
3
|
*/
|
|
4
4
|
import { NodeId } from "node-opcua-nodeid";
|
|
5
|
+
import { VariantOptions } from "node-opcua-variant";
|
|
5
6
|
import { NamespacePrivate } from "../namespace_private";
|
|
6
7
|
import { UAExclusiveLimitAlarmImpl } from "./ua_exclusive_limit_alarm_impl";
|
|
8
|
+
import { InstantiateLimitAlarmOptions } from "./ua_limit_alarm_impl";
|
|
7
9
|
|
|
8
10
|
export class UAExclusiveLevelAlarmImpl extends UAExclusiveLimitAlarmImpl {
|
|
9
11
|
public static instantiate(
|
|
10
12
|
namespace: NamespacePrivate,
|
|
11
13
|
type: NodeId | string,
|
|
12
|
-
|
|
13
|
-
data
|
|
14
|
+
options: InstantiateLimitAlarmOptions,
|
|
15
|
+
data?: Record<string, VariantOptions>
|
|
14
16
|
): UAExclusiveLevelAlarmImpl {
|
|
15
17
|
const addressSpace = namespace.addressSpace;
|
|
16
|
-
return UAExclusiveLimitAlarmImpl.instantiate(namespace, type,
|
|
18
|
+
return UAExclusiveLimitAlarmImpl.instantiate(namespace, type, options, data) as UAExclusiveLevelAlarmImpl;
|
|
17
19
|
}
|
|
18
20
|
}
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
import { assert } from "node-opcua-assert";
|
|
5
5
|
import { NodeId } from "node-opcua-nodeid";
|
|
6
6
|
import { UAObject } from "node-opcua-address-space-base";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import { UAEventType
|
|
7
|
+
import { UAExclusiveLimitAlarm_Base } from "node-opcua-nodeset-ua";
|
|
8
|
+
import { VariantOptions } from "node-opcua-variant";
|
|
9
|
+
import { UAEventType } from "node-opcua-address-space-base";
|
|
10
10
|
import { UATwoStateVariableEx } from "../../source/ua_two_state_variable_ex";
|
|
11
11
|
import { NamespacePrivate } from "../namespace_private";
|
|
12
12
|
import { promoteToStateMachine } from "../state_machine/finite_state_machine";
|
|
13
13
|
import { UAShelvedStateMachineEx } from "../state_machine/ua_shelving_state_machine_ex";
|
|
14
|
-
import {
|
|
14
|
+
import { UAExclusiveLimitStateMachineEx } from "../../source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex";
|
|
15
|
+
import { InstantiateLimitAlarmOptions, UALimitAlarmEx, UALimitAlarmHelper, UALimitAlarmImpl } from "./ua_limit_alarm_impl";
|
|
15
16
|
|
|
16
17
|
const validState = ["HighHigh", "High", "Low", "LowLow", null];
|
|
17
18
|
|
|
@@ -49,8 +50,8 @@ export class UAExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UAExc
|
|
|
49
50
|
public static instantiate(
|
|
50
51
|
namespace: NamespacePrivate,
|
|
51
52
|
type: UAEventType | string | NodeId,
|
|
52
|
-
options:
|
|
53
|
-
data
|
|
53
|
+
options: InstantiateLimitAlarmOptions,
|
|
54
|
+
data?: Record<string, VariantOptions>
|
|
54
55
|
): UAExclusiveLimitAlarmImpl {
|
|
55
56
|
const addressSpace = namespace.addressSpace;
|
|
56
57
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { UAExclusiveRateOfChangeAlarm_Base } from "node-opcua-nodeset-ua";
|
|
5
5
|
import { UAExclusiveLimitAlarmEx, UAExclusiveLimitAlarmImpl } from "./ua_exclusive_limit_alarm_impl";
|
|
6
6
|
|
|
7
7
|
export interface UAExclusiveRateOfChangeAlarmEx
|