node-opcua-address-space 2.97.0 → 2.98.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 (428) hide show
  1. package/package.json +37 -37
  2. package/source/interfaces/alarms_and_conditions/ua_condition_ex.ts +4 -3
  3. package/src/alarms_and_conditions/ua_condition_impl.ts +14 -9
  4. package/src/base_node_private.ts +73 -28
  5. package/src/ua_variable_type_impl.ts +35 -17
  6. package/dist/source/address_space_ts.d.ts +0 -118
  7. package/dist/source/address_space_ts.js +0 -18
  8. package/dist/source/address_space_ts.js.map +0 -1
  9. package/dist/source/continuation_points/continuation_point_manager.d.ts +0 -91
  10. package/dist/source/continuation_points/continuation_point_manager.js +0 -201
  11. package/dist/source/continuation_points/continuation_point_manager.js.map +0 -1
  12. package/dist/source/helpers/adjust_browse_direction.d.ts +0 -5
  13. package/dist/source/helpers/adjust_browse_direction.js +0 -12
  14. package/dist/source/helpers/adjust_browse_direction.js.map +0 -1
  15. package/dist/source/helpers/argument_list.d.ts +0 -33
  16. package/dist/source/helpers/argument_list.js +0 -255
  17. package/dist/source/helpers/argument_list.js.map +0 -1
  18. package/dist/source/helpers/call_helpers.d.ts +0 -6
  19. package/dist/source/helpers/call_helpers.js +0 -72
  20. package/dist/source/helpers/call_helpers.js.map +0 -1
  21. package/dist/source/helpers/coerce_enum_value.d.ts +0 -6
  22. package/dist/source/helpers/coerce_enum_value.js +0 -34
  23. package/dist/source/helpers/coerce_enum_value.js.map +0 -1
  24. package/dist/source/helpers/dump_tools.d.ts +0 -14
  25. package/dist/source/helpers/dump_tools.js +0 -79
  26. package/dist/source/helpers/dump_tools.js.map +0 -1
  27. package/dist/source/helpers/ensure_secure_access.d.ts +0 -9
  28. package/dist/source/helpers/ensure_secure_access.js +0 -77
  29. package/dist/source/helpers/ensure_secure_access.js.map +0 -1
  30. package/dist/source/helpers/make_optionals_map.d.ts +0 -21
  31. package/dist/source/helpers/make_optionals_map.js +0 -30
  32. package/dist/source/helpers/make_optionals_map.js.map +0 -1
  33. package/dist/source/helpers/multiform_func.d.ts +0 -11
  34. package/dist/source/helpers/multiform_func.js +0 -76
  35. package/dist/source/helpers/multiform_func.js.map +0 -1
  36. package/dist/source/helpers/resolve_opaque_on_address_space.d.ts +0 -3
  37. package/dist/source/helpers/resolve_opaque_on_address_space.js +0 -37
  38. package/dist/source/helpers/resolve_opaque_on_address_space.js.map +0 -1
  39. package/dist/source/index.d.ts +0 -61
  40. package/dist/source/index.js +0 -90
  41. package/dist/source/index.js.map +0 -1
  42. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +0 -19
  43. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js +0 -3
  44. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js.map +0 -1
  45. package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +0 -193
  46. package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.js +0 -3
  47. package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.js.map +0 -1
  48. package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +0 -12
  49. package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.js +0 -3
  50. package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.js.map +0 -1
  51. package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +0 -10
  52. package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.js +0 -3
  53. package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.js.map +0 -1
  54. package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +0 -7
  55. package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js +0 -3
  56. package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js.map +0 -1
  57. package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +0 -7
  58. package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.js +0 -3
  59. package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.js.map +0 -1
  60. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +0 -4
  61. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js +0 -3
  62. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js.map +0 -1
  63. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +0 -4
  64. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js +0 -3
  65. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js.map +0 -1
  66. package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +0 -9
  67. package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js +0 -3
  68. package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js.map +0 -1
  69. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +0 -4
  70. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js +0 -3
  71. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js.map +0 -1
  72. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +0 -4
  73. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js +0 -3
  74. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js.map +0 -1
  75. package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +0 -20
  76. package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js +0 -3
  77. package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js.map +0 -1
  78. package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +0 -23
  79. package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js +0 -3
  80. package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js.map +0 -1
  81. package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +0 -32
  82. package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js +0 -3
  83. package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js.map +0 -1
  84. package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +0 -19
  85. package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js +0 -3
  86. package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js.map +0 -1
  87. package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +0 -42
  88. package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.js +0 -3
  89. package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.js.map +0 -1
  90. package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +0 -7
  91. package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +0 -26
  92. package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +0 -1
  93. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +0 -5
  94. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js +0 -3
  95. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js.map +0 -1
  96. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +0 -20
  97. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js +0 -3
  98. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js.map +0 -1
  99. package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +0 -26
  100. package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js +0 -3
  101. package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js.map +0 -1
  102. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +0 -8
  103. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js +0 -3
  104. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js.map +0 -1
  105. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +0 -10
  106. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js +0 -3
  107. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js.map +0 -1
  108. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +0 -21
  109. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js +0 -3
  110. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js.map +0 -1
  111. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +0 -24
  112. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js +0 -3
  113. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js.map +0 -1
  114. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +0 -12
  115. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js +0 -3
  116. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js.map +0 -1
  117. package/dist/source/interfaces/data_access/ua_y_array_item_ex.d.ts +0 -8
  118. package/dist/source/interfaces/data_access/ua_y_array_item_ex.js +0 -3
  119. package/dist/source/interfaces/data_access/ua_y_array_item_ex.js.map +0 -1
  120. package/dist/source/interfaces/extension_object_constructor.d.ts +0 -10
  121. package/dist/source/interfaces/extension_object_constructor.js +0 -3
  122. package/dist/source/interfaces/extension_object_constructor.js.map +0 -1
  123. package/dist/source/interfaces/nodeset_loader_options.d.ts +0 -4
  124. package/dist/source/interfaces/nodeset_loader_options.js +0 -3
  125. package/dist/source/interfaces/nodeset_loader_options.js.map +0 -1
  126. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +0 -12
  127. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js +0 -3
  128. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js.map +0 -1
  129. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +0 -49
  130. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js +0 -3
  131. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js.map +0 -1
  132. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +0 -11
  133. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js +0 -3
  134. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js.map +0 -1
  135. package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +0 -30
  136. package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.js +0 -3
  137. package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.js.map +0 -1
  138. package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +0 -234
  139. package/dist/source/interfaces/state_machine/ua_state_machine_type.js +0 -3
  140. package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +0 -1
  141. package/dist/source/interfaces/state_machine/ua_transition_ex.d.ts +0 -6
  142. package/dist/source/interfaces/state_machine/ua_transition_ex.js +0 -3
  143. package/dist/source/interfaces/state_machine/ua_transition_ex.js.map +0 -1
  144. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +0 -8
  145. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js +0 -3
  146. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +0 -1
  147. package/dist/source/loader/decode_xml_extension_object.d.ts +0 -6
  148. package/dist/source/loader/decode_xml_extension_object.js +0 -72
  149. package/dist/source/loader/decode_xml_extension_object.js.map +0 -1
  150. package/dist/source/loader/ensure_datatype_extracted.d.ts +0 -5
  151. package/dist/source/loader/ensure_datatype_extracted.js +0 -71
  152. package/dist/source/loader/ensure_datatype_extracted.js.map +0 -1
  153. package/dist/source/loader/generateAddressSpaceRaw.d.ts +0 -11
  154. package/dist/source/loader/generateAddressSpaceRaw.js +0 -46
  155. package/dist/source/loader/generateAddressSpaceRaw.js.map +0 -1
  156. package/dist/source/loader/load_nodeset2.d.ts +0 -17
  157. package/dist/source/loader/load_nodeset2.js +0 -1484
  158. package/dist/source/loader/load_nodeset2.js.map +0 -1
  159. package/dist/source/loader/make_semver_compatible.d.ts +0 -6
  160. package/dist/source/loader/make_semver_compatible.js +0 -26
  161. package/dist/source/loader/make_semver_compatible.js.map +0 -1
  162. package/dist/source/loader/make_xml_extension_object_parser.d.ts +0 -28
  163. package/dist/source/loader/make_xml_extension_object_parser.js +0 -327
  164. package/dist/source/loader/make_xml_extension_object_parser.js.map +0 -1
  165. package/dist/source/loader/namespace_post_step.d.ts +0 -10
  166. package/dist/source/loader/namespace_post_step.js +0 -62
  167. package/dist/source/loader/namespace_post_step.js.map +0 -1
  168. package/dist/source/loader/register_node_promoter.d.ts +0 -2
  169. package/dist/source/loader/register_node_promoter.js +0 -10
  170. package/dist/source/loader/register_node_promoter.js.map +0 -1
  171. package/dist/source/namespace.d.ts +0 -6
  172. package/dist/source/namespace.js +0 -3
  173. package/dist/source/namespace.js.map +0 -1
  174. package/dist/source/namespace_alarm_and_condition.d.ts +0 -32
  175. package/dist/source/namespace_alarm_and_condition.js +0 -3
  176. package/dist/source/namespace_alarm_and_condition.js.map +0 -1
  177. package/dist/source/namespace_data_access.d.ts +0 -42
  178. package/dist/source/namespace_data_access.js +0 -3
  179. package/dist/source/namespace_data_access.js.map +0 -1
  180. package/dist/source/namespace_machine_state.d.ts +0 -8
  181. package/dist/source/namespace_machine_state.js +0 -3
  182. package/dist/source/namespace_machine_state.js.map +0 -1
  183. package/dist/source/pseudo_session.d.ts +0 -72
  184. package/dist/source/pseudo_session.js +0 -255
  185. package/dist/source/pseudo_session.js.map +0 -1
  186. package/dist/source/session_context.d.ts +0 -111
  187. package/dist/source/session_context.js +0 -265
  188. package/dist/source/session_context.js.map +0 -1
  189. package/dist/source/set_namespace_meta_data.d.ts +0 -2
  190. package/dist/source/set_namespace_meta_data.js +0 -60
  191. package/dist/source/set_namespace_meta_data.js.map +0 -1
  192. package/dist/source/ua_root_folder.d.ts +0 -9
  193. package/dist/source/ua_root_folder.js +0 -3
  194. package/dist/source/ua_root_folder.js.map +0 -1
  195. package/dist/source/ua_two_state_variable_ex.d.ts +0 -23
  196. package/dist/source/ua_two_state_variable_ex.js +0 -3
  197. package/dist/source/ua_two_state_variable_ex.js.map +0 -1
  198. package/dist/source/xml_writer.d.ts +0 -18
  199. package/dist/source/xml_writer.js +0 -3
  200. package/dist/source/xml_writer.js.map +0 -1
  201. package/dist/src/address_space.d.ts +0 -387
  202. package/dist/src/address_space.js +0 -1386
  203. package/dist/src/address_space.js.map +0 -1
  204. package/dist/src/address_space_change_event_tools.d.ts +0 -6
  205. package/dist/src/address_space_change_event_tools.js +0 -153
  206. package/dist/src/address_space_change_event_tools.js.map +0 -1
  207. package/dist/src/address_space_private.d.ts +0 -43
  208. package/dist/src/address_space_private.js +0 -3
  209. package/dist/src/address_space_private.js.map +0 -1
  210. package/dist/src/alarms_and_conditions/condition.d.ts +0 -5
  211. package/dist/src/alarms_and_conditions/condition.js +0 -79
  212. package/dist/src/alarms_and_conditions/condition.js.map +0 -1
  213. package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +0 -26
  214. package/dist/src/alarms_and_conditions/condition_info_impl.js +0 -55
  215. package/dist/src/alarms_and_conditions/condition_info_impl.js.map +0 -1
  216. package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +0 -222
  217. package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +0 -658
  218. package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +0 -1
  219. package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +0 -9
  220. package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +0 -61
  221. package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +0 -1
  222. package/dist/src/alarms_and_conditions/index.d.ts +0 -16
  223. package/dist/src/alarms_and_conditions/index.js +0 -33
  224. package/dist/src/alarms_and_conditions/index.js.map +0 -1
  225. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +0 -44
  226. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +0 -245
  227. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +0 -1
  228. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +0 -93
  229. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +0 -419
  230. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +0 -1
  231. package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +0 -26
  232. package/dist/src/alarms_and_conditions/ua_base_event_impl.js +0 -39
  233. package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +0 -1
  234. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +0 -44
  235. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +0 -184
  236. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +0 -1
  237. package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +0 -153
  238. package/dist/src/alarms_and_conditions/ua_condition_impl.js +0 -1029
  239. package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +0 -1
  240. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +0 -14
  241. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +0 -35
  242. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +0 -1
  243. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +0 -24
  244. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +0 -57
  245. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +0 -1
  246. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +0 -11
  247. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +0 -12
  248. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +0 -1
  249. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +0 -23
  250. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +0 -87
  251. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +0 -1
  252. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +0 -11
  253. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js +0 -8
  254. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +0 -1
  255. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +0 -79
  256. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +0 -251
  257. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +0 -1
  258. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +0 -24
  259. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +0 -51
  260. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +0 -1
  261. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +0 -19
  262. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +0 -163
  263. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +0 -1
  264. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +0 -46
  265. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +0 -166
  266. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +0 -1
  267. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +0 -18
  268. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +0 -18
  269. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +0 -1
  270. package/dist/src/apply_condition_refresh.d.ts +0 -6
  271. package/dist/src/apply_condition_refresh.js +0 -28
  272. package/dist/src/apply_condition_refresh.js.map +0 -1
  273. package/dist/src/base_node_impl.d.ts +0 -284
  274. package/dist/src/base_node_impl.js +0 -1455
  275. package/dist/src/base_node_impl.js.map +0 -1
  276. package/dist/src/base_node_private.d.ts +0 -81
  277. package/dist/src/base_node_private.js +0 -804
  278. package/dist/src/base_node_private.js.map +0 -1
  279. package/dist/src/check_value_rank_compatibility.d.ts +0 -15
  280. package/dist/src/check_value_rank_compatibility.js +0 -82
  281. package/dist/src/check_value_rank_compatibility.js.map +0 -1
  282. package/dist/src/data_access/add_dataItem_stuff.d.ts +0 -11
  283. package/dist/src/data_access/add_dataItem_stuff.js +0 -62
  284. package/dist/src/data_access/add_dataItem_stuff.js.map +0 -1
  285. package/dist/src/data_access/check_variant_compatibility_ua_analog_item.d.ts +0 -1
  286. package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js +0 -35
  287. package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js.map +0 -1
  288. package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +0 -32
  289. package/dist/src/data_access/ua_multistate_discrete_impl.js +0 -131
  290. package/dist/src/data_access/ua_multistate_discrete_impl.js.map +0 -1
  291. package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +0 -52
  292. package/dist/src/data_access/ua_multistate_value_discrete_impl.js +0 -254
  293. package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +0 -1
  294. package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +0 -25
  295. package/dist/src/data_access/ua_two_state_discrete_impl.js +0 -156
  296. package/dist/src/data_access/ua_two_state_discrete_impl.js.map +0 -1
  297. package/dist/src/event_data.d.ts +0 -34
  298. package/dist/src/event_data.js +0 -65
  299. package/dist/src/event_data.js.map +0 -1
  300. package/dist/src/extension_object_array_node.d.ts +0 -23
  301. package/dist/src/extension_object_array_node.js +0 -249
  302. package/dist/src/extension_object_array_node.js.map +0 -1
  303. package/dist/src/historical_access/address_space_historical_data_node.d.ts +0 -26
  304. package/dist/src/historical_access/address_space_historical_data_node.js +0 -653
  305. package/dist/src/historical_access/address_space_historical_data_node.js.map +0 -1
  306. package/dist/src/idx_iterator.d.ts +0 -8
  307. package/dist/src/idx_iterator.js +0 -51
  308. package/dist/src/idx_iterator.js.map +0 -1
  309. package/dist/src/index_current.d.ts +0 -46
  310. package/dist/src/index_current.js +0 -78
  311. package/dist/src/index_current.js.map +0 -1
  312. package/dist/src/namespace_impl.d.ts +0 -456
  313. package/dist/src/namespace_impl.js +0 -1763
  314. package/dist/src/namespace_impl.js.map +0 -1
  315. package/dist/src/namespace_private.d.ts +0 -23
  316. package/dist/src/namespace_private.js +0 -33
  317. package/dist/src/namespace_private.js.map +0 -1
  318. package/dist/src/nodeid_manager.d.ts +0 -37
  319. package/dist/src/nodeid_manager.js +0 -184
  320. package/dist/src/nodeid_manager.js.map +0 -1
  321. package/dist/src/nodeset_tools/adjust_namespace_array.d.ts +0 -2
  322. package/dist/src/nodeset_tools/adjust_namespace_array.js +0 -14
  323. package/dist/src/nodeset_tools/adjust_namespace_array.js.map +0 -1
  324. package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +0 -18
  325. package/dist/src/nodeset_tools/construct_namespace_dependency.js +0 -141
  326. package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +0 -1
  327. package/dist/src/nodeset_tools/dump_to_bsd.d.ts +0 -2
  328. package/dist/src/nodeset_tools/dump_to_bsd.js +0 -165
  329. package/dist/src/nodeset_tools/dump_to_bsd.js.map +0 -1
  330. package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +0 -10
  331. package/dist/src/nodeset_tools/nodeset_to_xml.js +0 -1288
  332. package/dist/src/nodeset_tools/nodeset_to_xml.js.map +0 -1
  333. package/dist/src/private_namespace.d.ts +0 -5
  334. package/dist/src/private_namespace.js +0 -20
  335. package/dist/src/private_namespace.js.map +0 -1
  336. package/dist/src/reference_impl.d.ts +0 -43
  337. package/dist/src/reference_impl.js +0 -140
  338. package/dist/src/reference_impl.js.map +0 -1
  339. package/dist/src/role_permissions.d.ts +0 -2
  340. package/dist/src/role_permissions.js +0 -11
  341. package/dist/src/role_permissions.js.map +0 -1
  342. package/dist/src/state_machine/finite_state_machine.d.ts +0 -81
  343. package/dist/src/state_machine/finite_state_machine.js +0 -389
  344. package/dist/src/state_machine/finite_state_machine.js.map +0 -1
  345. package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +0 -38
  346. package/dist/src/state_machine/ua_shelving_state_machine_ex.js +0 -251
  347. package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +0 -1
  348. package/dist/src/state_machine/ua_two_state_variable.d.ts +0 -61
  349. package/dist/src/state_machine/ua_two_state_variable.js +0 -332
  350. package/dist/src/state_machine/ua_two_state_variable.js.map +0 -1
  351. package/dist/src/tool_isSubtypeOf.d.ts +0 -18
  352. package/dist/src/tool_isSubtypeOf.js +0 -125
  353. package/dist/src/tool_isSubtypeOf.js.map +0 -1
  354. package/dist/src/tool_isSupertypeOf.d.ts +0 -18
  355. package/dist/src/tool_isSupertypeOf.js +0 -125
  356. package/dist/src/tool_isSupertypeOf.js.map +0 -1
  357. package/dist/src/ua_condition_type.d.ts +0 -8
  358. package/dist/src/ua_condition_type.js +0 -3
  359. package/dist/src/ua_condition_type.js.map +0 -1
  360. package/dist/src/ua_data_type_impl.d.ts +0 -89
  361. package/dist/src/ua_data_type_impl.js +0 -369
  362. package/dist/src/ua_data_type_impl.js.map +0 -1
  363. package/dist/src/ua_method_impl.d.ts +0 -42
  364. package/dist/src/ua_method_impl.js +0 -218
  365. package/dist/src/ua_method_impl.js.map +0 -1
  366. package/dist/src/ua_object_impl.d.ts +0 -35
  367. package/dist/src/ua_object_impl.js +0 -169
  368. package/dist/src/ua_object_impl.js.map +0 -1
  369. package/dist/src/ua_object_type_impl.d.ts +0 -50
  370. package/dist/src/ua_object_type_impl.js +0 -127
  371. package/dist/src/ua_object_type_impl.js.map +0 -1
  372. package/dist/src/ua_reference_type_impl.d.ts +0 -45
  373. package/dist/src/ua_reference_type_impl.js +0 -142
  374. package/dist/src/ua_reference_type_impl.js.map +0 -1
  375. package/dist/src/ua_variable_impl.d.ts +0 -380
  376. package/dist/src/ua_variable_impl.js +0 -1739
  377. package/dist/src/ua_variable_impl.js.map +0 -1
  378. package/dist/src/ua_variable_impl_ext_obj.d.ts +0 -23
  379. package/dist/src/ua_variable_impl_ext_obj.js +0 -671
  380. package/dist/src/ua_variable_impl_ext_obj.js.map +0 -1
  381. package/dist/src/ua_variable_type_impl.d.ts +0 -74
  382. package/dist/src/ua_variable_type_impl.js +0 -582
  383. package/dist/src/ua_variable_type_impl.js.map +0 -1
  384. package/dist/src/ua_view_impl.d.ts +0 -19
  385. package/dist/src/ua_view_impl.js +0 -44
  386. package/dist/src/ua_view_impl.js.map +0 -1
  387. package/distHelpers/add_event_generator_object.d.ts +0 -3
  388. package/distHelpers/add_event_generator_object.js +0 -65
  389. package/distHelpers/add_event_generator_object.js.map +0 -1
  390. package/distHelpers/alarms_and_conditions_demo.d.ts +0 -9
  391. package/distHelpers/alarms_and_conditions_demo.js +0 -116
  392. package/distHelpers/alarms_and_conditions_demo.js.map +0 -1
  393. package/distHelpers/assertHasMatchingReference.d.ts +0 -19
  394. package/distHelpers/assertHasMatchingReference.js +0 -41
  395. package/distHelpers/assertHasMatchingReference.js.map +0 -1
  396. package/distHelpers/boiler_system.d.ts +0 -113
  397. package/distHelpers/boiler_system.js +0 -396
  398. package/distHelpers/boiler_system.js.map +0 -1
  399. package/distHelpers/create_minimalist_address_space_nodeset.d.ts +0 -5
  400. package/distHelpers/create_minimalist_address_space_nodeset.js +0 -172
  401. package/distHelpers/create_minimalist_address_space_nodeset.js.map +0 -1
  402. package/distHelpers/date_utils.d.ts +0 -3
  403. package/distHelpers/date_utils.js +0 -10
  404. package/distHelpers/date_utils.js.map +0 -1
  405. package/distHelpers/dump_statemachine.d.ts +0 -0
  406. package/distHelpers/dump_statemachine.js +0 -128
  407. package/distHelpers/dump_statemachine.js.map +0 -1
  408. package/distHelpers/get_address_space_fixture.d.ts +0 -1
  409. package/distHelpers/get_address_space_fixture.js +0 -31
  410. package/distHelpers/get_address_space_fixture.js.map +0 -1
  411. package/distHelpers/get_mini_address_space.d.ts +0 -7
  412. package/distHelpers/get_mini_address_space.js +0 -37
  413. package/distHelpers/get_mini_address_space.js.map +0 -1
  414. package/distHelpers/index.d.ts +0 -12
  415. package/distHelpers/index.js +0 -29
  416. package/distHelpers/index.js.map +0 -1
  417. package/distHelpers/mock_session.d.ts +0 -10
  418. package/distHelpers/mock_session.js +0 -26
  419. package/distHelpers/mock_session.js.map +0 -1
  420. package/distNodeJS/generate_address_space.d.ts +0 -6
  421. package/distNodeJS/generate_address_space.js +0 -53
  422. package/distNodeJS/generate_address_space.js.map +0 -1
  423. package/distNodeJS/index.d.ts +0 -1
  424. package/distNodeJS/index.js +0 -18
  425. package/distNodeJS/index.js.map +0 -1
  426. package/source/helpers/dump_tools.ts +0 -92
  427. package/src/nodeset_tools/dump_to_bsd.ts +0 -198
  428. package/test_helpers/dump_statemachine.ts +0 -155
@@ -1,653 +0,0 @@
1
- "use strict";
2
- /**
3
- * @module node-opcua-address-space
4
- * @class IAddressSpace
5
- */
6
- // tslint:disable:no-console
7
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
8
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9
- return new (P || (P = Promise))(function (resolve, reject) {
10
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
11
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
12
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
13
- step((generator = generator.apply(thisArg, _arguments || [])).next());
14
- });
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.AddressSpace_installHistoricalDataNode = exports.VariableHistorian = void 0;
18
- const chalk = require("chalk");
19
- const node_opcua_assert_1 = require("node-opcua-assert");
20
- const node_opcua_data_model_1 = require("node-opcua-data-model");
21
- const node_opcua_date_time_1 = require("node-opcua-date-time");
22
- const node_opcua_service_history_1 = require("node-opcua-service-history");
23
- const node_opcua_status_code_1 = require("node-opcua-status-code");
24
- const node_opcua_variant_1 = require("node-opcua-variant");
25
- const ua_variable_impl_1 = require("../ua_variable_impl");
26
- const address_space_ts_1 = require("../../source/address_space_ts");
27
- // tslint:disable:no-var-requires
28
- const Dequeue = require("dequeue");
29
- /* interface Historian */
30
- // {
31
- //
32
- // }
33
- function inInTimeRange(historyReadDetails, dataValue) {
34
- if (historyReadDetails.startTime &&
35
- !(0, node_opcua_date_time_1.isMinDate)(historyReadDetails.startTime) &&
36
- dataValue.sourceTimestamp < historyReadDetails.startTime) {
37
- return false;
38
- }
39
- if (historyReadDetails.endTime &&
40
- !(0, node_opcua_date_time_1.isMinDate)(historyReadDetails.endTime) &&
41
- dataValue.sourceTimestamp > historyReadDetails.endTime) {
42
- return false;
43
- }
44
- return true;
45
- }
46
- function inInTimeRange2(historyReadDetails, dataValue) {
47
- if (historyReadDetails.endTime &&
48
- !(0, node_opcua_date_time_1.isMinDate)(historyReadDetails.endTime) &&
49
- dataValue.sourceTimestamp > historyReadDetails.endTime) {
50
- return false;
51
- }
52
- return !(historyReadDetails.startTime &&
53
- !(0, node_opcua_date_time_1.isMinDate)(historyReadDetails.startTime) &&
54
- dataValue.sourceTimestamp < historyReadDetails.startTime);
55
- }
56
- function filter_dequeue(q, historyReadRawModifiedDetails, onlyThisNumber, isReversed) {
57
- const r = [];
58
- const predicate = isReversed
59
- ? inInTimeRange2.bind(null, historyReadRawModifiedDetails)
60
- : inInTimeRange.bind(null, historyReadRawModifiedDetails);
61
- if (isReversed) {
62
- let c = q.head.prev;
63
- while (c.data) {
64
- if (predicate(c.data)) {
65
- r.push(c.data);
66
- }
67
- c = c.prev;
68
- if (onlyThisNumber && r.length === onlyThisNumber) {
69
- return r;
70
- }
71
- }
72
- }
73
- else {
74
- let c = q.head.next;
75
- while (c.data) {
76
- if (predicate(c.data)) {
77
- r.push(c.data);
78
- }
79
- c = c.next;
80
- if (onlyThisNumber && r.length === onlyThisNumber) {
81
- return r;
82
- }
83
- }
84
- }
85
- return r;
86
- }
87
- class VariableHistorian {
88
- constructor(node, options) {
89
- this._timeline = new Dequeue(); // is is ordered here ??????
90
- this._maxOnlineValues = options.maxOnlineValues || 1000;
91
- this.lastDate = new Date(1600, 0, 1, 0, 0, 0);
92
- this.lastDatePicoSeconds = 0;
93
- this.node = node;
94
- }
95
- /* public */
96
- push(newDataValue) {
97
- return __awaiter(this, void 0, void 0, function* () {
98
- this._timeline.push(newDataValue);
99
- const sourceTime = newDataValue.sourceTimestamp || new Date();
100
- const sourcePicoSeconds = newDataValue.sourcePicoseconds || 0;
101
- // ensure that values are set with date increasing
102
- if (sourceTime.getTime() <= this.lastDate.getTime()) {
103
- if (!(sourceTime.getTime() === this.lastDate.getTime() && sourcePicoSeconds > this.lastDatePicoSeconds)) {
104
- console.log(chalk.red("Warning date not increasing "), newDataValue.toString(), " last known date = ", this.lastDate);
105
- }
106
- }
107
- this.lastDate = sourceTime;
108
- this.lastDatePicoSeconds = newDataValue.sourcePicoseconds || 0;
109
- // we keep only a limited amount in main memory
110
- if (this._timeline.length > this._maxOnlineValues) {
111
- (0, node_opcua_assert_1.assert)(typeof this._maxOnlineValues === "number" && this._maxOnlineValues > 0);
112
- while (this._timeline.length > this._maxOnlineValues) {
113
- this._timeline.shift();
114
- }
115
- }
116
- if (this._timeline.length >= this._maxOnlineValues || this._timeline.length === 1) {
117
- const first = this._timeline.first();
118
- this.node._update_startOfOnlineArchive(first.sourceTimestamp);
119
- // we update the node startOnlineDate
120
- }
121
- });
122
- }
123
- extractDataValues(historyReadRawModifiedDetails, maxNumberToExtract, isReversed, reverseDataValue, callback) {
124
- (0, node_opcua_assert_1.assert)(typeof callback === "function");
125
- let dataValues = filter_dequeue(this._timeline, historyReadRawModifiedDetails, maxNumberToExtract, isReversed);
126
- if (reverseDataValue) {
127
- dataValues = dataValues.reverse();
128
- }
129
- callback(null, dataValues);
130
- }
131
- }
132
- exports.VariableHistorian = VariableHistorian;
133
- function _get_startOfOfflineArchive(node) {
134
- var _a;
135
- if (!node.$historicalDataConfiguration) {
136
- throw new Error("this variable has no HistoricalDataConfiguration");
137
- }
138
- return (_a = node.$historicalDataConfiguration.startOfArchive) === null || _a === void 0 ? void 0 : _a.readValue();
139
- }
140
- function _get_startOfArchive(node) {
141
- var _a;
142
- if (!node.$historicalDataConfiguration) {
143
- throw new Error("this variable has no HistoricalDataConfiguration");
144
- }
145
- return (_a = node.$historicalDataConfiguration.startOfArchive) === null || _a === void 0 ? void 0 : _a.readValue();
146
- }
147
- function _update_startOfArchive(newDate) {
148
- var _a;
149
- if (!this.$historicalDataConfiguration) {
150
- throw new Error("this variable has no HistoricalDataConfiguration");
151
- }
152
- (_a = this.$historicalDataConfiguration.startOfArchive) === null || _a === void 0 ? void 0 : _a.setValueFromSource({
153
- dataType: node_opcua_variant_1.DataType.DateTime,
154
- value: newDate
155
- });
156
- }
157
- function _update_startOfOnlineArchive(newDate) {
158
- var _a;
159
- if (!this.$historicalDataConfiguration) {
160
- throw new Error("this variable has no HistoricalDataConfiguration");
161
- }
162
- // The StartOfArchive Variable specifies the date before which there is no data
163
- // in the archive either online or offline.
164
- // The StartOfOnlineArchive Variable specifies the date of the earliest data
165
- // in the online archive.
166
- (_a = this.$historicalDataConfiguration.startOfOnlineArchive) === null || _a === void 0 ? void 0 : _a.setValueFromSource({
167
- dataType: node_opcua_variant_1.DataType.DateTime,
168
- value: newDate
169
- });
170
- const startOfArchiveDataValue = _get_startOfOfflineArchive(this);
171
- if (startOfArchiveDataValue &&
172
- (startOfArchiveDataValue.statusCode.isNotGood() ||
173
- !startOfArchiveDataValue.value ||
174
- !startOfArchiveDataValue.value.value ||
175
- startOfArchiveDataValue.value.value.getTime() >= newDate.getTime())) {
176
- this._update_startOfArchive(newDate);
177
- }
178
- }
179
- ua_variable_impl_1.UAVariableImpl.prototype._update_startOfOnlineArchive = _update_startOfOnlineArchive;
180
- ua_variable_impl_1.UAVariableImpl.prototype._update_startOfArchive = _update_startOfArchive;
181
- function _historyPush(newDataValue) {
182
- if (!this.varHistorian) {
183
- throw new Error("this variable has no HistoricalDataConfiguration");
184
- }
185
- (0, node_opcua_assert_1.assert)(Object.prototype.hasOwnProperty.call(this, "historizing"), "expecting a historizing attribute on node");
186
- if (!this.historizing) {
187
- return; //
188
- }
189
- (0, node_opcua_assert_1.assert)(this.historizing === true);
190
- this.varHistorian.push(newDataValue);
191
- }
192
- function _historyReadModify(context, historyReadRawModifiedDetails, indexRange, dataEncoding, continuationData, callback) {
193
- //
194
- // 6.4.3.3 Read modified functionality
195
- // Release 1.03 26 OPC Unified Architecture, Part 11
196
- //
197
- // When this structure is used for reading Modified Values (isReadModified is set to TRUE), it
198
- // reads the modified values, StatusCodes, timestamps, modification type, the user identifier,
199
- // and the timestamp of the modification from the history database for the specified time domain
200
- // for one or more HistoricalDataNodes. If there are multiple replaced values the Server shall
201
- // return all of them. The updateType specifies what value is returned in the modification record.
202
- // If the updateType is INSERT the value is the new value that was inserted. If the updateType
203
- // is anything else the value is the old value that was changed. See 6.8 HistoryUpdateDetails
204
- // parameter for details on what updateTypes are available.
205
- // The purpose of this function is to read values from history that have been Modified. The
206
- // returnBounds parameter shall be set to FALSE for this case, otherwise the Server returns a
207
- // BadInvalidArgument StatusCode.
208
- // The domain of the request is defined by startTime, endTime, and numValuesPerNode; at least
209
- // two of these shall be specified. If endTime is less than startTime, or endTime and
210
- // numValuesPerNode alone are specified, then the data shall be returned in reverse order with
211
- // the later data coming first. If all three are specified then the call shall return up to
212
- // numValuesPerNode results going from StartTime to EndTime, in either ascending or
213
- // descending order depending on the relative values of StartTime and EndTime. If more than
214
- // numValuesPerNode values exist within that time range for a given Node then only
215
- // numValuesPerNode values per Node are returned along with a continuationPoint. When a
216
- // continuationPoint is returned, a Client wanting the next numValuesPerNode values should call
217
- // ReadRaw again with the continuationPoint set. If numValuesPerNode is 0 then all of the
218
- // values in the range are returned. If the Server cannot return all modified values for a given
219
- // timestamp in a single response then it shall return modified values with the same timestamp
220
- // in subsequent calls.
221
- // If the request takes a long time to process then the Server can return partial results with a
222
- // ContinuationPoint. This might be done if the request is going to take more time than the Client
223
- // timeout hint. It may take longer than the Client timeout hint to retrieve any results. In this case
224
- // the Server may return zero results with a ContinuationPoint that allows the Server to resume
225
- // the calculation on the next Client HistoryRead call.
226
- // If a value has been modified multiple times then all values for the time are returned. This
227
- // means that a timestamp can appear in the array more than once. The order of the returned
228
- // values with the same timestamp should be from the most recent to oldest modification
229
- // timestamp, if startTime is less than or equal to endTime. If endTime is less than startTime,
230
- // then the order of the returned values will be from the oldest modification timestamp to the
231
- // most recent. It is Server dependent whether multiple modifications are kept or only the most
232
- // recent.
233
- // A Server does not have to create a modification record for data when it is first added to the
234
- // historical collection. If it does then it shall set the ExtraData bit and the Client can read the
235
- // modification record using a ReadModified call. If the data is subsequently modified the Server
236
- // shall create a second modification record which is returned along with the original
237
- // modification record whenever a Client uses the ReadModified call if the Server supports
238
- // multiple modification records per timestamp.
239
- // If the requested TimestampsToReturn is not supported for a Node then the operation shall
240
- // return the BadTimestampNotSupported StatusCode.
241
- // todo : provide correct implementation
242
- const result = new node_opcua_service_history_1.HistoryReadResult({
243
- historyData: new node_opcua_service_history_1.HistoryData({ dataValues: [] }),
244
- statusCode: node_opcua_status_code_1.StatusCodes.BadUnexpectedError
245
- });
246
- return callback(null, result);
247
- }
248
- function _historyReadRawAsync(historyReadRawModifiedDetails, maxNumberToExtract, isReversed, reverseDataValue, callback) {
249
- (0, node_opcua_assert_1.assert)(typeof callback === "function");
250
- this.varHistorian.extractDataValues(historyReadRawModifiedDetails, maxNumberToExtract, isReversed, reverseDataValue, callback);
251
- }
252
- function _historyReadRaw(context, historyReadRawModifiedDetails, indexRange, dataEncoding, continuationData, callback) {
253
- (0, node_opcua_assert_1.assert)(historyReadRawModifiedDetails instanceof node_opcua_service_history_1.ReadRawModifiedDetails);
254
- // 6.4.3.2 Read raw functionality
255
- //
256
- // When this structure is used for reading Raw Values (isReadModified is set to FALSE), it reads
257
- // the values, qualities, and timestamps from the history database for the specified time domain
258
- // for one or more HistoricalDataNodes.
259
- //
260
- // This parameter is intended for use by a Client that wants the actual data saved within the historian.
261
- //
262
- // The actual data may be compressed or may be all raw data collected for the item depending on the
263
- // historian and the storage rules invoked when the item values were saved.
264
- //
265
- // When returnBounds is TRUE, the Bounding Values for the time domain are returned. The optional Bounding
266
- // Values are provided to allow the Client to interpolate values for the start and end times when trending
267
- // the actual data on a display.
268
- //
269
- // The time domain of the request is defined by startTime, endTime, and numValuesPerNode;
270
- // at least two of these shall be specified.
271
- //
272
- // If endTime is less than startTime, or endTime and numValuesPerNode alone are specified
273
- // then the data will be returned in reverse order, with later data coming first as if time
274
- // were flowing backward.
275
- //
276
- // If all three are specified then the call shall return up to numValuesPerNode results going from
277
- // startTime to endTime, in either ascending or descending order depending on the relative values
278
- // of startTime and endTime.
279
- //
280
- // If numValuesPerNode is 0, then all the values in the range are returned.
281
- //
282
- // A default value of DateTime.MinValue (see Part 6) is used to indicate when startTime or
283
- // endTime is not specified.
284
- //
285
- // It is specifically allowed for the startTime and the endTime to be identical.
286
- // This allows the Client to request just one value.
287
- // When the startTime and endTime are identical then time is presumed to be flowing forward.
288
- // It is specifically not allowed for the Server to return a Bad_InvalidArgument StatusCode
289
- // if the requested time domain is outside of the Server's range. Such a case shall be treated
290
- // as an interval in which no data exists.
291
- //
292
- // If a startTime, endTime and numValuesPerNode are all provided and if more than
293
- // numValuesPerNode values exist within that time range for a given Node then only
294
- // numValuesPerNode values per Node are returned along with a continuationPoint.
295
- //
296
- // When a continuationPoint is returned, a Client wanting the next numValuesPerNode values
297
- // should call ReadRaw again with the continuationPoint set.
298
- //
299
- // If the request takes a long time to process then the Server can return partial results with a
300
- // ContinuationPoint. This might be done if the request is going to take more time than the Client
301
- // timeout hint. It may take longer than the Client timeout hint to retrieve any results.
302
- // In this case the Server may return zero results with a ContinuationPoint that allows the
303
- // Server to resume the calculation on the next Client HistoryRead call.
304
- //
305
- // If Bounding Values are requested and a non-zero numValuesPerNode was specified then any
306
- // Bounding Values returned are included in the numValuesPerNode count.
307
- //
308
- // If numValuesPerNode is 1 then only the start bound is returned (the end bound if the reverse
309
- // order is needed).
310
- //
311
- // If numValuesPerNode is 2 then the start bound and the first data point are
312
- // returned (the end bound if reverse order is needed).
313
- //
314
- // When Bounding Values are requested and no bounding value is found then the corresponding
315
- // StatusCode entry will be set to Bad_BoundNotFound, a timestamp equal to the start or end time
316
- // as appropriate, and a value of null.
317
- // How far back or forward to look in history for Bounding Values is Server dependent.
318
- //
319
- // For an interval in which no data exists, if Bounding Values are not requested, then the
320
- // corresponding StatusCode shall be Good_NoData. If Bounding Values are requested and one
321
- // or both exist, then the result code returned is Success and the bounding value(s) are
322
- // returned.
323
- //
324
- // For cases where there are multiple values for a given timestamp, all but the most recent are
325
- // considered to be Modified values and the Server shall return the most recent value. If the
326
- // Server returns a value which hides other values at a timestamp then it shall set the ExtraData
327
- // bit in the StatusCode associated with that value. If the Server contains additional information
328
- // regarding a value then the ExtraData bit shall also be set. It indicates that ModifiedValues are
329
- // available for retrieval, see 6.4.3.3.
330
- //
331
- // If the requested TimestampsToReturn is not supported for a Node, the operation shall return
332
- // the Bad_TimestampNotSupported StatusCode.
333
- const session = context.session;
334
- // istanbul ignore next
335
- if (!session) {
336
- throw new Error("Internal Error: context.session not defined");
337
- }
338
- // istanbul ignore next
339
- if (!session.continuationPointManager) {
340
- throw new Error("Internal Error: context.session.continuationPointManager not defined");
341
- }
342
- if (continuationData.continuationPoint) {
343
- const cnt = session.continuationPointManager.getNextHistoryReadRaw(historyReadRawModifiedDetails.numValuesPerNode, continuationData);
344
- const { statusCode, values } = cnt;
345
- const result2 = new node_opcua_service_history_1.HistoryReadResult({
346
- continuationPoint: cnt.continuationPoint,
347
- historyData: new node_opcua_service_history_1.HistoryData({ dataValues: values }),
348
- statusCode
349
- });
350
- return callback(null, result2);
351
- }
352
- // todo add special treatment for when startTime > endTime
353
- // ( in this case series must be return in reverse order )
354
- let maxNumberToExtract = 0;
355
- let isReversed = false;
356
- let reverseDataValue = false;
357
- if ((0, node_opcua_date_time_1.isMinDate)(historyReadRawModifiedDetails.endTime)) {
358
- // end time is not specified
359
- maxNumberToExtract = historyReadRawModifiedDetails.numValuesPerNode;
360
- if ((0, node_opcua_date_time_1.isMinDate)(historyReadRawModifiedDetails.startTime)) {
361
- // end start and start time are not specified, this is invalid
362
- const result = new node_opcua_service_history_1.HistoryReadResult({
363
- statusCode: node_opcua_status_code_1.StatusCodes.BadHistoryOperationUnsupported // should be an error
364
- });
365
- return callback(null, result);
366
- }
367
- }
368
- else if ((0, node_opcua_date_time_1.isMinDate)(historyReadRawModifiedDetails.startTime)) {
369
- // start time is not specified
370
- // end time is specified
371
- maxNumberToExtract = historyReadRawModifiedDetails.numValuesPerNode;
372
- isReversed = true;
373
- reverseDataValue = false;
374
- if (historyReadRawModifiedDetails.numValuesPerNode === 0) {
375
- // when start time is not specified
376
- // and end time is specified
377
- // numValuesPerNode shall be greater than 0
378
- const result = new node_opcua_service_history_1.HistoryReadResult({
379
- statusCode: node_opcua_status_code_1.StatusCodes.BadHistoryOperationUnsupported // should be an error
380
- });
381
- return callback(null, result);
382
- }
383
- }
384
- else {
385
- // start time is specified
386
- // end time is specified
387
- if (historyReadRawModifiedDetails.endTime.getTime() < historyReadRawModifiedDetails.startTime.getTime()) {
388
- reverseDataValue = true;
389
- const tmp = historyReadRawModifiedDetails.endTime;
390
- historyReadRawModifiedDetails.endTime = historyReadRawModifiedDetails.startTime;
391
- historyReadRawModifiedDetails.startTime = tmp;
392
- }
393
- }
394
- /*
395
- const maxHistoryContinuationPoints = this.engine.serverCapabilities.maxHistoryContinuationPoints;
396
- if (session.continuationPointManager.hasReachedMaximum(maxHistoryContinuationPoints)) {
397
- return new HistoryReadResult({ statusCode: StatusCodes.BadNoContinuationPoints });
398
- }
399
- */
400
- this._historyReadRawAsync(historyReadRawModifiedDetails, maxNumberToExtract, isReversed, reverseDataValue, (err, dataValues) => {
401
- if (err || !dataValues) {
402
- return callback(err);
403
- }
404
- const cnt = session.continuationPointManager.registerHistoryReadRaw(historyReadRawModifiedDetails.numValuesPerNode, dataValues, continuationData);
405
- const result = new node_opcua_service_history_1.HistoryReadResult({
406
- continuationPoint: cnt.continuationPoint,
407
- historyData: new node_opcua_service_history_1.HistoryData({ dataValues: cnt.values }),
408
- statusCode: cnt.statusCode
409
- });
410
- callback(null, result);
411
- });
412
- }
413
- function _historyReadRawModify(context, historyReadRawModifiedDetails, indexRange, dataEncoding, continuationData, callback) {
414
- const node = this;
415
- (0, node_opcua_assert_1.assert)(historyReadRawModifiedDetails instanceof node_opcua_service_history_1.ReadRawModifiedDetails);
416
- if (!historyReadRawModifiedDetails.isReadModified) {
417
- return node._historyReadRaw(context, historyReadRawModifiedDetails, indexRange, dataEncoding, continuationData, callback);
418
- }
419
- else {
420
- return node._historyReadModify(context, historyReadRawModifiedDetails, indexRange, dataEncoding, continuationData, callback);
421
- }
422
- }
423
- function _historyRead(context, historyReadDetails, indexRange, dataEncoding, continuationData, callback) {
424
- if (!this.canUserReadHistory(context)) {
425
- const result = new node_opcua_service_history_1.HistoryReadResult({
426
- statusCode: node_opcua_status_code_1.StatusCodes.BadUserAccessDenied
427
- });
428
- callback(null, result);
429
- }
430
- (0, node_opcua_assert_1.assert)(typeof callback === "function");
431
- if (historyReadDetails instanceof node_opcua_service_history_1.ReadRawModifiedDetails) {
432
- // note: only ReadRawModifiedDetails supported at this time
433
- return this._historyReadRawModify(context, historyReadDetails, indexRange, dataEncoding, continuationData, callback);
434
- }
435
- else if (historyReadDetails instanceof node_opcua_service_history_1.ReadEventDetails) {
436
- // The ReadEventDetails structure is used to read the Events from the history database for the
437
- // specified time domain for one or more HistoricalEventNodes. The Events are filtered based on
438
- // the filter structure provided. This filter includes the EventFields that are to be returned. For a
439
- // complete description of filter refer to Part 4.
440
- // The startTime and endTime are used to filter on the Time field for Events.
441
- // The time domain of the request is defined by startTime, endTime, and numValuesPerNode; at
442
- // least two of these shall be specified. If endTime is less than startTime, or endTime and
443
- // numValuesPerNode alone are specified then the data will be returned in reverse order with
444
- // later/newer data provided first as if time were flowing backward. If all three are specified then
445
- // the call shall return up to numValuesPerNode results going from startTime to endTime, in
446
- // either ascending or descending order depending on the relative values of startTime and
447
- // endTime. If numValuesPerNode is 0 then all of the values in the range are returned. The
448
- // default value is used to indicate when startTime, endTime or numValuesPerNode are not
449
- // specified.
450
- // It is specifically allowed for the startTime and the endTime to be identical. This allows the
451
- // Client to request the Event at a single instance in time. When the startTime and endTime are
452
- // identical then time is presumed to be flowing forward. If no data exists at the time specified
453
- // then the Server shall return the Good_NoData StatusCode.
454
- // If a startTime, endTime and numValuesPerNode are all provided, and if more than
455
- // numValuesPerNode Events exist within that time range for a given Node, then only
456
- // numValuesPerNode Events per Node are returned along with a ContinuationPoint. When a
457
- // ContinuationPoint is returned, a Client wanting the next numValuesPerNode values should
458
- // call HistoryRead again with the continuationPoint set.
459
- // If the request takes a long time to process then the Server can return partial results with a
460
- // ContinuationPoint. This might be done if the request is going to take more time than the Client
461
- // timeout hint. It may take longer than the Client timeout hint to retrieve any results. In this case
462
- // the Server may return zero results with a ContinuationPoint that allows the Server to resume
463
- // the calculation on the next Client HistoryRead call.
464
- // For an interval in which no data exists, the corresponding StatusCode shall be Good_NoData.
465
- // The filter parameter is used to determine which historical Events and their corresponding
466
- // fields are returned. It is possible that the fields of an EventType are available for real time
467
- // updating, but not available from the historian. In this case a StatusCode value will be returned
468
- // for any Event field that cannot be returned. The value of the StatusCode shall be
469
- // Bad_NoData.
470
- // If the requested TimestampsToReturn is not supported for a Node then the operation shall
471
- // return the Bad_TimestampNotSupported StatusCode. When reading Events this only applies
472
- // to Event fields that are of type DataValue.
473
- // todo provide correct implementation
474
- const result = new node_opcua_service_history_1.HistoryReadResult({
475
- historyData: new node_opcua_service_history_1.HistoryData({ dataValues: [] }),
476
- statusCode: node_opcua_status_code_1.StatusCodes.BadHistoryOperationUnsupported
477
- });
478
- return callback(null, result);
479
- }
480
- else if (historyReadDetails instanceof node_opcua_service_history_1.ReadProcessedDetails) {
481
- const addressSpace = this.addressSpace;
482
- if (!addressSpace._readProcessedDetails) {
483
- const result = new node_opcua_service_history_1.HistoryReadResult({
484
- historyData: new node_opcua_service_history_1.HistoryData({}),
485
- statusCode: node_opcua_status_code_1.StatusCodes.BadHistoryOperationUnsupported
486
- });
487
- return callback(null, result);
488
- }
489
- else {
490
- return addressSpace._readProcessedDetails(this, context, historyReadDetails, indexRange, dataEncoding, continuationData, callback);
491
- }
492
- }
493
- else if (historyReadDetails instanceof node_opcua_service_history_1.ReadAtTimeDetails) {
494
- // Release 1.03 28 OPC Unified Architecture, Part 11
495
- // The ReadAtTimeDetails structure reads the values and qualities from the history database for
496
- // the specified timestamps for one or more HistoricalDataNodes. This function is intended to
497
- // provide values to correlate with other values with a known timestamp. For example, a Client
498
- // may need to read the values of sensors when lab samples were collected.
499
- // The order of the values and qualities returned shall match the order of the timestamps
500
- // supplied in the request.
501
- // When no value exists for a specified timestamp, a value shall be Interpolated from the
502
- // surrounding values to represent the value at the specified timestamp. The interpolation will
503
- // follow the same rules as the standard Interpolated Aggregate as outlined in Part 13.
504
- // If the useSimpleBounds flag is True and Interpolation is required then simple bounding values
505
- // will be used to calculate the data value. If useSimpleBounds is False and Interpolation is
506
- // required then interpolated bounding values will be used to calculate the data value. See
507
- // Part 13 for the definition of simple bounding values and interpolated bounding values.
508
- // If a value is found for the specified timestamp, then the Server will set the StatusCode
509
- // InfoBits to be Raw. If the value is Interpolated from the surrounding values, then the Server
510
- // will set the StatusCode InfoBits to be Interpolated.
511
- // If the read request is taking a long time to calculate then the Server may return zero results
512
- // with a ContinuationPoint that allows the Server to resume the calculation on the next Client
513
- // HistoryRead call.
514
- // If the requested TimestampsToReturn is not supported for a Node, then the operation shall
515
- // return the Bad_TimestampNotSupported StatusCode.
516
- // todo provide correct implementation
517
- const result = new node_opcua_service_history_1.HistoryReadResult({
518
- historyData: new node_opcua_service_history_1.HistoryData({ dataValues: [] }),
519
- statusCode: node_opcua_status_code_1.StatusCodes.BadHistoryOperationUnsupported
520
- });
521
- return callback(null, result);
522
- }
523
- else {
524
- const result = new node_opcua_service_history_1.HistoryReadResult({
525
- historyData: new node_opcua_service_history_1.HistoryData({ dataValues: [] }),
526
- statusCode: node_opcua_status_code_1.StatusCodes.BadHistoryOperationUnsupported
527
- });
528
- return callback(null, result);
529
- }
530
- }
531
- function on_value_change(newDataValue) {
532
- this._historyPush.call(this, newDataValue);
533
- }
534
- /**
535
- * @method installHistoricalDataNode
536
- * @param node UAVariable
537
- * @param [options] {Object}
538
- * @param [options.maxOnlineValues = 1000]
539
- */
540
- function AddressSpace_installHistoricalDataNode(node, options) {
541
- var _a, _b, _c;
542
- address_space_ts_1.AddressSpace.historizerFactory = address_space_ts_1.AddressSpace.historizerFactory || {
543
- create(node1, options1) {
544
- return new VariableHistorian(node1, options1);
545
- }
546
- };
547
- (0, node_opcua_assert_1.assert)(node.nodeClass === node_opcua_data_model_1.NodeClass.Variable);
548
- options = options || {};
549
- const addressSpace = node.addressSpace;
550
- // install specific history behavior
551
- node._historyRead = _historyRead;
552
- node._historyPush = _historyPush;
553
- node._historyReadRawModify = _historyReadRawModify;
554
- node._historyReadModify = _historyReadModify;
555
- node._historyReadRaw = _historyReadRaw;
556
- node._historyReadRawAsync = _historyReadRawAsync;
557
- node.varHistorian = options.historian || address_space_ts_1.AddressSpace.historizerFactory.create(node, options);
558
- const historicalDataConfigurationType = addressSpace.findObjectType("HistoricalDataConfigurationType");
559
- if (!historicalDataConfigurationType) {
560
- throw new Error("cannot find HistoricalDataConfigurationType");
561
- }
562
- node.historizing = true;
563
- // tslint:disable:no-bitwise
564
- node.accessLevel = node.accessLevel | node_opcua_data_model_1.AccessLevelFlag.CurrentRead | node_opcua_data_model_1.AccessLevelFlag.HistoryRead;
565
- if (node.userAccessLevel !== undefined) {
566
- node.userAccessLevel = node.userAccessLevel | node_opcua_data_model_1.AccessLevelFlag.CurrentRead | node_opcua_data_model_1.AccessLevelFlag.HistoryRead;
567
- }
568
- const optionals = ["Stepped", "Definition", "MaxTimeInterval", "MinTimeInterval", "StartOfArchive", "StartOfOnlineArchive"];
569
- // Note from spec : If a HistoricalDataNode has configuration defined then one
570
- // instance shall have a BrowseName of ‘HA Configuration’
571
- const historicalDataConfiguration = historicalDataConfigurationType.instantiate({
572
- browseName: { name: "HA Configuration", namespaceIndex: 0 },
573
- optionals
574
- });
575
- // All Historical Configuration Objects shall be referenced using the HasHistoricalConfiguration ReferenceType.
576
- node.addReference({
577
- isForward: true,
578
- nodeId: historicalDataConfiguration.nodeId,
579
- referenceType: "HasHistoricalConfiguration"
580
- });
581
- // The Stepped Variable specifies whether the historical data was collected in such a manner
582
- // that it should be displayed as SlopedInterpolation (sloped line between points) or as
583
- // SteppedInterpolation (vertically-connected horizontal lines between points) when raw data is
584
- // examined. This Property also effects how some Aggregates are calculated. A value of True
585
- // indicates the stepped interpolation mode. A value of False indicates SlopedInterpolation
586
- // mode. The default value is False.
587
- historicalDataConfiguration.stepped.setValueFromSource({ dataType: "Boolean", value: false });
588
- // The MaxTimeInterval Variable specifies the maximum interval between data points in the
589
- // history repository regardless of their value change (see Part 3 for definition of Duration).
590
- (_a = historicalDataConfiguration.maxTimeInterval) === null || _a === void 0 ? void 0 : _a.setValueFromSource({ dataType: "Duration", value: 10 * 1000 });
591
- // The MinTimeInterval Variable specifies the minimum interval between data points in the
592
- // history repository regardless of their value change
593
- (_b = historicalDataConfiguration.minTimeInterval) === null || _b === void 0 ? void 0 : _b.setValueFromSource({ dataType: "Duration", value: 0.1 * 1000 });
594
- // The StartOfArchive Variable specifies the date before which there is no data in the archive
595
- // either online or offline.
596
- // The StartOfOnlineArchive Variable specifies the date of the earliest data in the online archive.
597
- const startOfOnlineArchive = new Date();
598
- (_c = historicalDataConfiguration.startOfOnlineArchive) === null || _c === void 0 ? void 0 : _c.setValueFromSource({
599
- dataType: node_opcua_variant_1.DataType.DateTime,
600
- value: startOfOnlineArchive
601
- });
602
- // TreatUncertainAsBad
603
- // The TreatUncertainAsBad Variable indicates how the Server treats data returned with a
604
- // StatusCode severity Uncertain with respect to Aggregate calculations. A value of True indicates
605
- // the Server considers the severity equivalent to Bad, a value of False indicates the Server
606
- // considers the severity equivalent to Good, unless the Aggregate definition says otherwise. The
607
- // default value is True. Note that the value is still treated as Uncertain when the StatusCode for
608
- // the result is calculated.
609
- historicalDataConfiguration.aggregateConfiguration.treatUncertainAsBad.setValueFromSource({
610
- dataType: "Boolean",
611
- value: true
612
- });
613
- // The PercentDataBad Variable indicates the minimum percentage of Bad data in a given interval required for the
614
- // StatusCode for the given interval for processed data request to be set to Bad.
615
- // (Uncertain is treated as defined above.) Refer to 5.4.3 for details on using this Variable when assigning
616
- // StatusCodes. For details on which Aggregates use the PercentDataBad Variable, see
617
- // the definition of each Aggregate. The default value is 100.
618
- historicalDataConfiguration.aggregateConfiguration.percentDataBad.setValueFromSource({
619
- dataType: "Byte",
620
- value: 100
621
- });
622
- // The PercentDataGood Variable indicates the minimum percentage of Good data in a given
623
- // interval required for the StatusCode for the given interval for the processed data requests to be
624
- // set to Good. Refer to 5.4.3 for details on using this Variable when assigning StatusCodes. For
625
- // details on which Aggregates use the PercentDataGood Variable, see the definition of each
626
- // Aggregate. The default value is 100.
627
- historicalDataConfiguration.aggregateConfiguration.percentDataGood.setValueFromSource({
628
- dataType: "Byte",
629
- value: 100
630
- });
631
- //
632
- // The PercentDataGood and PercentDataBad shall follow the following relationship
633
- // PercentDataGood ≥ (100 – PercentDataBad). If they are equal the result of the
634
- // PercentDataGood calculation is used. If the values entered for PercentDataGood and
635
- //
636
- // PercentDataBad do not result in a valid calculation (e.g. Bad = 80; Good = 0) the result will
637
- // have a StatusCode of Bad_AggregateInvalidInputs The StatusCode
638
- //
639
- // Bad_AggregateInvalidInputs will be returned if the value of PercentDataGood or
640
- // PercentDataBad exceed 100.
641
- node.$historicalDataConfiguration = historicalDataConfiguration;
642
- const dataValue = node.readValue();
643
- if (dataValue.statusCode.isNot(node_opcua_status_code_1.StatusCodes.BadWaitingForInitialData) &&
644
- dataValue.statusCode.isNot(node_opcua_status_code_1.StatusCodes.UncertainInitialValue)) {
645
- on_value_change.call(node, dataValue);
646
- }
647
- node.on("value_changed", on_value_change);
648
- // update the index of historizing nodes in the addressSpace
649
- node.addressSpace.historizingNodes = node.addressSpace.historizingNodes || {};
650
- node.addressSpace.historizingNodes[node.nodeId.toString()] = node;
651
- }
652
- exports.AddressSpace_installHistoricalDataNode = AddressSpace_installHistoricalDataNode;
653
- //# sourceMappingURL=address_space_historical_data_node.js.map