node-opcua-address-space 2.55.0 → 2.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/dist/source/address_space_ts.js.map +1 -1
- package/dist/source/continuation_points/continuation_point_manager.d.ts +27 -16
- package/dist/source/continuation_points/continuation_point_manager.js +141 -48
- package/dist/source/continuation_points/continuation_point_manager.js.map +1 -1
- package/dist/source/helpers/adjust_browse_direction.js.map +1 -1
- package/dist/source/helpers/call_helpers.js.map +1 -1
- package/dist/source/helpers/check_event_clause.js.map +1 -1
- package/dist/source/helpers/coerce_enum_value.js.map +1 -1
- package/dist/source/helpers/ensure_secure_access.js +0 -13
- package/dist/source/helpers/ensure_secure_access.js.map +1 -1
- package/dist/source/helpers/resolve_opaque_on_address_space.js.map +1 -1
- package/dist/source/loader/load_nodeset2.js +29 -3
- package/dist/source/loader/load_nodeset2.js.map +1 -1
- package/dist/source/loader/namespace_post_step.js.map +1 -1
- package/dist/source/loader/register_node_promoter.js.map +1 -1
- package/dist/source/namespace_machine_state.d.ts +1 -1
- package/dist/source/pseudo_session.js +23 -24
- package/dist/source/pseudo_session.js.map +1 -1
- package/dist/source/session_context.js +2 -2
- package/dist/source/session_context.js.map +1 -1
- package/dist/source/set_namespace_meta_data.js.map +1 -1
- package/dist/src/address_space.d.ts +7 -8
- package/dist/src/address_space.js +2 -2
- package/dist/src/address_space.js.map +1 -1
- package/dist/src/address_space_private.d.ts +4 -5
- package/dist/src/alarms_and_conditions/check_where_clause.js +1 -1
- package/dist/src/alarms_and_conditions/check_where_clause.js.map +1 -1
- package/dist/src/alarms_and_conditions/condition.js.map +1 -1
- package/dist/src/alarms_and_conditions/extract_event_fields.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +2 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
- 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.js.map +1 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -1
- package/dist/src/base_node_impl.js.map +1 -1
- package/dist/src/data_access/add_dataItem_stuff.js.map +1 -1
- package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js.map +1 -1
- package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -1
- package/dist/src/event_data.js.map +1 -1
- package/dist/src/extension_object_array_node.js.map +1 -1
- package/dist/src/historical_access/address_space_historical_data_node.js +28 -59
- package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -1
- package/dist/src/namespace_impl.d.ts +2 -2
- package/dist/src/namespace_impl.js +6 -6
- package/dist/src/namespace_impl.js.map +1 -1
- package/dist/src/nodeid_manager.js +1 -4
- package/dist/src/nodeid_manager.js.map +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.js +1 -1
- package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
- package/dist/src/nodeset_tools/typedictionary_to_xml.d.ts +1 -1
- package/dist/src/nodeset_tools/typedictionary_to_xml.js +3 -2
- package/dist/src/nodeset_tools/typedictionary_to_xml.js.map +1 -1
- package/dist/src/reference_impl.js +3 -1
- package/dist/src/reference_impl.js.map +1 -1
- package/dist/src/state_machine/finite_state_machine.js.map +1 -1
- package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
- package/dist/src/state_machine/ua_two_state_variable.js.map +1 -1
- package/dist/src/tool_isSupertypeOf.js.map +1 -1
- package/dist/src/ua_method_impl.d.ts +3 -2
- package/dist/src/ua_method_impl.js +5 -0
- package/dist/src/ua_method_impl.js.map +1 -1
- package/dist/src/ua_object_impl.d.ts +10 -6
- package/dist/src/ua_object_impl.js +1 -1
- package/dist/src/ua_object_impl.js.map +1 -1
- package/dist/src/ua_object_type_impl.js.map +1 -1
- package/dist/src/ua_reference_type_impl.js +3 -1
- package/dist/src/ua_reference_type_impl.js.map +1 -1
- package/dist/src/ua_variable_impl.d.ts +8 -7
- package/dist/src/ua_variable_impl.js +6 -10
- package/dist/src/ua_variable_impl.js.map +1 -1
- package/dist/src/ua_variable_type_impl.js.map +1 -1
- package/dist/src/ua_view_impl.js.map +1 -1
- package/distHelpers/add_event_generator_object.js.map +1 -1
- package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
- package/distHelpers/boiler_system.d.ts +1 -1
- package/distHelpers/boiler_system.js +1 -2
- package/distHelpers/boiler_system.js.map +1 -1
- package/distHelpers/create_minimalist_address_space_nodeset.js +1 -0
- package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -1
- package/distHelpers/date_utils.d.ts +3 -0
- package/distHelpers/date_utils.js +10 -0
- package/distHelpers/date_utils.js.map +1 -0
- package/distHelpers/get_mini_address_space.js.map +1 -1
- package/distHelpers/index.d.ts +2 -0
- package/distHelpers/index.js +2 -0
- package/distHelpers/index.js.map +1 -1
- package/distHelpers/mock_session.d.ts +14 -0
- package/distHelpers/mock_session.js +26 -0
- package/distHelpers/mock_session.js.map +1 -0
- package/generate.js +1 -1
- package/nodeJS.d.ts +1 -1
- package/package.json +32 -32
- package/source/address_space_ts.ts +0 -3
- package/source/continuation_points/continuation_point_manager.ts +178 -64
- package/source/helpers/adjust_browse_direction.ts +3 -3
- package/source/helpers/argument_list.ts +1 -1
- package/source/helpers/call_helpers.ts +0 -1
- package/source/helpers/check_event_clause.ts +2 -9
- package/source/helpers/coerce_enum_value.ts +3 -3
- package/source/helpers/ensure_secure_access.ts +1 -13
- package/source/helpers/resolve_opaque_on_address_space.ts +4 -1
- package/source/interfaces/alarms_and_conditions/condition_info_i.ts +13 -13
- package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +0 -1
- package/source/interfaces/data_access/ua_y_array_item_ex.ts +4 -2
- package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +5 -1
- package/source/interfaces/state_machine/ua_state_machine_type.ts +2 -2
- package/source/loader/load_nodeset2.ts +39 -3
- package/source/loader/namespace_post_step.ts +1 -2
- package/source/loader/register_node_promoter.ts +4 -1
- package/source/namespace.ts +4 -6
- package/source/namespace_machine_state.ts +1 -2
- package/source/pseudo_session.ts +37 -29
- package/source/session_context.ts +2 -9
- package/source/set_namespace_meta_data.ts +21 -15
- package/source/xml_writer.ts +0 -1
- package/source_nodejs/index.ts +1 -1
- package/src/address_space.ts +17 -16
- package/src/address_space_private.ts +7 -12
- package/src/alarms_and_conditions/check_where_clause.ts +21 -22
- package/src/alarms_and_conditions/condition.ts +0 -1
- package/src/alarms_and_conditions/extract_event_fields.ts +0 -1
- package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +14 -10
- package/src/alarms_and_conditions/ua_base_event_impl.ts +11 -15
- package/src/alarms_and_conditions/ua_condition_impl.ts +35 -40
- package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +39 -33
- package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +2 -2
- package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +4 -5
- package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +16 -16
- package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +8 -8
- package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +9 -10
- package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +2 -4
- package/src/apply_condition_refresh.ts +2 -2
- package/src/base_node_impl.ts +2 -2
- package/src/data_access/add_dataItem_stuff.ts +4 -4
- package/src/data_access/check_variant_compatibility_ua_analog_item.ts +12 -15
- package/src/data_access/ua_multistate_discrete_impl.ts +6 -3
- package/src/data_access/ua_multistate_value_discrete.ts +1 -1
- package/src/event_data.ts +1 -7
- package/src/extension_object_array_node.ts +4 -10
- package/src/historical_access/address_space_historical_data_node.ts +39 -63
- package/src/namespace_impl.ts +5 -5
- package/src/namespace_private.ts +1 -1
- package/src/nodeid_manager.ts +2 -5
- package/src/nodeset_tools/nodeset_to_xml.ts +5 -5
- package/src/nodeset_tools/typedictionary_to_xml.ts +7 -5
- package/src/reference_impl.ts +4 -2
- package/src/state_machine/finite_state_machine.ts +426 -428
- package/src/state_machine/ua_shelving_state_machine_ex.ts +19 -9
- package/src/state_machine/ua_two_state_variable.ts +5 -7
- package/src/tool_isSupertypeOf.ts +2 -6
- package/src/ua_condition_type.ts +0 -1
- package/src/ua_method_impl.ts +25 -9
- package/src/ua_object_impl.ts +13 -8
- package/src/ua_object_type_impl.ts +7 -4
- package/src/ua_reference_type_impl.ts +6 -12
- package/src/ua_variable_impl.ts +11 -15
- package/src/ua_variable_type_impl.ts +2 -2
- package/src/ua_view_impl.ts +3 -6
- package/testHelpers.d.ts +1 -1
- package/test_helpers/add_event_generator_object.ts +6 -5
- package/test_helpers/alarms_and_conditions_demo.ts +9 -8
- package/test_helpers/assertHasMatchingReference.ts +43 -43
- package/test_helpers/boiler_system.ts +610 -618
- package/test_helpers/create_minimalist_address_space_nodeset.ts +13 -13
- package/test_helpers/date_utils.ts +5 -0
- package/test_helpers/dump_statemachine.ts +2 -2
- package/test_helpers/get_address_space_fixture.ts +30 -30
- package/test_helpers/get_mini_address_space.ts +42 -42
- package/test_helpers/index.ts +13 -11
- package/test_helpers/mock_session.ts +34 -0
- package/test_helpers/test_fixtures/dataType_in_separateNamespace.xml +150 -150
- package/test_helpers/test_fixtures/dataType_in_separateNamespace_basic.xml +57 -57
- package/test_helpers/test_fixtures/dataType_in_separateNamespace_mix.xml +135 -135
- package/test_helpers/test_fixtures/dataType_withEnumeration.xml +82 -82
- package/test_helpers/test_fixtures/dataType_with_isOptionSet.xml +194 -194
- package/test_helpers/test_fixtures/dataType_with_union.xml +1 -1
- package/test_helpers/test_fixtures/fixture_empty_nodeset2.xml +106 -106
- package/test_helpers/test_fixtures/fixture_simple_statemachine_nodeset2.xml +1303 -1303
- package/test_helpers/test_fixtures/fixuture_nodeset_objects_with_some_methods.xml +362 -362
- package/test_helpers/test_fixtures/issue_846.xml +3172 -3172
- package/test_helpers/test_fixtures/issue_899_variable_with_nodeid_value.xml +32 -32
- package/test_helpers/test_fixtures/mini.nodeset.withVariousVariables.xml +194 -194
- package/test_helpers/test_fixtures/minimalist_nodeset_with_models.xml +8 -8
- package/test_helpers/test_fixtures/minimalist_nodeset_with_models_more_complex.xml +16 -16
- package/test_helpers/test_fixtures/nodeset_with_analog_items.xml +45 -45
- 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 -289
- package/dist/src/base_node.js +0 -1345
- 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 -1751
- 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 -83
- package/dist/src/ua_data_type.js +0 -289
- package/dist/src/ua_data_type.js.map +0 -1
- package/dist/src/ua_method.d.ts +0 -41
- package/dist/src/ua_method.js +0 -202
- package/dist/src/ua_method.js.map +0 -1
- package/dist/src/ua_object.d.ts +0 -28
- 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 -42
- package/dist/src/ua_reference_type.js +0 -138
- package/dist/src/ua_reference_type.js.map +0 -1
- package/dist/src/ua_variable.d.ts +0 -339
- package/dist/src/ua_variable.js +0 -1706
- 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 -42
- package/dist/src/ua_view.js.map +0 -1
|
@@ -51,19 +51,19 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
51
51
|
|
|
52
52
|
options.optionals = options.optionals || [];
|
|
53
53
|
|
|
54
|
-
if (Object.prototype.hasOwnProperty.call(options,"lowLowLimit")) {
|
|
54
|
+
if (Object.prototype.hasOwnProperty.call(options, "lowLowLimit")) {
|
|
55
55
|
options.optionals.push("LowLowLimit");
|
|
56
56
|
options.optionals.push("LowLowState");
|
|
57
57
|
}
|
|
58
|
-
if (Object.prototype.hasOwnProperty.call(options,"lowLimit")) {
|
|
58
|
+
if (Object.prototype.hasOwnProperty.call(options, "lowLimit")) {
|
|
59
59
|
options.optionals.push("LowLimit");
|
|
60
60
|
options.optionals.push("LowState");
|
|
61
61
|
}
|
|
62
|
-
if (Object.prototype.hasOwnProperty.call(options,"highLimit")) {
|
|
62
|
+
if (Object.prototype.hasOwnProperty.call(options, "highLimit")) {
|
|
63
63
|
options.optionals.push("HighLimit");
|
|
64
64
|
options.optionals.push("HighState");
|
|
65
65
|
}
|
|
66
|
-
if (Object.prototype.hasOwnProperty.call(options,"highHighLimit")) {
|
|
66
|
+
if (Object.prototype.hasOwnProperty.call(options, "highHighLimit")) {
|
|
67
67
|
options.optionals.push("HighHighLimit");
|
|
68
68
|
options.optionals.push("HighHighState");
|
|
69
69
|
}
|
|
@@ -93,7 +93,7 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
93
93
|
trueState: "LowLow active"
|
|
94
94
|
});
|
|
95
95
|
alarm.lowLowState.setValue(false);
|
|
96
|
-
assert(Object.prototype.hasOwnProperty.call(alarm,"lowLowLimit"));
|
|
96
|
+
assert(Object.prototype.hasOwnProperty.call(alarm, "lowLowLimit"));
|
|
97
97
|
}
|
|
98
98
|
if (alarm.lowState) {
|
|
99
99
|
_install_TwoStateVariable_machinery(alarm.lowState, {
|
|
@@ -101,7 +101,7 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
101
101
|
trueState: "Low active"
|
|
102
102
|
});
|
|
103
103
|
alarm.lowState.setValue(false);
|
|
104
|
-
assert(Object.prototype.hasOwnProperty.call(alarm,"lowLimit"));
|
|
104
|
+
assert(Object.prototype.hasOwnProperty.call(alarm, "lowLimit"));
|
|
105
105
|
}
|
|
106
106
|
if (alarm.highState) {
|
|
107
107
|
_install_TwoStateVariable_machinery(alarm.highState, {
|
|
@@ -109,7 +109,7 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
109
109
|
trueState: "High active"
|
|
110
110
|
});
|
|
111
111
|
alarm.highState.setValue(false);
|
|
112
|
-
assert(Object.prototype.hasOwnProperty.call(alarm,"highLimit"));
|
|
112
|
+
assert(Object.prototype.hasOwnProperty.call(alarm, "highLimit"));
|
|
113
113
|
}
|
|
114
114
|
if (alarm.highHighState) {
|
|
115
115
|
_install_TwoStateVariable_machinery(alarm.highHighState, {
|
|
@@ -117,7 +117,7 @@ export class UANonExclusiveLimitAlarmImpl extends UALimitAlarmImpl implements UA
|
|
|
117
117
|
trueState: "HighHigh active"
|
|
118
118
|
});
|
|
119
119
|
alarm.highHighState.setValue(false);
|
|
120
|
-
assert(Object.prototype.hasOwnProperty.call(alarm,"highHighLimit"));
|
|
120
|
+
assert(Object.prototype.hasOwnProperty.call(alarm, "highHighLimit"));
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
alarm.activeState.setValue(false);
|
|
@@ -30,12 +30,12 @@ export declare interface UAOffNormalAlarmEx
|
|
|
30
30
|
| "suppressedState"
|
|
31
31
|
>,
|
|
32
32
|
UADiscreteAlarmEx {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
getNormalStateNode(): UAVariable;
|
|
34
|
+
|
|
35
|
+
getNormalStateValue(): any;
|
|
36
|
+
|
|
37
|
+
setNormalStateValue(value: any): void;
|
|
38
|
+
}
|
|
39
39
|
|
|
40
40
|
export declare interface UAOffNormalAlarmImpl extends UAOffNormalAlarmEx, UADiscreteAlarmImpl {
|
|
41
41
|
on(eventName: string, eventHandler: any): this;
|
|
@@ -65,11 +65,11 @@ export class UAOffNormalAlarmImpl extends UADiscreteAlarmImpl implements UAOffNo
|
|
|
65
65
|
throw new Error("cannot find offNormalAlarmType");
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
assert(Object.prototype.hasOwnProperty.call(options,"inputNode"), "must provide inputNode"); // must provide a inputNode
|
|
69
|
-
assert(Object.prototype.hasOwnProperty.call(options,"normalState"), "must provide a normalState Node"); // must provide a inputNode
|
|
68
|
+
assert(Object.prototype.hasOwnProperty.call(options, "inputNode"), "must provide inputNode"); // must provide a inputNode
|
|
69
|
+
assert(Object.prototype.hasOwnProperty.call(options, "normalState"), "must provide a normalState Node"); // must provide a inputNode
|
|
70
70
|
options.optionals = options.optionals || [];
|
|
71
71
|
|
|
72
|
-
assert(Object.prototype.hasOwnProperty.call(options,"inputNode"), "must provide inputNode"); // must provide a inputNode
|
|
72
|
+
assert(Object.prototype.hasOwnProperty.call(options, "inputNode"), "must provide inputNode"); // must provide a inputNode
|
|
73
73
|
const alarmNode = UADiscreteAlarmImpl.instantiate(namespace, limitAlarmTypeId, options, data) as UAOffNormalAlarmImpl;
|
|
74
74
|
Object.setPrototypeOf(alarmNode, UAOffNormalAlarmImpl.prototype);
|
|
75
75
|
|
|
@@ -139,7 +139,6 @@ export class UAOffNormalAlarmImpl extends UADiscreteAlarmImpl implements UAOffNo
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
public _updateAlarmState(normalStateValue?: any, inputValue?: any): void {
|
|
142
|
-
|
|
143
142
|
if (utils.isNullOrUndefined(normalStateValue) || utils.isNullOrUndefined(inputValue)) {
|
|
144
143
|
this.activeState.setValue(false);
|
|
145
144
|
return;
|
|
@@ -13,15 +13,13 @@ import { UAOffNormalAlarmImpl } from "./ua_off_normal_alarm_impl";
|
|
|
13
13
|
* Subscription.
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
|
-
export class UASystemOffNormalAlarmImpl extends
|
|
17
|
-
|
|
16
|
+
export class UASystemOffNormalAlarmImpl extends UAOffNormalAlarmImpl {
|
|
18
17
|
public static instantiate(
|
|
19
18
|
namespace: INamespace,
|
|
20
19
|
limitAlarmTypeId: string | NodeId,
|
|
21
20
|
options: any,
|
|
22
21
|
data: any
|
|
23
22
|
): UASystemOffNormalAlarmImpl {
|
|
24
|
-
|
|
25
|
-
namespace, limitAlarmTypeId, options, data) as UASystemOffNormalAlarmImpl;
|
|
23
|
+
return UAOffNormalAlarmImpl.instantiate(namespace, limitAlarmTypeId, options, data) as UASystemOffNormalAlarmImpl;
|
|
26
24
|
}
|
|
27
25
|
}
|
|
@@ -3,7 +3,7 @@ import { UAConditionImpl } from "./alarms_and_conditions/ua_condition_impl";
|
|
|
3
3
|
import { BaseNodeImpl } from "./base_node_impl";
|
|
4
4
|
import { UAObjectImpl } from "./ua_object_impl";
|
|
5
5
|
|
|
6
|
-
export type ConditionRefreshCache = {[key in string]: UAObject};
|
|
6
|
+
export type ConditionRefreshCache = { [key in string]: UAObject };
|
|
7
7
|
export function apply_condition_refresh(this: BaseNodeImpl, _cache?: ConditionRefreshCache): void {
|
|
8
8
|
// visit all notifiers recursively
|
|
9
9
|
_cache = _cache || {};
|
|
@@ -27,4 +27,4 @@ export function apply_condition_refresh(this: BaseNodeImpl, _cache?: ConditionRe
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
}
|
|
30
|
+
}
|
package/src/base_node_impl.ts
CHANGED
|
@@ -1162,14 +1162,14 @@ export class BaseNodeImpl extends EventEmitter implements BaseNode {
|
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
1164
|
|
|
1165
|
-
public installPostInstallFunc(f: ()=>void): void {
|
|
1165
|
+
public installPostInstallFunc(f: () => void): void {
|
|
1166
1166
|
if (!f) {
|
|
1167
1167
|
// nothing to do
|
|
1168
1168
|
return;
|
|
1169
1169
|
}
|
|
1170
1170
|
|
|
1171
1171
|
function chain(f1: any, f2: any) {
|
|
1172
|
-
return function chaiFunc(this: BaseNode, ...
|
|
1172
|
+
return function chaiFunc(this: BaseNode, ...args: any[]) {
|
|
1173
1173
|
if (f1) {
|
|
1174
1174
|
f1.apply(this, args);
|
|
1175
1175
|
}
|
|
@@ -41,11 +41,11 @@ interface add_dataItem_stuffOptions {
|
|
|
41
41
|
valuePrecision?: number;
|
|
42
42
|
modellingRule?: ModellingRuleType;
|
|
43
43
|
}
|
|
44
|
-
export function add_dataItem_stuff(variable: UAVariable, options: add_dataItem_stuffOptions)
|
|
44
|
+
export function add_dataItem_stuff(variable: UAVariable, options: add_dataItem_stuffOptions): void {
|
|
45
45
|
const addressSpace = variable.addressSpace;
|
|
46
46
|
const namespace = addressSpace.getNamespace(variable.nodeId.namespace);
|
|
47
47
|
|
|
48
|
-
if (Object.prototype.hasOwnProperty.call(options,"definition")) {
|
|
48
|
+
if (Object.prototype.hasOwnProperty.call(options, "definition")) {
|
|
49
49
|
namespace.addVariable({
|
|
50
50
|
browseName: { name: "Definition", namespaceIndex: 0 },
|
|
51
51
|
dataType: "String",
|
|
@@ -58,7 +58,7 @@ export function add_dataItem_stuff(variable: UAVariable, options: add_dataItem_s
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
if (Object.prototype.hasOwnProperty.call(options,"valuePrecision")) {
|
|
61
|
+
if (Object.prototype.hasOwnProperty.call(options, "valuePrecision")) {
|
|
62
62
|
assert(typeof options.valuePrecision === "number");
|
|
63
63
|
|
|
64
64
|
namespace.addVariable({
|
|
@@ -72,4 +72,4 @@ export function add_dataItem_stuff(variable: UAVariable, options: add_dataItem_s
|
|
|
72
72
|
value: new Variant({ dataType: DataType.Double, value: options.valuePrecision })
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
}
|
|
75
|
+
}
|
|
@@ -16,24 +16,21 @@ function validate_value_range(range: Range, variant: Variant) {
|
|
|
16
16
|
return true;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
function checkVariantCompatibilityUAAnalogItem(this: UAVariableImpl, value: Variant): StatusCode {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if (analogItem.instrumentRange) {
|
|
30
|
-
|
|
31
|
-
return StatusCodes.BadOutOfRange;
|
|
32
|
-
}
|
|
20
|
+
assert(value instanceof Variant);
|
|
21
|
+
// test dataType
|
|
22
|
+
if (!this._validate_DataType(value.dataType)) {
|
|
23
|
+
return StatusCodes.BadTypeMismatch;
|
|
24
|
+
}
|
|
25
|
+
const analogItem = this as unknown as UAAnalogItem<any, any>;
|
|
26
|
+
// AnalogDataItem
|
|
27
|
+
if (analogItem.instrumentRange) {
|
|
28
|
+
if (!validate_value_range(analogItem.instrumentRange.readValue().value.value as Range, value)) {
|
|
29
|
+
return StatusCodes.BadOutOfRange;
|
|
33
30
|
}
|
|
34
|
-
return StatusCodes.Good;
|
|
35
31
|
}
|
|
36
|
-
|
|
32
|
+
return StatusCodes.Good;
|
|
33
|
+
}
|
|
37
34
|
|
|
38
35
|
/**
|
|
39
36
|
* extend default checkVariantCompatibility on base class with this one
|
|
@@ -109,10 +109,13 @@ export function promoteToMultiStateDiscrete<T, DT extends DataType>(node: UAVari
|
|
|
109
109
|
}
|
|
110
110
|
registerNodePromoter(VariableTypeIds.MultiStateDiscreteType, promoteToMultiStateDiscrete);
|
|
111
111
|
|
|
112
|
-
export function _addMultiStateDiscrete<T,DT extends DataType>(
|
|
112
|
+
export function _addMultiStateDiscrete<T, DT extends DataType>(
|
|
113
|
+
namespace: INamespace,
|
|
114
|
+
options: AddMultiStateDiscreteOptions
|
|
115
|
+
): UAMultiStateDiscreteImpl<T, DT> {
|
|
113
116
|
const addressSpace = namespace.addressSpace;
|
|
114
|
-
assert(Object.prototype.hasOwnProperty.call(options,"enumStrings"));
|
|
115
|
-
assert(!Object.prototype.hasOwnProperty.call(options,"ValuePrecision"));
|
|
117
|
+
assert(Object.prototype.hasOwnProperty.call(options, "enumStrings"));
|
|
118
|
+
assert(!Object.prototype.hasOwnProperty.call(options, "ValuePrecision"));
|
|
116
119
|
|
|
117
120
|
const multiStateDiscreteType = addressSpace.findVariableType("MultiStateDiscreteType");
|
|
118
121
|
if (!multiStateDiscreteType) {
|
|
@@ -167,7 +167,7 @@ export class UAMultiStateValueDiscreteImpl<T, DT extends DataType>
|
|
|
167
167
|
*
|
|
168
168
|
* @private
|
|
169
169
|
*/
|
|
170
|
-
public _post_initialize():void {
|
|
170
|
+
public _post_initialize(): void {
|
|
171
171
|
// MultiStateValueDiscrete Variables can have any numeric Data Type;
|
|
172
172
|
// this includes signed and unsigned integers from 8 to 64 Bit length.
|
|
173
173
|
|
package/src/event_data.ts
CHANGED
|
@@ -10,12 +10,7 @@ import { StatusCodes } from "node-opcua-status-code";
|
|
|
10
10
|
import { SimpleAttributeOperand } from "node-opcua-types";
|
|
11
11
|
import { DataType, Variant, VariantLike } from "node-opcua-variant";
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
ISessionContext,
|
|
15
|
-
BaseNode,
|
|
16
|
-
IEventData,
|
|
17
|
-
UAVariable
|
|
18
|
-
} from "node-opcua-address-space-base";
|
|
13
|
+
import { ISessionContext, BaseNode, IEventData, UAVariable } from "node-opcua-address-space-base";
|
|
19
14
|
|
|
20
15
|
/**
|
|
21
16
|
* @class EventData
|
|
@@ -23,7 +18,6 @@ import {
|
|
|
23
18
|
* @constructor
|
|
24
19
|
*/
|
|
25
20
|
export class EventData implements IEventData {
|
|
26
|
-
|
|
27
21
|
public eventId: NodeId;
|
|
28
22
|
public $eventDataSource: BaseNode;
|
|
29
23
|
|
|
@@ -11,13 +11,7 @@ import { DataType } from "node-opcua-variant";
|
|
|
11
11
|
import { VariantArrayType } from "node-opcua-variant";
|
|
12
12
|
|
|
13
13
|
import { ExtensionObject } from "node-opcua-extension-object";
|
|
14
|
-
import {
|
|
15
|
-
UADataType,
|
|
16
|
-
UADynamicVariableArray,
|
|
17
|
-
UAObject,
|
|
18
|
-
UAReferenceType,
|
|
19
|
-
UAVariable
|
|
20
|
-
} from "node-opcua-address-space-base"
|
|
14
|
+
import { UADataType, UADynamicVariableArray, UAObject, UAReferenceType, UAVariable } from "node-opcua-address-space-base";
|
|
21
15
|
import { UAVariableImpl } from "./ua_variable_impl";
|
|
22
16
|
|
|
23
17
|
const doDebug = checkDebugFlag(__filename);
|
|
@@ -172,14 +166,14 @@ export function bindExtObjArrayNode<T extends ExtensionObject>(
|
|
|
172
166
|
uaArrayVariableNode.$$extensionObjectArray = [];
|
|
173
167
|
uaArrayVariableNode.$$indexPropertyName = indexPropertyName;
|
|
174
168
|
|
|
175
|
-
uaArrayVariableNode.$$getElementBrowseName = function (this:
|
|
169
|
+
uaArrayVariableNode.$$getElementBrowseName = function (this: UADynamicVariableArray<T>, extObj: ExtensionObject) {
|
|
176
170
|
const indexPropertyName1 = this.$$indexPropertyName;
|
|
177
171
|
|
|
178
|
-
if (!Object.prototype.hasOwnProperty.call(extObj,indexPropertyName1)) {
|
|
172
|
+
if (!Object.prototype.hasOwnProperty.call(extObj, indexPropertyName1)) {
|
|
179
173
|
console.log(" extension object do not have ", indexPropertyName1, extObj);
|
|
180
174
|
}
|
|
181
175
|
// assert(extObj.constructor === addressSpace.constructExtensionObject(dataType));
|
|
182
|
-
assert(Object.prototype.hasOwnProperty.call(extObj,indexPropertyName1));
|
|
176
|
+
assert(Object.prototype.hasOwnProperty.call(extObj, indexPropertyName1));
|
|
183
177
|
const browseName = (extObj as any)[indexPropertyName1].toString();
|
|
184
178
|
return browseName;
|
|
185
179
|
};
|
|
@@ -25,11 +25,10 @@ import { CallbackT } from "node-opcua-status-code";
|
|
|
25
25
|
import { DataType } from "node-opcua-variant";
|
|
26
26
|
import {
|
|
27
27
|
IAddressSpace,
|
|
28
|
-
ContinuationPoint,
|
|
29
|
-
ContinuationPointData,
|
|
30
28
|
IVariableHistorian,
|
|
31
29
|
IVariableHistorianOptions,
|
|
32
|
-
UAVariable
|
|
30
|
+
UAVariable,
|
|
31
|
+
ContinuationData
|
|
33
32
|
} from "node-opcua-address-space-base";
|
|
34
33
|
import { ISessionContext } from "node-opcua-address-space-base";
|
|
35
34
|
|
|
@@ -249,18 +248,13 @@ function _historyPush(this: UAVariableImpl, newDataValue: DataValue) {
|
|
|
249
248
|
this.varHistorian.push(newDataValue);
|
|
250
249
|
}
|
|
251
250
|
|
|
252
|
-
function createContinuationPoint(): ContinuationPoint {
|
|
253
|
-
// todo: improve
|
|
254
|
-
return Buffer.from("ABCDEF");
|
|
255
|
-
}
|
|
256
|
-
|
|
257
251
|
function _historyReadModify(
|
|
258
252
|
this: UAVariable,
|
|
259
253
|
context: ISessionContext,
|
|
260
|
-
historyReadRawModifiedDetails:
|
|
254
|
+
historyReadRawModifiedDetails: ReadRawModifiedDetails,
|
|
261
255
|
indexRange: NumericRange | null,
|
|
262
256
|
dataEncoding: QualifiedNameLike | null,
|
|
263
|
-
|
|
257
|
+
continuationData: ContinuationData,
|
|
264
258
|
callback: CallbackT<HistoryReadResult>
|
|
265
259
|
) {
|
|
266
260
|
//
|
|
@@ -338,7 +332,7 @@ function _historyReadRaw(
|
|
|
338
332
|
historyReadRawModifiedDetails: ReadRawModifiedDetails,
|
|
339
333
|
indexRange: NumericRange | null,
|
|
340
334
|
dataEncoding: QualifiedNameLike | null,
|
|
341
|
-
|
|
335
|
+
continuationData: ContinuationData,
|
|
342
336
|
callback: CallbackT<HistoryReadResult>
|
|
343
337
|
): void {
|
|
344
338
|
assert(historyReadRawModifiedDetails instanceof ReadRawModifiedDetails);
|
|
@@ -423,29 +417,20 @@ function _historyReadRaw(
|
|
|
423
417
|
// If the requested TimestampsToReturn is not supported for a Node, the operation shall return
|
|
424
418
|
// the Bad_TimestampNotSupported StatusCode.
|
|
425
419
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
return callback(null, result1);
|
|
437
|
-
}
|
|
438
|
-
const dataValues = cnt.dataValues.splice(0, historyReadRawModifiedDetails.numValuesPerNode);
|
|
439
|
-
if (cnt.dataValues.length > 0) {
|
|
440
|
-
//
|
|
441
|
-
} else {
|
|
442
|
-
context.continuationPoints![continuationPoint.toString("hex")] = null;
|
|
443
|
-
continuationPoint = null;
|
|
444
|
-
}
|
|
420
|
+
const session = context.session;
|
|
421
|
+
if (!session) {
|
|
422
|
+
throw new Error("Internal Error: context.session not defined");
|
|
423
|
+
}
|
|
424
|
+
if (continuationData.continuationPoint) {
|
|
425
|
+
const cnt = session.continuationPointManager.getNextHistoryReadRaw(
|
|
426
|
+
historyReadRawModifiedDetails.numValuesPerNode,
|
|
427
|
+
continuationData
|
|
428
|
+
);
|
|
429
|
+
const { statusCode, values } = cnt;
|
|
445
430
|
const result2 = new HistoryReadResult({
|
|
446
|
-
continuationPoint: continuationPoint
|
|
447
|
-
historyData: new HistoryData({ dataValues }),
|
|
448
|
-
statusCode
|
|
431
|
+
continuationPoint: cnt.continuationPoint,
|
|
432
|
+
historyData: new HistoryData({ dataValues: values }),
|
|
433
|
+
statusCode
|
|
449
434
|
});
|
|
450
435
|
return callback(null, result2);
|
|
451
436
|
}
|
|
@@ -493,6 +478,13 @@ function _historyReadRaw(
|
|
|
493
478
|
}
|
|
494
479
|
}
|
|
495
480
|
|
|
481
|
+
/*
|
|
482
|
+
const maxHistoryContinuationPoints = this.engine.serverCapabilities.maxHistoryContinuationPoints;
|
|
483
|
+
if (session.continuationPointManager.hasReachedMaximum(maxHistoryContinuationPoints)) {
|
|
484
|
+
return new HistoryReadResult({ statusCode: StatusCodes.BadNoContinuationPoints });
|
|
485
|
+
}
|
|
486
|
+
*/
|
|
487
|
+
|
|
496
488
|
(this as UAVariableImpl)._historyReadRawAsync(
|
|
497
489
|
historyReadRawModifiedDetails,
|
|
498
490
|
maxNumberToExtract,
|
|
@@ -503,31 +495,15 @@ function _historyReadRaw(
|
|
|
503
495
|
return callback(err);
|
|
504
496
|
}
|
|
505
497
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
statusCode: StatusCodes.GoodNoData
|
|
512
|
-
});
|
|
513
|
-
return callback(null, result1);
|
|
514
|
-
} else {
|
|
515
|
-
const remaining = dataValues;
|
|
516
|
-
dataValues = remaining.splice(0, historyReadRawModifiedDetails.numValuesPerNode);
|
|
517
|
-
|
|
518
|
-
if (remaining.length > 0 && !isMinDate(historyReadRawModifiedDetails.endTime)) {
|
|
519
|
-
continuationPoint = createContinuationPoint();
|
|
520
|
-
context.continuationPoints = context.continuationPoints || {};
|
|
521
|
-
context.continuationPoints[continuationPoint.toString("hex")] = {
|
|
522
|
-
dataValues: remaining
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
}
|
|
498
|
+
const cnt = session.continuationPointManager.registerHistoryReadRaw(
|
|
499
|
+
historyReadRawModifiedDetails.numValuesPerNode,
|
|
500
|
+
dataValues,
|
|
501
|
+
continuationData
|
|
502
|
+
);
|
|
527
503
|
const result = new HistoryReadResult({
|
|
528
|
-
continuationPoint: continuationPoint
|
|
529
|
-
historyData: new HistoryData({ dataValues }),
|
|
530
|
-
statusCode:
|
|
504
|
+
continuationPoint: cnt.continuationPoint,
|
|
505
|
+
historyData: new HistoryData({ dataValues: cnt.values }),
|
|
506
|
+
statusCode: cnt.statusCode
|
|
531
507
|
});
|
|
532
508
|
callback(null, result);
|
|
533
509
|
}
|
|
@@ -540,7 +516,7 @@ function _historyReadRawModify(
|
|
|
540
516
|
historyReadRawModifiedDetails: ReadRawModifiedDetails,
|
|
541
517
|
indexRange: NumericRange | null,
|
|
542
518
|
dataEncoding: QualifiedNameLike | null,
|
|
543
|
-
|
|
519
|
+
continuationData: ContinuationData,
|
|
544
520
|
callback: CallbackT<HistoryReadResult>
|
|
545
521
|
) {
|
|
546
522
|
const node = this as UAVariableImpl;
|
|
@@ -548,14 +524,14 @@ function _historyReadRawModify(
|
|
|
548
524
|
assert(historyReadRawModifiedDetails instanceof ReadRawModifiedDetails);
|
|
549
525
|
|
|
550
526
|
if (!historyReadRawModifiedDetails.isReadModified) {
|
|
551
|
-
return node._historyReadRaw(context, historyReadRawModifiedDetails, indexRange, dataEncoding,
|
|
527
|
+
return node._historyReadRaw(context, historyReadRawModifiedDetails, indexRange, dataEncoding, continuationData, callback);
|
|
552
528
|
} else {
|
|
553
529
|
return node._historyReadModify(
|
|
554
530
|
context,
|
|
555
531
|
historyReadRawModifiedDetails,
|
|
556
532
|
indexRange,
|
|
557
533
|
dataEncoding,
|
|
558
|
-
|
|
534
|
+
continuationData,
|
|
559
535
|
callback
|
|
560
536
|
);
|
|
561
537
|
}
|
|
@@ -567,13 +543,13 @@ function _historyRead(
|
|
|
567
543
|
historyReadDetails: ReadRawModifiedDetails | ReadEventDetails | ReadProcessedDetails | ReadAtTimeDetails,
|
|
568
544
|
indexRange: NumericRange | null,
|
|
569
545
|
dataEncoding: QualifiedNameLike | null,
|
|
570
|
-
|
|
546
|
+
continuationData: ContinuationData,
|
|
571
547
|
callback: CallbackT<HistoryReadResult>
|
|
572
548
|
) {
|
|
573
549
|
assert(callback instanceof Function);
|
|
574
550
|
if (historyReadDetails instanceof ReadRawModifiedDetails) {
|
|
575
551
|
// note: only ReadRawModifiedDetails supported at this time
|
|
576
|
-
return this._historyReadRawModify(context, historyReadDetails, indexRange, dataEncoding,
|
|
552
|
+
return this._historyReadRawModify(context, historyReadDetails, indexRange, dataEncoding, continuationData, callback);
|
|
577
553
|
} else if (historyReadDetails instanceof ReadEventDetails) {
|
|
578
554
|
// The ReadEventDetails structure is used to read the Events from the history database for the
|
|
579
555
|
// specified time domain for one or more HistoricalEventNodes. The Events are filtered based on
|
|
@@ -634,7 +610,7 @@ function _historyRead(
|
|
|
634
610
|
historyReadDetails,
|
|
635
611
|
indexRange,
|
|
636
612
|
dataEncoding,
|
|
637
|
-
|
|
613
|
+
continuationData,
|
|
638
614
|
callback
|
|
639
615
|
);
|
|
640
616
|
}
|
package/src/namespace_impl.ts
CHANGED
|
@@ -194,7 +194,7 @@ function detachNode(node: BaseNode) {
|
|
|
194
194
|
* @params options.publicationDate="" {Date}
|
|
195
195
|
*
|
|
196
196
|
*/
|
|
197
|
-
export class
|
|
197
|
+
export class NamespaceImpl implements NamespacePrivate {
|
|
198
198
|
public static _handle_hierarchy_parent = _handle_hierarchy_parent;
|
|
199
199
|
public static isNonEmptyQualifiedName = isNonEmptyQualifiedName;
|
|
200
200
|
|
|
@@ -237,8 +237,8 @@ export class UANamespace implements NamespacePrivate {
|
|
|
237
237
|
this._nodeIdManager = new NodeIdManager(this.index, this.addressSpace);
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
public getDefaultNamespace():
|
|
241
|
-
return this.index === 0 ? this : (this.addressSpace.getDefaultNamespace()
|
|
240
|
+
public getDefaultNamespace(): NamespacePrivate {
|
|
241
|
+
return this.index === 0 ? this : (this.addressSpace.getDefaultNamespace());
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
public dispose(): void {
|
|
@@ -1814,7 +1814,7 @@ export class UANamespace implements NamespacePrivate {
|
|
|
1814
1814
|
}
|
|
1815
1815
|
const references: UAReference[] = [];
|
|
1816
1816
|
|
|
1817
|
-
function process_subtypeOf_options(this:
|
|
1817
|
+
function process_subtypeOf_options(this: NamespaceImpl, options2: any, references1: AddReferenceOpts[]) {
|
|
1818
1818
|
// check common misspelling mistake
|
|
1819
1819
|
assert(!options2.subTypeOf, "misspell error : it should be 'subtypeOf' instead");
|
|
1820
1820
|
if (Object.prototype.hasOwnProperty.call(options2, "hasTypeDefinition")) {
|
|
@@ -2067,7 +2067,7 @@ function _handle_event_hierarchy_parent(
|
|
|
2067
2067
|
}
|
|
2068
2068
|
}
|
|
2069
2069
|
|
|
2070
|
-
export function _handle_hierarchy_parent(addressSpace: AddressSpacePrivate, references: AddReferenceOpts[], options: any) {
|
|
2070
|
+
export function _handle_hierarchy_parent(addressSpace: AddressSpacePrivate, references: AddReferenceOpts[], options: any): void {
|
|
2071
2071
|
options.componentOf = _coerce_parent(addressSpace, options.componentOf, addressSpace._coerceNode);
|
|
2072
2072
|
options.propertyOf = _coerce_parent(addressSpace, options.propertyOf, addressSpace._coerceNode);
|
|
2073
2073
|
options.organizedBy = _coerce_parent(addressSpace, options.organizedBy, addressSpace._coerceFolder);
|
package/src/namespace_private.ts
CHANGED
package/src/nodeid_manager.ts
CHANGED
|
@@ -65,7 +65,7 @@ export class NodeIdManager {
|
|
|
65
65
|
this.addressSpace = addressSpace;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
public setCache(cache: NodeEntry[]) {
|
|
68
|
+
public setCache(cache: NodeEntry[]): void {
|
|
69
69
|
this._cache = {};
|
|
70
70
|
this._reverseCache = {};
|
|
71
71
|
for (const [key, value, nodeClass] of cache) {
|
|
@@ -114,10 +114,7 @@ export class NodeIdManager {
|
|
|
114
114
|
public constructNodeId(options: ConstructNodeIdOptions): NodeId {
|
|
115
115
|
function prepareName(browseName: QualifiedName): string {
|
|
116
116
|
assert(browseName instanceof QualifiedName);
|
|
117
|
-
const m = browseName
|
|
118
|
-
.name!.toString()
|
|
119
|
-
.replace(/[ ]/g, "")
|
|
120
|
-
.replace(/(<|>)/g, "");
|
|
117
|
+
const m = browseName.name!.toString().replace(/[ ]/g, "").replace(/(<|>)/g, "");
|
|
121
118
|
return m;
|
|
122
119
|
}
|
|
123
120
|
let nodeId = options.nodeId;
|
|
@@ -51,7 +51,7 @@ import { UAReferenceTypeImpl } from "../ua_reference_type_impl";
|
|
|
51
51
|
import { UAObjectTypeImpl } from "../ua_object_type_impl";
|
|
52
52
|
import { UAVariableImpl } from "../ua_variable_impl";
|
|
53
53
|
import { UAObjectImpl } from "../ua_object_impl";
|
|
54
|
-
import {
|
|
54
|
+
import { NamespaceImpl } from "../namespace_impl";
|
|
55
55
|
import { UAMethodImpl } from "../ua_method_impl";
|
|
56
56
|
import { UADataTypeImpl } from "../ua_data_type_impl";
|
|
57
57
|
import { UAVariableTypeImpl } from "../ua_variable_type_impl";
|
|
@@ -697,15 +697,15 @@ function dumpCommonAttributes(xw: XmlWriter, node: BaseNode) {
|
|
|
697
697
|
xw.writeAttribute("NodeId", n(xw, node.nodeId));
|
|
698
698
|
xw.writeAttribute("BrowseName", b(xw, node.browseName));
|
|
699
699
|
|
|
700
|
-
if (Object.prototype.hasOwnProperty.call(node,"symbolicName")) {
|
|
700
|
+
if (Object.prototype.hasOwnProperty.call(node, "symbolicName")) {
|
|
701
701
|
xw.writeAttribute("SymbolicName", (node as any).symbolicName);
|
|
702
702
|
}
|
|
703
|
-
if (Object.prototype.hasOwnProperty.call(node,"isAbstract")) {
|
|
703
|
+
if (Object.prototype.hasOwnProperty.call(node, "isAbstract")) {
|
|
704
704
|
if ((node as any).isAbstract) {
|
|
705
705
|
xw.writeAttribute("IsAbstract", (node as any).isAbstract ? "true" : "false");
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
|
-
if (Object.prototype.hasOwnProperty.call(node,"accessLevel")) {
|
|
708
|
+
if (Object.prototype.hasOwnProperty.call(node, "accessLevel")) {
|
|
709
709
|
// CurrentRead is by default
|
|
710
710
|
if ((node as UAVariable).accessLevel !== currentReadFlag) {
|
|
711
711
|
xw.writeAttribute("AccessLevel", (node as UAVariable).accessLevel.toString());
|
|
@@ -1199,7 +1199,7 @@ UADataTypeImpl.prototype.dumpXML = function (xw: XmlWriter) {
|
|
|
1199
1199
|
dumpUADataType(xw, this);
|
|
1200
1200
|
};
|
|
1201
1201
|
|
|
1202
|
-
|
|
1202
|
+
NamespaceImpl.prototype.toNodeset2XML = function (this: NamespaceImpl) {
|
|
1203
1203
|
const dependency = constructNamespaceDependency(this);
|
|
1204
1204
|
const translationTable = constructNamespaceTranslationTable(dependency);
|
|
1205
1205
|
|
|
@@ -18,18 +18,18 @@ function dumpEnumeratedType(xw: XmlWriter, e: EnumDefinition, name: string): voi
|
|
|
18
18
|
for (const f of e.fields || []) {
|
|
19
19
|
xw.startElement("opc:EnumeratedValue");
|
|
20
20
|
xw.writeAttribute("Name", f.name!);
|
|
21
|
-
assert(f.value[0] === 0, "
|
|
21
|
+
assert(f.value[0] === 0, "unsupported 64 bit value !");
|
|
22
22
|
xw.writeAttribute("Value", f.value[1].toString());
|
|
23
23
|
xw.endElement();
|
|
24
24
|
}
|
|
25
25
|
xw.endElement();
|
|
26
26
|
}
|
|
27
|
-
function buildXmlName(addressSpace: AddressSpacePrivate, map: { [key: number]: string }, nodeId: NodeId) {
|
|
27
|
+
function buildXmlName(addressSpace: AddressSpacePrivate, map: { [key: number]: string }, nodeId: NodeId): string {
|
|
28
28
|
if (NodeId.sameNodeId(nodeId, NodeId.nullNodeId)) {
|
|
29
29
|
return "ua:ExtensionObject";
|
|
30
30
|
}
|
|
31
31
|
const node = addressSpace.findNode(nodeId);
|
|
32
|
-
//
|
|
32
|
+
// istanbul ignore next
|
|
33
33
|
if (!node) {
|
|
34
34
|
throw new Error("Cannot find Node for" + nodeId?.toString());
|
|
35
35
|
}
|
|
@@ -37,6 +37,8 @@ function buildXmlName(addressSpace: AddressSpacePrivate, map: { [key: number]: s
|
|
|
37
37
|
const prefix = node.nodeId.namespace === 0 ? (node.nodeId.value <= 15 ? "opc" : "ua") : map[node.nodeId.namespace];
|
|
38
38
|
return prefix + ":" + (typeName === "Structure" && prefix === "ua" ? "ExtensionObject" : typeName);
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
// eslint-disable-next-line max-statements
|
|
40
42
|
function dumpDataTypeStructure(
|
|
41
43
|
xw: XmlWriter,
|
|
42
44
|
addressSpace: IAddressSpace,
|
|
@@ -44,7 +46,7 @@ function dumpDataTypeStructure(
|
|
|
44
46
|
structureDefinition: StructureDefinition,
|
|
45
47
|
name: string,
|
|
46
48
|
doc?: string
|
|
47
|
-
) {
|
|
49
|
+
): void {
|
|
48
50
|
xw.startElement("opc:StructuredType");
|
|
49
51
|
xw.writeAttribute("Name", name);
|
|
50
52
|
xw.writeAttribute("BaseType", buildXmlName(addressSpace as AddressSpacePrivate, map, structureDefinition.baseDataType));
|
|
@@ -134,7 +136,7 @@ function dumpDataTypeToBSD(xw: XmlWriter, dataType: UADataType, map: { [key: num
|
|
|
134
136
|
function shortcut(namespace: INamespace) {
|
|
135
137
|
return "n" + namespace.index;
|
|
136
138
|
}
|
|
137
|
-
export function dumpToBSD(namespace: NamespacePrivate) {
|
|
139
|
+
export function dumpToBSD(namespace: NamespacePrivate): void {
|
|
138
140
|
const dependency: INamespace[] = constructNamespaceDependency(namespace);
|
|
139
141
|
|
|
140
142
|
const addressSpace = namespace.addressSpace;
|