node-opcua-address-space 2.98.0 → 2.98.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (460) hide show
  1. package/dist/source/address_space_ts.d.ts +118 -0
  2. package/dist/source/address_space_ts.js +18 -0
  3. package/dist/source/address_space_ts.js.map +1 -0
  4. package/dist/source/continuation_points/continuation_point_manager.d.ts +91 -0
  5. package/dist/source/continuation_points/continuation_point_manager.js +201 -0
  6. package/dist/source/continuation_points/continuation_point_manager.js.map +1 -0
  7. package/dist/source/helpers/adjust_browse_direction.d.ts +5 -0
  8. package/dist/source/helpers/adjust_browse_direction.js +12 -0
  9. package/dist/source/helpers/adjust_browse_direction.js.map +1 -0
  10. package/dist/source/helpers/argument_list.d.ts +33 -0
  11. package/dist/source/helpers/argument_list.js +255 -0
  12. package/dist/source/helpers/argument_list.js.map +1 -0
  13. package/dist/source/helpers/call_helpers.d.ts +6 -0
  14. package/dist/source/helpers/call_helpers.js +72 -0
  15. package/dist/source/helpers/call_helpers.js.map +1 -0
  16. package/dist/source/helpers/coerce_enum_value.d.ts +6 -0
  17. package/dist/source/helpers/coerce_enum_value.js +34 -0
  18. package/dist/source/helpers/coerce_enum_value.js.map +1 -0
  19. package/dist/source/helpers/dump_tools.d.ts +14 -0
  20. package/dist/source/helpers/dump_tools.js +79 -0
  21. package/dist/source/helpers/dump_tools.js.map +1 -0
  22. package/dist/source/helpers/ensure_secure_access.d.ts +9 -0
  23. package/dist/source/helpers/ensure_secure_access.js +77 -0
  24. package/dist/source/helpers/ensure_secure_access.js.map +1 -0
  25. package/dist/source/helpers/make_optionals_map.d.ts +21 -0
  26. package/dist/source/helpers/make_optionals_map.js +30 -0
  27. package/dist/source/helpers/make_optionals_map.js.map +1 -0
  28. package/dist/source/helpers/multiform_func.d.ts +11 -0
  29. package/dist/source/helpers/multiform_func.js +76 -0
  30. package/dist/source/helpers/multiform_func.js.map +1 -0
  31. package/dist/source/helpers/resolve_opaque_on_address_space.d.ts +3 -0
  32. package/dist/source/helpers/resolve_opaque_on_address_space.js +37 -0
  33. package/dist/source/helpers/resolve_opaque_on_address_space.js.map +1 -0
  34. package/dist/source/index.d.ts +61 -0
  35. package/dist/source/index.js +90 -0
  36. package/dist/source/index.js.map +1 -0
  37. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +19 -0
  38. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js +3 -0
  39. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js.map +1 -0
  40. package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +193 -0
  41. package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.js +3 -0
  42. package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.js.map +1 -0
  43. package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +12 -0
  44. package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.js +3 -0
  45. package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.js.map +1 -0
  46. package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +10 -0
  47. package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.js +3 -0
  48. package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.js.map +1 -0
  49. package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +7 -0
  50. package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js +3 -0
  51. package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js.map +1 -0
  52. package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +7 -0
  53. package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.js +3 -0
  54. package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.js.map +1 -0
  55. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +4 -0
  56. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js +3 -0
  57. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js.map +1 -0
  58. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +4 -0
  59. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js +3 -0
  60. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js.map +1 -0
  61. package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +9 -0
  62. package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js +3 -0
  63. package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js.map +1 -0
  64. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +4 -0
  65. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js +3 -0
  66. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js.map +1 -0
  67. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +4 -0
  68. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js +3 -0
  69. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js.map +1 -0
  70. package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +20 -0
  71. package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js +3 -0
  72. package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js.map +1 -0
  73. package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +23 -0
  74. package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js +3 -0
  75. package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js.map +1 -0
  76. package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +32 -0
  77. package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js +3 -0
  78. package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js.map +1 -0
  79. package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +19 -0
  80. package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js +3 -0
  81. package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js.map +1 -0
  82. package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +45 -0
  83. package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.js +3 -0
  84. package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.js.map +1 -0
  85. package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +7 -0
  86. package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +26 -0
  87. package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +1 -0
  88. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +5 -0
  89. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js +3 -0
  90. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js.map +1 -0
  91. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +20 -0
  92. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js +3 -0
  93. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js.map +1 -0
  94. package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +26 -0
  95. package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js +3 -0
  96. package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js.map +1 -0
  97. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +8 -0
  98. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js +3 -0
  99. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js.map +1 -0
  100. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +10 -0
  101. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js +3 -0
  102. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js.map +1 -0
  103. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +21 -0
  104. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js +3 -0
  105. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js.map +1 -0
  106. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +24 -0
  107. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js +3 -0
  108. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js.map +1 -0
  109. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +12 -0
  110. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js +3 -0
  111. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js.map +1 -0
  112. package/dist/source/interfaces/data_access/ua_y_array_item_ex.d.ts +8 -0
  113. package/dist/source/interfaces/data_access/ua_y_array_item_ex.js +3 -0
  114. package/dist/source/interfaces/data_access/ua_y_array_item_ex.js.map +1 -0
  115. package/dist/source/interfaces/extension_object_constructor.d.ts +10 -0
  116. package/dist/source/interfaces/extension_object_constructor.js +3 -0
  117. package/dist/source/interfaces/extension_object_constructor.js.map +1 -0
  118. package/dist/source/interfaces/nodeset_loader_options.d.ts +4 -0
  119. package/dist/source/interfaces/nodeset_loader_options.js +3 -0
  120. package/dist/source/interfaces/nodeset_loader_options.js.map +1 -0
  121. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +12 -0
  122. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js +3 -0
  123. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js.map +1 -0
  124. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +49 -0
  125. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js +3 -0
  126. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js.map +1 -0
  127. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +11 -0
  128. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js +3 -0
  129. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js.map +1 -0
  130. package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +30 -0
  131. package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.js +3 -0
  132. package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.js.map +1 -0
  133. package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +234 -0
  134. package/dist/source/interfaces/state_machine/ua_state_machine_type.js +3 -0
  135. package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +1 -0
  136. package/dist/source/interfaces/state_machine/ua_transition_ex.d.ts +6 -0
  137. package/dist/source/interfaces/state_machine/ua_transition_ex.js +3 -0
  138. package/dist/source/interfaces/state_machine/ua_transition_ex.js.map +1 -0
  139. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +8 -0
  140. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js +3 -0
  141. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -0
  142. package/dist/source/loader/decode_xml_extension_object.d.ts +6 -0
  143. package/dist/source/loader/decode_xml_extension_object.js +72 -0
  144. package/dist/source/loader/decode_xml_extension_object.js.map +1 -0
  145. package/dist/source/loader/ensure_datatype_extracted.d.ts +5 -0
  146. package/dist/source/loader/ensure_datatype_extracted.js +71 -0
  147. package/dist/source/loader/ensure_datatype_extracted.js.map +1 -0
  148. package/dist/source/loader/generateAddressSpaceRaw.d.ts +11 -0
  149. package/dist/source/loader/generateAddressSpaceRaw.js +46 -0
  150. package/dist/source/loader/generateAddressSpaceRaw.js.map +1 -0
  151. package/dist/source/loader/load_nodeset2.d.ts +17 -0
  152. package/dist/source/loader/load_nodeset2.js +1484 -0
  153. package/dist/source/loader/load_nodeset2.js.map +1 -0
  154. package/dist/source/loader/make_semver_compatible.d.ts +6 -0
  155. package/dist/source/loader/make_semver_compatible.js +26 -0
  156. package/dist/source/loader/make_semver_compatible.js.map +1 -0
  157. package/dist/source/loader/make_xml_extension_object_parser.d.ts +28 -0
  158. package/dist/source/loader/make_xml_extension_object_parser.js +327 -0
  159. package/dist/source/loader/make_xml_extension_object_parser.js.map +1 -0
  160. package/dist/source/loader/namespace_post_step.d.ts +10 -0
  161. package/dist/source/loader/namespace_post_step.js +62 -0
  162. package/dist/source/loader/namespace_post_step.js.map +1 -0
  163. package/dist/source/loader/register_node_promoter.d.ts +2 -0
  164. package/dist/source/loader/register_node_promoter.js +10 -0
  165. package/dist/source/loader/register_node_promoter.js.map +1 -0
  166. package/dist/source/namespace.d.ts +6 -0
  167. package/dist/source/namespace.js +3 -0
  168. package/dist/source/namespace.js.map +1 -0
  169. package/dist/source/namespace_alarm_and_condition.d.ts +32 -0
  170. package/dist/source/namespace_alarm_and_condition.js +3 -0
  171. package/dist/source/namespace_alarm_and_condition.js.map +1 -0
  172. package/dist/source/namespace_data_access.d.ts +42 -0
  173. package/dist/source/namespace_data_access.js +3 -0
  174. package/dist/source/namespace_data_access.js.map +1 -0
  175. package/dist/source/namespace_machine_state.d.ts +8 -0
  176. package/dist/source/namespace_machine_state.js +3 -0
  177. package/dist/source/namespace_machine_state.js.map +1 -0
  178. package/dist/source/pseudo_session.d.ts +72 -0
  179. package/dist/source/pseudo_session.js +255 -0
  180. package/dist/source/pseudo_session.js.map +1 -0
  181. package/dist/source/session_context.d.ts +111 -0
  182. package/dist/source/session_context.js +265 -0
  183. package/dist/source/session_context.js.map +1 -0
  184. package/dist/source/set_namespace_meta_data.d.ts +2 -0
  185. package/dist/source/set_namespace_meta_data.js +60 -0
  186. package/dist/source/set_namespace_meta_data.js.map +1 -0
  187. package/dist/source/ua_root_folder.d.ts +9 -0
  188. package/dist/source/ua_root_folder.js +3 -0
  189. package/dist/source/ua_root_folder.js.map +1 -0
  190. package/dist/source/ua_two_state_variable_ex.d.ts +23 -0
  191. package/dist/source/ua_two_state_variable_ex.js +3 -0
  192. package/dist/source/ua_two_state_variable_ex.js.map +1 -0
  193. package/dist/source/xml_writer.d.ts +18 -0
  194. package/dist/source/xml_writer.js +3 -0
  195. package/dist/source/xml_writer.js.map +1 -0
  196. package/dist/src/address_space.d.ts +387 -0
  197. package/dist/src/address_space.js +1386 -0
  198. package/dist/src/address_space.js.map +1 -0
  199. package/dist/src/address_space_change_event_tools.d.ts +6 -0
  200. package/dist/src/address_space_change_event_tools.js +153 -0
  201. package/dist/src/address_space_change_event_tools.js.map +1 -0
  202. package/dist/src/address_space_private.d.ts +43 -0
  203. package/dist/src/address_space_private.js +3 -0
  204. package/dist/src/address_space_private.js.map +1 -0
  205. package/dist/src/alarms_and_conditions/condition.d.ts +5 -0
  206. package/dist/src/alarms_and_conditions/condition.js +79 -0
  207. package/dist/src/alarms_and_conditions/condition.js.map +1 -0
  208. package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +26 -0
  209. package/dist/src/alarms_and_conditions/condition_info_impl.js +55 -0
  210. package/dist/src/alarms_and_conditions/condition_info_impl.js.map +1 -0
  211. package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +222 -0
  212. package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +658 -0
  213. package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +1 -0
  214. package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +9 -0
  215. package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +61 -0
  216. package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +1 -0
  217. package/dist/src/alarms_and_conditions/index.d.ts +16 -0
  218. package/dist/src/alarms_and_conditions/index.js +33 -0
  219. package/dist/src/alarms_and_conditions/index.js.map +1 -0
  220. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +44 -0
  221. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +245 -0
  222. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -0
  223. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +93 -0
  224. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +419 -0
  225. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -0
  226. package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +26 -0
  227. package/dist/src/alarms_and_conditions/ua_base_event_impl.js +39 -0
  228. package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +1 -0
  229. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +44 -0
  230. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +184 -0
  231. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -0
  232. package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +155 -0
  233. package/dist/src/alarms_and_conditions/ua_condition_impl.js +1029 -0
  234. package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -0
  235. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +14 -0
  236. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +35 -0
  237. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -0
  238. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +24 -0
  239. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +57 -0
  240. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -0
  241. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +11 -0
  242. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +12 -0
  243. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -0
  244. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +23 -0
  245. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +87 -0
  246. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -0
  247. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +11 -0
  248. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js +8 -0
  249. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -0
  250. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +79 -0
  251. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +251 -0
  252. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -0
  253. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +24 -0
  254. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +51 -0
  255. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -0
  256. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +19 -0
  257. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +163 -0
  258. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -0
  259. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +46 -0
  260. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +166 -0
  261. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -0
  262. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +18 -0
  263. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +18 -0
  264. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -0
  265. package/dist/src/apply_condition_refresh.d.ts +6 -0
  266. package/dist/src/apply_condition_refresh.js +28 -0
  267. package/dist/src/apply_condition_refresh.js.map +1 -0
  268. package/dist/src/base_node_impl.d.ts +284 -0
  269. package/dist/src/base_node_impl.js +1455 -0
  270. package/dist/src/base_node_impl.js.map +1 -0
  271. package/dist/src/base_node_private.d.ts +81 -0
  272. package/dist/src/base_node_private.js +833 -0
  273. package/dist/src/base_node_private.js.map +1 -0
  274. package/dist/src/check_value_rank_compatibility.d.ts +15 -0
  275. package/dist/src/check_value_rank_compatibility.js +82 -0
  276. package/dist/src/check_value_rank_compatibility.js.map +1 -0
  277. package/dist/src/data_access/add_dataItem_stuff.d.ts +11 -0
  278. package/dist/src/data_access/add_dataItem_stuff.js +62 -0
  279. package/dist/src/data_access/add_dataItem_stuff.js.map +1 -0
  280. package/dist/src/data_access/check_variant_compatibility_ua_analog_item.d.ts +1 -0
  281. package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js +35 -0
  282. package/dist/src/data_access/check_variant_compatibility_ua_analog_item.js.map +1 -0
  283. package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +32 -0
  284. package/dist/src/data_access/ua_multistate_discrete_impl.js +131 -0
  285. package/dist/src/data_access/ua_multistate_discrete_impl.js.map +1 -0
  286. package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +52 -0
  287. package/dist/src/data_access/ua_multistate_value_discrete_impl.js +254 -0
  288. package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +1 -0
  289. package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +25 -0
  290. package/dist/src/data_access/ua_two_state_discrete_impl.js +156 -0
  291. package/dist/src/data_access/ua_two_state_discrete_impl.js.map +1 -0
  292. package/dist/src/event_data.d.ts +34 -0
  293. package/dist/src/event_data.js +65 -0
  294. package/dist/src/event_data.js.map +1 -0
  295. package/dist/src/extension_object_array_node.d.ts +23 -0
  296. package/dist/src/extension_object_array_node.js +249 -0
  297. package/dist/src/extension_object_array_node.js.map +1 -0
  298. package/dist/src/historical_access/address_space_historical_data_node.d.ts +26 -0
  299. package/dist/src/historical_access/address_space_historical_data_node.js +653 -0
  300. package/dist/src/historical_access/address_space_historical_data_node.js.map +1 -0
  301. package/dist/src/idx_iterator.d.ts +8 -0
  302. package/dist/src/idx_iterator.js +51 -0
  303. package/dist/src/idx_iterator.js.map +1 -0
  304. package/dist/src/index_current.d.ts +46 -0
  305. package/dist/src/index_current.js +78 -0
  306. package/dist/src/index_current.js.map +1 -0
  307. package/dist/src/namespace_impl.d.ts +456 -0
  308. package/dist/src/namespace_impl.js +1763 -0
  309. package/dist/src/namespace_impl.js.map +1 -0
  310. package/dist/src/namespace_private.d.ts +23 -0
  311. package/dist/src/namespace_private.js +33 -0
  312. package/dist/src/namespace_private.js.map +1 -0
  313. package/dist/src/nodeid_manager.d.ts +37 -0
  314. package/dist/src/nodeid_manager.js +184 -0
  315. package/dist/src/nodeid_manager.js.map +1 -0
  316. package/dist/src/nodeset_tools/adjust_namespace_array.d.ts +2 -0
  317. package/dist/src/nodeset_tools/adjust_namespace_array.js +14 -0
  318. package/dist/src/nodeset_tools/adjust_namespace_array.js.map +1 -0
  319. package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +18 -0
  320. package/dist/src/nodeset_tools/construct_namespace_dependency.js +141 -0
  321. package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +1 -0
  322. package/dist/src/nodeset_tools/dump_to_bsd.d.ts +2 -0
  323. package/dist/src/nodeset_tools/dump_to_bsd.js +165 -0
  324. package/dist/src/nodeset_tools/dump_to_bsd.js.map +1 -0
  325. package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +10 -0
  326. package/dist/src/nodeset_tools/nodeset_to_xml.js +1288 -0
  327. package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -0
  328. package/dist/src/private_namespace.d.ts +5 -0
  329. package/dist/src/private_namespace.js +20 -0
  330. package/dist/src/private_namespace.js.map +1 -0
  331. package/dist/src/reference_impl.d.ts +43 -0
  332. package/dist/src/reference_impl.js +140 -0
  333. package/dist/src/reference_impl.js.map +1 -0
  334. package/dist/src/role_permissions.d.ts +2 -0
  335. package/dist/src/role_permissions.js +11 -0
  336. package/dist/src/role_permissions.js.map +1 -0
  337. package/dist/src/state_machine/finite_state_machine.d.ts +81 -0
  338. package/dist/src/state_machine/finite_state_machine.js +389 -0
  339. package/dist/src/state_machine/finite_state_machine.js.map +1 -0
  340. package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +38 -0
  341. package/dist/src/state_machine/ua_shelving_state_machine_ex.js +251 -0
  342. package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -0
  343. package/dist/src/state_machine/ua_two_state_variable.d.ts +61 -0
  344. package/dist/src/state_machine/ua_two_state_variable.js +332 -0
  345. package/dist/src/state_machine/ua_two_state_variable.js.map +1 -0
  346. package/dist/src/tool_isSubtypeOf.d.ts +18 -0
  347. package/dist/src/tool_isSubtypeOf.js +125 -0
  348. package/dist/src/tool_isSubtypeOf.js.map +1 -0
  349. package/dist/src/ua_condition_type.d.ts +8 -0
  350. package/dist/src/ua_condition_type.js +3 -0
  351. package/dist/src/ua_condition_type.js.map +1 -0
  352. package/dist/src/ua_data_type_impl.d.ts +89 -0
  353. package/dist/src/ua_data_type_impl.js +369 -0
  354. package/dist/src/ua_data_type_impl.js.map +1 -0
  355. package/dist/src/ua_method_impl.d.ts +42 -0
  356. package/dist/src/ua_method_impl.js +218 -0
  357. package/dist/src/ua_method_impl.js.map +1 -0
  358. package/dist/src/ua_object_impl.d.ts +35 -0
  359. package/dist/src/ua_object_impl.js +169 -0
  360. package/dist/src/ua_object_impl.js.map +1 -0
  361. package/dist/src/ua_object_type_impl.d.ts +50 -0
  362. package/dist/src/ua_object_type_impl.js +127 -0
  363. package/dist/src/ua_object_type_impl.js.map +1 -0
  364. package/dist/src/ua_reference_type_impl.d.ts +45 -0
  365. package/dist/src/ua_reference_type_impl.js +142 -0
  366. package/dist/src/ua_reference_type_impl.js.map +1 -0
  367. package/dist/src/ua_variable_impl.d.ts +380 -0
  368. package/dist/src/ua_variable_impl.js +1739 -0
  369. package/dist/src/ua_variable_impl.js.map +1 -0
  370. package/dist/src/ua_variable_impl_ext_obj.d.ts +23 -0
  371. package/dist/src/ua_variable_impl_ext_obj.js +671 -0
  372. package/dist/src/ua_variable_impl_ext_obj.js.map +1 -0
  373. package/dist/src/ua_variable_type_impl.d.ts +74 -0
  374. package/dist/src/ua_variable_type_impl.js +598 -0
  375. package/dist/src/ua_variable_type_impl.js.map +1 -0
  376. package/dist/src/ua_view_impl.d.ts +19 -0
  377. package/dist/src/ua_view_impl.js +44 -0
  378. package/dist/src/ua_view_impl.js.map +1 -0
  379. package/dist/tsconfig_common.tsbuildinfo +1 -0
  380. package/distHelpers/add_event_generator_object.d.ts +3 -0
  381. package/{test_helpers/add_event_generator_object.ts → distHelpers/add_event_generator_object.js} +16 -22
  382. package/distHelpers/add_event_generator_object.js.map +1 -0
  383. package/distHelpers/alarms_and_conditions_demo.d.ts +9 -0
  384. package/{test_helpers/alarms_and_conditions_demo.ts → distHelpers/alarms_and_conditions_demo.js} +21 -56
  385. package/distHelpers/alarms_and_conditions_demo.js.map +1 -0
  386. package/distHelpers/assertHasMatchingReference.d.ts +19 -0
  387. package/{test_helpers/assertHasMatchingReference.ts → distHelpers/assertHasMatchingReference.js} +12 -14
  388. package/distHelpers/assertHasMatchingReference.js.map +1 -0
  389. package/distHelpers/boiler_system.d.ts +113 -0
  390. package/{test_helpers/boiler_system.ts → distHelpers/boiler_system.js} +81 -295
  391. package/distHelpers/boiler_system.js.map +1 -0
  392. package/distHelpers/create_minimalist_address_space_nodeset.d.ts +5 -0
  393. package/{test_helpers/create_minimalist_address_space_nodeset.ts → distHelpers/create_minimalist_address_space_nodeset.js} +51 -87
  394. package/distHelpers/create_minimalist_address_space_nodeset.js.map +1 -0
  395. package/distHelpers/date_utils.d.ts +3 -0
  396. package/distHelpers/date_utils.js +10 -0
  397. package/distHelpers/date_utils.js.map +1 -0
  398. package/distHelpers/dump_statemachine.d.ts +0 -0
  399. package/distHelpers/dump_statemachine.js +128 -0
  400. package/distHelpers/dump_statemachine.js.map +1 -0
  401. package/distHelpers/get_address_space_fixture.d.ts +1 -0
  402. package/{test_helpers/get_address_space_fixture.ts → distHelpers/get_address_space_fixture.js} +8 -7
  403. package/distHelpers/get_address_space_fixture.js.map +1 -0
  404. package/distHelpers/get_mini_address_space.d.ts +7 -0
  405. package/distHelpers/get_mini_address_space.js +37 -0
  406. package/distHelpers/get_mini_address_space.js.map +1 -0
  407. package/distHelpers/index.js +29 -0
  408. package/distHelpers/index.js.map +1 -0
  409. package/distHelpers/mock_session.d.ts +10 -0
  410. package/distHelpers/mock_session.js +26 -0
  411. package/distHelpers/mock_session.js.map +1 -0
  412. package/distNodeJS/generate_address_space.d.ts +6 -0
  413. package/distNodeJS/generate_address_space.js +53 -0
  414. package/distNodeJS/generate_address_space.js.map +1 -0
  415. package/distNodeJS/index.js +18 -0
  416. package/distNodeJS/index.js.map +1 -0
  417. package/package.json +49 -38
  418. package/source/helpers/dump_tools.ts +92 -0
  419. package/src/nodeset_tools/dump_to_bsd.ts +198 -0
  420. package/.mocharc.yml +0 -12
  421. package/generate.js +0 -1
  422. package/source_nodejs/generate_address_space.ts +0 -60
  423. package/test_helpers/date_utils.ts +0 -5
  424. package/test_helpers/get_mini_address_space.ts +0 -42
  425. package/test_helpers/mock_session.ts +0 -34
  426. package/test_helpers/test_fixtures/dataType_in_separateNamespace.xml +0 -150
  427. package/test_helpers/test_fixtures/dataType_in_separateNamespace_basic.xml +0 -57
  428. package/test_helpers/test_fixtures/dataType_in_separateNamespace_mix.xml +0 -136
  429. package/test_helpers/test_fixtures/dataType_issue.xml +0 -80
  430. package/test_helpers/test_fixtures/dataType_withEnumeration.xml +0 -82
  431. package/test_helpers/test_fixtures/dataType_with_isOptionSet.xml +0 -194
  432. package/test_helpers/test_fixtures/dataType_with_qualifiedname.xml +0 -71
  433. package/test_helpers/test_fixtures/dataType_with_recursive_structure.xml +0 -155
  434. package/test_helpers/test_fixtures/dataType_with_structures.xml +0 -605
  435. package/test_helpers/test_fixtures/dataType_with_union.xml +0 -90
  436. package/test_helpers/test_fixtures/datatype_as_per_1.04.xml +0 -118
  437. package/test_helpers/test_fixtures/datatype_with_allow_subtype.xml +0 -104
  438. package/test_helpers/test_fixtures/eurange_issue.xml +0 -74
  439. package/test_helpers/test_fixtures/example_issue1096.xml +0 -267
  440. package/test_helpers/test_fixtures/fixture_empty_nodeset2.xml +0 -106
  441. package/test_helpers/test_fixtures/fixture_simple_statemachine_nodeset2.xml +0 -1305
  442. package/test_helpers/test_fixtures/fixuture_nodeset_objects_with_some_methods.xml +0 -370
  443. package/test_helpers/test_fixtures/issue_1132_variable_with_nodeid_value.xml +0 -68
  444. package/test_helpers/test_fixtures/issue_846.xml +0 -3172
  445. package/test_helpers/test_fixtures/issue_899_variable_with_nodeid_value.xml +0 -33
  446. package/test_helpers/test_fixtures/mini.Node.Set2.xml +0 -4736
  447. package/test_helpers/test_fixtures/mini.nodeset.withVariousVariables.xml +0 -196
  448. package/test_helpers/test_fixtures/minimalist_nodeset_with_models.xml +0 -8
  449. package/test_helpers/test_fixtures/minimalist_nodeset_with_models_more_complex.xml +0 -20
  450. package/test_helpers/test_fixtures/nodeset_no_aliases.xml +0 -30
  451. package/test_helpers/test_fixtures/nodeset_no_aliases_with_aliases.xml +0 -31
  452. package/test_helpers/test_fixtures/nodeset_with_analog_items.xml +0 -45
  453. package/test_helpers/test_fixtures/nodeset_with_guid.xml +0 -1442
  454. package/test_helpers/test_fixtures/nodeset_with_int64_values.xml +0 -31
  455. package/test_helpers/test_fixtures/nodeset_with_special_char.xml +0 -34
  456. package/test_helpers/test_fixtures/nodeset_with_utf8_special_characters.xml +0 -20
  457. package/test_helpers/test_fixtures/variable_with_value.xml +0 -143
  458. package/test_helpers/test_fixtures/variabletype_with_value.xml +0 -324
  459. /package/{test_helpers/index.ts → distHelpers/index.d.ts} +0 -0
  460. /package/{source_nodejs/index.ts → distNodeJS/index.d.ts} +0 -0
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @module node-opcua-address-space
3
+ */
4
+ import { InstantiateObjectOptions } from "node-opcua-address-space-base";
5
+ import { UAStateMachineEx, UAStateMachineType } from "./ua_state_machine_type";
6
+ /**
7
+ * Finite State Machine
8
+ *
9
+ * The FiniteStateMachineType is the base ObjectType for StateMachines that explicitly define
10
+ * the possible States and Transitions. Once the States are defined subtypes shall not add new
11
+ * States (see B.4.18).
12
+ * The States of the machine are represented with instances of the StateType ObjectType.
13
+ *
14
+ * EachState shall have a BrowseName which is unique within the StateMachine and shall have a
15
+ * StateNumber which shall also be unique across all States defined in the StateMachine.
16
+ *
17
+ * Be aware that States in a SubStateMachine may have the same StateNumber or BrowseName as
18
+ * States in the parent machine. A concrete subtype of FiniteStateMachineType shall define at
19
+ * least one State.
20
+ *
21
+ * A StateMachine may define one State which is an instance of the InitialStateType. This State
22
+ * is the State that the machine goes into when it is activated.
23
+ *
24
+ * The Transitions that may occur are represented with instances of the TransitionType.
25
+ *
26
+ * Each Transition shall have a BrowseName which is unique within the StateMachine and may have a
27
+ * TransitionNumber which shall also be unique across all Transitions defined in the StateMachine.
28
+ *
29
+ * The initial State for a Transition is a StateType Object which is the target of a FromState
30
+ * Reference. The final State for a Transition is a StateType Object which is the target of a ToState
31
+ * Reference. The FromState and ToState References shall always be specified.
32
+ * A Transition may produce an Event. The Event is indicated by a HasEffect Reference to a
33
+ * subtype of BaseEventType. The StateMachineType shall have GeneratesEvent References to
34
+ * the targets of a HasEffect Reference for each of its Transitions.
35
+ * A FiniteStateMachineType may define Methods that cause a transition to occur. These Methods
36
+ * are targets of HasCause References for each of the Transitions that may be triggered by the
37
+ * Method. The Executable Attribute for a Method is used to indicate whether the current State of
38
+ * the machine allows the Method to be called.
39
+ *
40
+ * A FiniteStateMachineType may have sub-state-machines which are represented as instances
41
+ * of StateMachineType ObjectTypes. Each State shall have a HasSubStateMachine Reference
42
+ * to the StateMachineType Object which represents the child States. The SubStateMachine is
43
+ * not active if the parent State is not active. In this case the CurrentState and LastTransition
44
+ * Variables of the SubStateMachine shall have a status equal to BadStateNotActive (see Table
45
+ * B.17).
46
+ */
47
+ export interface UAFiniteStateMachineType extends UAStateMachineType {
48
+ instantiate(options: InstantiateObjectOptions): UAStateMachineEx;
49
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ua_finite_state_machine_type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ua_finite_state_machine_type.js","sourceRoot":"","sources":["../../../../source/interfaces/state_machine/ua_finite_state_machine_type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @module node-opcua-address-space
3
+ */
4
+ import { InstantiateObjectOptions, UAObjectType } from "node-opcua-address-space-base";
5
+ import { UAProgramStateMachine_Base } from "node-opcua-nodeset-ua";
6
+ import { UAStateMachineEx } from "./ua_state_machine_type";
7
+ export interface UAProgramStateMachineEx extends UAStateMachineEx {
8
+ }
9
+ export interface UAProgramStateMachineType extends UAProgramStateMachine_Base, UAObjectType {
10
+ instantiate(options: InstantiateObjectOptions): UAProgramStateMachineEx;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ua_program_state_machine_type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ua_program_state_machine_type.js","sourceRoot":"","sources":["../../../../source/interfaces/state_machine/ua_program_state_machine_type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
1
+ /// <reference types="node" />
2
+ import { UAProperty, UAMethod } from "node-opcua-address-space-base";
3
+ import { DataType } from "node-opcua-basic-types";
4
+ import { UAShelvedStateMachine_Base, UAState } from "node-opcua-nodeset-ua";
5
+ import { UAStateMachineEx } from "./ua_state_machine_type";
6
+ import { UATransitionEx } from "./ua_transition_ex";
7
+ export interface UAShelvedStateMachineHelper {
8
+ _timer: NodeJS.Timer | null;
9
+ _sheveldTime: Date;
10
+ _unshelvedTime: Date;
11
+ _duration: number;
12
+ }
13
+ export interface UAShelvedStateMachineEx extends UAShelvedStateMachine_Base, UAStateMachineEx, UAShelvedStateMachineHelper {
14
+ unshelveTime: UAProperty<number, /*z*/ DataType.Double>;
15
+ unshelved: UAState;
16
+ timedShelved: UAState;
17
+ oneShotShelved: UAState;
18
+ unshelvedToTimedShelved: UATransitionEx;
19
+ unshelvedToOneShotShelved: UATransitionEx;
20
+ timedShelvedToUnshelved: UATransitionEx;
21
+ timedShelvedToOneShotShelved: UATransitionEx;
22
+ oneShotShelvedToUnshelved: UATransitionEx;
23
+ oneShotShelvedToTimedShelved: UATransitionEx;
24
+ timedShelve: UAMethod;
25
+ timedShelve2?: UAMethod;
26
+ unshelve: UAMethod;
27
+ unshelve2?: UAMethod;
28
+ oneShotShelve: UAMethod;
29
+ oneShotShelve2?: UAMethod;
30
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ua_shelved_state_machine_ex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ua_shelved_state_machine_ex.js","sourceRoot":"","sources":["../../../../source/interfaces/state_machine/ua_shelved_state_machine_ex.ts"],"names":[],"mappings":""}
@@ -0,0 +1,234 @@
1
+ /**
2
+ * @module node-opcua-address-space
3
+ */
4
+ import { DateTime, UInt32 } from "node-opcua-basic-types";
5
+ import { LocalizedText } from "node-opcua-data-model";
6
+ import { DataType } from "node-opcua-variant";
7
+ import { UAProperty, InstantiateObjectOptions, UAObject, UAObjectType, UAReferenceType, UAVariableTypeT } from "node-opcua-address-space-base";
8
+ import { UAInitialState, UAInitialState_Base, UAState, UAState_Base, UAStateMachine_Base, UATransition_Base, UATransitionEvent_Base } from "node-opcua-nodeset-ua";
9
+ import { UATransitionEx } from "./ua_transition_ex";
10
+ export type UtcTime = DateTime;
11
+ export interface NonHierarchicalReferences extends UAReferenceType {
12
+ }
13
+ export interface UAStateVariableType extends UAVariableTypeT<LocalizedText, DataType.LocalizedText> {
14
+ isAbstract: false;
15
+ }
16
+ export interface StateB {
17
+ stateNumber: UAProperty<UInt32, DataType.UInt32>;
18
+ }
19
+ export interface UAStateType extends UAState_Base, UAObjectType {
20
+ }
21
+ export interface UATransitionType extends UATransition_Base, UAObjectType {
22
+ }
23
+ /**
24
+ * Initial State Type
25
+ *
26
+ * The InitialStateType is a subtype of the StateType and is formally defined in Table B.8.
27
+ * An Object of the InitialStateType represents the State that a FiniteStateMachine enters
28
+ * when it is activated.
29
+ *
30
+ * Each FiniteStateMachine can have at most one State of type InitialStateType, but
31
+ * a FiniteStateMachine does not have to have a State of this type.
32
+ *
33
+ * A SubStateMachine goes into its initial state whenever the parent state is entered. However, a
34
+ * state machine may define a transition that goes directly to a state of the SubStateMachine. In
35
+ * this case the SubStateMachine goes into that State instead of the initial State. The two
36
+ * scenarios are illustrated in Figure B.4. The transition from State5 to State6 causes the
37
+ * SubStateMachine to go into the initial State (State7), however, the transition from State4 to
38
+ * State8 causes the parent machine to go to State6 and the SubStateMachine will go to State8.
39
+ *
40
+ * If no initial state for a SubStateMachine exists and the State having the SubStateMachine is
41
+ * entered directly, then the State of the SubStateMachine is server-specific.
42
+ */
43
+ export interface UAInitialStateType extends UAInitialState_Base, UAStateType {
44
+ }
45
+ /**
46
+ * ToState Reference Type
47
+ *
48
+ * The ToState ReferenceType is a concrete ReferenceType and can be used directly. It is a
49
+ * subtype of NonHierarchicalReferences.
50
+ *
51
+ * The semantic of this ReferenceType is to point form a Transition to the ending State the
52
+ * Transition connects.
53
+ *
54
+ * The SourceNode of this ReferenceType shall be an Object of the ObjectType TransitionType or
55
+ * one of its subtypes. The TargetNode of this ReferenceType shall be an Object of the ObjectType
56
+ * StateType or one of its subtypes.
57
+ *
58
+ * References of this ReferenceType may be only exposed uni-directional. Sometimes this is
59
+ * required, for example, if a Transition points to a State of a sub-machine.
60
+ */
61
+ export interface ToStateReferenceType extends NonHierarchicalReferences {
62
+ }
63
+ /**
64
+ *
65
+ * FromState Reference Type
66
+ *
67
+ * The FromState ReferenceType is a concrete ReferenceType and can be used directly. It is a
68
+ * subtype of NonHierarchicalReferences.
69
+ *
70
+ * The semantic of this ReferenceType is to point form a Transition to the starting State the
71
+ * Transition connects.
72
+ *
73
+ * The SourceNode of this ReferenceType shall be an Object of the ObjectType TransitionType or
74
+ * one of its subtypes. The TargetNode of this ReferenceType shall be an Object of the ObjectType
75
+ * StateType or one of its subtypes.
76
+ */
77
+ export interface FromStateReferenceType extends NonHierarchicalReferences {
78
+ }
79
+ /**
80
+ * HasCause
81
+ * The HasCause ReferenceType is a concrete ReferenceType and can be used directly. It is a
82
+ * subtype of NonHierarchicalReferences.
83
+ *
84
+ * The semantic of this ReferenceType is to point form a Transition to something that causes the
85
+ * Transition. In this annex we only define Methods as Causes. However, the ReferenceType is
86
+ * not restricted to point to Methods. The referenced Methods can, but do not have to point to a
87
+ * Method of the StateMachineType. For example, it is allowed to point to a server-wide restart
88
+ * Method leading the state machine to go into its initial state.
89
+ *
90
+ * The SourceNode of this ReferenceType shall be an Object of the ObjectType TransitionType or
91
+ * one of its subtypes. The TargetNode can be of any NodeClass
92
+ */
93
+ export interface HasCauseReferenceType extends NonHierarchicalReferences {
94
+ }
95
+ /**
96
+ * HasEffect ReferenceType
97
+ *
98
+ * The HasEffect ReferenceType is a concrete ReferenceType and can be used directly. It is a
99
+ * subtype of NonHierarchicalReferences.
100
+ * The semantic of this ReferenceType is to point form a Transition to something that will be
101
+ * effected when the Transition is triggered. In this annex we only define EventTypes as Effects.
102
+ *
103
+ * However, the ReferenceType is not restricted to point to EventTypes.
104
+ *
105
+ * The SourceNode of this ReferenceType shall be an Object of the ObjectType TransitionType or
106
+ * one of its subtypes. The TargetNode can be of any NodeClass.
107
+ */
108
+ export interface HasEffectReferenceType extends NonHierarchicalReferences {
109
+ }
110
+ /**
111
+ * The HasSubStateMachine ReferenceType is a concrete ReferenceType and can be used
112
+ * directly. It is a subtype of NonHierarchicalReferences.
113
+ *
114
+ * The semantic of this ReferenceType is to point from a State to an instance of
115
+ * StateMachineType which represents the sub-states for the State.
116
+ *
117
+ * The SourceNode of this ReferenceType shall be an Object of the ObjectType StateType.
118
+ *
119
+ * The TargetNode shall be an Object of the ObjectType StateMachineType or one of its subtypes.
120
+ *
121
+ * Each Object can be the TargetNode of at most one HasSubStateMachine Reference.
122
+ *
123
+ * The SourceNode (the state) and the TargetNode (the SubStateMachine) shall belong to the
124
+ * same StateMachine, that is, both shall be referenced from the same Object of type
125
+ * StateMachineType using a HasComponent Reference or a subtype of HasComponent.
126
+ */
127
+ export interface HasSubStateMachine extends NonHierarchicalReferences {
128
+ }
129
+ /**
130
+ * The TransitionEventType is a subtype of the BaseEventType. It can be used to generate an
131
+ * Event identifying that a Transition of a StateMachine was triggered.
132
+ *
133
+ * The TransitionEventType inherits the Properties of the BaseEventType.
134
+ *
135
+ * The inherited Property SourceNode shall be filled with the NodeId of the StateMachine instance
136
+ * where the Transition occurs. If the Transition occurs in a SubStateMachine, then the NodeId of
137
+ * the SubStateMachine has to be used. If the Transition occurs between a StateMachine and a
138
+ * SubStateMachine, then the NodeId of the StateMachine has to be used, independent of the
139
+ * direction of the Transition.
140
+ */
141
+ export interface UATransitionEventType extends UATransitionEvent_Base, UAObjectType {
142
+ }
143
+ export type TransitionSelector = (transitions: UATransitionEx[], fromState: UAState, toState: UAState) => UATransitionEx | null;
144
+ /**
145
+ * State Machine type
146
+ *
147
+ * StateMachines produce Events which may include the current state of a StateMachine. In that
148
+ * case Servers shall provide all the optional Properties of the StateVariableType in the Event,
149
+ * even if they are not provided on the instances in the address space.
150
+ */
151
+ /**
152
+ * StateMachineType
153
+ *
154
+ * The StateMachineType is the base ObjectType for all StateMachineTypes. It defines a single
155
+ * Variable which represents the current state of the machine.
156
+ * An instance of this ObjectType shall generate an Event whenever a significant state change occurs.
157
+ * The Server decides which state changes are significant. Servers shall use the GeneratesEvent
158
+ * ReferenceType to indicate which Event(s) could be produced by the StateMachine.
159
+ *
160
+ * Subtypes may add Methods which affect the state of the machine. The Executable Attribute is
161
+ * used to indicate whether the Method is valid given the current state of the machine. The
162
+ * generation of AuditEvents for Methods is defined in Part 4. A StateMachine may not be active.
163
+ *
164
+ * In this case, the CurrentState and LastTransition Variables shall have a status equal to
165
+ * BadStateNotActive (see Table B.17).
166
+ *
167
+ * Subtypes may add components which are instances of StateMachineTypes. These components
168
+ * are considered to be sub-states of the StateMachine. SubStateMachines are only active when
169
+ * the parent machine is in an appropriate state.
170
+ * Events produced by SubStateMachines may be suppressed by the parent machine. In some
171
+ * cases, the parent machine will produce a single Event that reflects changes in multiple
172
+ * SubStateMachines
173
+ */
174
+ export interface UAStateMachineHelper {
175
+ readonly initialState: UAInitialState | null;
176
+ readonly states: UAState[];
177
+ readonly transitions: UATransitionEx[];
178
+ currentStateNode: UAState | null;
179
+ /**
180
+ * return all state nodes associated with this state machine
181
+ */
182
+ getStates(): UAState[];
183
+ /**
184
+ * return all state to state transition node associated with this state machine
185
+ */
186
+ getTransitions(): UATransitionEx[];
187
+ /**
188
+ * return the state Node by Name
189
+ * @param name
190
+ */
191
+ getStateByName(name: string): UAState | null;
192
+ /**
193
+ * returns true if there is a valid transition from currentStateNode to toStateNode
194
+ * @param toStateNode
195
+ */
196
+ isValidTransition(toStateNode: UAState | string, predicate?: TransitionSelector): boolean;
197
+ /**
198
+ * try to find the valid transition between fromState Node to toState Node
199
+ * @param fromStateNode
200
+ * @param toStateNode
201
+ */
202
+ findTransitionNode(fromStateNode: UAState, toStateNode: UAState, predicate?: TransitionSelector): UATransitionEx | null;
203
+ /**
204
+ * return the current state as string
205
+ */
206
+ getCurrentState(): string | null;
207
+ /**
208
+ * change the current state
209
+ *
210
+ * note:
211
+ * - a transition from currentState to toState node must exists
212
+ * - a TransitionEventType event will be raised
213
+ * @param toStateNode
214
+ */
215
+ setState(toStateNode: UAState | string | null, predicate?: TransitionSelector): void;
216
+ }
217
+ export interface UAStateMachineEx extends UAObject, UAStateMachineHelper, UAStateMachine_Base {
218
+ }
219
+ export interface UAStateMachineTypeHelper extends UAObjectType {
220
+ /**
221
+ * return all state nodes associated with this state machine
222
+ */
223
+ getStates(): UAState[];
224
+ /**
225
+ * return all state to state transition node associated with this state machine
226
+ */
227
+ getTransitions(): UATransitionEx[];
228
+ getStateByName(name: string): UAState | null;
229
+ }
230
+ export interface UAStateMachineType extends UAObjectType, UAStateMachineTypeHelper, UAStateMachine_Base {
231
+ instantiate(options: InstantiateObjectOptions): UAStateMachineEx;
232
+ }
233
+ export declare function promoteToStateMachineType(node: UAObjectType): UAStateMachineType;
234
+ export declare function promoteToStateMachine(node: UAObject): UAStateMachineEx;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ua_state_machine_type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ua_state_machine_type.js","sourceRoot":"","sources":["../../../../source/interfaces/state_machine/ua_state_machine_type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { BaseNode } from "node-opcua-address-space-base";
2
+ import { UATransition } from "node-opcua-nodeset-ua";
3
+ export interface UATransitionEx extends UATransition {
4
+ get toStateNode(): BaseNode | null;
5
+ get fromStateNode(): BaseNode | null;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ua_transition_ex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ua_transition_ex.js","sourceRoot":"","sources":["../../../../source/interfaces/state_machine/ua_transition_ex.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @module node-opcua-address-space
3
+ */
4
+ import { SubscriptionDiagnosticsDataType } from "node-opcua-types";
5
+ import { DTSubscriptionDiagnostics, UASubscriptionDiagnostics } from "node-opcua-nodeset-ua";
6
+ export interface UASubscriptionDiagnosticsVariableEx extends UASubscriptionDiagnostics<DTSubscriptionDiagnostics> {
7
+ $extensionObject: SubscriptionDiagnosticsDataType;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ua_subscription_diagnostics_variable_ex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ua_subscription_diagnostics_variable_ex.js","sourceRoot":"","sources":["../../../source/interfaces/ua_subscription_diagnostics_variable_ex.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { IAddressSpace } from "node-opcua-address-space-base";
2
+ import { ExtensionObject } from "node-opcua-extension-object";
3
+ import { NodeId } from "node-opcua-nodeid";
4
+ import { DefinitionMap2 } from "./make_xml_extension_object_parser";
5
+ export declare function makeDefinitionMap(addressSpace: IAddressSpace): DefinitionMap2;
6
+ export declare function decodeXmlExtensionObject(addressSpace: IAddressSpace, encodingNodeId: NodeId, xmlBody: string): ExtensionObject | null;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.decodeXmlExtensionObject = exports.makeDefinitionMap = void 0;
4
+ const node_opcua_debug_1 = require("node-opcua-debug");
5
+ const node_opcua_types_1 = require("node-opcua-types");
6
+ const node_opcua_xml2json_1 = require("node-opcua-xml2json");
7
+ const make_xml_extension_object_parser_1 = require("./make_xml_extension_object_parser");
8
+ const doDebug = (0, node_opcua_debug_1.checkDebugFlag)(__filename);
9
+ const debugLog = (0, node_opcua_debug_1.make_debugLog)(__filename);
10
+ const errorLog = (0, node_opcua_debug_1.make_errorLog)(__filename);
11
+ function encodingNodeIdToDataTypeNode(addressSpace, encodingNodeId) {
12
+ const encodingNode = addressSpace.findNode(encodingNodeId);
13
+ // istanbul ignore next
14
+ if (!encodingNode) {
15
+ throw new Error("findDataTypeNode: Cannot find encoding NodeId" + encodingNodeId.toString());
16
+ }
17
+ // xx console.log("encodingNode", encodingNode.toString());
18
+ const refs = encodingNode.findReferences("HasEncoding", false);
19
+ const dataTypes = refs.map((ref) => addressSpace.findNode(ref.nodeId)).filter((obj) => obj !== null);
20
+ // istanbul ignore next
21
+ if (dataTypes.length !== 1) {
22
+ throw new Error("Internal Error");
23
+ }
24
+ const dataTypeNode = dataTypes[0];
25
+ return dataTypeNode;
26
+ }
27
+ function makeDefinitionMap(addressSpace) {
28
+ return {
29
+ findDefinition(dataTypeNodeId) {
30
+ const dataTypeNode = addressSpace.findDataType(dataTypeNodeId);
31
+ if (!dataTypeNode) {
32
+ throw new Error("findDefinition: cannot find dataType " + dataTypeNodeId.toString());
33
+ }
34
+ if (dataTypeNode.nodeClass !== node_opcua_types_1.NodeClass.DataType) {
35
+ throw new Error("Expecting a DataType node here");
36
+ }
37
+ const name = dataTypeNode.browseName.name || "";
38
+ // console.log("yy)=", dataTypeNode.toString());
39
+ if (dataTypeNode.isStructure()) {
40
+ const definition = dataTypeNode.getStructureDefinition();
41
+ return { name, definition };
42
+ }
43
+ else if (dataTypeNode.isEnumeration()) {
44
+ const definition = dataTypeNode.getEnumDefinition();
45
+ return { name, definition };
46
+ }
47
+ else {
48
+ const dataType = dataTypeNode.getBasicDataType();
49
+ return { name, definition: { dataType } };
50
+ }
51
+ }
52
+ };
53
+ }
54
+ exports.makeDefinitionMap = makeDefinitionMap;
55
+ function decodeXmlExtensionObject(addressSpace, encodingNodeId, xmlBody) {
56
+ const definitionMap = makeDefinitionMap(addressSpace);
57
+ const dataType = encodingNodeIdToDataTypeNode(addressSpace, encodingNodeId);
58
+ // const { name, definition } = definitionMap.findDefinition(dataType.nodeId);
59
+ // const hasOptionalFields = definition.fields!.some((field) => field.isOptional);
60
+ const reader = (0, make_xml_extension_object_parser_1.makeXmlExtensionObjectReader)(dataType.nodeId, definitionMap, {});
61
+ const parser2 = new node_opcua_xml2json_1.Xml2Json(reader);
62
+ const pojo = parser2.parseStringSync(xmlBody);
63
+ const userDefinedExtensionObject = addressSpace.constructExtensionObject(dataType, pojo);
64
+ // istanbul ignore next
65
+ if (doDebug) {
66
+ debugLog("userDefinedExtensionObject", userDefinedExtensionObject.toString());
67
+ }
68
+ //
69
+ return userDefinedExtensionObject;
70
+ }
71
+ exports.decodeXmlExtensionObject = decodeXmlExtensionObject;
72
+ //# sourceMappingURL=decode_xml_extension_object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decode_xml_extension_object.js","sourceRoot":"","sources":["../../../source/loader/decode_xml_extension_object.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,5 @@
1
+ import { IAddressSpace } from "node-opcua-address-space-base";
2
+ import { ExtraDataTypeManager } from "node-opcua-client-dynamic-extension-object";
3
+ import { CallbackT } from "node-opcua-status-code";
4
+ export declare function ensureDatatypeExtracted(addressSpace: IAddressSpace): Promise<ExtraDataTypeManager>;
5
+ export declare function ensureDatatypeExtractedWithCallback(addressSpace: IAddressSpace, callback: CallbackT<ExtraDataTypeManager>): void;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ensureDatatypeExtractedWithCallback = exports.ensureDatatypeExtracted = void 0;
13
+ const node_opcua_client_dynamic_extension_object_1 = require("node-opcua-client-dynamic-extension-object");
14
+ const node_opcua_debug_1 = require("node-opcua-debug");
15
+ const node_opcua_factory_1 = require("node-opcua-factory");
16
+ const pseudo_session_1 = require("../pseudo_session");
17
+ const debugLog = (0, node_opcua_debug_1.make_debugLog)(__filename);
18
+ function fixDefinition103(addressSpace, namespaceArray, dataTypeManager) {
19
+ // fix datatype _getDefinition();
20
+ for (let namespaceIndex = 1; namespaceIndex < namespaceArray.length; namespaceIndex++) {
21
+ const df = dataTypeManager.getDataTypeFactory(namespaceIndex);
22
+ for (const s of df.getStructureIterator()) {
23
+ const dataType = addressSpace.findDataType(s.schema.dataTypeNodeId);
24
+ if (!s.constructor) {
25
+ continue;
26
+ }
27
+ if (!dataType) {
28
+ continue;
29
+ }
30
+ if (dataType.$partialDefinition && dataType.$partialDefinition.length) {
31
+ continue;
32
+ }
33
+ // debugLog(" Explorartion", dataType.browseName.toString());
34
+ if (!dataType.$partialDefinition || (dataType.$partialDefinition.length === 0 && s.schema.fields.length > 0)) {
35
+ const sd = (0, node_opcua_client_dynamic_extension_object_1.convertStructureTypeSchemaToStructureDefinition)(s.schema);
36
+ dataType.$partialDefinition = sd.fields || undefined;
37
+ }
38
+ }
39
+ }
40
+ }
41
+ function ensureDatatypeExtracted(addressSpace) {
42
+ return __awaiter(this, void 0, void 0, function* () {
43
+ const addressSpacePriv = addressSpace;
44
+ if (!addressSpacePriv.$$extraDataTypeManager) {
45
+ const dataTypeManager = new node_opcua_client_dynamic_extension_object_1.ExtraDataTypeManager();
46
+ const namespaceArray = addressSpace.getNamespaceArray().map((n) => n.namespaceUri);
47
+ debugLog("INamespace Array = ", namespaceArray.join("\n "));
48
+ dataTypeManager.setNamespaceArray(namespaceArray);
49
+ addressSpacePriv.$$extraDataTypeManager = dataTypeManager;
50
+ for (let namespaceIndex = 1; namespaceIndex < namespaceArray.length; namespaceIndex++) {
51
+ const dataTypeFactory1 = new node_opcua_factory_1.DataTypeFactory([(0, node_opcua_factory_1.getStandardDataTypeFactory)()]);
52
+ dataTypeManager.registerDataTypeFactory(namespaceIndex, dataTypeFactory1);
53
+ }
54
+ // inject simple types
55
+ // now extract structure and enumeration from old form
56
+ const session = new pseudo_session_1.PseudoSession(addressSpace);
57
+ yield (0, node_opcua_client_dynamic_extension_object_1.populateDataTypeManager)(session, dataTypeManager);
58
+ // turn old <=103 structure to have valid DataTypeDefinition
59
+ fixDefinition103(addressSpace, namespaceArray, dataTypeManager);
60
+ }
61
+ return addressSpacePriv.$$extraDataTypeManager;
62
+ });
63
+ }
64
+ exports.ensureDatatypeExtracted = ensureDatatypeExtracted;
65
+ function ensureDatatypeExtractedWithCallback(addressSpace, callback) {
66
+ ensureDatatypeExtracted(addressSpace)
67
+ .then((result) => callback(null, result))
68
+ .catch((err) => callback(err));
69
+ }
70
+ exports.ensureDatatypeExtractedWithCallback = ensureDatatypeExtractedWithCallback;
71
+ //# sourceMappingURL=ensure_datatype_extracted.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure_datatype_extracted.js","sourceRoot":"","sources":["../../../source/loader/ensure_datatype_extracted.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,11 @@
1
+ import { CallbackT } from "node-opcua-status-code";
2
+ import { IAddressSpace } from "node-opcua-address-space-base";
3
+ import { NodeSetLoaderOptions } from "../interfaces/nodeset_loader_options";
4
+ /**
5
+ * @param addressSpace the addressSpace to populate
6
+ * @xmlFiles: a lis of xml files
7
+ * @param xmlLoader - a helper function to return the content of the xml file
8
+ */
9
+ export declare function generateAddressSpaceRaw(addressSpace: IAddressSpace, xmlFiles: string | string[], xmlLoader: (nodeset2xmlUri: string) => Promise<string>, options: NodeSetLoaderOptions): Promise<void>;
10
+ export type XmlLoaderFunc = (nodeset2xmlUri: string, callback: CallbackT<string>) => void;
11
+ export type XmlLoaderAsyncFunc = (nodeset2xmlUri: string) => Promise<string>;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.generateAddressSpaceRaw = void 0;
13
+ const node_opcua_debug_1 = require("node-opcua-debug");
14
+ const adjust_namespace_array_1 = require("../../src/nodeset_tools/adjust_namespace_array");
15
+ const load_nodeset2_1 = require("./load_nodeset2");
16
+ const doDebug = (0, node_opcua_debug_1.checkDebugFlag)(__filename);
17
+ const debugLog = (0, node_opcua_debug_1.make_debugLog)(__filename);
18
+ const errorLog = (0, node_opcua_debug_1.make_errorLog)(__filename);
19
+ /**
20
+ * @param addressSpace the addressSpace to populate
21
+ * @xmlFiles: a lis of xml files
22
+ * @param xmlLoader - a helper function to return the content of the xml file
23
+ */
24
+ function generateAddressSpaceRaw(addressSpace, xmlFiles, xmlLoader, options) {
25
+ return __awaiter(this, void 0, void 0, function* () {
26
+ const nodesetLoader = new load_nodeset2_1.NodeSetLoader(addressSpace, options);
27
+ if (!Array.isArray(xmlFiles)) {
28
+ xmlFiles = [xmlFiles];
29
+ }
30
+ for (let index = 0; index < xmlFiles.length; index++) {
31
+ const xmlData = yield xmlLoader(xmlFiles[index]);
32
+ try {
33
+ yield nodesetLoader.addNodeSetAsync(xmlData);
34
+ }
35
+ catch (err) {
36
+ errorLog("generateAddressSpace: Loading xml file ", xmlFiles[index], " failed with error ", err.message);
37
+ throw err;
38
+ }
39
+ }
40
+ yield nodesetLoader.terminateAsync();
41
+ (0, adjust_namespace_array_1.adjustNamespaceArray)(addressSpace);
42
+ // however process them in series
43
+ });
44
+ }
45
+ exports.generateAddressSpaceRaw = generateAddressSpaceRaw;
46
+ //# sourceMappingURL=generateAddressSpaceRaw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateAddressSpaceRaw.js","sourceRoot":"","sources":["../../../source/loader/generateAddressSpaceRaw.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uDAAgF;AAIhF,2FAAsF;AAEtF,mDAAgD;AAEhD,MAAM,OAAO,GAAG,IAAA,iCAAc,EAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,QAAQ,GAAG,IAAA,gCAAa,EAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,QAAQ,GAAG,IAAA,gCAAa,EAAC,UAAU,CAAC,CAAC;AAE3C;;;;GAIG;AACH,SAAsB,uBAAuB,CACzC,YAA2B,EAC3B,QAA2B,EAC3B,SAAsD,EACtD,OAA6B;;QAE7B,MAAM,aAAa,GAAG,IAAI,6BAAa,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QAE/D,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC1B,QAAQ,GAAG,CAAC,QAAQ,CAAC,CAAC;SACzB;QACD,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAClD,MAAM,OAAO,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;YACjD,IAAI;gBACA,MAAM,aAAa,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;aAChD;YAAC,OAAO,GAAG,EAAE;gBACV,QAAQ,CAAC,0CAA0C,EAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,qBAAqB,EAAG,GAAa,CAAC,OAAO,CAAC,CAAC;gBACrH,MAAM,GAAG,CAAC;aACb;SACJ;QACD,MAAM,aAAa,CAAC,cAAc,EAAE,CAAC;QACrC,IAAA,6CAAoB,EAAC,YAAY,CAAC,CAAC;QACnC,iCAAiC;IACrC,CAAC;CAAA;AAvBD,0DAuBC"}