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.
Files changed (329) hide show
  1. package/LICENSE +20 -20
  2. package/dist/source/address_space_ts.js.map +1 -1
  3. package/dist/source/continuation_points/continuation_point_manager.d.ts +27 -16
  4. package/dist/source/continuation_points/continuation_point_manager.js +141 -48
  5. package/dist/source/continuation_points/continuation_point_manager.js.map +1 -1
  6. package/dist/source/helpers/adjust_browse_direction.js.map +1 -1
  7. package/dist/source/helpers/call_helpers.js.map +1 -1
  8. package/dist/source/helpers/check_event_clause.js.map +1 -1
  9. package/dist/source/helpers/coerce_enum_value.js.map +1 -1
  10. package/dist/source/helpers/ensure_secure_access.js +0 -13
  11. package/dist/source/helpers/ensure_secure_access.js.map +1 -1
  12. package/dist/source/helpers/resolve_opaque_on_address_space.js.map +1 -1
  13. package/dist/source/loader/load_nodeset2.js +29 -3
  14. package/dist/source/loader/load_nodeset2.js.map +1 -1
  15. package/dist/source/loader/namespace_post_step.js.map +1 -1
  16. package/dist/source/loader/register_node_promoter.js.map +1 -1
  17. package/dist/source/namespace_machine_state.d.ts +1 -1
  18. package/dist/source/pseudo_session.js +23 -24
  19. package/dist/source/pseudo_session.js.map +1 -1
  20. package/dist/source/session_context.js +2 -2
  21. package/dist/source/session_context.js.map +1 -1
  22. package/dist/source/set_namespace_meta_data.js.map +1 -1
  23. package/dist/src/address_space.d.ts +7 -8
  24. package/dist/src/address_space.js +2 -2
  25. package/dist/src/address_space.js.map +1 -1
  26. package/dist/src/address_space_private.d.ts +4 -5
  27. package/dist/src/alarms_and_conditions/check_where_clause.js +1 -1
  28. package/dist/src/alarms_and_conditions/check_where_clause.js.map +1 -1
  29. package/dist/src/alarms_and_conditions/condition.js.map +1 -1
  30. package/dist/src/alarms_and_conditions/extract_event_fields.js.map +1 -1
  31. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +2 -1
  32. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
  33. package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -1
  34. package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
  35. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -1
  36. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -1
  37. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -1
  38. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -1
  39. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
  40. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -1
  41. package/dist/src/base_node_impl.js.map +1 -1
  42. package/dist/src/data_access/add_dataItem_stuff.js.map +1 -1
  43. package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js.map +1 -1
  44. package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -1
  45. package/dist/src/event_data.js.map +1 -1
  46. package/dist/src/extension_object_array_node.js.map +1 -1
  47. package/dist/src/historical_access/address_space_historical_data_node.js +28 -59
  48. package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -1
  49. package/dist/src/namespace_impl.d.ts +2 -2
  50. package/dist/src/namespace_impl.js +6 -6
  51. package/dist/src/namespace_impl.js.map +1 -1
  52. package/dist/src/nodeid_manager.js +1 -4
  53. package/dist/src/nodeid_manager.js.map +1 -1
  54. package/dist/src/nodeset_tools/nodeset_to_xml.js +1 -1
  55. package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
  56. package/dist/src/nodeset_tools/typedictionary_to_xml.d.ts +1 -1
  57. package/dist/src/nodeset_tools/typedictionary_to_xml.js +3 -2
  58. package/dist/src/nodeset_tools/typedictionary_to_xml.js.map +1 -1
  59. package/dist/src/reference_impl.js +3 -1
  60. package/dist/src/reference_impl.js.map +1 -1
  61. package/dist/src/state_machine/finite_state_machine.js.map +1 -1
  62. package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
  63. package/dist/src/state_machine/ua_two_state_variable.js.map +1 -1
  64. package/dist/src/tool_isSupertypeOf.js.map +1 -1
  65. package/dist/src/ua_method_impl.d.ts +3 -2
  66. package/dist/src/ua_method_impl.js +5 -0
  67. package/dist/src/ua_method_impl.js.map +1 -1
  68. package/dist/src/ua_object_impl.d.ts +10 -6
  69. package/dist/src/ua_object_impl.js +1 -1
  70. package/dist/src/ua_object_impl.js.map +1 -1
  71. package/dist/src/ua_object_type_impl.js.map +1 -1
  72. package/dist/src/ua_reference_type_impl.js +3 -1
  73. package/dist/src/ua_reference_type_impl.js.map +1 -1
  74. package/dist/src/ua_variable_impl.d.ts +8 -7
  75. package/dist/src/ua_variable_impl.js +6 -10
  76. package/dist/src/ua_variable_impl.js.map +1 -1
  77. package/dist/src/ua_variable_type_impl.js.map +1 -1
  78. package/dist/src/ua_view_impl.js.map +1 -1
  79. package/distHelpers/add_event_generator_object.js.map +1 -1
  80. package/distHelpers/alarms_and_conditions_demo.js.map +1 -1
  81. package/distHelpers/boiler_system.d.ts +1 -1
  82. package/distHelpers/boiler_system.js +1 -2
  83. package/distHelpers/boiler_system.js.map +1 -1
  84. package/distHelpers/create_minimalist_address_space_nodeset.js +1 -0
  85. package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -1
  86. package/distHelpers/date_utils.d.ts +3 -0
  87. package/distHelpers/date_utils.js +10 -0
  88. package/distHelpers/date_utils.js.map +1 -0
  89. package/distHelpers/get_mini_address_space.js.map +1 -1
  90. package/distHelpers/index.d.ts +2 -0
  91. package/distHelpers/index.js +2 -0
  92. package/distHelpers/index.js.map +1 -1
  93. package/distHelpers/mock_session.d.ts +14 -0
  94. package/distHelpers/mock_session.js +26 -0
  95. package/distHelpers/mock_session.js.map +1 -0
  96. package/generate.js +1 -1
  97. package/nodeJS.d.ts +1 -1
  98. package/package.json +32 -32
  99. package/source/address_space_ts.ts +0 -3
  100. package/source/continuation_points/continuation_point_manager.ts +178 -64
  101. package/source/helpers/adjust_browse_direction.ts +3 -3
  102. package/source/helpers/argument_list.ts +1 -1
  103. package/source/helpers/call_helpers.ts +0 -1
  104. package/source/helpers/check_event_clause.ts +2 -9
  105. package/source/helpers/coerce_enum_value.ts +3 -3
  106. package/source/helpers/ensure_secure_access.ts +1 -13
  107. package/source/helpers/resolve_opaque_on_address_space.ts +4 -1
  108. package/source/interfaces/alarms_and_conditions/condition_info_i.ts +13 -13
  109. package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +0 -1
  110. package/source/interfaces/data_access/ua_y_array_item_ex.ts +4 -2
  111. package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +5 -1
  112. package/source/interfaces/state_machine/ua_state_machine_type.ts +2 -2
  113. package/source/loader/load_nodeset2.ts +39 -3
  114. package/source/loader/namespace_post_step.ts +1 -2
  115. package/source/loader/register_node_promoter.ts +4 -1
  116. package/source/namespace.ts +4 -6
  117. package/source/namespace_machine_state.ts +1 -2
  118. package/source/pseudo_session.ts +37 -29
  119. package/source/session_context.ts +2 -9
  120. package/source/set_namespace_meta_data.ts +21 -15
  121. package/source/xml_writer.ts +0 -1
  122. package/source_nodejs/index.ts +1 -1
  123. package/src/address_space.ts +17 -16
  124. package/src/address_space_private.ts +7 -12
  125. package/src/alarms_and_conditions/check_where_clause.ts +21 -22
  126. package/src/alarms_and_conditions/condition.ts +0 -1
  127. package/src/alarms_and_conditions/extract_event_fields.ts +0 -1
  128. package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +14 -10
  129. package/src/alarms_and_conditions/ua_base_event_impl.ts +11 -15
  130. package/src/alarms_and_conditions/ua_condition_impl.ts +35 -40
  131. package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +39 -33
  132. package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +2 -2
  133. package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +4 -5
  134. package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +16 -16
  135. package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +8 -8
  136. package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +9 -10
  137. package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +2 -4
  138. package/src/apply_condition_refresh.ts +2 -2
  139. package/src/base_node_impl.ts +2 -2
  140. package/src/data_access/add_dataItem_stuff.ts +4 -4
  141. package/src/data_access/check_variant_compatibility_ua_analog_item.ts +12 -15
  142. package/src/data_access/ua_multistate_discrete_impl.ts +6 -3
  143. package/src/data_access/ua_multistate_value_discrete.ts +1 -1
  144. package/src/event_data.ts +1 -7
  145. package/src/extension_object_array_node.ts +4 -10
  146. package/src/historical_access/address_space_historical_data_node.ts +39 -63
  147. package/src/namespace_impl.ts +5 -5
  148. package/src/namespace_private.ts +1 -1
  149. package/src/nodeid_manager.ts +2 -5
  150. package/src/nodeset_tools/nodeset_to_xml.ts +5 -5
  151. package/src/nodeset_tools/typedictionary_to_xml.ts +7 -5
  152. package/src/reference_impl.ts +4 -2
  153. package/src/state_machine/finite_state_machine.ts +426 -428
  154. package/src/state_machine/ua_shelving_state_machine_ex.ts +19 -9
  155. package/src/state_machine/ua_two_state_variable.ts +5 -7
  156. package/src/tool_isSupertypeOf.ts +2 -6
  157. package/src/ua_condition_type.ts +0 -1
  158. package/src/ua_method_impl.ts +25 -9
  159. package/src/ua_object_impl.ts +13 -8
  160. package/src/ua_object_type_impl.ts +7 -4
  161. package/src/ua_reference_type_impl.ts +6 -12
  162. package/src/ua_variable_impl.ts +11 -15
  163. package/src/ua_variable_type_impl.ts +2 -2
  164. package/src/ua_view_impl.ts +3 -6
  165. package/testHelpers.d.ts +1 -1
  166. package/test_helpers/add_event_generator_object.ts +6 -5
  167. package/test_helpers/alarms_and_conditions_demo.ts +9 -8
  168. package/test_helpers/assertHasMatchingReference.ts +43 -43
  169. package/test_helpers/boiler_system.ts +610 -618
  170. package/test_helpers/create_minimalist_address_space_nodeset.ts +13 -13
  171. package/test_helpers/date_utils.ts +5 -0
  172. package/test_helpers/dump_statemachine.ts +2 -2
  173. package/test_helpers/get_address_space_fixture.ts +30 -30
  174. package/test_helpers/get_mini_address_space.ts +42 -42
  175. package/test_helpers/index.ts +13 -11
  176. package/test_helpers/mock_session.ts +34 -0
  177. package/test_helpers/test_fixtures/dataType_in_separateNamespace.xml +150 -150
  178. package/test_helpers/test_fixtures/dataType_in_separateNamespace_basic.xml +57 -57
  179. package/test_helpers/test_fixtures/dataType_in_separateNamespace_mix.xml +135 -135
  180. package/test_helpers/test_fixtures/dataType_withEnumeration.xml +82 -82
  181. package/test_helpers/test_fixtures/dataType_with_isOptionSet.xml +194 -194
  182. package/test_helpers/test_fixtures/dataType_with_union.xml +1 -1
  183. package/test_helpers/test_fixtures/fixture_empty_nodeset2.xml +106 -106
  184. package/test_helpers/test_fixtures/fixture_simple_statemachine_nodeset2.xml +1303 -1303
  185. package/test_helpers/test_fixtures/fixuture_nodeset_objects_with_some_methods.xml +362 -362
  186. package/test_helpers/test_fixtures/issue_846.xml +3172 -3172
  187. package/test_helpers/test_fixtures/issue_899_variable_with_nodeid_value.xml +32 -32
  188. package/test_helpers/test_fixtures/mini.nodeset.withVariousVariables.xml +194 -194
  189. package/test_helpers/test_fixtures/minimalist_nodeset_with_models.xml +8 -8
  190. package/test_helpers/test_fixtures/minimalist_nodeset_with_models_more_complex.xml +16 -16
  191. package/test_helpers/test_fixtures/nodeset_with_analog_items.xml +45 -45
  192. package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.d.ts +0 -23
  193. package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js +0 -3
  194. package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js.map +0 -1
  195. package/dist/source/interfaces/data_access/ua_discrete_item.d.ts +0 -6
  196. package/dist/source/interfaces/data_access/ua_discrete_item.js +0 -3
  197. package/dist/source/interfaces/data_access/ua_discrete_item.js.map +0 -1
  198. package/dist/source/interfaces/data_access/ua_multistate_discrete.d.ts +0 -25
  199. package/dist/source/interfaces/data_access/ua_multistate_discrete.js +0 -3
  200. package/dist/source/interfaces/data_access/ua_multistate_discrete.js.map +0 -1
  201. package/dist/source/interfaces/data_access/ua_multistate_value_discrete.d.ts +0 -27
  202. package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js +0 -3
  203. package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js.map +0 -1
  204. package/dist/source/interfaces/data_access/ua_two_state_discrete.d.ts +0 -17
  205. package/dist/source/interfaces/data_access/ua_two_state_discrete.js +0 -3
  206. package/dist/source/interfaces/data_access/ua_two_state_discrete.js.map +0 -1
  207. package/dist/source/interfaces/data_access/ua_y_array_item.d.ts +0 -19
  208. package/dist/source/interfaces/data_access/ua_y_array_item.js +0 -3
  209. package/dist/source/interfaces/data_access/ua_y_array_item.js.map +0 -1
  210. package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.d.ts +0 -11
  211. package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js +0 -3
  212. package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js.map +0 -1
  213. package/dist/source/interfaces/state_machine/finite_state_machine.d.ts +0 -70
  214. package/dist/source/interfaces/state_machine/finite_state_machine.js +0 -3
  215. package/dist/source/interfaces/state_machine/finite_state_machine.js.map +0 -1
  216. package/dist/source/interfaces/state_machine/program_finite_state_machine.d.ts +0 -74
  217. package/dist/source/interfaces/state_machine/program_finite_state_machine.js +0 -3
  218. package/dist/source/interfaces/state_machine/program_finite_state_machine.js.map +0 -1
  219. package/dist/source/interfaces/state_machine/state_machine.d.ts +0 -342
  220. package/dist/source/interfaces/state_machine/state_machine.js +0 -3
  221. package/dist/source/interfaces/state_machine/state_machine.js.map +0 -1
  222. package/dist/source/interfaces/state_machine/ua_finite_state_variable.d.ts +0 -18
  223. package/dist/source/interfaces/state_machine/ua_finite_state_variable.js +0 -3
  224. package/dist/source/interfaces/state_machine/ua_finite_state_variable.js.map +0 -1
  225. package/dist/source/interfaces/state_machine/ua_state_variable.d.ts +0 -29
  226. package/dist/source/interfaces/state_machine/ua_state_variable.js +0 -3
  227. package/dist/source/interfaces/state_machine/ua_state_variable.js.map +0 -1
  228. package/dist/source/interfaces/state_machine/ua_two_state_variable.d.ts +0 -26
  229. package/dist/source/interfaces/state_machine/ua_two_state_variable.js +0 -3
  230. package/dist/source/interfaces/state_machine/ua_two_state_variable.js.map +0 -1
  231. package/dist/source/interfaces/subscription_diagnostics_variable.d.ts +0 -41
  232. package/dist/source/interfaces/subscription_diagnostics_variable.js +0 -3
  233. package/dist/source/interfaces/subscription_diagnostics_variable.js.map +0 -1
  234. package/dist/src/alarms_and_conditions/base_event_type.d.ts +0 -26
  235. package/dist/src/alarms_and_conditions/base_event_type.js +0 -41
  236. package/dist/src/alarms_and_conditions/base_event_type.js.map +0 -1
  237. package/dist/src/alarms_and_conditions/shelving_state_machine.d.ts +0 -22
  238. package/dist/src/alarms_and_conditions/shelving_state_machine.js +0 -241
  239. package/dist/src/alarms_and_conditions/shelving_state_machine.js.map +0 -1
  240. package/dist/src/alarms_and_conditions/trip_alarm.d.ts +0 -16
  241. package/dist/src/alarms_and_conditions/trip_alarm.js +0 -21
  242. package/dist/src/alarms_and_conditions/trip_alarm.js.map +0 -1
  243. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.d.ts +0 -54
  244. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js +0 -255
  245. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js.map +0 -1
  246. package/dist/src/alarms_and_conditions/ua_alarm_condition_base.d.ts +0 -138
  247. package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js +0 -460
  248. package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js.map +0 -1
  249. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.d.ts +0 -35
  250. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js +0 -32
  251. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js.map +0 -1
  252. package/dist/src/alarms_and_conditions/ua_condition_base.d.ts +0 -191
  253. package/dist/src/alarms_and_conditions/ua_condition_base.js +0 -1029
  254. package/dist/src/alarms_and_conditions/ua_condition_base.js.map +0 -1
  255. package/dist/src/alarms_and_conditions/ua_discrete_alarm.d.ts +0 -11
  256. package/dist/src/alarms_and_conditions/ua_discrete_alarm.js +0 -58
  257. package/dist/src/alarms_and_conditions/ua_discrete_alarm.js.map +0 -1
  258. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.d.ts +0 -24
  259. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js +0 -59
  260. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js.map +0 -1
  261. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.d.ts +0 -14
  262. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js +0 -17
  263. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js.map +0 -1
  264. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.d.ts +0 -22
  265. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js +0 -87
  266. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js.map +0 -1
  267. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.d.ts +0 -6
  268. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js +0 -11
  269. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js.map +0 -1
  270. package/dist/src/alarms_and_conditions/ua_limit_alarm.d.ts +0 -76
  271. package/dist/src/alarms_and_conditions/ua_limit_alarm.js +0 -237
  272. package/dist/src/alarms_and_conditions/ua_limit_alarm.js.map +0 -1
  273. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.d.ts +0 -27
  274. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js +0 -62
  275. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js.map +0 -1
  276. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.d.ts +0 -49
  277. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js +0 -176
  278. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js.map +0 -1
  279. package/dist/src/alarms_and_conditions/ua_off_normal_alarm.d.ts +0 -47
  280. package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js +0 -151
  281. package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js.map +0 -1
  282. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.d.ts +0 -16
  283. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js +0 -18
  284. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js.map +0 -1
  285. package/dist/src/base_node.d.ts +0 -289
  286. package/dist/src/base_node.js +0 -1345
  287. package/dist/src/base_node.js.map +0 -1
  288. package/dist/src/data_access/ua_analog_item.d.ts +0 -13
  289. package/dist/src/data_access/ua_analog_item.js +0 -37
  290. package/dist/src/data_access/ua_analog_item.js.map +0 -1
  291. package/dist/src/data_access/ua_data_item.d.ts +0 -16
  292. package/dist/src/data_access/ua_data_item.js +0 -66
  293. package/dist/src/data_access/ua_data_item.js.map +0 -1
  294. package/dist/src/data_access/ua_multistate_discrete.d.ts +0 -24
  295. package/dist/src/data_access/ua_multistate_discrete.js +0 -132
  296. package/dist/src/data_access/ua_multistate_discrete.js.map +0 -1
  297. package/dist/src/namespace.d.ts +0 -472
  298. package/dist/src/namespace.js +0 -1751
  299. package/dist/src/namespace.js.map +0 -1
  300. package/dist/src/reference.d.ts +0 -43
  301. package/dist/src/reference.js +0 -138
  302. package/dist/src/reference.js.map +0 -1
  303. package/dist/src/session_context.d.ts +0 -4
  304. package/dist/src/session_context.js +0 -9
  305. package/dist/src/session_context.js.map +0 -1
  306. package/dist/src/ua_data_type.d.ts +0 -83
  307. package/dist/src/ua_data_type.js +0 -289
  308. package/dist/src/ua_data_type.js.map +0 -1
  309. package/dist/src/ua_method.d.ts +0 -41
  310. package/dist/src/ua_method.js +0 -202
  311. package/dist/src/ua_method.js.map +0 -1
  312. package/dist/src/ua_object.d.ts +0 -28
  313. package/dist/src/ua_object.js +0 -153
  314. package/dist/src/ua_object.js.map +0 -1
  315. package/dist/src/ua_object_type.d.ts +0 -49
  316. package/dist/src/ua_object_type.js +0 -123
  317. package/dist/src/ua_object_type.js.map +0 -1
  318. package/dist/src/ua_reference_type.d.ts +0 -42
  319. package/dist/src/ua_reference_type.js +0 -138
  320. package/dist/src/ua_reference_type.js.map +0 -1
  321. package/dist/src/ua_variable.d.ts +0 -339
  322. package/dist/src/ua_variable.js +0 -1706
  323. package/dist/src/ua_variable.js.map +0 -1
  324. package/dist/src/ua_variable_type.d.ts +0 -57
  325. package/dist/src/ua_variable_type.js +0 -530
  326. package/dist/src/ua_variable_type.js.map +0 -1
  327. package/dist/src/ua_view.d.ts +0 -16
  328. package/dist/src/ua_view.js +0 -42
  329. package/dist/src/ua_view.js.map +0 -1
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mockSession = exports.MockContinuationPointManager = void 0;
4
+ const node_opcua_nodeid_1 = require("node-opcua-nodeid");
5
+ class MockContinuationPointManager {
6
+ registerHistoryReadRaw(maxElements, dataValues, cnt) {
7
+ throw new Error("Method not implemented.");
8
+ }
9
+ getNextHistoryReadRaw(numValues, cnt) {
10
+ throw new Error("Method not implemented.");
11
+ }
12
+ registerReferences(maxElements, values, cnt) {
13
+ throw new Error("Method not implemented.");
14
+ }
15
+ getNextReferences(numValue, cnt) {
16
+ throw new Error("Method not implemented.");
17
+ }
18
+ }
19
+ exports.MockContinuationPointManager = MockContinuationPointManager;
20
+ exports.mockSession = {
21
+ getSessionId() {
22
+ return node_opcua_nodeid_1.NodeId.nullNodeId;
23
+ },
24
+ continuationPointManager: new MockContinuationPointManager()
25
+ };
26
+ //# sourceMappingURL=mock_session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mock_session.js","sourceRoot":"","sources":["../test_helpers/mock_session.ts"],"names":[],"mappings":";;;AAEA,yDAA2C;AAG3C,MAAa,4BAA4B;IAC9B,sBAAsB,CACzB,WAAmB,EACnB,UAAuB,EACvB,GAAqB;QAErB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IACM,qBAAqB,CAAC,SAAiB,EAAE,GAAqB;QACjE,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IACM,kBAAkB,CACrB,WAAmB,EACnB,MAA8B,EAC9B,GAAqB;QAErB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IACM,iBAAiB,CAAC,QAAgB,EAAE,GAAqB;QAC5D,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;CACJ;AArBD,oEAqBC;AAEY,QAAA,WAAW,GAAG;IACvB,YAAY;QACR,OAAO,0BAAM,CAAC,UAAU,CAAC;IAC7B,CAAC;IACD,wBAAwB,EAAE,IAAI,4BAA4B,EAAE;CAC/D,CAAC"}
package/generate.js CHANGED
@@ -1 +1 @@
1
- const generator = require("node-opcua-generator");
1
+ const generator = require("node-opcua-generator");
package/nodeJS.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./distNodeJS";
1
+ export * from "./distNodeJS";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-opcua-address-space",
3
- "version": "2.55.0",
3
+ "version": "2.58.0",
4
4
  "description": "pure nodejs OPCUA SDK - module -address-space",
5
5
  "main": "./dist/src/index_current.js",
6
6
  "types": "./dist/source/index.d.ts",
@@ -10,7 +10,8 @@
10
10
  "scripts": {
11
11
  "build": "tsc -b",
12
12
  "test": "mocha",
13
- "lint": "eslint source/**/*.ts",
13
+ "lint": "eslint source test src source_nodejs test_helpers",
14
+ "format": "prettier --write source test src source_nodejs test_helpers",
14
15
  "clean": "node -e \"require('rimraf').sync('dist');\"",
15
16
  "c": "mocha --version"
16
17
  },
@@ -20,49 +21,48 @@
20
21
  "chalk": "4.1.2",
21
22
  "dequeue": "^1.0.5",
22
23
  "lodash": "4.17.21",
23
- "node-opcua-address-space-base": "2.55.0",
24
+ "node-opcua-address-space-base": "2.58.0",
24
25
  "node-opcua-assert": "2.55.0",
25
- "node-opcua-basic-types": "2.55.0",
26
- "node-opcua-client-dynamic-extension-object": "2.55.0",
26
+ "node-opcua-basic-types": "2.57.0",
27
+ "node-opcua-client-dynamic-extension-object": "2.57.0",
27
28
  "node-opcua-constants": "2.52.0",
28
- "node-opcua-data-access": "2.55.0",
29
- "node-opcua-data-model": "2.55.0",
30
- "node-opcua-data-value": "2.55.0",
29
+ "node-opcua-data-access": "2.57.0",
30
+ "node-opcua-data-model": "2.57.0",
31
+ "node-opcua-data-value": "2.57.0",
31
32
  "node-opcua-date-time": "2.55.0",
32
33
  "node-opcua-debug": "2.55.0",
33
34
  "node-opcua-enum": "2.55.0",
34
- "node-opcua-factory": "2.55.0",
35
+ "node-opcua-factory": "2.57.0",
35
36
  "node-opcua-nodeid": "2.55.0",
36
- "node-opcua-nodeset-ua": "2.55.0",
37
- "node-opcua-numeric-range": "2.55.0",
38
- "node-opcua-object-registry": "2.55.0",
39
- "node-opcua-pseudo-session": "2.55.0",
40
- "node-opcua-schemas": "2.55.0",
41
- "node-opcua-service-browse": "2.55.0",
42
- "node-opcua-service-call": "2.55.0",
43
- "node-opcua-service-filter": "2.55.0",
44
- "node-opcua-service-history": "2.55.0",
45
- "node-opcua-service-translate-browse-path": "2.55.0",
46
- "node-opcua-service-write": "2.55.0",
47
- "node-opcua-status-code": "2.55.0",
48
- "node-opcua-types": "2.55.0",
49
- "node-opcua-utils": "2.55.0",
50
- "node-opcua-variant": "2.55.0",
51
- "node-opcua-xml2json": "2.55.0",
37
+ "node-opcua-nodeset-ua": "2.58.0",
38
+ "node-opcua-numeric-range": "2.57.0",
39
+ "node-opcua-object-registry": "2.56.0",
40
+ "node-opcua-pseudo-session": "2.57.0",
41
+ "node-opcua-schemas": "2.57.0",
42
+ "node-opcua-service-browse": "2.57.0",
43
+ "node-opcua-service-call": "2.57.0",
44
+ "node-opcua-service-filter": "2.57.0",
45
+ "node-opcua-service-history": "2.57.0",
46
+ "node-opcua-service-translate-browse-path": "2.57.0",
47
+ "node-opcua-service-write": "2.57.0",
48
+ "node-opcua-status-code": "2.56.0",
49
+ "node-opcua-types": "2.57.0",
50
+ "node-opcua-utils": "2.57.0",
51
+ "node-opcua-variant": "2.57.0",
52
+ "node-opcua-xml2json": "2.57.0",
52
53
  "set-prototype-of": "^1.0.0",
53
54
  "thenify": "^3.3.1",
54
55
  "xml-writer": "^1.7.0"
55
56
  },
56
57
  "devDependencies": {
57
- "date-utils": "^1.2.21",
58
58
  "humanize": "0.0.9",
59
59
  "node-opcua-benchmarker": "2.55.0",
60
60
  "node-opcua-binary-stream": "2.55.0",
61
- "node-opcua-extension-object": "2.55.0",
62
- "node-opcua-leak-detector": "2.55.0",
63
- "node-opcua-nodesets": "2.51.0",
64
- "node-opcua-packet-analyzer": "2.55.0",
65
- "node-opcua-test-fixtures": "2.55.0",
61
+ "node-opcua-extension-object": "2.57.0",
62
+ "node-opcua-leak-detector": "2.56.0",
63
+ "node-opcua-nodesets": "2.57.0",
64
+ "node-opcua-packet-analyzer": "2.57.0",
65
+ "node-opcua-test-fixtures": "2.57.0",
66
66
  "should": "^13.2.3",
67
67
  "sinon": "^11.1.2",
68
68
  "source-map-support": "^0.5.20"
@@ -82,5 +82,5 @@
82
82
  "internet of things"
83
83
  ],
84
84
  "homepage": "http://node-opcua.github.io/",
85
- "gitHead": "28fdbfe1c5306fd0e69758ccacfa2c6d1722115c"
85
+ "gitHead": "a5d0c4ddd44eda6a4710afd6d98f9b16033a95b0"
86
86
  }
@@ -37,7 +37,6 @@ import { MinimalistAddressSpace } from "../src/reference_impl";
37
37
  import { Namespace } from "./namespace";
38
38
  import { UARootFolder } from "./ua_root_folder";
39
39
 
40
-
41
40
  export declare function resolveReferenceType(addressSpace: MinimalistAddressSpace, reference: UAReference): UAReferenceType;
42
41
 
43
42
  export declare function resolveReferenceNode(addressSpace: MinimalistAddressSpace, reference: UAReference): BaseNode;
@@ -125,7 +124,6 @@ export interface XAxisDefinitionVariable extends UAVariable {
125
124
  euRange: RangeVariable;
126
125
  }
127
126
 
128
-
129
127
  export declare const NamespaceOptions: { nodeIdNameSeparator: string };
130
128
 
131
129
  export interface UATypesFolder extends UAFolder {
@@ -187,7 +185,6 @@ export declare class VariableHistorian implements IVariableHistorian {
187
185
 
188
186
  export type UAClonable = UAObject | UAVariable | UAMethod;
189
187
 
190
-
191
188
  export interface Enumeration extends UAVariable {}
192
189
  export declare function createExtObjArrayNode<T extends ExtensionObject>(
193
190
  parentFolder: UAObject,
@@ -1,11 +1,73 @@
1
1
  /**
2
2
  * @module node-opcua-server
3
3
  */
4
- import { assert } from "node-opcua-assert";
5
4
  import { StatusCode, StatusCodes } from "node-opcua-status-code";
6
5
  import { BrowseResultOptions, ReferenceDescription } from "node-opcua-types";
7
- import { ContinuationPoint } from "node-opcua-address-space-base";
6
+ import {
7
+ ContinuationPoint,
8
+ IContinuationPointManager,
9
+ IContinuationPointInfo,
10
+ ContinuationData
11
+ } from "node-opcua-address-space-base";
12
+ import { DataValue } from "node-opcua-data-value";
13
+ import { runInThisContext } from "vm";
8
14
 
15
+ /**
16
+ * from https://reference.opcfoundation.org/v104/Core/docs/Part4/7.6/
17
+ *
18
+ * A ContinuationPoint is used to pause a Browse, QueryFirst or HistoryRead operation and allow it to be restarted later by calling BrowseNext,
19
+ * QueryNext or HistoryRead.
20
+ * - Operations are paused when the number of results found exceeds the limits set by either the Client or the Server.
21
+ * - The Client specifies the maximum number of results per operation in the request message.
22
+ * - A Server shall not return more than this number of results but it may return fewer results.
23
+ * - The Server allocates a ContinuationPoint if there are more results to return.
24
+ * - Servers shall support at least one ContinuationPoint per Session.
25
+ * - Servers specify a maximum number of ContinuationPoints per Session in the ServerCapabilities Object defined in OPC 10000-5.
26
+ * - ContinuationPoints remain active until
27
+ * a/ the Client retrieves the remaining results,
28
+ * b/ or, the Client releases the ContinuationPoint
29
+ * c/ or the Session is closed.
30
+ * - A Server shall automatically free ContinuationPoints from prior requests from a Session if they are needed to process a new request
31
+ * from this Session.
32
+ * - The Server returns a Bad_ContinuationPointInvalid error if a Client tries to use a ContinuationPoint that has been released.
33
+ * - A Client can avoid this situation by completing paused operations before starting new operations.
34
+ * - Requests will often specify multiple operations that may or may not require a ContinuationPoint.
35
+ * - A Server shall process the operations until it uses the maximum number of continuation points in this response.
36
+ * Once that happens the Server shall return a Bad_NoContinuationPoints error for any remaining operations. A Client can avoid
37
+ * this situation by sending requests with a number of operations that do not exceed the maximum number of ContinuationPoints
38
+ * per Session defined for the Service in the ServerCapabilities Object defined in OPC 10000-5.
39
+ * A Client restarts an operation by passing the ContinuationPoint back to the Server. Server should always be able to reuse the ContinuationPoint
40
+ * provided so Servers shall never return Bad_NoContinuationPoints error when continuing a previously halted operation.
41
+ * A ContinuationPoint is a subtype of the ByteString data type.
42
+ *
43
+ *
44
+ * for historical access: https://reference.opcfoundation.org/v104/Core/docs/Part11/6.3/
45
+ *
46
+ * The continuationPoint parameter in the HistoryRead Service is used to mark a point from which to continue
47
+ * the read if not all values could be returned in one response. The value is opaque for the Client and is
48
+ * only used to maintain the state information for the Server to continue from. *
49
+ *
50
+ * For HistoricalDataNode requests, a Server may use the timestamp of the last returned data item if the timestamp
51
+ * is unique. This can reduce the need in the Server to store state information for the continuation point.
52
+ * The Client specifies the maximum number of results per operation in the request Message. A Server shall
53
+ * not return more than this number of results but it may return fewer results. The Server allocates a
54
+ * ContinuationPoint if there are more results to return. The Server may return fewer results due to buffer issues
55
+ * or other internal constraints. It may also be required to return a continuationPoint due to HistoryRead
56
+ * parameter constraints. If a request is taking a long time to calculate and is approaching the timeout time, the
57
+ * Server may return partial results with a continuation point. This may be done if the calculation is going to
58
+ * take more time than the Client timeout. In some cases it may take longer than the Client timeout to calculate
59
+ * even one result. Then the Server may return zero results with a continuation point that allows the Server to
60
+ * resume the calculation on the next Client read call. For additional discussions regarding ContinuationPoints
61
+ * and HistoryRead please see the individual extensible HistoryReadDetails parameter in 6.4.
62
+ * If the Client specifies a ContinuationPoint, then the HistoryReadDetails parameter and the TimestampsToReturn
63
+ * parameter are ignored, because it does not make sense to request different parameters when continuing from a
64
+ * previous call. It is permissible to change the dataEncoding parameter with each request.
65
+ * If the Client specifies a ContinuationPoint that is no longer valid, then the Server shall return a
66
+ * Bad_ContinuationPointInvalid error.
67
+ * If the releaseContinuationPoints parameter is set in the request the Server shall not return any data and shall
68
+ * release all ContinuationPoints passed in the request. If the ContinuationPoint for an operation is missing or
69
+ * invalid then the StatusCode for the operation shall be Bad_ContinuationPointInvalid.
70
+ */
9
71
  let counter = 0;
10
72
 
11
73
  function make_key() {
@@ -14,107 +76,159 @@ function make_key() {
14
76
  return Buffer.from(counter.toString(), "ascii");
15
77
  }
16
78
 
17
- export interface ContinuationPointInfo extends BrowseResultOptions {
18
- continuationPoint?: ContinuationPoint;
19
- references?: ReferenceDescription[];
20
- statusCode: StatusCode;
79
+ interface Data {
80
+ maxElements: number;
81
+ values: ReferenceDescription[] | DataValue[];
21
82
  }
22
-
23
- export class ContinuationPointManager {
24
- private readonly _map: any;
83
+ export class ContinuationPointManager implements IContinuationPointManager {
84
+ private _map: Map<string, Data>;
25
85
 
26
86
  constructor() {
27
- this._map = {};
87
+ this._map = new Map();
28
88
  }
29
89
 
30
90
  /**
31
- * returns true if the current number of active continuation point has reach the limit
32
- * specified in maxBrowseContinuationPoint
91
+ * returns true if the current number of active continuation point has reached the limit
92
+ * specified in maxContinuationPoint
33
93
  * @param maxBrowseContinuationPoint
34
94
  */
35
- public hasReachMaximum(maxBrowseContinuationPoint: number): boolean {
36
- if (maxBrowseContinuationPoint === 0) {
95
+ public hasReachedMaximum(maxContinuationPoint: number): boolean {
96
+ if (maxContinuationPoint === 0) {
37
97
  return false;
38
98
  }
39
- const nbContinuationPoints = Object.keys(this._map).length;
40
- return nbContinuationPoints >= maxBrowseContinuationPoint;
99
+ const nbContinuationPoints = this._map.size;
100
+ return nbContinuationPoints >= maxContinuationPoint;
101
+ }
102
+
103
+ public clearContinuationPoints() {
104
+ // call when a new request to the server is received
105
+ this._map.clear();
106
+ }
107
+
108
+ public registerHistoryReadRaw(
109
+ numValuesPerNode: number,
110
+ dataValues: DataValue[],
111
+ continuationData: ContinuationData
112
+ ): IContinuationPointInfo<DataValue> {
113
+ return this._register(numValuesPerNode, dataValues, continuationData);
114
+ }
115
+ public getNextHistoryReadRaw(numValues: number, continuationData: ContinuationData): IContinuationPointInfo<DataValue> {
116
+ return this._getNext(numValues, continuationData);
117
+ }
118
+
119
+ registerReferences(
120
+ maxElements: number,
121
+ values: ReferenceDescription[],
122
+ continuationData: ContinuationData
123
+ ): IContinuationPointInfo<ReferenceDescription> {
124
+ return this._register(maxElements, values, continuationData);
125
+ }
126
+ /**
127
+ * - releaseContinuationPoints = TRUE
128
+ *
129
+ * passed continuationPoints shall be reset to free resources in
130
+ * the Server. The continuation points are released and the results
131
+ * and diagnosticInfos arrays are empty.
132
+ *
133
+ * - releaseContinuationPoints = FALSE
134
+ *
135
+ * passed continuationPoints shall be used to get the next set of
136
+ * browse information
137
+ */
138
+ getNextReferences(numValues: number, continuationData: ContinuationData): IContinuationPointInfo<ReferenceDescription> {
139
+ return this._getNext(numValues, continuationData);
41
140
  }
42
141
 
43
- public register(maxElements: number, values: ReferenceDescription[]): ContinuationPointInfo {
44
- maxElements = maxElements || values.length;
45
- if (maxElements >= values.length) {
142
+ private _register<T extends DataValue | ReferenceDescription>(
143
+ maxValues: number,
144
+ values: T[],
145
+ continuationData: ContinuationData
146
+ ): IContinuationPointInfo<T> {
147
+ if (continuationData.releaseContinuationPoints) {
148
+ this.clearContinuationPoints();
46
149
  return {
47
150
  continuationPoint: undefined,
48
- references: values,
151
+ values: [],
49
152
  statusCode: StatusCodes.Good
50
153
  };
51
154
  }
155
+ if (!continuationData.continuationPoint && !continuationData.index) {
156
+ this.clearContinuationPoints();
157
+ }
52
158
 
53
- const key = make_key();
54
- const keyHash = key.toString("ascii");
159
+ if (maxValues >= 1) {
160
+ // now make sure that only the requested number of value is returned
161
+ if (values.length === 0) {
162
+ return {
163
+ continuationPoint: undefined,
164
+ values: null,
165
+ statusCode: StatusCodes.GoodNoData
166
+ };
167
+ }
168
+ }
55
169
 
170
+ maxValues = maxValues || values.length;
171
+ if (maxValues >= values.length) {
172
+ return {
173
+ continuationPoint: undefined,
174
+ values,
175
+ statusCode: StatusCodes.Good
176
+ };
177
+ }
56
178
  // split the array in two ( values)
57
- const current_block = values.splice(0, maxElements);
179
+ const current_block = values.splice(0, maxValues);
180
+
181
+ const key = make_key();
182
+ const keyHash = key.toString("ascii");
58
183
 
59
184
  const result = {
60
185
  continuationPoint: key,
61
- references: current_block,
186
+ values: current_block,
62
187
  statusCode: StatusCodes.Good
63
188
  };
64
189
 
65
190
  // create
66
- const data = {
67
- maxElements,
68
- remainingElements: values
191
+ const data: Data = {
192
+ maxElements: maxValues,
193
+ values: values as DataValue[] | ReferenceDescription[]
69
194
  };
70
- this._map[keyHash] = data;
71
-
72
- return result;
73
- }
74
-
75
- public getNext(continuationPoint: ContinuationPoint): ContinuationPointInfo {
76
- if (!continuationPoint) {
77
- return { statusCode: StatusCodes.BadContinuationPointInvalid };
78
- }
79
- const keyHash = continuationPoint.toString("ascii");
195
+ this._map.set(keyHash, data);
80
196
 
81
- const data = this._map[keyHash];
82
- if (!data) {
83
- return { statusCode: StatusCodes.BadContinuationPointInvalid };
84
- }
85
- assert(data.maxElements > 0);
86
- // split the array in two ( values)
87
- const current_block = data.remainingElements.splice(0, data.maxElements);
88
-
89
- const result = {
90
- continuationPoint: data.remainingElements.length ? continuationPoint : undefined,
91
- references: current_block,
92
- statusCode: StatusCodes.Good
93
- };
94
- if (data.remainingElements.length === 0) {
95
- // we are done
96
- delete this._map[keyHash];
97
- }
98
197
  return result;
99
198
  }
100
199
 
101
- public cancel(continuationPoint: ContinuationPoint): ContinuationPointInfo {
102
- if (!continuationPoint) {
103
- return { statusCode: StatusCodes.BadContinuationPointInvalid };
200
+ private _getNext<T extends DataValue | ReferenceDescription>(
201
+ numValues: number,
202
+ continuationData: ContinuationData
203
+ ): IContinuationPointInfo<T> {
204
+ if (!continuationData.continuationPoint) {
205
+ return {
206
+ continuationPoint: undefined,
207
+ values: null,
208
+ statusCode: StatusCodes.BadContinuationPointInvalid
209
+ };
104
210
  }
105
-
106
- const keyHash = continuationPoint.toString("ascii");
107
-
108
- const data = this._map[keyHash];
211
+ const keyHash = continuationData.continuationPoint.toString("ascii");
212
+ const data = this._map.get(keyHash);
109
213
  if (!data) {
110
214
  return {
111
- continuationPoint: undefined, // nullBuffer,
112
- references: [],
215
+ continuationPoint: undefined,
216
+ values: null,
113
217
  statusCode: StatusCodes.BadContinuationPointInvalid
114
218
  };
115
219
  }
116
- delete this._map[keyHash];
220
+
221
+ const values = data.values.splice(0, numValues || data.maxElements) as T[];
222
+
223
+ let continuationPoint: ContinuationPoint | undefined = continuationData.continuationPoint;
224
+ if (data.values.length === 0 || continuationData.releaseContinuationPoints) {
225
+ // no more data available for next call
226
+ this._map.delete(keyHash);
227
+ continuationPoint = undefined;
228
+ }
117
229
  return {
230
+ continuationPoint,
231
+ values,
118
232
  statusCode: StatusCodes.Good
119
233
  };
120
234
  }
@@ -4,9 +4,9 @@
4
4
  import { BrowseDirection } from "node-opcua-data-model";
5
5
 
6
6
  export function adjustBrowseDirection(
7
- browseDirection: BrowseDirection | null | undefined,
8
- defaultValue: BrowseDirection
9
- ):BrowseDirection {
7
+ browseDirection: BrowseDirection | null | undefined,
8
+ defaultValue: BrowseDirection
9
+ ): BrowseDirection {
10
10
  // istanbul ignore next
11
11
  if (browseDirection === null || browseDirection === undefined) {
12
12
  return defaultValue;
@@ -24,7 +24,7 @@ function myfindBuiltInType(dataType: DataType): any {
24
24
  return factories.findBuiltInType(DataType[dataType]);
25
25
  }
26
26
  export interface ArgumentDef {
27
- dataType: DataType
27
+ dataType: DataType;
28
28
  valueRank?: undefined | number;
29
29
  }
30
30
  export function encode_ArgumentList(definition: ArgumentDef[], args: any[], stream: OutputBinaryStream): void {
@@ -30,7 +30,6 @@ import { resolveOpaqueOnAddressSpace } from "./resolve_opaque_on_address_space";
30
30
  // BadNoCommunication
31
31
  type ResponseCallback<T> = (err: Error | null, result?: T) => void;
32
32
 
33
-
34
33
  export function callMethodHelper(
35
34
  context: ISessionContext,
36
35
  addressSpace: IAddressSpace,
@@ -14,10 +14,7 @@ import { BaseNode, UAObjectType } from "node-opcua-address-space-base";
14
14
  * @param selectClause
15
15
  * @return {Array<StatusCode>}
16
16
  */
17
- export function checkSelectClause(
18
- parentNode: BaseNode,
19
- selectClause: SimpleAttributeOperand
20
- ): StatusCode {
17
+ export function checkSelectClause(parentNode: BaseNode, selectClause: SimpleAttributeOperand): StatusCode {
21
18
  //
22
19
  const addressSpace = parentNode.addressSpace;
23
20
 
@@ -45,7 +42,6 @@ export function checkSelectClause(
45
42
  const browsePath = constructBrowsePathFromQualifiedName(eventTypeNode, selectClause.browsePath);
46
43
  const browsePathResult = addressSpace.browsePath(browsePath);
47
44
  return browsePathResult.statusCode;
48
-
49
45
  }
50
46
 
51
47
  /**
@@ -54,9 +50,6 @@ export function checkSelectClause(
54
50
  * @param selectClauses
55
51
  * @return an array of StatusCode
56
52
  */
57
- export function checkSelectClauses(
58
- eventTypeNode: UAObjectType,
59
- selectClauses: SimpleAttributeOperand[]
60
- ): StatusCode[] {
53
+ export function checkSelectClauses(eventTypeNode: UAObjectType, selectClauses: SimpleAttributeOperand[]): StatusCode[] {
61
54
  return selectClauses.map(checkSelectClause.bind(null, eventTypeNode));
62
55
  }
@@ -7,12 +7,12 @@ import { coerceLocalizedText } from "node-opcua-data-model";
7
7
  import { EnumValueType } from "node-opcua-types";
8
8
  import { EnumValueTypeOptionsLike } from "../address_space_ts";
9
9
 
10
- export function coerceEnumValues(enumValues: EnumValueTypeOptionsLike[] | { [key: string]: number| Int64 }): EnumValueType[] {
10
+ export function coerceEnumValues(enumValues: EnumValueTypeOptionsLike[] | { [key: string]: number | Int64 }): EnumValueType[] {
11
11
  if (Array.isArray(enumValues)) {
12
12
  //
13
13
  return enumValues.map((en: any) => {
14
- assert(Object.prototype.hasOwnProperty.call(en,"value"));
15
- assert(Object.prototype.hasOwnProperty.call(en,"displayName"));
14
+ assert(Object.prototype.hasOwnProperty.call(en, "value"));
15
+ assert(Object.prototype.hasOwnProperty.call(en, "displayName"));
16
16
  return new EnumValueType({
17
17
  displayName: coerceLocalizedText(en.displayName),
18
18
  value: en.value
@@ -27,19 +27,7 @@ function newIsUserReadable(this: BaseNode, context: ISessionContext): boolean {
27
27
  }
28
28
  return false;
29
29
  }
30
- function replaceMethod(obj: any, method: string, func: any) {
31
- const oldMethod = obj[method];
32
- if (!oldMethod) {
33
- throw new Error("I cannot find method " + method + " on object " + obj.browseName.toString());
34
- }
35
- obj[method] = function (this: any, ...args: any[]) {
36
- const ret = func.apply(this, args);
37
- if (!ret) {
38
- return false;
39
- }
40
- return oldMethod.apply(this, args);
41
- };
42
- }
30
+
43
31
  /**
44
32
  * make sure that the given ia node can only be read
45
33
  * by Administrator user on a encrypted channel
@@ -4,7 +4,10 @@ import { IAddressSpace } from "node-opcua-address-space-base";
4
4
  import { PseudoSession } from "../pseudo_session";
5
5
  import { ensureDatatypeExtracted } from "../loader/load_nodeset2";
6
6
 
7
- export async function resolveOpaqueOnAddressSpace(addressSpace: IAddressSpace, variants: (Variant | null) | (Variant | null)[]): Promise<void> {
7
+ export async function resolveOpaqueOnAddressSpace(
8
+ addressSpace: IAddressSpace,
9
+ variants: (Variant | null) | (Variant | null)[]
10
+ ): Promise<void> {
8
11
  if (!variants) {
9
12
  return;
10
13
  }
@@ -1,13 +1,13 @@
1
- /**
2
- * @module node-opcua-address-space
3
- */
4
- import { UInt16 } from "node-opcua-basic-types";
5
- import { LocalizedTextLike } from "node-opcua-data-model";
6
- import { StatusCode } from "node-opcua-status-code";
7
-
8
- export interface ConditionInfoOptions {
9
- message?: string | LocalizedTextLike |null ;
10
- quality?: StatusCode |null;
11
- severity?: UInt16 | null;
12
- retain?: boolean | null;
13
- }
1
+ /**
2
+ * @module node-opcua-address-space
3
+ */
4
+ import { UInt16 } from "node-opcua-basic-types";
5
+ import { LocalizedTextLike } from "node-opcua-data-model";
6
+ import { StatusCode } from "node-opcua-status-code";
7
+
8
+ export interface ConditionInfoOptions {
9
+ message?: string | LocalizedTextLike | null;
10
+ quality?: StatusCode | null;
11
+ severity?: UInt16 | null;
12
+ retain?: boolean | null;
13
+ }
@@ -30,5 +30,4 @@ export interface UAMultiStateValueDiscreteEx<T, DT extends DataType>
30
30
  setValue(value: string | number | Int64): void;
31
31
 
32
32
  findValueAsText(value: number | UInt64): Variant;
33
-
34
33
  }
@@ -3,8 +3,10 @@
3
3
  */
4
4
  import { UAVariableT } from "node-opcua-address-space-base";
5
5
  import { DataType } from "node-opcua-variant";
6
- import { DT3DOrientation, UAYArrayItem_Base } from "node-opcua-nodeset-ua";
6
+ import { DT3DOrientation, UAYArrayItem_Base } from "node-opcua-nodeset-ua";
7
7
 
8
- export interface UAYArrayItemEx<DT extends DataType.Double|DataType.Float> extends UAVariableT<number[], DT>, UAYArrayItem_Base<number[], DT> {
8
+ export interface UAYArrayItemEx<DT extends DataType.Double | DataType.Float>
9
+ extends UAVariableT<number[], DT>,
10
+ UAYArrayItem_Base<number[], DT> {
9
11
  // --- helpers ---
10
12
  }
@@ -6,7 +6,11 @@ import { UAExclusiveLimitStateMachine, UAExclusiveLimitStateMachine_Base } from
6
6
 
7
7
  import { UAStateMachineEx, UAStateMachineHelper, UAStateMachineType } from "./ua_state_machine_type";
8
8
 
9
- export interface UAExclusiveLimitStateMachineEx extends UAObject, UAExclusiveLimitStateMachine_Base , UAStateMachineHelper, UAStateMachineEx {}
9
+ export interface UAExclusiveLimitStateMachineEx
10
+ extends UAObject,
11
+ UAExclusiveLimitStateMachine_Base,
12
+ UAStateMachineHelper,
13
+ UAStateMachineEx {}
10
14
 
11
15
  export interface UAExclusiveLimitStateMachineType extends UAStateMachineType {
12
16
  isAbstract: false;