node-opcua-address-space 2.51.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 (598) hide show
  1. package/.mocharc.yml +12 -0
  2. package/LICENSE +20 -0
  3. package/dist/source/address_space_ts.d.ts +122 -0
  4. package/dist/source/address_space_ts.js +18 -0
  5. package/dist/source/address_space_ts.js.map +1 -0
  6. package/dist/source/continuation_points/continuation_point_manager.d.ts +21 -0
  7. package/dist/source/continuation_points/continuation_point_manager.js +100 -0
  8. package/dist/source/continuation_points/continuation_point_manager.js.map +1 -0
  9. package/dist/source/helpers/adjust_browse_direction.d.ts +5 -0
  10. package/dist/source/helpers/adjust_browse_direction.js +12 -0
  11. package/dist/source/helpers/adjust_browse_direction.js.map +1 -0
  12. package/dist/source/helpers/argument_list.d.ts +30 -0
  13. package/dist/source/helpers/argument_list.js +237 -0
  14. package/dist/source/helpers/argument_list.js.map +1 -0
  15. package/dist/source/helpers/call_helpers.d.ts +6 -0
  16. package/dist/source/helpers/call_helpers.js +71 -0
  17. package/dist/source/helpers/call_helpers.js.map +1 -0
  18. package/dist/source/helpers/check_event_clause.d.ts +17 -0
  19. package/dist/source/helpers/check_event_clause.js +53 -0
  20. package/dist/source/helpers/check_event_clause.js.map +1 -0
  21. package/dist/source/helpers/coerce_enum_value.d.ts +6 -0
  22. package/dist/source/helpers/coerce_enum_value.js +34 -0
  23. package/dist/source/helpers/coerce_enum_value.js.map +1 -0
  24. package/dist/source/helpers/dump_tools.d.ts +14 -0
  25. package/dist/source/helpers/dump_tools.js +79 -0
  26. package/dist/source/helpers/dump_tools.js.map +1 -0
  27. package/dist/source/helpers/ensure_secure_access.d.ts +9 -0
  28. package/dist/source/helpers/ensure_secure_access.js +90 -0
  29. package/dist/source/helpers/ensure_secure_access.js.map +1 -0
  30. package/dist/source/helpers/make_optionals_map.d.ts +21 -0
  31. package/dist/source/helpers/make_optionals_map.js +30 -0
  32. package/dist/source/helpers/make_optionals_map.js.map +1 -0
  33. package/dist/source/helpers/resolve_opaque_on_address_space.d.ts +3 -0
  34. package/dist/source/helpers/resolve_opaque_on_address_space.js +37 -0
  35. package/dist/source/helpers/resolve_opaque_on_address_space.js.map +1 -0
  36. package/dist/source/index.d.ts +39 -0
  37. package/dist/source/index.js +62 -0
  38. package/dist/source/index.js.map +1 -0
  39. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +12 -0
  40. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js +3 -0
  41. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js.map +1 -0
  42. package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.d.ts +1 -0
  43. package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js +3 -0
  44. package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js.map +1 -0
  45. package/dist/source/interfaces/data_access/ua_discrete_item.d.ts +4 -0
  46. package/dist/source/interfaces/data_access/ua_discrete_item.js +3 -0
  47. package/dist/source/interfaces/data_access/ua_discrete_item.js.map +1 -0
  48. package/dist/source/interfaces/data_access/ua_multistate_discrete.d.ts +25 -0
  49. package/dist/source/interfaces/data_access/ua_multistate_discrete.js +3 -0
  50. package/dist/source/interfaces/data_access/ua_multistate_discrete.js.map +1 -0
  51. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +21 -0
  52. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js +3 -0
  53. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js.map +1 -0
  54. package/dist/source/interfaces/data_access/ua_multistate_value_discrete.d.ts +27 -0
  55. package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js +3 -0
  56. package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js.map +1 -0
  57. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +24 -0
  58. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js +3 -0
  59. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js.map +1 -0
  60. package/dist/source/interfaces/data_access/ua_two_state_discrete.d.ts +17 -0
  61. package/dist/source/interfaces/data_access/ua_two_state_discrete.js +3 -0
  62. package/dist/source/interfaces/data_access/ua_two_state_discrete.js.map +1 -0
  63. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +12 -0
  64. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js +3 -0
  65. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js.map +1 -0
  66. package/dist/source/interfaces/data_access/ua_y_array_item.d.ts +4 -0
  67. package/dist/source/interfaces/data_access/ua_y_array_item.js +3 -0
  68. package/dist/source/interfaces/data_access/ua_y_array_item.js.map +1 -0
  69. package/dist/source/interfaces/data_access/ua_y_array_item_ex.d.ts +8 -0
  70. package/dist/source/interfaces/data_access/ua_y_array_item_ex.js +3 -0
  71. package/dist/source/interfaces/data_access/ua_y_array_item_ex.js.map +1 -0
  72. package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.d.ts +11 -0
  73. package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js +3 -0
  74. package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js.map +1 -0
  75. package/dist/source/interfaces/state_machine/finite_state_machine.d.ts +69 -0
  76. package/dist/source/interfaces/state_machine/finite_state_machine.js +3 -0
  77. package/dist/source/interfaces/state_machine/finite_state_machine.js.map +1 -0
  78. package/dist/source/interfaces/state_machine/program_finite_state_machine.d.ts +74 -0
  79. package/dist/source/interfaces/state_machine/program_finite_state_machine.js +3 -0
  80. package/dist/source/interfaces/state_machine/program_finite_state_machine.js.map +1 -0
  81. package/dist/source/interfaces/state_machine/state_machine.d.ts +342 -0
  82. package/dist/source/interfaces/state_machine/state_machine.js +3 -0
  83. package/dist/source/interfaces/state_machine/state_machine.js.map +1 -0
  84. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +12 -0
  85. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js +3 -0
  86. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js.map +1 -0
  87. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +49 -0
  88. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js +3 -0
  89. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js.map +1 -0
  90. package/dist/source/interfaces/state_machine/ua_finite_state_variable.d.ts +18 -0
  91. package/dist/source/interfaces/state_machine/ua_finite_state_variable.js +3 -0
  92. package/dist/source/interfaces/state_machine/ua_finite_state_variable.js.map +1 -0
  93. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +11 -0
  94. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js +3 -0
  95. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js.map +1 -0
  96. package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +222 -0
  97. package/dist/source/interfaces/state_machine/ua_state_machine_type.js +3 -0
  98. package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +1 -0
  99. package/dist/source/interfaces/state_machine/ua_state_variable.d.ts +29 -0
  100. package/dist/source/interfaces/state_machine/ua_state_variable.js +3 -0
  101. package/dist/source/interfaces/state_machine/ua_state_variable.js.map +1 -0
  102. package/dist/source/interfaces/state_machine/ua_transition_ex.d.ts +6 -0
  103. package/dist/source/interfaces/state_machine/ua_transition_ex.js +3 -0
  104. package/dist/source/interfaces/state_machine/ua_transition_ex.js.map +1 -0
  105. package/dist/source/interfaces/state_machine/ua_two_state_variable.d.ts +26 -0
  106. package/dist/source/interfaces/state_machine/ua_two_state_variable.js +3 -0
  107. package/dist/source/interfaces/state_machine/ua_two_state_variable.js.map +1 -0
  108. package/dist/source/interfaces/subscription_diagnostics_variable.d.ts +41 -0
  109. package/dist/source/interfaces/subscription_diagnostics_variable.js +3 -0
  110. package/dist/source/interfaces/subscription_diagnostics_variable.js.map +1 -0
  111. package/dist/source/interfaces/ua_authorisation_service.d.ts +1 -0
  112. package/dist/source/interfaces/ua_authorisation_service.js +3 -0
  113. package/dist/source/interfaces/ua_authorisation_service.js.map +1 -0
  114. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +8 -0
  115. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js +3 -0
  116. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -0
  117. package/dist/source/loader/generateAddressSpaceRaw.d.ts +10 -0
  118. package/dist/source/loader/generateAddressSpaceRaw.js +59 -0
  119. package/dist/source/loader/generateAddressSpaceRaw.js.map +1 -0
  120. package/dist/source/loader/load_nodeset2.d.ts +13 -0
  121. package/dist/source/loader/load_nodeset2.js +1392 -0
  122. package/dist/source/loader/load_nodeset2.js.map +1 -0
  123. package/dist/source/loader/namespace_post_step.d.ts +6 -0
  124. package/dist/source/loader/namespace_post_step.js +48 -0
  125. package/dist/source/loader/namespace_post_step.js.map +1 -0
  126. package/dist/source/loader/register_node_promoter.d.ts +3 -0
  127. package/dist/source/loader/register_node_promoter.js +10 -0
  128. package/dist/source/loader/register_node_promoter.js.map +1 -0
  129. package/dist/source/namespace.d.ts +6 -0
  130. package/dist/source/namespace.js +3 -0
  131. package/dist/source/namespace.js.map +1 -0
  132. package/dist/source/namespace_alarm_and_condition.d.ts +24 -0
  133. package/dist/source/namespace_alarm_and_condition.js +3 -0
  134. package/dist/source/namespace_alarm_and_condition.js.map +1 -0
  135. package/dist/source/namespace_data_access.d.ts +42 -0
  136. package/dist/source/namespace_data_access.js +3 -0
  137. package/dist/source/namespace_data_access.js.map +1 -0
  138. package/dist/source/namespace_machine_state.d.ts +7 -0
  139. package/dist/source/namespace_machine_state.js +3 -0
  140. package/dist/source/namespace_machine_state.js.map +1 -0
  141. package/dist/source/pseudo_session.d.ts +55 -0
  142. package/dist/source/pseudo_session.js +205 -0
  143. package/dist/source/pseudo_session.js.map +1 -0
  144. package/dist/source/session_context.d.ts +111 -0
  145. package/dist/source/session_context.js +266 -0
  146. package/dist/source/session_context.js.map +1 -0
  147. package/dist/source/set_namespace_meta_data.d.ts +2 -0
  148. package/dist/source/set_namespace_meta_data.js +60 -0
  149. package/dist/source/set_namespace_meta_data.js.map +1 -0
  150. package/dist/source/ua_namespace_meta_data_type.d.ts +71 -0
  151. package/dist/source/ua_namespace_meta_data_type.js +3 -0
  152. package/dist/source/ua_namespace_meta_data_type.js.map +1 -0
  153. package/dist/source/ua_root_folder.d.ts +9 -0
  154. package/dist/source/ua_root_folder.js +3 -0
  155. package/dist/source/ua_root_folder.js.map +1 -0
  156. package/dist/source/ua_two_state_variable_ex.d.ts +23 -0
  157. package/dist/source/ua_two_state_variable_ex.js +3 -0
  158. package/dist/source/ua_two_state_variable_ex.js.map +1 -0
  159. package/dist/source/xml_writer.d.ts +9 -0
  160. package/dist/source/xml_writer.js +3 -0
  161. package/dist/source/xml_writer.js.map +1 -0
  162. package/dist/src/address_space.d.ts +393 -0
  163. package/dist/src/address_space.js +1375 -0
  164. package/dist/src/address_space.js.map +1 -0
  165. package/dist/src/address_space_change_event_tools.d.ts +6 -0
  166. package/dist/src/address_space_change_event_tools.js +150 -0
  167. package/dist/src/address_space_change_event_tools.js.map +1 -0
  168. package/dist/src/address_space_private.d.ts +44 -0
  169. package/dist/src/address_space_private.js +3 -0
  170. package/dist/src/address_space_private.js.map +1 -0
  171. package/dist/src/alarms_and_conditions/base_event_type.d.ts +26 -0
  172. package/dist/src/alarms_and_conditions/base_event_type.js +41 -0
  173. package/dist/src/alarms_and_conditions/base_event_type.js.map +1 -0
  174. package/dist/src/alarms_and_conditions/check_where_clause.d.ts +4 -0
  175. package/dist/src/alarms_and_conditions/check_where_clause.js +110 -0
  176. package/dist/src/alarms_and_conditions/check_where_clause.js.map +1 -0
  177. package/dist/src/alarms_and_conditions/condition.d.ts +5 -0
  178. package/dist/src/alarms_and_conditions/condition.js +81 -0
  179. package/dist/src/alarms_and_conditions/condition.js.map +1 -0
  180. package/dist/src/alarms_and_conditions/condition_info.d.ts +27 -0
  181. package/dist/src/alarms_and_conditions/condition_info.js +55 -0
  182. package/dist/src/alarms_and_conditions/condition_info.js.map +1 -0
  183. package/dist/src/alarms_and_conditions/condition_snapshot.d.ts +232 -0
  184. package/dist/src/alarms_and_conditions/condition_snapshot.js +667 -0
  185. package/dist/src/alarms_and_conditions/condition_snapshot.js.map +1 -0
  186. package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +21 -0
  187. package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +47 -0
  188. package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -0
  189. package/dist/src/alarms_and_conditions/extract_event_fields.d.ts +10 -0
  190. package/dist/src/alarms_and_conditions/extract_event_fields.js +90 -0
  191. package/dist/src/alarms_and_conditions/extract_event_fields.js.map +1 -0
  192. package/dist/src/alarms_and_conditions/index.d.ts +18 -0
  193. package/dist/src/alarms_and_conditions/index.js +31 -0
  194. package/dist/src/alarms_and_conditions/index.js.map +1 -0
  195. package/dist/src/alarms_and_conditions/shelving_state_machine.d.ts +22 -0
  196. package/dist/src/alarms_and_conditions/shelving_state_machine.js +241 -0
  197. package/dist/src/alarms_and_conditions/shelving_state_machine.js.map +1 -0
  198. package/dist/src/alarms_and_conditions/trip_alarm.d.ts +16 -0
  199. package/dist/src/alarms_and_conditions/trip_alarm.js +21 -0
  200. package/dist/src/alarms_and_conditions/trip_alarm.js.map +1 -0
  201. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.d.ts +54 -0
  202. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js +255 -0
  203. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js.map +1 -0
  204. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +62 -0
  205. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +244 -0
  206. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -0
  207. package/dist/src/alarms_and_conditions/ua_alarm_condition_base.d.ts +138 -0
  208. package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js +460 -0
  209. package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js.map +1 -0
  210. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +118 -0
  211. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +417 -0
  212. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -0
  213. package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +29 -0
  214. package/dist/src/alarms_and_conditions/ua_base_event_impl.js +39 -0
  215. package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -0
  216. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.d.ts +35 -0
  217. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js +32 -0
  218. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js.map +1 -0
  219. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +21 -0
  220. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +26 -0
  221. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -0
  222. package/dist/src/alarms_and_conditions/ua_condition_base.d.ts +191 -0
  223. package/dist/src/alarms_and_conditions/ua_condition_base.js +1029 -0
  224. package/dist/src/alarms_and_conditions/ua_condition_base.js.map +1 -0
  225. package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +182 -0
  226. package/dist/src/alarms_and_conditions/ua_condition_impl.js +1021 -0
  227. package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -0
  228. package/dist/src/alarms_and_conditions/ua_discrete_alarm.d.ts +11 -0
  229. package/dist/src/alarms_and_conditions/ua_discrete_alarm.js +58 -0
  230. package/dist/src/alarms_and_conditions/ua_discrete_alarm.js.map +1 -0
  231. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +17 -0
  232. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +58 -0
  233. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -0
  234. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.d.ts +24 -0
  235. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js +59 -0
  236. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js.map +1 -0
  237. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +27 -0
  238. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +57 -0
  239. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -0
  240. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.d.ts +14 -0
  241. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js +17 -0
  242. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js.map +1 -0
  243. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +9 -0
  244. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +12 -0
  245. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -0
  246. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.d.ts +22 -0
  247. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js +87 -0
  248. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js.map +1 -0
  249. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +38 -0
  250. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +87 -0
  251. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -0
  252. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.d.ts +6 -0
  253. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js +11 -0
  254. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js.map +1 -0
  255. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +10 -0
  256. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js +8 -0
  257. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -0
  258. package/dist/src/alarms_and_conditions/ua_limit_alarm.d.ts +76 -0
  259. package/dist/src/alarms_and_conditions/ua_limit_alarm.js +237 -0
  260. package/dist/src/alarms_and_conditions/ua_limit_alarm.js.map +1 -0
  261. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +98 -0
  262. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +233 -0
  263. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -0
  264. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.d.ts +27 -0
  265. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js +62 -0
  266. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js.map +1 -0
  267. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +28 -0
  268. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +51 -0
  269. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -0
  270. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.d.ts +49 -0
  271. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js +176 -0
  272. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js.map +1 -0
  273. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +25 -0
  274. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +163 -0
  275. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -0
  276. package/dist/src/alarms_and_conditions/ua_off_normal_alarm.d.ts +47 -0
  277. package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js +151 -0
  278. package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js.map +1 -0
  279. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +39 -0
  280. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +136 -0
  281. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -0
  282. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.d.ts +16 -0
  283. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js +18 -0
  284. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js.map +1 -0
  285. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +16 -0
  286. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +18 -0
  287. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -0
  288. package/dist/src/apply_condition_refresh.d.ts +6 -0
  289. package/dist/src/apply_condition_refresh.js +28 -0
  290. package/dist/src/apply_condition_refresh.js.map +1 -0
  291. package/dist/src/base_node.d.ts +279 -0
  292. package/dist/src/base_node.js +1364 -0
  293. package/dist/src/base_node.js.map +1 -0
  294. package/dist/src/base_node_impl.d.ts +281 -0
  295. package/dist/src/base_node_impl.js +1394 -0
  296. package/dist/src/base_node_impl.js.map +1 -0
  297. package/dist/src/base_node_private.d.ts +61 -0
  298. package/dist/src/base_node_private.js +521 -0
  299. package/dist/src/base_node_private.js.map +1 -0
  300. package/dist/src/data_access/add_dataItem_stuff.d.ts +11 -0
  301. package/dist/src/data_access/add_dataItem_stuff.js +62 -0
  302. package/dist/src/data_access/add_dataItem_stuff.js.map +1 -0
  303. package/dist/src/data_access/check_variant_compatibility_ua_analog_item.d.ts +1 -0
  304. package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js +35 -0
  305. package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js.map +1 -0
  306. package/dist/src/data_access/ua_analog_item.d.ts +13 -0
  307. package/dist/src/data_access/ua_analog_item.js +37 -0
  308. package/dist/src/data_access/ua_analog_item.js.map +1 -0
  309. package/dist/src/data_access/ua_data_item.d.ts +16 -0
  310. package/dist/src/data_access/ua_data_item.js +66 -0
  311. package/dist/src/data_access/ua_data_item.js.map +1 -0
  312. package/dist/src/data_access/ua_multistate_discrete.d.ts +23 -0
  313. package/dist/src/data_access/ua_multistate_discrete.js +131 -0
  314. package/dist/src/data_access/ua_multistate_discrete.js.map +1 -0
  315. package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +32 -0
  316. package/dist/src/data_access/ua_multistate_discrete_impl.js +131 -0
  317. package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -0
  318. package/dist/src/data_access/ua_multistate_value_discrete.d.ts +51 -0
  319. package/dist/src/data_access/ua_multistate_value_discrete.js +249 -0
  320. package/dist/src/data_access/ua_multistate_value_discrete.js.map +1 -0
  321. package/dist/src/data_access/ua_two_state_discrete.d.ts +25 -0
  322. package/dist/src/data_access/ua_two_state_discrete.js +154 -0
  323. package/dist/src/data_access/ua_two_state_discrete.js.map +1 -0
  324. package/dist/src/event_data.d.ts +29 -0
  325. package/dist/src/event_data.js +96 -0
  326. package/dist/src/event_data.js.map +1 -0
  327. package/dist/src/extension_object_array_node.d.ts +61 -0
  328. package/dist/src/extension_object_array_node.js +266 -0
  329. package/dist/src/extension_object_array_node.js.map +1 -0
  330. package/dist/src/historical_access/address_space_historical_data_node.d.ts +26 -0
  331. package/dist/src/historical_access/address_space_historical_data_node.js +662 -0
  332. package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -0
  333. package/dist/src/index_current.d.ts +42 -0
  334. package/dist/src/index_current.js +71 -0
  335. package/dist/src/index_current.js.map +1 -0
  336. package/dist/src/namespace.d.ts +475 -0
  337. package/dist/src/namespace.js +1775 -0
  338. package/dist/src/namespace.js.map +1 -0
  339. package/dist/src/namespace_impl.d.ts +463 -0
  340. package/dist/src/namespace_impl.js +1763 -0
  341. package/dist/src/namespace_impl.js.map +1 -0
  342. package/dist/src/namespace_private.d.ts +21 -0
  343. package/dist/src/namespace_private.js +29 -0
  344. package/dist/src/namespace_private.js.map +1 -0
  345. package/dist/src/nodeid_manager.d.ts +36 -0
  346. package/dist/src/nodeid_manager.js +196 -0
  347. package/dist/src/nodeid_manager.js.map +1 -0
  348. package/dist/src/nodeset_tools/adjust_namespace_array.d.ts +2 -0
  349. package/dist/src/nodeset_tools/adjust_namespace_array.js +14 -0
  350. package/dist/src/nodeset_tools/adjust_namespace_array.js.map +1 -0
  351. package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +2 -0
  352. package/dist/src/nodeset_tools/construct_namespace_dependency.js +39 -0
  353. package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +1 -0
  354. package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +2 -0
  355. package/dist/src/nodeset_tools/nodeset_to_xml.js +1155 -0
  356. package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -0
  357. package/dist/src/nodeset_tools/typedictionary_to_xml.d.ts +2 -0
  358. package/dist/src/nodeset_tools/typedictionary_to_xml.js +147 -0
  359. package/dist/src/nodeset_tools/typedictionary_to_xml.js.map +1 -0
  360. package/dist/src/reference.d.ts +43 -0
  361. package/dist/src/reference.js +138 -0
  362. package/dist/src/reference.js.map +1 -0
  363. package/dist/src/reference_impl.d.ts +43 -0
  364. package/dist/src/reference_impl.js +138 -0
  365. package/dist/src/reference_impl.js.map +1 -0
  366. package/dist/src/role_permissions.d.ts +2 -0
  367. package/dist/src/role_permissions.js +11 -0
  368. package/dist/src/role_permissions.js.map +1 -0
  369. package/dist/src/session_context.d.ts +4 -0
  370. package/dist/src/session_context.js +9 -0
  371. package/dist/src/session_context.js.map +1 -0
  372. package/dist/src/state_machine/finite_state_machine.d.ts +67 -0
  373. package/dist/src/state_machine/finite_state_machine.js +354 -0
  374. package/dist/src/state_machine/finite_state_machine.js.map +1 -0
  375. package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +34 -0
  376. package/dist/src/state_machine/ua_shelving_state_machine_ex.js +244 -0
  377. package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -0
  378. package/dist/src/state_machine/ua_two_state_variable.d.ts +61 -0
  379. package/dist/src/state_machine/ua_two_state_variable.js +332 -0
  380. package/dist/src/state_machine/ua_two_state_variable.js.map +1 -0
  381. package/dist/src/tool_isSupertypeOf.d.ts +17 -0
  382. package/dist/src/tool_isSupertypeOf.js +103 -0
  383. package/dist/src/tool_isSupertypeOf.js.map +1 -0
  384. package/dist/src/ua_condition_type.d.ts +8 -0
  385. package/dist/src/ua_condition_type.js +3 -0
  386. package/dist/src/ua_condition_type.js.map +1 -0
  387. package/dist/src/ua_data_type.d.ts +83 -0
  388. package/dist/src/ua_data_type.js +289 -0
  389. package/dist/src/ua_data_type.js.map +1 -0
  390. package/dist/src/ua_data_type_impl.d.ts +83 -0
  391. package/dist/src/ua_data_type_impl.js +291 -0
  392. package/dist/src/ua_data_type_impl.js.map +1 -0
  393. package/dist/src/ua_method.d.ts +42 -0
  394. package/dist/src/ua_method.js +204 -0
  395. package/dist/src/ua_method.js.map +1 -0
  396. package/dist/src/ua_method_impl.d.ts +40 -0
  397. package/dist/src/ua_method_impl.js +203 -0
  398. package/dist/src/ua_method_impl.js.map +1 -0
  399. package/dist/src/ua_object.d.ts +29 -0
  400. package/dist/src/ua_object.js +153 -0
  401. package/dist/src/ua_object.js.map +1 -0
  402. package/dist/src/ua_object_impl.d.ts +29 -0
  403. package/dist/src/ua_object_impl.js +156 -0
  404. package/dist/src/ua_object_impl.js.map +1 -0
  405. package/dist/src/ua_object_type.d.ts +49 -0
  406. package/dist/src/ua_object_type.js +124 -0
  407. package/dist/src/ua_object_type.js.map +1 -0
  408. package/dist/src/ua_object_type_impl.d.ts +48 -0
  409. package/dist/src/ua_object_type_impl.js +124 -0
  410. package/dist/src/ua_object_type_impl.js.map +1 -0
  411. package/dist/src/ua_reference_type.d.ts +42 -0
  412. package/dist/src/ua_reference_type.js +138 -0
  413. package/dist/src/ua_reference_type.js.map +1 -0
  414. package/dist/src/ua_reference_type_impl.d.ts +43 -0
  415. package/dist/src/ua_reference_type_impl.js +138 -0
  416. package/dist/src/ua_reference_type_impl.js.map +1 -0
  417. package/dist/src/ua_variable.d.ts +346 -0
  418. package/dist/src/ua_variable.js +1721 -0
  419. package/dist/src/ua_variable.js.map +1 -0
  420. package/dist/src/ua_variable_impl.d.ts +353 -0
  421. package/dist/src/ua_variable_impl.js +1719 -0
  422. package/dist/src/ua_variable_impl.js.map +1 -0
  423. package/dist/src/ua_variable_type.d.ts +54 -0
  424. package/dist/src/ua_variable_type.js +555 -0
  425. package/dist/src/ua_variable_type.js.map +1 -0
  426. package/dist/src/ua_variable_type_impl.d.ts +63 -0
  427. package/dist/src/ua_variable_type_impl.js +556 -0
  428. package/dist/src/ua_variable_type_impl.js.map +1 -0
  429. package/dist/src/ua_view.d.ts +16 -0
  430. package/dist/src/ua_view.js +42 -0
  431. package/dist/src/ua_view.js.map +1 -0
  432. package/dist/src/ua_view_impl.d.ts +15 -0
  433. package/dist/src/ua_view_impl.js +37 -0
  434. package/dist/src/ua_view_impl.js.map +1 -0
  435. package/distHelpers/add_event_generator_object.d.ts +3 -0
  436. package/distHelpers/add_event_generator_object.js +66 -0
  437. package/distHelpers/add_event_generator_object.js.map +1 -0
  438. package/distHelpers/alarms_and_conditions_demo.d.ts +10 -0
  439. package/distHelpers/alarms_and_conditions_demo.js +115 -0
  440. package/distHelpers/alarms_and_conditions_demo.js.map +1 -0
  441. package/distHelpers/assertHasMatchingReference.d.ts +19 -0
  442. package/distHelpers/assertHasMatchingReference.js +41 -0
  443. package/distHelpers/assertHasMatchingReference.js.map +1 -0
  444. package/distHelpers/boiler_system.d.ts +113 -0
  445. package/distHelpers/boiler_system.js +397 -0
  446. package/distHelpers/boiler_system.js.map +1 -0
  447. package/distHelpers/create_minimalist_address_space_nodeset.d.ts +5 -0
  448. package/distHelpers/create_minimalist_address_space_nodeset.js +171 -0
  449. package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -0
  450. package/distHelpers/dump_statemachine.d.ts +6 -0
  451. package/distHelpers/dump_statemachine.js +116 -0
  452. package/distHelpers/dump_statemachine.js.map +1 -0
  453. package/distHelpers/get_address_space_fixture.d.ts +1 -0
  454. package/distHelpers/get_address_space_fixture.js +31 -0
  455. package/distHelpers/get_address_space_fixture.js.map +1 -0
  456. package/distHelpers/get_mini_address_space.d.ts +7 -0
  457. package/distHelpers/get_mini_address_space.js +37 -0
  458. package/distHelpers/get_mini_address_space.js.map +1 -0
  459. package/distHelpers/index.d.ts +11 -0
  460. package/distHelpers/index.js +24 -0
  461. package/distHelpers/index.js.map +1 -0
  462. package/distNodeJS/generate_address_space.d.ts +4 -0
  463. package/distNodeJS/generate_address_space.js +31 -0
  464. package/distNodeJS/generate_address_space.js.map +1 -0
  465. package/distNodeJS/index.d.ts +1 -0
  466. package/distNodeJS/index.js +14 -0
  467. package/distNodeJS/index.js.map +1 -0
  468. package/generate.js +1 -0
  469. package/nodeJS.d.ts +1 -0
  470. package/nodeJS.js +1 -0
  471. package/package.json +87 -0
  472. package/source/address_space_ts.ts +217 -0
  473. package/source/continuation_points/continuation_point_manager.ts +121 -0
  474. package/source/helpers/adjust_browse_direction.ts +15 -0
  475. package/source/helpers/argument_list.ts +286 -0
  476. package/source/helpers/call_helpers.ts +112 -0
  477. package/source/helpers/check_event_clause.ts +62 -0
  478. package/source/helpers/coerce_enum_value.ts +33 -0
  479. package/source/helpers/dump_tools.ts +92 -0
  480. package/source/helpers/ensure_secure_access.ts +88 -0
  481. package/source/helpers/make_optionals_map.ts +49 -0
  482. package/source/helpers/resolve_opaque_on_address_space.ts +23 -0
  483. package/source/index.ts +49 -0
  484. package/source/interfaces/alarms_and_conditions/condition_info_i.ts +13 -0
  485. package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +26 -0
  486. package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +34 -0
  487. package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +14 -0
  488. package/source/interfaces/data_access/ua_y_array_item_ex.ts +10 -0
  489. package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +14 -0
  490. package/source/interfaces/state_machine/ua_finite_state_machine_type.ts +50 -0
  491. package/source/interfaces/state_machine/ua_program_state_machine_type.ts +13 -0
  492. package/source/interfaces/state_machine/ua_state_machine_type.ts +261 -0
  493. package/source/interfaces/state_machine/ua_transition_ex.ts +7 -0
  494. package/source/interfaces/ua_subscription_diagnostics_variable_ex.ts +8 -0
  495. package/source/loader/generateAddressSpaceRaw.ts +79 -0
  496. package/source/loader/load_nodeset2.ts +1600 -0
  497. package/source/loader/namespace_post_step.ts +36 -0
  498. package/source/loader/register_node_promoter.ts +8 -0
  499. package/source/namespace.ts +9 -0
  500. package/source/namespace_alarm_and_condition.ts +47 -0
  501. package/source/namespace_data_access.ts +60 -0
  502. package/source/namespace_machine_state.ts +13 -0
  503. package/source/pseudo_session.ts +288 -0
  504. package/source/session_context.ts +345 -0
  505. package/source/set_namespace_meta_data.ts +68 -0
  506. package/source/ua_root_folder.ts +10 -0
  507. package/source/ua_two_state_variable_ex.ts +35 -0
  508. package/source/xml_writer.ts +15 -0
  509. package/source_nodejs/generate_address_space.ts +36 -0
  510. package/source_nodejs/index.ts +1 -0
  511. package/src/address_space.ts +1575 -0
  512. package/src/address_space_change_event_tools.ts +177 -0
  513. package/src/address_space_private.ts +98 -0
  514. package/src/alarms_and_conditions/check_where_clause.ts +148 -0
  515. package/src/alarms_and_conditions/condition.ts +89 -0
  516. package/src/alarms_and_conditions/condition_info.ts +66 -0
  517. package/src/alarms_and_conditions/condition_snapshot.ts +766 -0
  518. package/src/alarms_and_conditions/deviation_alarm_helper.ts +66 -0
  519. package/src/alarms_and_conditions/extract_event_fields.ts +104 -0
  520. package/src/alarms_and_conditions/index.ts +18 -0
  521. package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +339 -0
  522. package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +513 -0
  523. package/src/alarms_and_conditions/ua_base_event_impl.ts +55 -0
  524. package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +50 -0
  525. package/src/alarms_and_conditions/ua_condition_impl.ts +1298 -0
  526. package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +81 -0
  527. package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +110 -0
  528. package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +19 -0
  529. package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +130 -0
  530. package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +24 -0
  531. package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +305 -0
  532. package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +108 -0
  533. package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +224 -0
  534. package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +186 -0
  535. package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +27 -0
  536. package/src/apply_condition_refresh.ts +30 -0
  537. package/src/base_node_impl.ts +1749 -0
  538. package/src/base_node_private.ts +690 -0
  539. package/src/data_access/add_dataItem_stuff.ts +75 -0
  540. package/src/data_access/check_variant_compatibility_ua_analog_item.ts +41 -0
  541. package/src/data_access/ua_multistate_discrete_impl.ts +168 -0
  542. package/src/data_access/ua_multistate_value_discrete.ts +299 -0
  543. package/src/data_access/ua_two_state_discrete.ts +185 -0
  544. package/src/event_data.ts +117 -0
  545. package/src/extension_object_array_node.ts +325 -0
  546. package/src/historical_access/address_space_historical_data_node.ts +828 -0
  547. package/src/index_current.ts +52 -0
  548. package/src/namespace_impl.ts +2181 -0
  549. package/src/namespace_private.ts +60 -0
  550. package/src/nodeid_manager.ts +228 -0
  551. package/src/nodeset_tools/adjust_namespace_array.ts +11 -0
  552. package/src/nodeset_tools/construct_namespace_dependency.ts +40 -0
  553. package/src/nodeset_tools/nodeset_to_xml.ts +1317 -0
  554. package/src/nodeset_tools/typedictionary_to_xml.ts +175 -0
  555. package/src/reference_impl.ts +169 -0
  556. package/src/role_permissions.ts +6 -0
  557. package/src/state_machine/finite_state_machine.ts +428 -0
  558. package/src/state_machine/ua_shelving_state_machine_ex.ts +314 -0
  559. package/src/state_machine/ua_two_state_variable.ts +421 -0
  560. package/src/tool_isSupertypeOf.ts +129 -0
  561. package/src/ua_condition_type.ts +10 -0
  562. package/src/ua_data_type_impl.ts +356 -0
  563. package/src/ua_method_impl.ts +278 -0
  564. package/src/ua_object_impl.ts +203 -0
  565. package/src/ua_object_type_impl.ts +158 -0
  566. package/src/ua_reference_type_impl.ts +174 -0
  567. package/src/ua_variable_impl.ts +2277 -0
  568. package/src/ua_variable_type_impl.ts +741 -0
  569. package/src/ua_view_impl.ts +54 -0
  570. package/testHelpers.d.ts +1 -0
  571. package/testHelpers.js +1 -0
  572. package/test_helpers/add_event_generator_object.ts +71 -0
  573. package/test_helpers/alarms_and_conditions_demo.ts +147 -0
  574. package/test_helpers/assertHasMatchingReference.ts +43 -0
  575. package/test_helpers/boiler_system.ts +618 -0
  576. package/test_helpers/create_minimalist_address_space_nodeset.ts +208 -0
  577. package/test_helpers/dump_statemachine.ts +155 -0
  578. package/test_helpers/get_address_space_fixture.ts +30 -0
  579. package/test_helpers/get_mini_address_space.ts +42 -0
  580. package/test_helpers/index.ts +11 -0
  581. package/test_helpers/test_fixtures/dataType_in_separateNamespace.xml +150 -0
  582. package/test_helpers/test_fixtures/dataType_in_separateNamespace_basic.xml +57 -0
  583. package/test_helpers/test_fixtures/dataType_in_separateNamespace_mix.xml +136 -0
  584. package/test_helpers/test_fixtures/dataType_withEnumeration.xml +82 -0
  585. package/test_helpers/test_fixtures/dataType_with_isOptionSet.xml +194 -0
  586. package/test_helpers/test_fixtures/dataType_with_structures.xml +605 -0
  587. package/test_helpers/test_fixtures/dataType_with_union.xml +1 -0
  588. package/test_helpers/test_fixtures/datatype_as_per_1.04.xml +91 -0
  589. package/test_helpers/test_fixtures/fixture_empty_nodeset2.xml +106 -0
  590. package/test_helpers/test_fixtures/fixture_simple_statemachine_nodeset2.xml +1303 -0
  591. package/test_helpers/test_fixtures/fixuture_nodeset_objects_with_some_methods.xml +362 -0
  592. package/test_helpers/test_fixtures/issue_846.xml +3172 -0
  593. package/test_helpers/test_fixtures/issue_899_variable_with_nodeid_value.xml +33 -0
  594. package/test_helpers/test_fixtures/mini.Node.Set2.xml +4508 -0
  595. package/test_helpers/test_fixtures/mini.nodeset.withVariousVariables.xml +194 -0
  596. package/test_helpers/test_fixtures/minimalist_nodeset_with_models.xml +8 -0
  597. package/test_helpers/test_fixtures/minimalist_nodeset_with_models_more_complex.xml +16 -0
  598. package/test_helpers/test_fixtures/nodeset_with_analog_items.xml +45 -0
@@ -0,0 +1,177 @@
1
+ /**
2
+ * @module node-opcua-address-space
3
+ */
4
+ import * as chalk from "chalk";
5
+
6
+ import { UAReference, BaseNode, UAObject, UAVariable } from "node-opcua-address-space-base";
7
+ import { assert } from "node-opcua-assert";
8
+ import { BrowseDirection, NodeClass } from "node-opcua-data-model";
9
+ import { Enum, EnumItem } from "node-opcua-enum";
10
+ import { NodeId } from "node-opcua-nodeid";
11
+ import { ModelChangeStructureDataType } from "node-opcua-types";
12
+
13
+ import { AddressSpacePrivate } from "./address_space_private";
14
+ import { BaseNodeImpl } from "./base_node_impl";
15
+
16
+ const verbFlags = new Enum({
17
+ // NodeAdded 0 Indicates the affected Node has been added.
18
+ NodeAdded: 0x01,
19
+
20
+ // NodeDeleted 1 Indicates the affected Node has been deleted.
21
+ NodeDeleted: 0x02,
22
+
23
+ // ReferenceAdded 2 Indicates a Reference has been added. The affected Node may
24
+ ReferenceAdded: 0x04,
25
+
26
+ // be either a SourceNode or TargetNode. Note that an added
27
+ // bidirectional Reference is reflected by two ChangeStructures.
28
+ // ReferenceDeleted 3 Indicates a Reference has been deleted. The affected Node may
29
+ // be either a SourceNode or TargetNode. Note that a deleted
30
+ // bidirectional Reference is reflected by two ChangeStructures.
31
+ ReferenceDeleted: 0x08,
32
+
33
+ // DataTypeChanged 4 This verb may be used only for affected Nodes that are
34
+ // Variables or VariableTypes. It indicates that the DataType
35
+ // Attribute has changed.
36
+ DataTypeChanged: 0x10
37
+ });
38
+
39
+ function makeVerb(verbs: any): number {
40
+ const e: EnumItem = verbFlags.get(verbs)!;
41
+ assert(e !== null);
42
+ return e.value;
43
+ }
44
+
45
+ export function _handle_add_reference_change_event(node1: BaseNode, node2id: NodeId): void {
46
+ const addressSpace = node1.addressSpace as AddressSpacePrivate;
47
+
48
+ const node2 = addressSpace.findNode(node2id)! as BaseNode;
49
+
50
+ if (node1.nodeVersion || (node2 && node2.nodeVersion)) {
51
+ // a event has to be send
52
+ addressSpace.modelChangeTransaction(() => {
53
+ function _getTypeDef(node: BaseNode) {
54
+ if (node.nodeClass === NodeClass.Object || node.nodeClass === NodeClass.Variable) {
55
+ return (<UAVariable | UAObject>node).typeDefinitionObj.nodeId;
56
+ }
57
+ return null;
58
+ }
59
+
60
+ let modelChangeTgt = new ModelChangeStructureDataType({
61
+ affected: node1.nodeId,
62
+ affectedType: _getTypeDef(node1),
63
+ verb: makeVerb("ReferenceAdded")
64
+ });
65
+ addressSpace._collectModelChange(null, modelChangeTgt);
66
+
67
+ modelChangeTgt = new ModelChangeStructureDataType({
68
+ affected: node2.nodeId,
69
+ affectedType: _getTypeDef(node2),
70
+ verb: makeVerb("ReferenceAdded")
71
+ });
72
+ addressSpace._collectModelChange(null, modelChangeTgt);
73
+ });
74
+ }
75
+ }
76
+
77
+ try {
78
+ (ModelChangeStructureDataType as any).prototype.toString = function (options: any): string {
79
+ if (!options) {
80
+ return "";
81
+ }
82
+ const addressSpace = options.addressSpace;
83
+
84
+ function n(nodeId: NodeId | null) {
85
+ if (!nodeId || nodeId.isEmpty()) {
86
+ return "";
87
+ }
88
+ const node = addressSpace.findNode(nodeId)!;
89
+ return '"' + nodeId.toString() + '"' + chalk.yellow(" /* " + (node ? node.browseName.toString() : "???") + " */");
90
+ }
91
+
92
+ let str = "{ verb:" + verbFlags.get(this.verb)!.key + ",";
93
+ str += " affected: " + n(this.affected) + ",";
94
+ str += " type: " + n(this.affectedType) + " }";
95
+ return str;
96
+ };
97
+ } catch (err) {
98
+ //
99
+ }
100
+
101
+ export function _handle_model_change_event(node: BaseNodeImpl): void {
102
+ const addressSpace = node.addressSpace as AddressSpacePrivate;
103
+ //
104
+ const parent = node.parent!;
105
+
106
+ if (parent && (parent as BaseNode).nodeVersion) {
107
+ addressSpace.modelChangeTransaction(() => {
108
+ let typeDefinitionNodeId = null;
109
+
110
+ if (node.nodeClass === NodeClass.Object || node.nodeClass === NodeClass.Variable) {
111
+ typeDefinitionNodeId = node.typeDefinitionObj.nodeId;
112
+ }
113
+
114
+ const modelChange1 = new ModelChangeStructureDataType({
115
+ affected: node.nodeId,
116
+ affectedType: typeDefinitionNodeId,
117
+ verb: makeVerb("NodeAdded")
118
+ });
119
+ addressSpace._collectModelChange(null, modelChange1);
120
+
121
+ const modelChangeSrc = new ModelChangeStructureDataType({
122
+ affected: parent.nodeId,
123
+ affectedType: null,
124
+ verb: makeVerb("ReferenceAdded")
125
+ });
126
+ addressSpace._collectModelChange(null, modelChangeSrc);
127
+
128
+ // bidirectional
129
+ if ((node as BaseNode).nodeVersion) {
130
+ const modelChangeTgt = new ModelChangeStructureDataType({
131
+ affected: node.nodeId,
132
+ affectedType: typeDefinitionNodeId,
133
+ verb: makeVerb("ReferenceAdded")
134
+ });
135
+ addressSpace._collectModelChange(null, modelChangeTgt);
136
+ }
137
+ });
138
+ }
139
+ }
140
+
141
+ export function _handle_delete_node_model_change_event(node: BaseNode): void {
142
+ const addressSpace = node.addressSpace as AddressSpacePrivate;
143
+
144
+ // get backward references
145
+ const references = node.findReferencesEx("HierarchicalReferences", BrowseDirection.Inverse)!;
146
+
147
+ const parentNodes = references.map((r: UAReference) => {
148
+ return addressSpace.findNode(r.nodeId)! as BaseNode;
149
+ });
150
+
151
+ const versionableNodes = parentNodes.filter((n: BaseNode) => !!n?.nodeVersion);
152
+
153
+ if (versionableNodes.length >= 1 || !!node.nodeVersion) {
154
+ addressSpace.modelChangeTransaction(() => {
155
+ // ...
156
+ for (const r of references) {
157
+ const target = addressSpace.findNode(r.nodeId)!;
158
+
159
+ const modelChangeSrc_l = new ModelChangeStructureDataType({
160
+ affected: target.nodeId,
161
+ affectedType: null,
162
+ verb: makeVerb("ReferenceDeleted")
163
+ });
164
+
165
+ addressSpace._collectModelChange(null, modelChangeSrc_l);
166
+ }
167
+
168
+ const modelChangeSrc = new ModelChangeStructureDataType({
169
+ affected: node.nodeId,
170
+ affectedType: (<UAVariable | UAObject>node).typeDefinition,
171
+ verb: makeVerb("NodeDeleted")
172
+ });
173
+
174
+ addressSpace._collectModelChange(null, modelChangeSrc);
175
+ });
176
+ }
177
+ }
@@ -0,0 +1,98 @@
1
+ /**
2
+ * @module node-opcua-address-space.Private
3
+ */
4
+ import { ExtraDataTypeManager } from "node-opcua-client-dynamic-extension-object";
5
+ import { NodeClass, QualifiedNameLike } from "node-opcua-data-model";
6
+ import { ExtensionObject } from "node-opcua-extension-object";
7
+ import { NodeId, NodeIdLike } from "node-opcua-nodeid";
8
+ import { ModelChangeStructureDataType, ReadProcessedDetails, HistoryReadResult } from "node-opcua-types";
9
+ import { NumericRange } from "node-opcua-numeric-range";
10
+ import { CallbackT } from "node-opcua-status-code";
11
+
12
+ import {
13
+ IAddressSpace,
14
+ BaseNode,
15
+ UADataType,
16
+ UAView,
17
+ ISessionContext,
18
+ AddReferenceOpts,
19
+ ContinuationPoint,
20
+ UAVariableType,
21
+ UAObjectType,
22
+ UAReference,
23
+ UAVariable
24
+ } from "node-opcua-address-space-base";
25
+
26
+ import { UARootFolder } from "../source/ua_root_folder";
27
+
28
+ import { NamespacePrivate } from "./namespace_private";
29
+ import { ExtensionObjectConstructorFuncWithSchema } from "./ua_data_type_impl";
30
+ import { UANamespace} from "./namespace_impl";
31
+
32
+ export interface AddressSpacePrivate extends IAddressSpace {
33
+
34
+ rootFolder: UARootFolder;
35
+
36
+ isFrugal: boolean;
37
+ suspendBackReference: boolean;
38
+
39
+ _condition_refresh_in_progress: boolean;
40
+
41
+ _coerceNode(node: string | BaseNode | NodeIdLike): BaseNode | null;
42
+
43
+ _coerceFolder(folder: string | BaseNode | NodeId): BaseNode | null;
44
+
45
+ _coerce_DataType(dataType: NodeIdLike | BaseNode): NodeId;
46
+
47
+ _coerceType(
48
+ baseType: string | NodeId | BaseNode,
49
+ topMostBaseType: string,
50
+ nodeClass: NodeClass
51
+ ): UAVariableType | UAObjectType;
52
+ _coerceTypeDefinition(typeDefinition: string | NodeId): NodeId;
53
+
54
+ _coerce_VariableTypeIds(dataType: NodeId | string | BaseNode): NodeId;
55
+
56
+ getDefaultNamespace(): NamespacePrivate;
57
+
58
+ getOwnNamespace(): NamespacePrivate;
59
+
60
+ getNamespace(indexOrName: number | string): UANamespace;
61
+
62
+ registerNamespace(namespaceUri: string): UANamespace;
63
+
64
+ getNamespaceArray(): NamespacePrivate[];
65
+
66
+ getExtensionObjectConstructor(dataType: NodeId | UADataType): ExtensionObjectConstructorFuncWithSchema;
67
+
68
+ constructExtensionObject(dataType: UADataType | NodeId, options?: any): ExtensionObject;
69
+
70
+ normalizeReferenceType(params: AddReferenceOpts | UAReference): UAReference;
71
+
72
+ normalizeReferenceTypes(references: AddReferenceOpts[] | UAReference[] | null): UAReference[];
73
+
74
+ _register(node: BaseNode): void;
75
+
76
+ resolveNodeId(nodeIdLike: NodeIdLike): NodeId;
77
+
78
+ modelChangeTransaction(action: () => void): void;
79
+
80
+ _collectModelChange(view: UAView | null, data: ModelChangeStructureDataType): void;
81
+
82
+ deleteNode(nodeId: NodeId): void;
83
+
84
+ getDataTypeManager(): ExtraDataTypeManager;
85
+
86
+ ///
87
+ _readProcessedDetails?: (
88
+ variable: UAVariable,
89
+ context: ISessionContext,
90
+ historyReadDetails: ReadProcessedDetails,
91
+ indexRange: NumericRange | null,
92
+ dataEncoding: QualifiedNameLike | null,
93
+ continuationPoint: ContinuationPoint | null,
94
+ callback: CallbackT<HistoryReadResult>
95
+ ) => void;
96
+
97
+ isEnumeration(dataType: NodeId): boolean;
98
+ }
@@ -0,0 +1,148 @@
1
+ import {
2
+ ContentFilter, FilterOperator, LiteralOperand, SimpleAttributeOperand, FilterOperand, ElementOperand
3
+ } from "node-opcua-types";
4
+ import { DataType } from "node-opcua-variant";
5
+ import { NodeClass } from "node-opcua-data-model";
6
+ import { ExtensionObject } from "node-opcua-extension-object";
7
+ import { NodeId, sameNodeId } from "node-opcua-nodeid";
8
+ import { IAddressSpace, IEventData, ISessionContext, UAObject, UAObjectType, UAReferenceType, UAVariableType } from "node-opcua-address-space-base";
9
+
10
+ import { SessionContext } from "../../source/session_context";
11
+ import { extractEventFields } from "./extract_event_fields";
12
+
13
+ function checkNot(
14
+ addressSpace: IAddressSpace,
15
+ sessionContext: ISessionContext,
16
+ whereClause: ContentFilter,
17
+ eventData: IEventData,
18
+ filteredOperands: FilterOperand[]
19
+ ): boolean {
20
+
21
+ if (filteredOperands[0] instanceof ElementOperand) {
22
+ const index = (filteredOperands[0] as ElementOperand).index;
23
+ return !__checkWhereClause(addressSpace, sessionContext, whereClause, index, eventData);
24
+ }
25
+ return false;
26
+ }
27
+
28
+ function checkOfType(
29
+ addressSpace: IAddressSpace,
30
+ ofType: LiteralOperand,
31
+ eventData: IEventData
32
+ ): boolean {
33
+
34
+ // istanbul ignore next
35
+ if (!ofType) {
36
+ throw new Error("invalid operand");
37
+ }
38
+ // istanbul ignore next
39
+ if (ofType.value.dataType !== DataType.NodeId) {
40
+ throw new Error("invalid operand type (expecting Nodeid");
41
+ }
42
+
43
+ const ofTypeNode = addressSpace.findNode(ofType.value.value) as UAObjectType | UAReferenceType | UAVariableType;
44
+
45
+ // istanbul ignore next
46
+ if (!ofTypeNode) {
47
+ return false; // the ofType node is not known, we don't know what to do
48
+ }
49
+
50
+ // istanbul ignore next
51
+ if (ofTypeNode.nodeClass !== NodeClass.ObjectType) {
52
+ throw new Error("operand should be a ObjectType " + ofTypeNode.nodeId.toString());
53
+ }
54
+ const node = eventData.$eventDataSource! as (UAObjectType | UAObject | UAReferenceType | UAVariableType);
55
+ if (!node) {
56
+ throw new Error("cannot find node " + eventData.$eventDataSource?.toString());
57
+ }
58
+ if (node.nodeClass === NodeClass.ObjectType) {
59
+ return node.isSupertypeOf(ofTypeNode);
60
+ }
61
+ if (node.nodeClass === NodeClass.Object && node.typeDefinitionObj) {
62
+ return node.typeDefinitionObj.isSupertypeOf(ofTypeNode);
63
+ }
64
+ return true;
65
+ }
66
+
67
+ function _extractValue(operand: SimpleAttributeOperand, eventData: IEventData): NodeId | null {
68
+ // eventData.readValue;
69
+ const v = extractEventFields(SessionContext.defaultContext, [operand], eventData)[0];
70
+ return v.value as NodeId;
71
+ }
72
+
73
+ function checkInList(
74
+ addressSpace: IAddressSpace,
75
+ filterOperands: ExtensionObject[],
76
+ eventData: IEventData
77
+ ): boolean {
78
+
79
+ const operand0 = filterOperands[0];
80
+ if (!(operand0 instanceof SimpleAttributeOperand)) {
81
+ // unsupported case
82
+ return false;
83
+ }
84
+ const nodeId: NodeId | null = _extractValue(operand0, eventData);
85
+ if (!nodeId) {
86
+ return false;
87
+ }
88
+ function _is(nodeId1: NodeId, operandX: LiteralOperand): boolean {
89
+
90
+ const operandNode = addressSpace.findNode(operandX.value.value as NodeId);
91
+ if (!operandNode) {
92
+ return false;
93
+ }
94
+ return sameNodeId(nodeId1, operandNode.nodeId);
95
+ }
96
+ for (let i = 1; i < filterOperands.length; i++) {
97
+ const filterOperand = filterOperands[i];
98
+ if ((filterOperand instanceof LiteralOperand) && _is(nodeId, filterOperand)) {
99
+ return true;
100
+ }
101
+ }
102
+ return false;
103
+ }
104
+
105
+ export function __checkWhereClause(
106
+ addressSpace: IAddressSpace,
107
+ sessionContext: ISessionContext,
108
+ whereClause: ContentFilter,
109
+ index: number,
110
+ eventData: IEventData
111
+ ): boolean {
112
+
113
+ if (!whereClause.elements || whereClause.elements.length === 0) {
114
+ return true;
115
+ }
116
+ const element = whereClause.elements[index];
117
+ if (!element) {
118
+ return true;
119
+ }
120
+ switch (element.filterOperator) {
121
+ case FilterOperator.Not:
122
+ return checkNot(addressSpace, sessionContext, whereClause, eventData, element.filterOperands as FilterOperand[]);
123
+ case FilterOperator.OfType:
124
+ return checkOfType(addressSpace, element.filterOperands![0] as LiteralOperand, eventData);
125
+ case FilterOperator.InList:
126
+ return checkInList(addressSpace, element.filterOperands as ExtensionObject[], eventData);
127
+ default:
128
+ // from Spec OPC Unified Architecture, Part 4 133 Release 1.04
129
+ // Any basic FilterOperator in Table 119 may be used in the whereClause, however, only the
130
+ // OfType_14 FilterOperator from Table 120 is permitted.
131
+ // tslint:disable-next-line: no-console
132
+ console.log("whereClause = ", whereClause.toString());
133
+ throw new Error("Only OfType operator are allowed in checkWhereClause")
134
+ }
135
+ }
136
+
137
+ export function checkWhereClause(
138
+ addressSpace: IAddressSpace,
139
+ sessionContext: ISessionContext,
140
+ whereClause: ContentFilter,
141
+ eventData: IEventData
142
+ ): boolean {
143
+
144
+ if (!whereClause.elements || whereClause.elements.length === 0) {
145
+ return true;
146
+ }
147
+ return __checkWhereClause(addressSpace, sessionContext, whereClause, 0, eventData);
148
+ }
@@ -0,0 +1,89 @@
1
+ /**
2
+ * @module node-opcua-address-space.AlarmsAndConditions
3
+ */
4
+ // tslint:disable:no-console
5
+ // tslint:disable:no-var-requires
6
+ require("set-prototype-of");
7
+ import { assert } from "node-opcua-assert";
8
+ import { LocalizedText, LocalizedTextLike } from "node-opcua-data-model";
9
+ import { minDate } from "node-opcua-factory";
10
+ import { StatusCode, StatusCodes } from "node-opcua-status-code";
11
+
12
+ import { ConditionSnapshot } from "./condition_snapshot";
13
+
14
+ export function _setAckedState(
15
+ self: ConditionSnapshot,
16
+ requestedAckedState: boolean,
17
+ conditionEventId?: Buffer,
18
+ comment?: string | LocalizedText | LocalizedTextLike
19
+ ): StatusCode {
20
+
21
+ assert(self instanceof ConditionSnapshot);
22
+
23
+ const ackedState = self.getAckedState();
24
+
25
+ if (ackedState && requestedAckedState) {
26
+ return StatusCodes.BadConditionBranchAlreadyAcked;
27
+ }
28
+ self._set_twoStateVariable("ackedState", requestedAckedState);
29
+ return StatusCodes.Good;
30
+ }
31
+
32
+ // tslint:disable:max-classes-per-file
33
+ function prepare_date(sourceTimestamp: { value: Date } | null) {
34
+ if (!sourceTimestamp || !sourceTimestamp.value) {
35
+ return minDate;
36
+ }
37
+ assert(sourceTimestamp.value instanceof Date);
38
+ return sourceTimestamp;
39
+ }
40
+
41
+ /*
42
+ As per spec OPCUA 1.03 part 9:
43
+
44
+ A Condition’s EnabledState effects the generation of Event Notifications and as such results
45
+ in the following specific behaviour:
46
+ * When the Condition instance enters the Disabled state, the Retain Property of this
47
+ Condition shall be set to FALSE by the Server to indicate to the Client that the
48
+ Condition instance is currently not of interest to Clients.
49
+ * When the Condition instance enters the enabled state, the Condition shall be
50
+ evaluated and all of its Properties updated to reflect the current values. If this
51
+ evaluation causes the Retain Property to transition to TRUE for any ConditionBranch,
52
+ then an Event Notification shall be generated for that ConditionBranch.
53
+ * The Server may choose to continue to test for a Condition instance while it is
54
+ Disabled. However, no Event Notifications will be generated while the Condition
55
+ instance is disabled.
56
+ * For any Condition that exists in the Address Space the Attributes and the following
57
+ Variables will continue to have valid values even in the Disabled state; EventId, Event
58
+ Type, Source Node, Source Name, Time, and EnabledState.
59
+ Other properties may no longer provide current valid values.
60
+ All Variables that are no longer provided shall return a status of BadConditionDisabled.
61
+ The Event that reports the Disabled state should report the properties as NULL or with a status
62
+ of BadConditionDisabled.
63
+ When enabled, changes to the following components shall cause a ConditionType Event Notification:
64
+ - Quality
65
+ - Severity (inherited from BaseEventType)
66
+ - Comment
67
+
68
+ // spec :
69
+ // The HasCondition ReferenceType is a concrete ReferenceType and can be used directly. It is
70
+ // a subtype of NonHierarchicalReferences.
71
+ // The semantic of this ReferenceType is to specify the relationship between a ConditionSource
72
+ // and its Conditions. Each ConditionSource shall be the target of a HasEventSource Reference
73
+ // or a sub type of HasEventSource. The Address Space organisation that shall be provided for
74
+ // Clients to detect Conditions and ConditionSources is defined in Clause 6. Various examples
75
+ // for the use of this ReferenceType can be found in B.2.
76
+ // HasCondition References can be used in the Type definition of an Object or a Variable. In this
77
+ // case, the SourceNode of this ReferenceType shall be an ObjectType or VariableType Node or
78
+ // one of their InstanceDeclaration Nodes. The TargetNode shall be a Condition instance
79
+ // declaration or a ConditionType. The following rules for instantiation apply:
80
+ //  All HasCondition References used in a Type shall exist in instances of these Types as
81
+ // well.
82
+ //  If the TargetNode in the Type definition is a ConditionType, the same TargetNode will
83
+ // be referenced on the instance.
84
+ // HasCondition References may be used solely in the instance space when they are not
85
+ // available in Type definitions. In this case the SourceNode of this ReferenceType shall be an
86
+ // Object, Variable or Method Node. The TargetNode shall be a Condition instance or a
87
+ // ConditionType.
88
+
89
+ */
@@ -0,0 +1,66 @@
1
+ /**
2
+ * @module node-opcua-address-space.AlarmsAndConditions
3
+ */
4
+ import { assert } from "node-opcua-assert";
5
+ import { UInt16 } from "node-opcua-basic-types";
6
+ import { LocalizedText, LocalizedTextLike } from "node-opcua-data-model";
7
+ import { StatusCode } from "node-opcua-status-code";
8
+ import { ConditionInfoOptions } from "../../source/interfaces/alarms_and_conditions/condition_info_i";
9
+
10
+ export interface ConditionInfo {
11
+ message: LocalizedText | null;
12
+ quality: StatusCode | null;
13
+ severity: UInt16 | null;
14
+ retain: boolean | null;
15
+ isDifferentFrom(otherConditionInfo: ConditionInfo): boolean;
16
+ }
17
+ /**
18
+ * @class ConditionInfo
19
+ * @param options {Object}
20
+ * @param options.message {String|LocalizedText} the event message
21
+ * @param options.severity {UInt16} severity
22
+ * @param options.quality {StatusCode} quality
23
+ * @param options.retain {Boolean} retain flag
24
+ * @constructor
25
+ */
26
+ export class ConditionInfo {
27
+ public message: LocalizedText | null = null;
28
+ public quality: StatusCode | null = null;
29
+ public severity: UInt16 | null = 0;
30
+ public retain: boolean | null = false;
31
+
32
+ constructor(options: ConditionInfoOptions) {
33
+ this.severity = null;
34
+ this.quality = null;
35
+ this.message = null;
36
+ this.retain = null;
37
+
38
+ if (Object.prototype.hasOwnProperty.call(options, "message") && options.message) {
39
+ this.message = LocalizedText.coerce(options.message);
40
+ }
41
+ if (Object.prototype.hasOwnProperty.call(options, "quality") && options.quality !== null) {
42
+ this.quality = options.quality!;
43
+ }
44
+ if (Object.prototype.hasOwnProperty.call(options, "severity") && options.severity !== null) {
45
+ assert(typeof options.severity === "number");
46
+ this.severity = options.severity!;
47
+ }
48
+ if (Object.prototype.hasOwnProperty.call(options, "retain") && options.retain !== null) {
49
+ assert(typeof options.retain === "boolean");
50
+ this.retain = options.retain!;
51
+ }
52
+ }
53
+
54
+ /**
55
+ * @method isDifferentFrom
56
+ * @param otherConditionInfo {ConditionInfo}
57
+ * @return {Boolean}
58
+ */
59
+ public isDifferentFrom(otherConditionInfo: ConditionInfo): boolean {
60
+ return (
61
+ this.severity !== otherConditionInfo.severity ||
62
+ this.quality !== otherConditionInfo.quality ||
63
+ this.message !== otherConditionInfo.message
64
+ );
65
+ }
66
+ }