node-opcua-address-space 2.179.0 → 2.181.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 (1085) hide show
  1. package/api/address_space_public.ts +63 -0
  2. package/api/address_space_ts.ts +129 -0
  3. package/api/continuation_points/continuation_point_manager.ts +271 -0
  4. package/api/helpers/argument_list.ts +310 -0
  5. package/api/helpers/call_helpers.ts +100 -0
  6. package/api/helpers/coerce_enum_value.ts +33 -0
  7. package/api/helpers/dump_tools.ts +90 -0
  8. package/api/helpers/ensure_secure_access.ts +78 -0
  9. package/api/helpers/multiform_func.ts +78 -0
  10. package/api/helpers/resolve_opaque_on_address_space.ts +26 -0
  11. package/api/index.ts +210 -0
  12. package/api/interfaces/alarms_and_conditions/condition_info_i.ts +60 -0
  13. package/api/interfaces/alarms_and_conditions/condition_snapshot.ts +236 -0
  14. package/api/interfaces/alarms_and_conditions/deviation_stuff.ts +16 -0
  15. package/api/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +8 -0
  16. package/api/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +6 -0
  17. package/api/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +6 -0
  18. package/api/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +13 -0
  19. package/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +6 -0
  20. package/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +6 -0
  21. package/api/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +21 -0
  22. package/api/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +28 -0
  23. package/api/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +72 -0
  24. package/api/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +36 -0
  25. package/api/interfaces/alarms_and_conditions/ua_condition_ex.ts +55 -0
  26. package/api/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +17 -0
  27. package/api/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +21 -0
  28. package/api/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +21 -0
  29. package/api/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +26 -0
  30. package/api/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +29 -0
  31. package/api/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +25 -0
  32. package/api/interfaces/data_access/ua_multistate_discrete_ex.ts +57 -0
  33. package/api/interfaces/data_access/ua_multistate_value_discrete_ex.ts +31 -0
  34. package/api/interfaces/data_access/ua_two_state_discrete_ex.ts +15 -0
  35. package/api/interfaces/nodeset_loader_options.ts +58 -0
  36. package/api/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +20 -0
  37. package/api/interfaces/state_machine/ua_finite_state_machine_type.ts +50 -0
  38. package/api/interfaces/state_machine/ua_program_state_machine_type.ts +14 -0
  39. package/api/interfaces/state_machine/ua_shelved_state_machine_ex.ts +35 -0
  40. package/api/interfaces/state_machine/ua_state_machine_type.ts +288 -0
  41. package/api/loader/decode_xml_extension_object.ts +80 -0
  42. package/api/loader/ensure_datatype_extracted.ts +122 -0
  43. package/api/loader/generateAddressSpaceRaw.ts +470 -0
  44. package/api/loader/load_nodeset2.ts +278 -0
  45. package/api/loader/make_xml_extension_object_parser.ts +518 -0
  46. package/api/loader/namespace_post_step.ts +68 -0
  47. package/api/loader/nodeset_image.ts +451 -0
  48. package/api/loader/nodeset_image_codec.ts +576 -0
  49. package/api/loader/nodeset_image_store.ts +78 -0
  50. package/api/loader/nodeset_record.ts +141 -0
  51. package/api/loader/nodeset_record_applier.ts +889 -0
  52. package/api/loader/nodeset_source.ts +367 -0
  53. package/api/loader/nodeset_source_helpers.ts +50 -0
  54. package/api/loader/nodeset_to_image.ts +29 -0
  55. package/api/loader/nodeset_xml_producer.ts +383 -0
  56. package/api/loader/parsers/extension_object_parser.ts +374 -0
  57. package/api/loader/parsers/variant_parser.ts +363 -0
  58. package/api/loader/register_node_promoter.ts +6 -0
  59. package/api/namespace.ts +25 -0
  60. package/api/namespace_alarm_and_condition.ts +78 -0
  61. package/api/namespace_data_access.ts +92 -0
  62. package/api/namespace_machine_state.ts +20 -0
  63. package/api/pseudo_session.ts +415 -0
  64. package/api/session_context.ts +729 -0
  65. package/api/ua_interface.ts +38 -0
  66. package/api/ua_two_state_variable_ex.ts +36 -0
  67. package/bin/opcua-nodeset-image.js +192 -0
  68. package/dist/api/address_space_public.d.ts +57 -0
  69. package/dist/api/address_space_public.js +19 -0
  70. package/dist/api/address_space_public.js.map +1 -0
  71. package/dist/api/address_space_ts.d.ts +79 -0
  72. package/dist/api/address_space_ts.js +13 -0
  73. package/dist/api/address_space_ts.js.map +1 -0
  74. package/dist/api/continuation_points/continuation_point_manager.js +230 -0
  75. package/dist/api/continuation_points/continuation_point_manager.js.map +1 -0
  76. package/dist/api/helpers/adjust_browse_direction.js.map +1 -0
  77. package/dist/api/helpers/argument_list.js +263 -0
  78. package/dist/api/helpers/argument_list.js.map +1 -0
  79. package/dist/api/helpers/call_helpers.js +80 -0
  80. package/dist/api/helpers/call_helpers.js.map +1 -0
  81. package/dist/api/helpers/coerce_enum_value.d.ts +6 -0
  82. package/dist/api/helpers/coerce_enum_value.js.map +1 -0
  83. package/dist/api/helpers/dump_tools.js +81 -0
  84. package/dist/api/helpers/dump_tools.js.map +1 -0
  85. package/dist/api/helpers/ensure_secure_access.d.ts +19 -0
  86. package/dist/api/helpers/ensure_secure_access.js +67 -0
  87. package/dist/api/helpers/ensure_secure_access.js.map +1 -0
  88. package/dist/api/helpers/make_optionals_map.js.map +1 -0
  89. package/dist/api/helpers/multiform_func.js +75 -0
  90. package/dist/api/helpers/multiform_func.js.map +1 -0
  91. package/dist/api/helpers/resolve_opaque_on_address_space.js +25 -0
  92. package/dist/api/helpers/resolve_opaque_on_address_space.js.map +1 -0
  93. package/dist/api/index.d.ts +113 -0
  94. package/dist/api/index.js +234 -0
  95. package/dist/api/index.js.map +1 -0
  96. package/dist/api/interfaces/alarms_and_conditions/condition_info_i.d.ts +54 -0
  97. package/dist/api/interfaces/alarms_and_conditions/condition_info_i.js +28 -0
  98. package/dist/api/interfaces/alarms_and_conditions/condition_info_i.js.map +1 -0
  99. package/dist/api/interfaces/alarms_and_conditions/condition_snapshot.d.ts +151 -0
  100. package/dist/api/interfaces/alarms_and_conditions/condition_snapshot.js.map +1 -0
  101. package/dist/api/interfaces/alarms_and_conditions/deviation_stuff.d.ts +12 -0
  102. package/dist/api/interfaces/alarms_and_conditions/deviation_stuff.js.map +1 -0
  103. package/dist/api/interfaces/alarms_and_conditions/install_setpoint_options.js.map +1 -0
  104. package/dist/api/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +7 -0
  105. package/dist/api/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js.map +1 -0
  106. package/dist/api/interfaces/alarms_and_conditions/instantiate_condition_options.js.map +1 -0
  107. package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +4 -0
  108. package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js.map +1 -0
  109. package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +4 -0
  110. package/dist/api/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js.map +1 -0
  111. package/dist/api/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +10 -0
  112. package/dist/api/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js.map +1 -0
  113. package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +4 -0
  114. package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js.map +1 -0
  115. package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +4 -0
  116. package/dist/api/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js.map +1 -0
  117. package/dist/api/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +20 -0
  118. package/dist/api/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js.map +1 -0
  119. package/dist/api/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +21 -0
  120. package/dist/api/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js.map +1 -0
  121. package/dist/api/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +56 -0
  122. package/dist/api/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js.map +1 -0
  123. package/dist/api/interfaces/alarms_and_conditions/ua_base_event_ex.js.map +1 -0
  124. package/dist/api/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +19 -0
  125. package/dist/api/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js.map +1 -0
  126. package/dist/api/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +44 -0
  127. package/dist/api/interfaces/alarms_and_conditions/ua_condition_ex.js.map +1 -0
  128. package/dist/api/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +4 -0
  129. package/dist/api/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +1 -0
  130. package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +5 -0
  131. package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js.map +1 -0
  132. package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +19 -0
  133. package/dist/api/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js.map +1 -0
  134. package/dist/api/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +25 -0
  135. package/dist/api/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js.map +1 -0
  136. package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +8 -0
  137. package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js.map +1 -0
  138. package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +10 -0
  139. package/dist/api/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js.map +1 -0
  140. package/dist/api/interfaces/data_access/ua_multistate_discrete_ex.d.ts +44 -0
  141. package/dist/api/interfaces/data_access/ua_multistate_discrete_ex.js.map +1 -0
  142. package/dist/api/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +22 -0
  143. package/dist/api/interfaces/data_access/ua_multistate_value_discrete_ex.js.map +1 -0
  144. package/dist/api/interfaces/data_access/ua_two_state_discrete_ex.d.ts +13 -0
  145. package/dist/api/interfaces/data_access/ua_two_state_discrete_ex.js.map +1 -0
  146. package/dist/api/interfaces/data_access/ua_y_array_item_ex.js.map +1 -0
  147. package/dist/api/interfaces/extension_object_constructor.js.map +1 -0
  148. package/dist/api/interfaces/i_condition_variable_type_setter_options.js.map +1 -0
  149. package/dist/api/interfaces/i_set_state_options.js.map +1 -0
  150. package/dist/api/interfaces/nodeset_loader_options.d.ts +56 -0
  151. package/dist/api/interfaces/nodeset_loader_options.js.map +1 -0
  152. package/dist/api/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +12 -0
  153. package/dist/api/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js.map +1 -0
  154. package/dist/api/interfaces/state_machine/ua_finite_state_machine_type.d.ts +49 -0
  155. package/dist/api/interfaces/state_machine/ua_finite_state_machine_type.js.map +1 -0
  156. package/dist/api/interfaces/state_machine/ua_program_state_machine_type.d.ts +11 -0
  157. package/dist/api/interfaces/state_machine/ua_program_state_machine_type.js.map +1 -0
  158. package/dist/api/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +29 -0
  159. package/dist/api/interfaces/state_machine/ua_shelved_state_machine_ex.js.map +1 -0
  160. package/dist/api/interfaces/state_machine/ua_state_machine_type.d.ts +236 -0
  161. package/dist/api/interfaces/state_machine/ua_state_machine_type.js.map +1 -0
  162. package/dist/api/interfaces/state_machine/ua_transition_ex.js.map +1 -0
  163. package/dist/api/interfaces/ua_subscription_diagnostics_variable_ex.js.map +1 -0
  164. package/dist/api/loader/decode_xml_extension_object.d.ts +6 -0
  165. package/dist/api/loader/decode_xml_extension_object.js +69 -0
  166. package/dist/api/loader/decode_xml_extension_object.js.map +1 -0
  167. package/dist/api/loader/ensure_datatype_extracted.js +88 -0
  168. package/dist/api/loader/ensure_datatype_extracted.js.map +1 -0
  169. package/dist/api/loader/generateAddressSpaceRaw.d.ts +64 -0
  170. package/dist/api/loader/generateAddressSpaceRaw.js +379 -0
  171. package/dist/api/loader/generateAddressSpaceRaw.js.map +1 -0
  172. package/dist/api/loader/load_nodeset2.d.ts +38 -0
  173. package/dist/api/loader/load_nodeset2.js +245 -0
  174. package/dist/api/loader/load_nodeset2.js.map +1 -0
  175. package/dist/api/loader/make_semver_compatible.js.map +1 -0
  176. package/dist/api/loader/make_xml_extension_object_parser.js +417 -0
  177. package/dist/api/loader/make_xml_extension_object_parser.js.map +1 -0
  178. package/dist/api/loader/namespace_post_step.js +57 -0
  179. package/dist/api/loader/namespace_post_step.js.map +1 -0
  180. package/dist/api/loader/nodeset_image.d.ts +94 -0
  181. package/dist/api/loader/nodeset_image.js +406 -0
  182. package/dist/api/loader/nodeset_image.js.map +1 -0
  183. package/dist/api/loader/nodeset_image_codec.d.ts +104 -0
  184. package/dist/api/loader/nodeset_image_codec.js +489 -0
  185. package/dist/api/loader/nodeset_image_codec.js.map +1 -0
  186. package/dist/api/loader/nodeset_image_store.d.ts +27 -0
  187. package/dist/api/loader/nodeset_image_store.js +72 -0
  188. package/dist/api/loader/nodeset_image_store.js.map +1 -0
  189. package/dist/api/loader/nodeset_record.d.ts +125 -0
  190. package/dist/api/loader/nodeset_record.js +26 -0
  191. package/dist/api/loader/nodeset_record.js.map +1 -0
  192. package/dist/api/loader/nodeset_record_applier.d.ts +106 -0
  193. package/dist/api/loader/nodeset_record_applier.js +731 -0
  194. package/dist/api/loader/nodeset_record_applier.js.map +1 -0
  195. package/dist/api/loader/nodeset_source.d.ts +124 -0
  196. package/dist/api/loader/nodeset_source.js +307 -0
  197. package/dist/api/loader/nodeset_source.js.map +1 -0
  198. package/dist/api/loader/nodeset_source_helpers.d.ts +27 -0
  199. package/dist/api/loader/nodeset_source_helpers.js +30 -0
  200. package/dist/api/loader/nodeset_source_helpers.js.map +1 -0
  201. package/dist/api/loader/nodeset_to_image.d.ts +13 -0
  202. package/dist/api/loader/nodeset_to_image.js +30 -0
  203. package/dist/api/loader/nodeset_to_image.js.map +1 -0
  204. package/dist/api/loader/nodeset_xml_producer.d.ts +16 -0
  205. package/dist/api/loader/nodeset_xml_producer.js +349 -0
  206. package/dist/api/loader/nodeset_xml_producer.js.map +1 -0
  207. package/dist/api/loader/parsers/extension_object_parser.js +274 -0
  208. package/dist/api/loader/parsers/extension_object_parser.js.map +1 -0
  209. package/dist/api/loader/parsers/localized_text_parser.js.map +1 -0
  210. package/dist/api/loader/parsers/nodeid_parser.js.map +1 -0
  211. package/dist/api/loader/parsers/qualified_name_parser.js.map +1 -0
  212. package/dist/api/loader/parsers/variant_parser.d.ts +42 -0
  213. package/dist/api/loader/parsers/variant_parser.js +294 -0
  214. package/dist/api/loader/parsers/variant_parser.js.map +1 -0
  215. package/dist/api/loader/register_node_promoter.d.ts +2 -0
  216. package/dist/api/loader/register_node_promoter.js +9 -0
  217. package/dist/api/loader/register_node_promoter.js.map +1 -0
  218. package/dist/api/namespace.d.ts +18 -0
  219. package/dist/api/namespace.js.map +1 -0
  220. package/dist/api/namespace_alarm_and_condition.d.ts +33 -0
  221. package/dist/api/namespace_alarm_and_condition.js.map +1 -0
  222. package/dist/api/namespace_data_access.d.ts +67 -0
  223. package/dist/api/namespace_data_access.js.map +1 -0
  224. package/dist/api/namespace_machine_state.d.ts +8 -0
  225. package/dist/api/namespace_machine_state.js.map +1 -0
  226. package/dist/api/pseudo_session.d.ts +74 -0
  227. package/dist/api/pseudo_session.js +308 -0
  228. package/dist/api/pseudo_session.js.map +1 -0
  229. package/dist/api/session_context.d.ts +242 -0
  230. package/dist/api/session_context.js +524 -0
  231. package/dist/api/session_context.js.map +1 -0
  232. package/dist/api/set_namespace_meta_data.js.map +1 -0
  233. package/dist/api/ua_addin.js.map +1 -0
  234. package/dist/api/ua_interface.js +25 -0
  235. package/dist/api/ua_interface.js.map +1 -0
  236. package/dist/api/ua_root_folder.js.map +1 -0
  237. package/dist/api/ua_two_state_variable_ex.d.ts +24 -0
  238. package/dist/api/ua_two_state_variable_ex.js.map +1 -0
  239. package/dist/api/xml_writer.js.map +1 -0
  240. package/dist/impl/_instantiate_helpers.js +99 -0
  241. package/dist/impl/_instantiate_helpers.js.map +1 -0
  242. package/dist/impl/_mandatory_child_or_requested_optional_filter.js +82 -0
  243. package/dist/impl/_mandatory_child_or_requested_optional_filter.js.map +1 -0
  244. package/dist/impl/address_space.d.ts +379 -0
  245. package/dist/impl/address_space.js +1383 -0
  246. package/dist/impl/address_space.js.map +1 -0
  247. package/dist/impl/address_space_change_event_tools.d.ts +6 -0
  248. package/dist/impl/address_space_change_event_tools.js.map +1 -0
  249. package/dist/impl/address_space_private.d.ts +48 -0
  250. package/dist/impl/address_space_private.js.map +1 -0
  251. package/dist/impl/alarms_and_conditions/condition.js.map +1 -0
  252. package/dist/impl/alarms_and_conditions/condition_info_impl.d.ts +19 -0
  253. package/dist/impl/alarms_and_conditions/condition_info_impl.js +39 -0
  254. package/dist/impl/alarms_and_conditions/condition_info_impl.js.map +1 -0
  255. package/dist/impl/alarms_and_conditions/condition_snapshot_impl.d.ts +271 -0
  256. package/dist/impl/alarms_and_conditions/condition_snapshot_impl.js +700 -0
  257. package/dist/impl/alarms_and_conditions/condition_snapshot_impl.js.map +1 -0
  258. package/dist/impl/alarms_and_conditions/deviation_alarm_helper.d.ts +12 -0
  259. package/dist/impl/alarms_and_conditions/deviation_alarm_helper.js +66 -0
  260. package/dist/impl/alarms_and_conditions/deviation_alarm_helper.js.map +1 -0
  261. package/dist/impl/alarms_and_conditions/index.d.ts +16 -0
  262. package/dist/impl/alarms_and_conditions/index.js +33 -0
  263. package/dist/impl/alarms_and_conditions/index.js.map +1 -0
  264. package/dist/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +54 -0
  265. package/dist/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +244 -0
  266. package/dist/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -0
  267. package/dist/impl/alarms_and_conditions/ua_alarm_condition_impl.d.ts +105 -0
  268. package/dist/impl/alarms_and_conditions/ua_alarm_condition_impl.js +428 -0
  269. package/dist/impl/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -0
  270. package/dist/impl/alarms_and_conditions/ua_base_event_impl.d.ts +36 -0
  271. package/dist/impl/alarms_and_conditions/ua_base_event_impl.js +32 -0
  272. package/dist/impl/alarms_and_conditions/ua_base_event_impl.js.map +1 -0
  273. package/dist/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +47 -0
  274. package/dist/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +204 -0
  275. package/dist/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +1 -0
  276. package/dist/impl/alarms_and_conditions/ua_condition_impl.d.ts +152 -0
  277. package/dist/impl/alarms_and_conditions/ua_condition_impl.js +1016 -0
  278. package/dist/impl/alarms_and_conditions/ua_condition_impl.js.map +1 -0
  279. package/dist/impl/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +22 -0
  280. package/dist/impl/alarms_and_conditions/ua_discrete_alarm_impl.js +41 -0
  281. package/dist/impl/alarms_and_conditions/ua_discrete_alarm_impl.js.map +1 -0
  282. package/dist/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +30 -0
  283. package/dist/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +54 -0
  284. package/dist/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +1 -0
  285. package/dist/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +12 -0
  286. package/dist/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +13 -0
  287. package/dist/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +1 -0
  288. package/dist/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +28 -0
  289. package/dist/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +86 -0
  290. package/dist/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +1 -0
  291. package/dist/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +10 -0
  292. package/dist/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js +8 -0
  293. package/dist/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +1 -0
  294. package/dist/impl/alarms_and_conditions/ua_limit_alarm_impl.d.ts +49 -0
  295. package/dist/impl/alarms_and_conditions/ua_limit_alarm_impl.js +207 -0
  296. package/dist/impl/alarms_and_conditions/ua_limit_alarm_impl.js.map +1 -0
  297. package/dist/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +28 -0
  298. package/dist/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +54 -0
  299. package/dist/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +1 -0
  300. package/dist/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +38 -0
  301. package/dist/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +172 -0
  302. package/dist/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +1 -0
  303. package/dist/impl/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +44 -0
  304. package/dist/impl/alarms_and_conditions/ua_off_normal_alarm_impl.js +164 -0
  305. package/dist/impl/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -0
  306. package/dist/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +18 -0
  307. package/dist/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +18 -0
  308. package/dist/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +1 -0
  309. package/dist/impl/apply_condition_refresh.d.ts +4 -0
  310. package/dist/impl/apply_condition_refresh.js +29 -0
  311. package/dist/impl/apply_condition_refresh.js.map +1 -0
  312. package/dist/impl/base_node_impl.d.ts +347 -0
  313. package/dist/impl/base_node_impl.js +1768 -0
  314. package/dist/impl/base_node_impl.js.map +1 -0
  315. package/dist/impl/base_node_private.d.ts +138 -0
  316. package/dist/impl/base_node_private.js +1028 -0
  317. package/dist/impl/base_node_private.js.map +1 -0
  318. package/dist/impl/check_value_rank_compatibility.js.map +1 -0
  319. package/dist/impl/child_accessors.d.ts +43 -0
  320. package/dist/impl/child_accessors.js +222 -0
  321. package/dist/impl/child_accessors.js.map +1 -0
  322. package/dist/impl/data_access/add_dataItem_stuff.js.map +1 -0
  323. package/dist/impl/data_access/adjust_datavalue_status_code.d.ts +7 -0
  324. package/dist/impl/data_access/adjust_datavalue_status_code.js.map +1 -0
  325. package/dist/impl/data_access/ua_multistate_discrete_impl.d.ts +38 -0
  326. package/dist/impl/data_access/ua_multistate_discrete_impl.js +143 -0
  327. package/dist/impl/data_access/ua_multistate_discrete_impl.js.map +1 -0
  328. package/dist/impl/data_access/ua_multistate_value_discrete_impl.d.ts +61 -0
  329. package/dist/impl/data_access/ua_multistate_value_discrete_impl.js +303 -0
  330. package/dist/impl/data_access/ua_multistate_value_discrete_impl.js.map +1 -0
  331. package/dist/impl/data_access/ua_two_state_discrete_impl.d.ts +30 -0
  332. package/dist/impl/data_access/ua_two_state_discrete_impl.js +164 -0
  333. package/dist/impl/data_access/ua_two_state_discrete_impl.js.map +1 -0
  334. package/dist/impl/event_data.d.ts +27 -0
  335. package/dist/impl/event_data.js +73 -0
  336. package/dist/impl/event_data.js.map +1 -0
  337. package/dist/impl/event_layout.d.ts +40 -0
  338. package/dist/impl/event_layout.js +103 -0
  339. package/dist/impl/event_layout.js.map +1 -0
  340. package/dist/impl/extension_object_array_node.d.ts +41 -0
  341. package/dist/impl/extension_object_array_node.js +274 -0
  342. package/dist/impl/extension_object_array_node.js.map +1 -0
  343. package/dist/impl/get_basic_datatype.js.map +1 -0
  344. package/dist/impl/handle_hierarchy_parent.d.ts +33 -0
  345. package/dist/impl/handle_hierarchy_parent.js +103 -0
  346. package/dist/impl/handle_hierarchy_parent.js.map +1 -0
  347. package/dist/impl/historical_access/address_space_historical_data_node.d.ts +21 -0
  348. package/dist/impl/historical_access/address_space_historical_data_node.js +658 -0
  349. package/dist/impl/historical_access/address_space_historical_data_node.js.map +1 -0
  350. package/dist/impl/historizer_factory.d.ts +18 -0
  351. package/dist/impl/historizer_factory.js +16 -0
  352. package/dist/impl/historizer_factory.js.map +1 -0
  353. package/dist/impl/idx_iterator.js.map +1 -0
  354. package/dist/impl/namespace_impl.d.ts +469 -0
  355. package/dist/impl/namespace_impl.js +1845 -0
  356. package/dist/impl/namespace_impl.js.map +1 -0
  357. package/dist/impl/namespace_private.d.ts +25 -0
  358. package/dist/impl/namespace_private.js.map +1 -0
  359. package/dist/impl/nodeid_manager.js +249 -0
  360. package/dist/impl/nodeid_manager.js.map +1 -0
  361. package/dist/impl/nodeset_tools/adjust_namespace_array.js.map +1 -0
  362. package/dist/impl/nodeset_tools/construct_namespace_dependency.d.ts +37 -0
  363. package/dist/impl/nodeset_tools/construct_namespace_dependency.js +352 -0
  364. package/dist/impl/nodeset_tools/construct_namespace_dependency.js.map +1 -0
  365. package/dist/impl/nodeset_tools/dump_to_bsd.d.ts +10 -0
  366. package/dist/impl/nodeset_tools/dump_to_bsd.js +176 -0
  367. package/dist/impl/nodeset_tools/dump_to_bsd.js.map +1 -0
  368. package/dist/impl/nodeset_tools/nodeset_to_records.d.ts +67 -0
  369. package/dist/impl/nodeset_tools/nodeset_to_records.js +773 -0
  370. package/dist/impl/nodeset_tools/nodeset_to_records.js.map +1 -0
  371. package/dist/impl/nodeset_tools/nodeset_to_xml.d.ts +28 -0
  372. package/dist/impl/nodeset_tools/nodeset_to_xml.js +1132 -0
  373. package/dist/impl/nodeset_tools/nodeset_to_xml.js.map +1 -0
  374. package/dist/impl/private_namespace.d.ts +5 -0
  375. package/dist/impl/private_namespace.js.map +1 -0
  376. package/dist/impl/reference_impl.d.ts +82 -0
  377. package/dist/impl/reference_impl.js +207 -0
  378. package/dist/impl/reference_impl.js.map +1 -0
  379. package/dist/impl/reference_type_version.d.ts +22 -0
  380. package/dist/impl/reference_type_version.js +22 -0
  381. package/dist/impl/reference_type_version.js.map +1 -0
  382. package/dist/impl/role_permissions.js.map +1 -0
  383. package/dist/impl/state_machine/finite_state_machine.d.ts +81 -0
  384. package/dist/impl/state_machine/finite_state_machine.js +573 -0
  385. package/dist/impl/state_machine/finite_state_machine.js.map +1 -0
  386. package/dist/impl/state_machine/ua_shelving_state_machine_ex.d.ts +64 -0
  387. package/dist/impl/state_machine/ua_shelving_state_machine_ex.js +249 -0
  388. package/dist/impl/state_machine/ua_shelving_state_machine_ex.js.map +1 -0
  389. package/dist/impl/state_machine/ua_two_state_variable.d.ts +55 -0
  390. package/dist/impl/state_machine/ua_two_state_variable.js +323 -0
  391. package/dist/impl/state_machine/ua_two_state_variable.js.map +1 -0
  392. package/dist/impl/tool_isSubtypeOf.d.ts +18 -0
  393. package/dist/impl/tool_isSubtypeOf.js +138 -0
  394. package/dist/impl/tool_isSubtypeOf.js.map +1 -0
  395. package/dist/impl/ua_condition_type.js.map +1 -0
  396. package/dist/impl/ua_data_type_impl.d.ts +87 -0
  397. package/dist/impl/ua_data_type_impl.js +391 -0
  398. package/dist/impl/ua_data_type_impl.js.map +1 -0
  399. package/dist/impl/ua_method_impl.d.ts +48 -0
  400. package/dist/impl/ua_method_impl.js +281 -0
  401. package/dist/impl/ua_method_impl.js.map +1 -0
  402. package/dist/impl/ua_object_impl.d.ts +38 -0
  403. package/dist/impl/ua_object_impl.js +214 -0
  404. package/dist/impl/ua_object_impl.js.map +1 -0
  405. package/dist/impl/ua_object_type_impl.d.ts +55 -0
  406. package/dist/impl/ua_object_type_impl.js +131 -0
  407. package/dist/impl/ua_object_type_impl.js.map +1 -0
  408. package/dist/impl/ua_reference_type_impl.d.ts +42 -0
  409. package/dist/impl/ua_reference_type_impl.js +157 -0
  410. package/dist/impl/ua_reference_type_impl.js.map +1 -0
  411. package/dist/impl/ua_variable_impl.d.ts +391 -0
  412. package/dist/impl/ua_variable_impl.js +2001 -0
  413. package/dist/impl/ua_variable_impl.js.map +1 -0
  414. package/dist/impl/ua_variable_impl_ext_obj.d.ts +23 -0
  415. package/dist/impl/ua_variable_impl_ext_obj.js +753 -0
  416. package/dist/impl/ua_variable_impl_ext_obj.js.map +1 -0
  417. package/dist/impl/ua_variable_type_impl.d.ts +79 -0
  418. package/dist/impl/ua_variable_type_impl.js +279 -0
  419. package/dist/impl/ua_variable_type_impl.js.map +1 -0
  420. package/dist/impl/ua_view_impl.d.ts +18 -0
  421. package/dist/impl/ua_view_impl.js +45 -0
  422. package/dist/impl/ua_view_impl.js.map +1 -0
  423. package/dist/impl/validate_data_type_correctness.d.ts +6 -0
  424. package/dist/impl/validate_data_type_correctness.js +123 -0
  425. package/dist/impl/validate_data_type_correctness.js.map +1 -0
  426. package/dist/tsconfig_base.tsbuildinfo +1 -1
  427. package/distHelpers/address_space_digest.d.ts +4 -0
  428. package/distHelpers/address_space_digest.js +9 -0
  429. package/distHelpers/address_space_digest.js.map +1 -0
  430. package/distHelpers/alarms_and_conditions_demo.d.ts +1 -1
  431. package/distHelpers/assertHasMatchingReference.d.ts +1 -1
  432. package/distHelpers/boiler_system.d.ts +1 -1
  433. package/distHelpers/boiler_system.js +3 -3
  434. package/distHelpers/boiler_system.js.map +1 -1
  435. package/distHelpers/create_minimalist_address_space_nodeset.d.ts +1 -1
  436. package/distHelpers/get_address_space_fixture.js +38 -22
  437. package/distHelpers/get_address_space_fixture.js.map +1 -1
  438. package/distHelpers/get_mini_address_space.d.ts +1 -1
  439. package/distHelpers/get_mini_address_space.js +7 -7
  440. package/distHelpers/get_mini_address_space.js.map +1 -1
  441. package/distHelpers/index.d.ts +9 -9
  442. package/distHelpers/index.js +9 -9
  443. package/distHelpers/index.js.map +1 -1
  444. package/distHelpers/mock_session.d.ts +1 -1
  445. package/distHelpers/mock_session.js +2 -2
  446. package/distHelpers/mock_session.js.map +1 -1
  447. package/distNodeJS/address_space_digest.d.ts +13 -0
  448. package/distNodeJS/address_space_digest.js +31 -0
  449. package/distNodeJS/address_space_digest.js.map +1 -0
  450. package/distNodeJS/generate_address_space.d.ts +35 -2
  451. package/distNodeJS/generate_address_space.js +201 -7
  452. package/distNodeJS/generate_address_space.js.map +1 -1
  453. package/distNodeJS/index.d.ts +3 -1
  454. package/distNodeJS/index.js +3 -1
  455. package/distNodeJS/index.js.map +1 -1
  456. package/distNodeJS/nodeset_image_file_store.d.ts +29 -0
  457. package/distNodeJS/nodeset_image_file_store.js +120 -0
  458. package/distNodeJS/nodeset_image_file_store.js.map +1 -0
  459. package/impl/_instantiate_helpers.ts +197 -0
  460. package/impl/_mandatory_child_or_requested_optional_filter.ts +100 -0
  461. package/impl/address_space.ts +1572 -0
  462. package/impl/address_space_change_event_tools.ts +177 -0
  463. package/impl/address_space_private.ts +100 -0
  464. package/impl/alarms_and_conditions/condition_info_impl.ts +45 -0
  465. package/impl/alarms_and_conditions/condition_snapshot_impl.ts +793 -0
  466. package/impl/alarms_and_conditions/deviation_alarm_helper.ts +73 -0
  467. package/impl/alarms_and_conditions/index.ts +16 -0
  468. package/impl/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +351 -0
  469. package/impl/alarms_and_conditions/ua_alarm_condition_impl.ts +515 -0
  470. package/impl/alarms_and_conditions/ua_base_event_impl.ts +61 -0
  471. package/impl/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +246 -0
  472. package/impl/alarms_and_conditions/ua_condition_impl.ts +1286 -0
  473. package/impl/alarms_and_conditions/ua_discrete_alarm_impl.ts +60 -0
  474. package/impl/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +95 -0
  475. package/impl/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +21 -0
  476. package/impl/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +112 -0
  477. package/impl/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +25 -0
  478. package/impl/alarms_and_conditions/ua_limit_alarm_impl.ts +265 -0
  479. package/impl/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +94 -0
  480. package/impl/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +232 -0
  481. package/impl/alarms_and_conditions/ua_off_normal_alarm_impl.ts +216 -0
  482. package/impl/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +26 -0
  483. package/impl/apply_condition_refresh.ts +56 -0
  484. package/impl/base_node_impl.ts +2165 -0
  485. package/impl/base_node_private.ts +1420 -0
  486. package/impl/child_accessors.ts +239 -0
  487. package/impl/data_access/adjust_datavalue_status_code.ts +36 -0
  488. package/impl/data_access/ua_multistate_discrete_impl.ts +198 -0
  489. package/impl/data_access/ua_multistate_value_discrete_impl.ts +384 -0
  490. package/impl/data_access/ua_two_state_discrete_impl.ts +195 -0
  491. package/impl/event_data.ts +80 -0
  492. package/impl/event_layout.ts +141 -0
  493. package/impl/extension_object_array_node.ts +343 -0
  494. package/impl/handle_hierarchy_parent.ts +133 -0
  495. package/impl/historical_access/address_space_historical_data_node.ts +849 -0
  496. package/impl/historizer_factory.ts +17 -0
  497. package/impl/namespace_impl.ts +2323 -0
  498. package/impl/namespace_private.ts +68 -0
  499. package/impl/nodeid_manager.ts +293 -0
  500. package/impl/nodeset_tools/construct_namespace_dependency.ts +381 -0
  501. package/impl/nodeset_tools/dump_to_bsd.ts +210 -0
  502. package/impl/nodeset_tools/nodeset_to_records.ts +846 -0
  503. package/impl/nodeset_tools/nodeset_to_xml.ts +1326 -0
  504. package/impl/private_namespace.ts +21 -0
  505. package/impl/reference_impl.ts +244 -0
  506. package/impl/reference_type_version.ts +19 -0
  507. package/impl/state_machine/finite_state_machine.ts +676 -0
  508. package/impl/state_machine/ua_shelving_state_machine_ex.ts +356 -0
  509. package/impl/state_machine/ua_two_state_variable.ts +421 -0
  510. package/impl/tool_isSubtypeOf.ts +168 -0
  511. package/impl/ua_data_type_impl.ts +486 -0
  512. package/impl/ua_method_impl.ts +364 -0
  513. package/impl/ua_object_impl.ts +278 -0
  514. package/impl/ua_object_type_impl.ts +179 -0
  515. package/impl/ua_reference_type_impl.ts +179 -0
  516. package/impl/ua_variable_impl.ts +2559 -0
  517. package/impl/ua_variable_impl_ext_obj.ts +904 -0
  518. package/impl/ua_variable_type_impl.ts +390 -0
  519. package/impl/ua_view_impl.ts +53 -0
  520. package/impl/validate_data_type_correctness.ts +142 -0
  521. package/package.json +49 -44
  522. package/source_nodejs/address_space_digest.ts +35 -0
  523. package/source_nodejs/generate_address_space.ts +181 -8
  524. package/source_nodejs/index.ts +3 -1
  525. package/source_nodejs/nodeset_image_file_store.ts +127 -0
  526. package/dist/source/address_space_ts.d.ts +0 -128
  527. package/dist/source/address_space_ts.js +0 -23
  528. package/dist/source/address_space_ts.js.map +0 -1
  529. package/dist/source/continuation_points/continuation_point_manager.js +0 -230
  530. package/dist/source/continuation_points/continuation_point_manager.js.map +0 -1
  531. package/dist/source/helpers/adjust_browse_direction.js.map +0 -1
  532. package/dist/source/helpers/argument_list.js +0 -263
  533. package/dist/source/helpers/argument_list.js.map +0 -1
  534. package/dist/source/helpers/call_helpers.js +0 -80
  535. package/dist/source/helpers/call_helpers.js.map +0 -1
  536. package/dist/source/helpers/coerce_enum_value.d.ts +0 -6
  537. package/dist/source/helpers/coerce_enum_value.js.map +0 -1
  538. package/dist/source/helpers/dump_tools.js +0 -81
  539. package/dist/source/helpers/dump_tools.js.map +0 -1
  540. package/dist/source/helpers/ensure_secure_access.d.ts +0 -9
  541. package/dist/source/helpers/ensure_secure_access.js +0 -58
  542. package/dist/source/helpers/ensure_secure_access.js.map +0 -1
  543. package/dist/source/helpers/make_optionals_map.js.map +0 -1
  544. package/dist/source/helpers/multiform_func.js +0 -75
  545. package/dist/source/helpers/multiform_func.js.map +0 -1
  546. package/dist/source/helpers/resolve_opaque_on_address_space.js +0 -25
  547. package/dist/source/helpers/resolve_opaque_on_address_space.js.map +0 -1
  548. package/dist/source/index.d.ts +0 -66
  549. package/dist/source/index.js +0 -97
  550. package/dist/source/index.js.map +0 -1
  551. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.d.ts +0 -21
  552. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js +0 -3
  553. package/dist/source/interfaces/alarms_and_conditions/condition_info_i.js.map +0 -1
  554. package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.d.ts +0 -150
  555. package/dist/source/interfaces/alarms_and_conditions/condition_snapshot.js.map +0 -1
  556. package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.d.ts +0 -12
  557. package/dist/source/interfaces/alarms_and_conditions/deviation_stuff.js.map +0 -1
  558. package/dist/source/interfaces/alarms_and_conditions/install_setpoint_options.js.map +0 -1
  559. package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.d.ts +0 -7
  560. package/dist/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js.map +0 -1
  561. package/dist/source/interfaces/alarms_and_conditions/instantiate_condition_options.js.map +0 -1
  562. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.d.ts +0 -4
  563. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js.map +0 -1
  564. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.d.ts +0 -4
  565. package/dist/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js.map +0 -1
  566. package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.d.ts +0 -10
  567. package/dist/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js.map +0 -1
  568. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.d.ts +0 -4
  569. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js.map +0 -1
  570. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.d.ts +0 -4
  571. package/dist/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js.map +0 -1
  572. package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.d.ts +0 -20
  573. package/dist/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js.map +0 -1
  574. package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.d.ts +0 -21
  575. package/dist/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js.map +0 -1
  576. package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.d.ts +0 -33
  577. package/dist/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js.map +0 -1
  578. package/dist/source/interfaces/alarms_and_conditions/ua_base_event_ex.js.map +0 -1
  579. package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.d.ts +0 -19
  580. package/dist/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js.map +0 -1
  581. package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.d.ts +0 -44
  582. package/dist/source/interfaces/alarms_and_conditions/ua_condition_ex.js.map +0 -1
  583. package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.d.ts +0 -4
  584. package/dist/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js.map +0 -1
  585. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.d.ts +0 -5
  586. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js.map +0 -1
  587. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.d.ts +0 -19
  588. package/dist/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js.map +0 -1
  589. package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.d.ts +0 -25
  590. package/dist/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js.map +0 -1
  591. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.d.ts +0 -8
  592. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js.map +0 -1
  593. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.d.ts +0 -10
  594. package/dist/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js.map +0 -1
  595. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.d.ts +0 -44
  596. package/dist/source/interfaces/data_access/ua_multistate_discrete_ex.js.map +0 -1
  597. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.d.ts +0 -22
  598. package/dist/source/interfaces/data_access/ua_multistate_value_discrete_ex.js.map +0 -1
  599. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.d.ts +0 -13
  600. package/dist/source/interfaces/data_access/ua_two_state_discrete_ex.js.map +0 -1
  601. package/dist/source/interfaces/data_access/ua_y_array_item_ex.js.map +0 -1
  602. package/dist/source/interfaces/extension_object_constructor.js.map +0 -1
  603. package/dist/source/interfaces/i_condition_variable_type_setter_options.js.map +0 -1
  604. package/dist/source/interfaces/i_set_state_options.js.map +0 -1
  605. package/dist/source/interfaces/nodeset_loader_options.d.ts +0 -37
  606. package/dist/source/interfaces/nodeset_loader_options.js.map +0 -1
  607. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.d.ts +0 -12
  608. package/dist/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js.map +0 -1
  609. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.d.ts +0 -49
  610. package/dist/source/interfaces/state_machine/ua_finite_state_machine_type.js.map +0 -1
  611. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.d.ts +0 -11
  612. package/dist/source/interfaces/state_machine/ua_program_state_machine_type.js.map +0 -1
  613. package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.d.ts +0 -29
  614. package/dist/source/interfaces/state_machine/ua_shelved_state_machine_ex.js.map +0 -1
  615. package/dist/source/interfaces/state_machine/ua_state_machine_type.d.ts +0 -236
  616. package/dist/source/interfaces/state_machine/ua_state_machine_type.js.map +0 -1
  617. package/dist/source/interfaces/state_machine/ua_transition_ex.js.map +0 -1
  618. package/dist/source/interfaces/ua_subscription_diagnostics_variable_ex.js.map +0 -1
  619. package/dist/source/loader/decode_xml_extension_object.d.ts +0 -6
  620. package/dist/source/loader/decode_xml_extension_object.js +0 -69
  621. package/dist/source/loader/decode_xml_extension_object.js.map +0 -1
  622. package/dist/source/loader/ensure_datatype_extracted.js +0 -88
  623. package/dist/source/loader/ensure_datatype_extracted.js.map +0 -1
  624. package/dist/source/loader/generateAddressSpaceRaw.d.ts +0 -29
  625. package/dist/source/loader/generateAddressSpaceRaw.js +0 -188
  626. package/dist/source/loader/generateAddressSpaceRaw.js.map +0 -1
  627. package/dist/source/loader/load_nodeset2.d.ts +0 -15
  628. package/dist/source/loader/load_nodeset2.js +0 -1047
  629. package/dist/source/loader/load_nodeset2.js.map +0 -1
  630. package/dist/source/loader/make_semver_compatible.js.map +0 -1
  631. package/dist/source/loader/make_xml_extension_object_parser.js +0 -422
  632. package/dist/source/loader/make_xml_extension_object_parser.js.map +0 -1
  633. package/dist/source/loader/namespace_post_step.js +0 -57
  634. package/dist/source/loader/namespace_post_step.js.map +0 -1
  635. package/dist/source/loader/parsers/extension_object_parser.js +0 -274
  636. package/dist/source/loader/parsers/extension_object_parser.js.map +0 -1
  637. package/dist/source/loader/parsers/localized_text_parser.js.map +0 -1
  638. package/dist/source/loader/parsers/nodeid_parser.js.map +0 -1
  639. package/dist/source/loader/parsers/qualified_name_parser.js.map +0 -1
  640. package/dist/source/loader/parsers/variant_parser.d.ts +0 -35
  641. package/dist/source/loader/parsers/variant_parser.js +0 -331
  642. package/dist/source/loader/parsers/variant_parser.js.map +0 -1
  643. package/dist/source/loader/register_node_promoter.d.ts +0 -2
  644. package/dist/source/loader/register_node_promoter.js +0 -9
  645. package/dist/source/loader/register_node_promoter.js.map +0 -1
  646. package/dist/source/namespace.d.ts +0 -6
  647. package/dist/source/namespace.js.map +0 -1
  648. package/dist/source/namespace_alarm_and_condition.d.ts +0 -33
  649. package/dist/source/namespace_alarm_and_condition.js.map +0 -1
  650. package/dist/source/namespace_data_access.d.ts +0 -67
  651. package/dist/source/namespace_data_access.js.map +0 -1
  652. package/dist/source/namespace_machine_state.d.ts +0 -8
  653. package/dist/source/namespace_machine_state.js.map +0 -1
  654. package/dist/source/pseudo_session.d.ts +0 -74
  655. package/dist/source/pseudo_session.js +0 -308
  656. package/dist/source/pseudo_session.js.map +0 -1
  657. package/dist/source/session_context.d.ts +0 -241
  658. package/dist/source/session_context.js +0 -517
  659. package/dist/source/session_context.js.map +0 -1
  660. package/dist/source/set_namespace_meta_data.js.map +0 -1
  661. package/dist/source/ua_addin.js.map +0 -1
  662. package/dist/source/ua_interface.js +0 -25
  663. package/dist/source/ua_interface.js.map +0 -1
  664. package/dist/source/ua_root_folder.js.map +0 -1
  665. package/dist/source/ua_two_state_variable_ex.d.ts +0 -24
  666. package/dist/source/ua_two_state_variable_ex.js.map +0 -1
  667. package/dist/source/xml_writer.js.map +0 -1
  668. package/dist/src/_instantiate_helpers.js +0 -99
  669. package/dist/src/_instantiate_helpers.js.map +0 -1
  670. package/dist/src/_mandatory_child_or_requested_optional_filter.js +0 -82
  671. package/dist/src/_mandatory_child_or_requested_optional_filter.js.map +0 -1
  672. package/dist/src/address_space.d.ts +0 -369
  673. package/dist/src/address_space.js +0 -1416
  674. package/dist/src/address_space.js.map +0 -1
  675. package/dist/src/address_space_change_event_tools.d.ts +0 -6
  676. package/dist/src/address_space_change_event_tools.js.map +0 -1
  677. package/dist/src/address_space_private.d.ts +0 -45
  678. package/dist/src/address_space_private.js.map +0 -1
  679. package/dist/src/alarms_and_conditions/condition.js.map +0 -1
  680. package/dist/src/alarms_and_conditions/condition_info_impl.d.ts +0 -18
  681. package/dist/src/alarms_and_conditions/condition_info_impl.js +0 -38
  682. package/dist/src/alarms_and_conditions/condition_info_impl.js.map +0 -1
  683. package/dist/src/alarms_and_conditions/condition_snapshot_impl.d.ts +0 -269
  684. package/dist/src/alarms_and_conditions/condition_snapshot_impl.js +0 -699
  685. package/dist/src/alarms_and_conditions/condition_snapshot_impl.js.map +0 -1
  686. package/dist/src/alarms_and_conditions/deviation_alarm_helper.d.ts +0 -12
  687. package/dist/src/alarms_and_conditions/deviation_alarm_helper.js +0 -66
  688. package/dist/src/alarms_and_conditions/deviation_alarm_helper.js.map +0 -1
  689. package/dist/src/alarms_and_conditions/index.d.ts +0 -16
  690. package/dist/src/alarms_and_conditions/index.js +0 -33
  691. package/dist/src/alarms_and_conditions/index.js.map +0 -1
  692. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.d.ts +0 -42
  693. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +0 -243
  694. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +0 -1
  695. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.d.ts +0 -80
  696. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +0 -415
  697. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +0 -1
  698. package/dist/src/alarms_and_conditions/ua_base_event_impl.d.ts +0 -18
  699. package/dist/src/alarms_and_conditions/ua_base_event_impl.js +0 -33
  700. package/dist/src/alarms_and_conditions/ua_base_event_impl.js.map +0 -1
  701. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.d.ts +0 -44
  702. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js +0 -203
  703. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.js.map +0 -1
  704. package/dist/src/alarms_and_conditions/ua_condition_impl.d.ts +0 -104
  705. package/dist/src/alarms_and_conditions/ua_condition_impl.js +0 -1017
  706. package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +0 -1
  707. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.d.ts +0 -19
  708. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js +0 -39
  709. package/dist/src/alarms_and_conditions/ua_discrete_alarm_impl.js.map +0 -1
  710. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.d.ts +0 -25
  711. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js +0 -55
  712. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.js.map +0 -1
  713. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.d.ts +0 -11
  714. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js +0 -12
  715. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.js.map +0 -1
  716. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.d.ts +0 -23
  717. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js +0 -87
  718. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.js.map +0 -1
  719. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.d.ts +0 -10
  720. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js +0 -8
  721. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.js.map +0 -1
  722. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.d.ts +0 -26
  723. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js +0 -208
  724. package/dist/src/alarms_and_conditions/ua_limit_alarm_impl.js.map +0 -1
  725. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.d.ts +0 -23
  726. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js +0 -55
  727. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.js.map +0 -1
  728. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.d.ts +0 -27
  729. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js +0 -173
  730. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.js.map +0 -1
  731. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.d.ts +0 -43
  732. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +0 -168
  733. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +0 -1
  734. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.d.ts +0 -18
  735. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js +0 -18
  736. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.js.map +0 -1
  737. package/dist/src/apply_condition_refresh.d.ts +0 -4
  738. package/dist/src/apply_condition_refresh.js +0 -27
  739. package/dist/src/apply_condition_refresh.js.map +0 -1
  740. package/dist/src/base_node_impl.d.ts +0 -287
  741. package/dist/src/base_node_impl.js +0 -1538
  742. package/dist/src/base_node_impl.js.map +0 -1
  743. package/dist/src/base_node_private.d.ts +0 -87
  744. package/dist/src/base_node_private.js +0 -925
  745. package/dist/src/base_node_private.js.map +0 -1
  746. package/dist/src/check_value_rank_compatibility.js.map +0 -1
  747. package/dist/src/data_access/add_dataItem_stuff.js.map +0 -1
  748. package/dist/src/data_access/adjust_datavalue_status_code.d.ts +0 -7
  749. package/dist/src/data_access/adjust_datavalue_status_code.js.map +0 -1
  750. package/dist/src/data_access/ua_multistate_discrete_impl.d.ts +0 -35
  751. package/dist/src/data_access/ua_multistate_discrete_impl.js +0 -142
  752. package/dist/src/data_access/ua_multistate_discrete_impl.js.map +0 -1
  753. package/dist/src/data_access/ua_multistate_value_discrete_impl.d.ts +0 -51
  754. package/dist/src/data_access/ua_multistate_value_discrete_impl.js +0 -302
  755. package/dist/src/data_access/ua_multistate_value_discrete_impl.js.map +0 -1
  756. package/dist/src/data_access/ua_two_state_discrete_impl.d.ts +0 -20
  757. package/dist/src/data_access/ua_two_state_discrete_impl.js +0 -163
  758. package/dist/src/data_access/ua_two_state_discrete_impl.js.map +0 -1
  759. package/dist/src/event_data.d.ts +0 -18
  760. package/dist/src/event_data.js +0 -70
  761. package/dist/src/event_data.js.map +0 -1
  762. package/dist/src/extension_object_array_node.d.ts +0 -34
  763. package/dist/src/extension_object_array_node.js +0 -262
  764. package/dist/src/extension_object_array_node.js.map +0 -1
  765. package/dist/src/get_basic_datatype.js.map +0 -1
  766. package/dist/src/historical_access/address_space_historical_data_node.d.ts +0 -21
  767. package/dist/src/historical_access/address_space_historical_data_node.js +0 -654
  768. package/dist/src/historical_access/address_space_historical_data_node.js.map +0 -1
  769. package/dist/src/idx_iterator.js.map +0 -1
  770. package/dist/src/index_current.d.ts +0 -50
  771. package/dist/src/index_current.js +0 -82
  772. package/dist/src/index_current.js.map +0 -1
  773. package/dist/src/namespace_impl.d.ts +0 -450
  774. package/dist/src/namespace_impl.js +0 -1876
  775. package/dist/src/namespace_impl.js.map +0 -1
  776. package/dist/src/namespace_private.d.ts +0 -31
  777. package/dist/src/namespace_private.js.map +0 -1
  778. package/dist/src/nodeid_manager.js +0 -249
  779. package/dist/src/nodeid_manager.js.map +0 -1
  780. package/dist/src/nodeset_tools/adjust_namespace_array.js.map +0 -1
  781. package/dist/src/nodeset_tools/construct_namespace_dependency.d.ts +0 -33
  782. package/dist/src/nodeset_tools/construct_namespace_dependency.js +0 -347
  783. package/dist/src/nodeset_tools/construct_namespace_dependency.js.map +0 -1
  784. package/dist/src/nodeset_tools/dump_to_bsd.d.ts +0 -2
  785. package/dist/src/nodeset_tools/dump_to_bsd.js +0 -164
  786. package/dist/src/nodeset_tools/dump_to_bsd.js.map +0 -1
  787. package/dist/src/nodeset_tools/nodeset_to_xml.d.ts +0 -12
  788. package/dist/src/nodeset_tools/nodeset_to_xml.js +0 -1381
  789. package/dist/src/nodeset_tools/nodeset_to_xml.js.map +0 -1
  790. package/dist/src/private_namespace.d.ts +0 -5
  791. package/dist/src/private_namespace.js.map +0 -1
  792. package/dist/src/reference_impl.d.ts +0 -43
  793. package/dist/src/reference_impl.js +0 -152
  794. package/dist/src/reference_impl.js.map +0 -1
  795. package/dist/src/role_permissions.js.map +0 -1
  796. package/dist/src/state_machine/finite_state_machine.d.ts +0 -70
  797. package/dist/src/state_machine/finite_state_machine.js +0 -574
  798. package/dist/src/state_machine/finite_state_machine.js.map +0 -1
  799. package/dist/src/state_machine/ua_shelving_state_machine_ex.d.ts +0 -39
  800. package/dist/src/state_machine/ua_shelving_state_machine_ex.js +0 -249
  801. package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +0 -1
  802. package/dist/src/state_machine/ua_two_state_variable.d.ts +0 -55
  803. package/dist/src/state_machine/ua_two_state_variable.js +0 -323
  804. package/dist/src/state_machine/ua_two_state_variable.js.map +0 -1
  805. package/dist/src/tool_isSubtypeOf.d.ts +0 -18
  806. package/dist/src/tool_isSubtypeOf.js +0 -130
  807. package/dist/src/tool_isSubtypeOf.js.map +0 -1
  808. package/dist/src/ua_condition_type.js.map +0 -1
  809. package/dist/src/ua_data_type_impl.d.ts +0 -87
  810. package/dist/src/ua_data_type_impl.js +0 -393
  811. package/dist/src/ua_data_type_impl.js.map +0 -1
  812. package/dist/src/ua_method_impl.d.ts +0 -48
  813. package/dist/src/ua_method_impl.js +0 -280
  814. package/dist/src/ua_method_impl.js.map +0 -1
  815. package/dist/src/ua_object_impl.d.ts +0 -38
  816. package/dist/src/ua_object_impl.js +0 -214
  817. package/dist/src/ua_object_impl.js.map +0 -1
  818. package/dist/src/ua_object_type_impl.d.ts +0 -55
  819. package/dist/src/ua_object_type_impl.js +0 -131
  820. package/dist/src/ua_object_type_impl.js.map +0 -1
  821. package/dist/src/ua_reference_type_impl.d.ts +0 -42
  822. package/dist/src/ua_reference_type_impl.js +0 -146
  823. package/dist/src/ua_reference_type_impl.js.map +0 -1
  824. package/dist/src/ua_variable_impl.d.ts +0 -379
  825. package/dist/src/ua_variable_impl.js +0 -1940
  826. package/dist/src/ua_variable_impl.js.map +0 -1
  827. package/dist/src/ua_variable_impl_ext_obj.d.ts +0 -23
  828. package/dist/src/ua_variable_impl_ext_obj.js +0 -752
  829. package/dist/src/ua_variable_impl_ext_obj.js.map +0 -1
  830. package/dist/src/ua_variable_type_impl.d.ts +0 -79
  831. package/dist/src/ua_variable_type_impl.js +0 -276
  832. package/dist/src/ua_variable_type_impl.js.map +0 -1
  833. package/dist/src/ua_view_impl.d.ts +0 -18
  834. package/dist/src/ua_view_impl.js +0 -45
  835. package/dist/src/ua_view_impl.js.map +0 -1
  836. package/dist/src/validate_data_type_correctness.d.ts +0 -6
  837. package/dist/src/validate_data_type_correctness.js +0 -106
  838. package/dist/src/validate_data_type_correctness.js.map +0 -1
  839. package/source/address_space_ts.ts +0 -220
  840. package/source/continuation_points/continuation_point_manager.ts +0 -271
  841. package/source/helpers/argument_list.ts +0 -310
  842. package/source/helpers/call_helpers.ts +0 -100
  843. package/source/helpers/coerce_enum_value.ts +0 -33
  844. package/source/helpers/dump_tools.ts +0 -90
  845. package/source/helpers/ensure_secure_access.ts +0 -57
  846. package/source/helpers/multiform_func.ts +0 -78
  847. package/source/helpers/resolve_opaque_on_address_space.ts +0 -26
  848. package/source/index.ts +0 -72
  849. package/source/interfaces/alarms_and_conditions/condition_info_i.ts +0 -24
  850. package/source/interfaces/alarms_and_conditions/condition_snapshot.ts +0 -235
  851. package/source/interfaces/alarms_and_conditions/deviation_stuff.ts +0 -16
  852. package/source/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.ts +0 -8
  853. package/source/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.ts +0 -6
  854. package/source/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.ts +0 -6
  855. package/source/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.ts +0 -13
  856. package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.ts +0 -6
  857. package/source/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.ts +0 -6
  858. package/source/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.ts +0 -21
  859. package/source/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.ts +0 -28
  860. package/source/interfaces/alarms_and_conditions/ua_alarm_condition_ex.ts +0 -43
  861. package/source/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.ts +0 -36
  862. package/source/interfaces/alarms_and_conditions/ua_condition_ex.ts +0 -55
  863. package/source/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.ts +0 -17
  864. package/source/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.ts +0 -21
  865. package/source/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.ts +0 -21
  866. package/source/interfaces/alarms_and_conditions/ua_limit_alarm_ex.ts +0 -26
  867. package/source/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.ts +0 -29
  868. package/source/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.ts +0 -25
  869. package/source/interfaces/data_access/ua_multistate_discrete_ex.ts +0 -57
  870. package/source/interfaces/data_access/ua_multistate_value_discrete_ex.ts +0 -31
  871. package/source/interfaces/data_access/ua_two_state_discrete_ex.ts +0 -15
  872. package/source/interfaces/nodeset_loader_options.ts +0 -38
  873. package/source/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.ts +0 -20
  874. package/source/interfaces/state_machine/ua_finite_state_machine_type.ts +0 -50
  875. package/source/interfaces/state_machine/ua_program_state_machine_type.ts +0 -14
  876. package/source/interfaces/state_machine/ua_shelved_state_machine_ex.ts +0 -35
  877. package/source/interfaces/state_machine/ua_state_machine_type.ts +0 -288
  878. package/source/loader/decode_xml_extension_object.ts +0 -80
  879. package/source/loader/ensure_datatype_extracted.ts +0 -122
  880. package/source/loader/generateAddressSpaceRaw.ts +0 -219
  881. package/source/loader/load_nodeset2.ts +0 -1275
  882. package/source/loader/make_xml_extension_object_parser.ts +0 -524
  883. package/source/loader/namespace_post_step.ts +0 -68
  884. package/source/loader/parsers/extension_object_parser.ts +0 -374
  885. package/source/loader/parsers/variant_parser.ts +0 -433
  886. package/source/loader/register_node_promoter.ts +0 -6
  887. package/source/namespace.ts +0 -7
  888. package/source/namespace_alarm_and_condition.ts +0 -78
  889. package/source/namespace_data_access.ts +0 -92
  890. package/source/namespace_machine_state.ts +0 -20
  891. package/source/pseudo_session.ts +0 -415
  892. package/source/session_context.ts +0 -717
  893. package/source/ua_interface.ts +0 -38
  894. package/source/ua_two_state_variable_ex.ts +0 -36
  895. package/src/_instantiate_helpers.ts +0 -197
  896. package/src/_mandatory_child_or_requested_optional_filter.ts +0 -100
  897. package/src/address_space.ts +0 -1631
  898. package/src/address_space_change_event_tools.ts +0 -177
  899. package/src/address_space_private.ts +0 -96
  900. package/src/alarms_and_conditions/condition_info_impl.ts +0 -44
  901. package/src/alarms_and_conditions/condition_snapshot_impl.ts +0 -792
  902. package/src/alarms_and_conditions/deviation_alarm_helper.ts +0 -73
  903. package/src/alarms_and_conditions/index.ts +0 -16
  904. package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +0 -331
  905. package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +0 -479
  906. package/src/alarms_and_conditions/ua_base_event_impl.ts +0 -42
  907. package/src/alarms_and_conditions/ua_certificate_expiration_alarm_impl.ts +0 -244
  908. package/src/alarms_and_conditions/ua_condition_impl.ts +0 -1261
  909. package/src/alarms_and_conditions/ua_discrete_alarm_impl.ts +0 -57
  910. package/src/alarms_and_conditions/ua_exclusive_deviation_alarm_impl.ts +0 -94
  911. package/src/alarms_and_conditions/ua_exclusive_level_alarm_impl.ts +0 -20
  912. package/src/alarms_and_conditions/ua_exclusive_limit_alarm_impl.ts +0 -109
  913. package/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm_impl.ts +0 -25
  914. package/src/alarms_and_conditions/ua_limit_alarm_impl.ts +0 -244
  915. package/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm_impl.ts +0 -88
  916. package/src/alarms_and_conditions/ua_non_exclusive_limit_alarm_impl.ts +0 -223
  917. package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +0 -218
  918. package/src/alarms_and_conditions/ua_system_off_normal_alarm_impl.ts +0 -26
  919. package/src/apply_condition_refresh.ts +0 -29
  920. package/src/base_node_impl.ts +0 -1907
  921. package/src/base_node_private.ts +0 -1287
  922. package/src/data_access/adjust_datavalue_status_code.ts +0 -36
  923. package/src/data_access/ua_multistate_discrete_impl.ts +0 -189
  924. package/src/data_access/ua_multistate_value_discrete_impl.ts +0 -369
  925. package/src/data_access/ua_two_state_discrete_impl.ts +0 -184
  926. package/src/event_data.ts +0 -83
  927. package/src/extension_object_array_node.ts +0 -331
  928. package/src/historical_access/address_space_historical_data_node.ts +0 -842
  929. package/src/index_current.ts +0 -51
  930. package/src/namespace_impl.ts +0 -2380
  931. package/src/namespace_private.ts +0 -77
  932. package/src/nodeid_manager.ts +0 -293
  933. package/src/nodeset_tools/construct_namespace_dependency.ts +0 -375
  934. package/src/nodeset_tools/dump_to_bsd.ts +0 -201
  935. package/src/nodeset_tools/nodeset_to_xml.ts +0 -1652
  936. package/src/private_namespace.ts +0 -21
  937. package/src/reference_impl.ts +0 -171
  938. package/src/state_machine/finite_state_machine.ts +0 -668
  939. package/src/state_machine/ua_shelving_state_machine_ex.ts +0 -330
  940. package/src/state_machine/ua_two_state_variable.ts +0 -421
  941. package/src/tool_isSubtypeOf.ts +0 -160
  942. package/src/ua_data_type_impl.ts +0 -483
  943. package/src/ua_method_impl.ts +0 -362
  944. package/src/ua_object_impl.ts +0 -278
  945. package/src/ua_object_type_impl.ts +0 -179
  946. package/src/ua_reference_type_impl.ts +0 -170
  947. package/src/ua_variable_impl.ts +0 -2489
  948. package/src/ua_variable_impl_ext_obj.ts +0 -903
  949. package/src/ua_variable_type_impl.ts +0 -385
  950. package/src/ua_view_impl.ts +0 -53
  951. package/src/validate_data_type_correctness.ts +0 -124
  952. /package/{source → api}/helpers/adjust_browse_direction.ts +0 -0
  953. /package/{source → api}/helpers/make_optionals_map.ts +0 -0
  954. /package/{source → api}/interfaces/alarms_and_conditions/install_setpoint_options.ts +0 -0
  955. /package/{source → api}/interfaces/alarms_and_conditions/instantiate_condition_options.ts +0 -0
  956. /package/{source → api}/interfaces/alarms_and_conditions/ua_base_event_ex.ts +0 -0
  957. /package/{source → api}/interfaces/data_access/ua_y_array_item_ex.ts +0 -0
  958. /package/{source → api}/interfaces/extension_object_constructor.ts +0 -0
  959. /package/{source → api}/interfaces/i_condition_variable_type_setter_options.ts +0 -0
  960. /package/{source → api}/interfaces/i_set_state_options.ts +0 -0
  961. /package/{source → api}/interfaces/state_machine/ua_transition_ex.ts +0 -0
  962. /package/{source → api}/interfaces/ua_subscription_diagnostics_variable_ex.ts +0 -0
  963. /package/{source → api}/loader/make_semver_compatible.ts +0 -0
  964. /package/{source → api}/loader/parsers/localized_text_parser.ts +0 -0
  965. /package/{source → api}/loader/parsers/nodeid_parser.ts +0 -0
  966. /package/{source → api}/loader/parsers/qualified_name_parser.ts +0 -0
  967. /package/{source → api}/set_namespace_meta_data.ts +0 -0
  968. /package/{source → api}/ua_addin.ts +0 -0
  969. /package/{source → api}/ua_root_folder.ts +0 -0
  970. /package/{source → api}/xml_writer.ts +0 -0
  971. /package/dist/{source → api}/continuation_points/continuation_point_manager.d.ts +0 -0
  972. /package/dist/{source → api}/helpers/adjust_browse_direction.d.ts +0 -0
  973. /package/dist/{source → api}/helpers/adjust_browse_direction.js +0 -0
  974. /package/dist/{source → api}/helpers/argument_list.d.ts +0 -0
  975. /package/dist/{source → api}/helpers/call_helpers.d.ts +0 -0
  976. /package/dist/{source → api}/helpers/coerce_enum_value.js +0 -0
  977. /package/dist/{source → api}/helpers/dump_tools.d.ts +0 -0
  978. /package/dist/{source → api}/helpers/make_optionals_map.d.ts +0 -0
  979. /package/dist/{source → api}/helpers/make_optionals_map.js +0 -0
  980. /package/dist/{source → api}/helpers/multiform_func.d.ts +0 -0
  981. /package/dist/{source → api}/helpers/resolve_opaque_on_address_space.d.ts +0 -0
  982. /package/dist/{source → api}/interfaces/alarms_and_conditions/condition_snapshot.js +0 -0
  983. /package/dist/{source → api}/interfaces/alarms_and_conditions/deviation_stuff.js +0 -0
  984. /package/dist/{source → api}/interfaces/alarms_and_conditions/install_setpoint_options.d.ts +0 -0
  985. /package/dist/{source → api}/interfaces/alarms_and_conditions/install_setpoint_options.js +0 -0
  986. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_alarm_condition_options.js +0 -0
  987. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_condition_options.d.ts +0 -0
  988. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_condition_options.js +0 -0
  989. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_exclusive_deviation_alarm_options.js +0 -0
  990. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_exclusive_limit_alarm_options.js +0 -0
  991. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_limit_alarm_options.js +0 -0
  992. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_non_exclusive_deviation_alarm_options.js +0 -0
  993. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_non_exclusive_limit_alarm_options.js +0 -0
  994. /package/dist/{source → api}/interfaces/alarms_and_conditions/instantiate_off_normal_alarm_options.js +0 -0
  995. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_acknowledgeable_condition_ex.js +0 -0
  996. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_alarm_condition_ex.js +0 -0
  997. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_base_event_ex.d.ts +0 -0
  998. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_base_event_ex.js +0 -0
  999. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_certificate_expiration_alarm_ex.js +0 -0
  1000. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_condition_ex.js +0 -0
  1001. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_discrete_alarm_ex.js +0 -0
  1002. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_exclusive_deviation_alarm_ex.js +0 -0
  1003. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_exclusive_limit_alarm_ex.js +0 -0
  1004. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_limit_alarm_ex.js +0 -0
  1005. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_non_exclusive_deviation_alarm_ex.js +0 -0
  1006. /package/dist/{source → api}/interfaces/alarms_and_conditions/ua_non_exclusive_limit_alarm_ex.js +0 -0
  1007. /package/dist/{source → api}/interfaces/data_access/ua_multistate_discrete_ex.js +0 -0
  1008. /package/dist/{source → api}/interfaces/data_access/ua_multistate_value_discrete_ex.js +0 -0
  1009. /package/dist/{source → api}/interfaces/data_access/ua_two_state_discrete_ex.js +0 -0
  1010. /package/dist/{source → api}/interfaces/data_access/ua_y_array_item_ex.d.ts +0 -0
  1011. /package/dist/{source → api}/interfaces/data_access/ua_y_array_item_ex.js +0 -0
  1012. /package/dist/{source → api}/interfaces/extension_object_constructor.d.ts +0 -0
  1013. /package/dist/{source → api}/interfaces/extension_object_constructor.js +0 -0
  1014. /package/dist/{source → api}/interfaces/i_condition_variable_type_setter_options.d.ts +0 -0
  1015. /package/dist/{source → api}/interfaces/i_condition_variable_type_setter_options.js +0 -0
  1016. /package/dist/{source → api}/interfaces/i_set_state_options.d.ts +0 -0
  1017. /package/dist/{source → api}/interfaces/i_set_state_options.js +0 -0
  1018. /package/dist/{source → api}/interfaces/nodeset_loader_options.js +0 -0
  1019. /package/dist/{source → api}/interfaces/state_machine/ua_exclusive_limit_state_machine_type_ex.js +0 -0
  1020. /package/dist/{source → api}/interfaces/state_machine/ua_finite_state_machine_type.js +0 -0
  1021. /package/dist/{source → api}/interfaces/state_machine/ua_program_state_machine_type.js +0 -0
  1022. /package/dist/{source → api}/interfaces/state_machine/ua_shelved_state_machine_ex.js +0 -0
  1023. /package/dist/{source → api}/interfaces/state_machine/ua_state_machine_type.js +0 -0
  1024. /package/dist/{source → api}/interfaces/state_machine/ua_transition_ex.d.ts +0 -0
  1025. /package/dist/{source → api}/interfaces/state_machine/ua_transition_ex.js +0 -0
  1026. /package/dist/{source → api}/interfaces/ua_subscription_diagnostics_variable_ex.d.ts +0 -0
  1027. /package/dist/{source → api}/interfaces/ua_subscription_diagnostics_variable_ex.js +0 -0
  1028. /package/dist/{source → api}/loader/ensure_datatype_extracted.d.ts +0 -0
  1029. /package/dist/{source → api}/loader/make_semver_compatible.d.ts +0 -0
  1030. /package/dist/{source → api}/loader/make_semver_compatible.js +0 -0
  1031. /package/dist/{source → api}/loader/make_xml_extension_object_parser.d.ts +0 -0
  1032. /package/dist/{source → api}/loader/namespace_post_step.d.ts +0 -0
  1033. /package/dist/{source → api}/loader/parsers/extension_object_parser.d.ts +0 -0
  1034. /package/dist/{source → api}/loader/parsers/localized_text_parser.d.ts +0 -0
  1035. /package/dist/{source → api}/loader/parsers/localized_text_parser.js +0 -0
  1036. /package/dist/{source → api}/loader/parsers/nodeid_parser.d.ts +0 -0
  1037. /package/dist/{source → api}/loader/parsers/nodeid_parser.js +0 -0
  1038. /package/dist/{source → api}/loader/parsers/qualified_name_parser.d.ts +0 -0
  1039. /package/dist/{source → api}/loader/parsers/qualified_name_parser.js +0 -0
  1040. /package/dist/{source → api}/namespace.js +0 -0
  1041. /package/dist/{source → api}/namespace_alarm_and_condition.js +0 -0
  1042. /package/dist/{source → api}/namespace_data_access.js +0 -0
  1043. /package/dist/{source → api}/namespace_machine_state.js +0 -0
  1044. /package/dist/{source → api}/set_namespace_meta_data.d.ts +0 -0
  1045. /package/dist/{source → api}/set_namespace_meta_data.js +0 -0
  1046. /package/dist/{source → api}/ua_addin.d.ts +0 -0
  1047. /package/dist/{source → api}/ua_addin.js +0 -0
  1048. /package/dist/{source → api}/ua_interface.d.ts +0 -0
  1049. /package/dist/{source → api}/ua_root_folder.d.ts +0 -0
  1050. /package/dist/{source → api}/ua_root_folder.js +0 -0
  1051. /package/dist/{source → api}/ua_two_state_variable_ex.js +0 -0
  1052. /package/dist/{source → api}/xml_writer.d.ts +0 -0
  1053. /package/dist/{source → api}/xml_writer.js +0 -0
  1054. /package/dist/{src → impl}/_instantiate_helpers.d.ts +0 -0
  1055. /package/dist/{src → impl}/_mandatory_child_or_requested_optional_filter.d.ts +0 -0
  1056. /package/dist/{src → impl}/address_space_change_event_tools.js +0 -0
  1057. /package/dist/{src → impl}/address_space_private.js +0 -0
  1058. /package/dist/{src → impl}/alarms_and_conditions/condition.d.ts +0 -0
  1059. /package/dist/{src → impl}/alarms_and_conditions/condition.js +0 -0
  1060. /package/dist/{src → impl}/check_value_rank_compatibility.d.ts +0 -0
  1061. /package/dist/{src → impl}/check_value_rank_compatibility.js +0 -0
  1062. /package/dist/{src → impl}/data_access/add_dataItem_stuff.d.ts +0 -0
  1063. /package/dist/{src → impl}/data_access/add_dataItem_stuff.js +0 -0
  1064. /package/dist/{src → impl}/data_access/adjust_datavalue_status_code.js +0 -0
  1065. /package/dist/{src → impl}/get_basic_datatype.d.ts +0 -0
  1066. /package/dist/{src → impl}/get_basic_datatype.js +0 -0
  1067. /package/dist/{src → impl}/idx_iterator.d.ts +0 -0
  1068. /package/dist/{src → impl}/idx_iterator.js +0 -0
  1069. /package/dist/{src → impl}/namespace_private.js +0 -0
  1070. /package/dist/{src → impl}/nodeid_manager.d.ts +0 -0
  1071. /package/dist/{src → impl}/nodeset_tools/adjust_namespace_array.d.ts +0 -0
  1072. /package/dist/{src → impl}/nodeset_tools/adjust_namespace_array.js +0 -0
  1073. /package/dist/{src → impl}/private_namespace.js +0 -0
  1074. /package/dist/{src → impl}/role_permissions.d.ts +0 -0
  1075. /package/dist/{src → impl}/role_permissions.js +0 -0
  1076. /package/dist/{src → impl}/ua_condition_type.d.ts +0 -0
  1077. /package/dist/{src → impl}/ua_condition_type.js +0 -0
  1078. /package/{src → impl}/alarms_and_conditions/condition.ts +0 -0
  1079. /package/{src → impl}/check_value_rank_compatibility.ts +0 -0
  1080. /package/{src → impl}/data_access/add_dataItem_stuff.ts +0 -0
  1081. /package/{src → impl}/get_basic_datatype.ts +0 -0
  1082. /package/{src → impl}/idx_iterator.ts +0 -0
  1083. /package/{src → impl}/nodeset_tools/adjust_namespace_array.ts +0 -0
  1084. /package/{src → impl}/role_permissions.ts +0 -0
  1085. /package/{src → impl}/ua_condition_type.ts +0 -0
@@ -0,0 +1,1768 @@
1
+ "use strict";
2
+ /**
3
+ * @module node-opcua-address-space
4
+ */
5
+ var __importDefault = (this && this.__importDefault) || function (mod) {
6
+ return (mod && mod.__esModule) ? mod : { "default": mod };
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.BaseNodeImpl = void 0;
10
+ exports.makeAttributeEventName = makeAttributeEventName;
11
+ exports.resolveChildAccessor = resolveChildAccessor;
12
+ exports.childAccessorNamesShadowedBy = childAccessorNamesShadowedBy;
13
+ exports.flushSharedChildAccessors = flushSharedChildAccessors;
14
+ exports.defineSharedChildAccessors = defineSharedChildAccessors;
15
+ exports.getReferenceType = getReferenceType;
16
+ const node_util_1 = require("node:util");
17
+ const chalk_1 = __importDefault(require("chalk"));
18
+ const node_opcua_address_space_base_1 = require("node-opcua-address-space-base");
19
+ const node_opcua_assert_1 = require("node-opcua-assert");
20
+ const node_opcua_constants_1 = require("node-opcua-constants");
21
+ const node_opcua_data_model_1 = require("node-opcua-data-model");
22
+ const node_opcua_data_value_1 = require("node-opcua-data-value");
23
+ const node_opcua_debug_1 = require("node-opcua-debug");
24
+ const node_opcua_nodeid_1 = require("node-opcua-nodeid");
25
+ const node_opcua_status_code_1 = require("node-opcua-status-code");
26
+ const node_opcua_types_1 = require("node-opcua-types");
27
+ const node_opcua_variant_1 = require("node-opcua-variant");
28
+ const dump_tools_js_1 = require("../api/helpers/dump_tools.js");
29
+ const session_context_js_1 = require("../api/session_context.js");
30
+ const address_space_change_event_tools_js_1 = require("./address_space_change_event_tools.js");
31
+ const base_node_private_js_1 = require("./base_node_private.js");
32
+ const child_accessors_js_1 = require("./child_accessors.js");
33
+ const reference_impl_js_1 = require("./reference_impl.js");
34
+ const reference_type_version_js_1 = require("./reference_type_version.js");
35
+ const role_permissions_js_1 = require("./role_permissions.js");
36
+ const doDebug = false;
37
+ const warningLog = (0, node_opcua_debug_1.make_warningLog)("base_node_impl");
38
+ const errorLog = (0, node_opcua_debug_1.make_errorLog)("base_node_impl");
39
+ const debugLog = (0, node_opcua_debug_1.make_debugLog)("base_node_impl");
40
+ const HasEventSourceReferenceType = (0, node_opcua_nodeid_1.resolveNodeId)("HasEventSource");
41
+ const HasNotifierReferenceType = (0, node_opcua_nodeid_1.resolveNodeId)("HasNotifier");
42
+ const HierarchicalReferencesType = (0, node_opcua_nodeid_1.resolveNodeId)("HierarchicalReferences");
43
+ const HasChildReferenceType = (0, node_opcua_nodeid_1.resolveNodeId)("HasChild");
44
+ /** a node with more references than this keeps the result of its reference scans */
45
+ const referenceScanMemoThreshold = 8;
46
+ const wellKnownReferenceTypesByAddressSpace = new WeakMap();
47
+ function wellKnownReferenceTypes(addressSpace) {
48
+ const known = wellKnownReferenceTypesByAddressSpace.get(addressSpace);
49
+ // an address space is disposed namespace by namespace, namespace 0 first: a child lookup made
50
+ // while a later namespace is torn down must not be handed reference types that are gone
51
+ if (known && !known.hasChild.isDisposed()) {
52
+ return known;
53
+ }
54
+ const hierarchicalReferences = addressSpace.findReferenceType(HierarchicalReferencesType);
55
+ const hasChild = addressSpace.findReferenceType(HasChildReferenceType);
56
+ const hasComponent = addressSpace.findReferenceType(HasComponentReferenceType);
57
+ const hasProperty = addressSpace.findReferenceType(HasPropertyReferenceType);
58
+ const organizes = addressSpace.findReferenceType(OrganizesReferenceType);
59
+ if (!hierarchicalReferences || !hasChild || !hasComponent || !hasProperty || !organizes) {
60
+ return null; // namespace 0 is still loading
61
+ }
62
+ const resolved = { hierarchicalReferences, hasChild, hasComponent, hasProperty, organizes };
63
+ wellKnownReferenceTypesByAddressSpace.set(addressSpace, resolved);
64
+ return resolved;
65
+ }
66
+ const HasComponentReferenceType = (0, node_opcua_nodeid_1.resolveNodeId)("HasComponent");
67
+ const HasPropertyReferenceType = (0, node_opcua_nodeid_1.resolveNodeId)("HasProperty");
68
+ const OrganizesReferenceType = (0, node_opcua_nodeid_1.resolveNodeId)("Organizes");
69
+ function defaultBrowseFilterFunc(_context) {
70
+ return true;
71
+ }
72
+ function _get_QualifiedBrowseName(browseName) {
73
+ return (0, node_opcua_data_model_1.coerceQualifiedName)(browseName) || "";
74
+ }
75
+ function _is_valid_BrowseDirection(browseDirection) {
76
+ return (browseDirection === node_opcua_data_model_1.BrowseDirection.Forward ||
77
+ browseDirection === node_opcua_data_model_1.BrowseDirection.Inverse ||
78
+ browseDirection === node_opcua_data_model_1.BrowseDirection.Both);
79
+ }
80
+ function makeAttributeEventName(attributeId) {
81
+ const attributeName = node_opcua_data_model_1.attributeNameById[attributeId];
82
+ return `${attributeName}_changed`;
83
+ }
84
+ /**
85
+ * Base class for all Node classes
86
+ *
87
+ * BaseNode is the base class for all the OPCUA objects in the address space
88
+ * It provides attributes and a set of references to other nodes.
89
+ * see:
90
+ * {{#crossLink "UAObject"}}{{/crossLink}},
91
+ * {{#crossLink "UAVariable"}}{{/crossLink}},
92
+ * {{#crossLink "Reference"}}{{/crossLink}},
93
+ * {{#crossLink "UAMethod"}}{{/crossLink}},
94
+ * {{#crossLink "UAView"}}{{/crossLink}},
95
+ * {{#crossLink "UAObjectType"}}{{/crossLink}},
96
+ * {{#crossLink "UADataType"}}{{/crossLink}},
97
+ * {{#crossLink "UAVariableType"}}{{/crossLink}},
98
+ *
99
+ *
100
+ */
101
+ class BaseNodeImpl extends node_opcua_address_space_base_1.TypedEventEmitter {
102
+ static makeAttributeEventName(attributeId) {
103
+ return makeAttributeEventName(attributeId);
104
+ }
105
+ _accessRestrictions;
106
+ _rolePermissions;
107
+ // public onFirstBrowseAction?: (this: BaseNode<T>) => Promise<void>;
108
+ get addressSpace() {
109
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
110
+ // c8 ignore next
111
+ if (!_private) {
112
+ throw new Error(`Internal error , cannot extract private data from ${this.browseName.toString()}`);
113
+ }
114
+ return _private.__address_space;
115
+ }
116
+ get addressSpacePrivate() {
117
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
118
+ // c8 ignore next
119
+ if (!_private) {
120
+ throw new Error(`Internal error , cannot extract private data from ${this.browseName.toString()}`);
121
+ }
122
+ return _private.__address_space;
123
+ }
124
+ get displayName() {
125
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
126
+ if (!_private._displayName) {
127
+ const raw = _private._displayNameRaw ?? "";
128
+ const displayNames = Array.isArray(raw) ? raw : [raw];
129
+ _private._displayName = displayNames.map(node_opcua_data_model_1.coerceLocalizedText);
130
+ }
131
+ return _private._displayName;
132
+ }
133
+ setDisplayName(value) {
134
+ if (!Array.isArray(value)) {
135
+ this.setDisplayName([value]);
136
+ return;
137
+ }
138
+ this._setDisplayName(value);
139
+ /**
140
+ * fires when the displayName is changed.
141
+ * @event DisplayName_changed
142
+ * @param dataValue {DataValue}
143
+ */
144
+ this._notifyAttributeChange(node_opcua_data_model_1.AttributeIds.DisplayName);
145
+ }
146
+ get description() {
147
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
148
+ if (!_private._description) {
149
+ _private._description = (0, node_opcua_data_model_1.coerceLocalizedText)(_private._descriptionRaw ?? null) || new node_opcua_data_model_1.LocalizedText({ text: "" });
150
+ }
151
+ return _private._description;
152
+ }
153
+ setDescription(value) {
154
+ this._setDescription(value);
155
+ /**
156
+ * fires when the description attribute is changed.
157
+ * @event Description_changed
158
+ * @param dataValue {DataValue}
159
+ */
160
+ this._notifyAttributeChange(node_opcua_data_model_1.AttributeIds.Description);
161
+ }
162
+ /**
163
+ * returns the nodeId of this node's Type Definition
164
+ */
165
+ get typeDefinition() {
166
+ const _cache = (0, base_node_private_js_1.BaseNode_getCache)(this);
167
+ if (!_cache.typeDefinition) {
168
+ const has_type_definition_ref = this.findReference("HasTypeDefinition", true);
169
+ let nodeId = has_type_definition_ref ? has_type_definition_ref.nodeId : null;
170
+ if (!nodeId) {
171
+ switch (this.nodeClass) {
172
+ case node_opcua_data_model_1.NodeClass.Object:
173
+ nodeId = (0, node_opcua_nodeid_1.coerceNodeId)(node_opcua_constants_1.ObjectTypeIds.BaseObjectType);
174
+ break;
175
+ case node_opcua_data_model_1.NodeClass.Variable:
176
+ nodeId = (0, node_opcua_nodeid_1.coerceNodeId)(node_opcua_constants_1.VariableTypeIds.BaseVariableType);
177
+ break;
178
+ default:
179
+ }
180
+ }
181
+ _cache.typeDefinition = nodeId;
182
+ }
183
+ return _cache.typeDefinition;
184
+ }
185
+ /**
186
+ * returns the nodeId of this node's Type Definition
187
+ */
188
+ get typeDefinitionObj() {
189
+ const _cache = (0, base_node_private_js_1.BaseNode_getCache)(this);
190
+ if (undefined === _cache.typeDefinitionObj) {
191
+ const nodeId = this.typeDefinition;
192
+ _cache.typeDefinitionObj = nodeId ? this.addressSpace.findNode(nodeId) : null;
193
+ }
194
+ if (!_cache.typeDefinitionObj) {
195
+ warningLog(this.nodeClass, "cannot find typeDefinitionObj ", this.browseName.toString(), this.nodeId.toString(), node_opcua_data_model_1.NodeClass[this.nodeClass]);
196
+ }
197
+ return _cache.typeDefinitionObj;
198
+ }
199
+ get parentNodeId() {
200
+ const parent = this.parent;
201
+ return parent ? parent.nodeId : undefined;
202
+ }
203
+ /**
204
+ * namespace index
205
+ */
206
+ get namespaceIndex() {
207
+ return this.nodeId.namespace;
208
+ }
209
+ /**
210
+ * namespace uri
211
+ */
212
+ get namespaceUri() {
213
+ return this.addressSpace.getNamespaceUri(this.namespaceIndex);
214
+ }
215
+ /**
216
+ * the parent node
217
+ */
218
+ get parent() {
219
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
220
+ if (_private._parent === undefined) {
221
+ // never been set before
222
+ _private._parent = _setup_parent_item.call(this, _private._referenceIdx);
223
+ }
224
+ return _private._parent || null;
225
+ }
226
+ /**
227
+ * @property modellingRule
228
+ * @type {String|undefined}
229
+ */
230
+ get modellingRule() {
231
+ const r = this.findReferencesAsObject("HasModellingRule");
232
+ if (!r || r.length === 0) {
233
+ return null; /// "? modellingRule missing ?"; // consider "Mandatory"
234
+ }
235
+ const r0 = r[0];
236
+ return r0.browseName.toString();
237
+ }
238
+ nodeClass = node_opcua_data_model_1.NodeClass.Unspecified;
239
+ nodeId;
240
+ browseName;
241
+ _postInstantiateFunc;
242
+ /**
243
+ * @internal
244
+ * @param options
245
+ */
246
+ constructor(options) {
247
+ super();
248
+ (0, node_opcua_assert_1.assert)(this.nodeClass === node_opcua_data_model_1.NodeClass.Unspecified, "must not be specify a nodeClass");
249
+ (0, node_opcua_assert_1.assert)(options.addressSpace); // expecting an address space
250
+ (0, node_opcua_assert_1.assert)(options.browseName instanceof node_opcua_data_model_1.QualifiedName, "Expecting a valid QualifiedName");
251
+ (0, node_opcua_assert_1.assert)(options.nodeId instanceof node_opcua_nodeid_1.NodeId, "Expecting a valid NodeId");
252
+ options.references = options.references || [];
253
+ const _private = (0, base_node_private_js_1.BaseNode_initPrivate)(this);
254
+ _private.__address_space = options.addressSpace;
255
+ this.nodeId = options.nodeId instanceof node_opcua_nodeid_1.NodeId ? options.nodeId : (0, node_opcua_nodeid_1.resolveNodeId)(options.nodeId);
256
+ // QualifiedName
257
+ /**
258
+ * the node browseName
259
+ * @property browseName
260
+ * @type QualifiedName
261
+ * @static
262
+ */
263
+ this.browseName = _get_QualifiedBrowseName(options.browseName);
264
+ // re-use browseName as displayName if displayName is missing
265
+ options.displayName = options.displayName || this.browseName.name?.toString();
266
+ if (options.description === undefined) {
267
+ options.description = null;
268
+ }
269
+ this._setDisplayName(options.displayName || "");
270
+ this._setDescription(options.description);
271
+ // user defined filter function for browsing
272
+ const _browseFilter = options.browseFilter || defaultBrowseFilterFunc;
273
+ (0, node_opcua_assert_1.assert)(typeof _browseFilter === "function");
274
+ _private._browseFilter = _browseFilter;
275
+ // normalize reference type
276
+ // this will convert any referenceType expressed with its inverseName into
277
+ // its normal name and fix the isForward flag accordingly.
278
+ // ( e.g "ComponentOf" isForward:true => "HasComponent", isForward:false)
279
+ for (const reference of options.references) {
280
+ this.__addReference(reference, false);
281
+ }
282
+ // the cache was empty to start with; one clear covers every reference just added
283
+ this._clear_caches();
284
+ this._accessRestrictions = options.accessRestrictions;
285
+ this._rolePermissions = (0, role_permissions_js_1.coerceRolePermissions)(options.rolePermissions);
286
+ // make `parent.<thisName>` resolve to this node: through a getter shared by every node when
287
+ // a nodeset is loading (defined in one batch by the loader, see flushSharedChildAccessors),
288
+ // through the own accessor installed by install_extra_properties otherwise
289
+ // (see child_accessors.ts for why the two paths exist)
290
+ _private._accessorName = (0, child_accessors_js_1.registerChildName)(this.browseName.name, options.addressSpace.suspendBackReference);
291
+ }
292
+ getDisplayName(_locale) {
293
+ return this.displayName[0].text || "";
294
+ }
295
+ get namespace() {
296
+ return this.addressSpacePrivate.getNamespace(this.nodeId.namespace);
297
+ }
298
+ // ---------------------------------------------------------------------------------------------------
299
+ // Finders
300
+ // ---------------------------------------------------------------------------------------------------
301
+ findReferencesEx(referenceType, browseDirection) {
302
+ browseDirection = browseDirection !== undefined ? browseDirection : node_opcua_data_model_1.BrowseDirection.Forward;
303
+ (0, node_opcua_assert_1.assert)(_is_valid_BrowseDirection(browseDirection));
304
+ (0, node_opcua_assert_1.assert)(browseDirection !== node_opcua_data_model_1.BrowseDirection.Both);
305
+ const referenceTypeNode = this._coerceReferenceType(referenceType);
306
+ if (!referenceTypeNode) {
307
+ // note: when loading nodeset2.xml files, reference type may not exit yet
308
+ // throw new Error("expecting valid reference name " + strReference);
309
+ return [];
310
+ }
311
+ const isForward = browseDirection === node_opcua_data_model_1.BrowseDirection.Forward;
312
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
313
+ // Memoized per reference type and direction, on the nodes where a scan is worth remembering:
314
+ // a scan touches every reference of the node and runs checkHasSubtype on each, and the same
315
+ // question is asked over and over (every child lookup, every browse) of folders, types and
316
+ // the Server object. A leaf variable holds three references; scanning them costs less than
317
+ // the map would, and a model with a hundred thousand of them cannot afford one map each.
318
+ // The memo goes with the rest of _cache whenever a reference is added or removed, and when
319
+ // a reference type was created since it was built.
320
+ const memoize = _private._referenceIdx.size + _private._back_referenceIdx.size > referenceScanMemoThreshold;
321
+ let entry;
322
+ const slot = isForward ? 0 : 1;
323
+ if (memoize) {
324
+ const _cache = (0, base_node_private_js_1.BaseNode_getCache)(this);
325
+ if (_cache._refExVersion !== reference_type_version_js_1.referenceTypeVersion.count) {
326
+ _cache._refEx = undefined;
327
+ _cache._refExVersion = reference_type_version_js_1.referenceTypeVersion.count;
328
+ }
329
+ if (!_cache._refEx) {
330
+ _cache._refEx = new Map();
331
+ }
332
+ entry = _cache._refEx.get(referenceTypeNode);
333
+ if (!entry) {
334
+ entry = [undefined, undefined, false, false];
335
+ _cache._refEx.set(referenceTypeNode, entry);
336
+ }
337
+ const memoized = entry[slot];
338
+ if (memoized) {
339
+ if (entry[slot + 2]) {
340
+ // a reference was scanned before its target existed: the same answer as a
341
+ // fresh scan, which resolves every target it can
342
+ entry[slot + 2] = resolveScannedReferences(this.addressSpace, memoized);
343
+ }
344
+ return memoized;
345
+ }
346
+ }
347
+ const results = [];
348
+ const addressSpace = this.addressSpace;
349
+ let unresolved = false;
350
+ const process = (referenceIdx) => {
351
+ for (const ref of referenceIdx.values()) {
352
+ if (ref.isForward === isForward && referenceTypeNode.checkHasSubtype(ref.referenceType)) {
353
+ // callers read ref.node: resolved here, once per reference, for the references a
354
+ // load left unresolved (the end-of-load sweep no longer visits every one)
355
+ if (!ref.node && !resolveReferenceNode(addressSpace, ref)) {
356
+ unresolved = true;
357
+ }
358
+ results.push(ref);
359
+ }
360
+ }
361
+ };
362
+ process(_private._referenceIdx);
363
+ process(_private._back_referenceIdx);
364
+ if (entry) {
365
+ // the array is handed out again on every hit: frozen, so that a caller changing it
366
+ // fails loudly rather than changing what every later caller sees
367
+ entry[slot] = Object.freeze(results);
368
+ entry[slot + 2] = unresolved;
369
+ }
370
+ return results;
371
+ }
372
+ findReferences_no_cache(referenceTypeNode, isForward = true) {
373
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
374
+ const result = [];
375
+ const addressSpace = this.addressSpace;
376
+ const keep = (ref) => {
377
+ if (ref.isForward === isForward && (0, node_opcua_nodeid_1.sameNodeId)(ref.referenceType, referenceTypeNode.nodeId)) {
378
+ if (!ref.node) {
379
+ resolveReferenceNode(addressSpace, ref);
380
+ }
381
+ result.push(ref);
382
+ }
383
+ };
384
+ for (const ref of _private._referenceIdx.values()) {
385
+ keep(ref);
386
+ }
387
+ for (const ref of _private._back_referenceIdx.values()) {
388
+ keep(ref);
389
+ }
390
+ return result;
391
+ }
392
+ findReferences(referenceType, isForward = true) {
393
+ const _cache = (0, base_node_private_js_1.BaseNode_getCache)(this);
394
+ const referenceTypeNode = this._coerceReferenceType(referenceType);
395
+ if (!referenceTypeNode) {
396
+ // note: when loading nodeset2.xml files, reference type may not exit yet
397
+ // throw new Error("expecting valid reference name " + strReference);
398
+ return [];
399
+ }
400
+ _cache._ref = _cache._ref || new Map();
401
+ const hash = `r|${referenceTypeNode.nodeId.toString()}|${isForward ? "f" : "b"}`;
402
+ if (_cache._ref.has(hash)) {
403
+ return _cache._ref.get(hash) || [];
404
+ }
405
+ // c8 ignore next
406
+ if (doDebug && !this.addressSpace.findReferenceType(referenceTypeNode.nodeId)) {
407
+ throw new Error(`expecting valid reference name ${referenceType}`);
408
+ }
409
+ const result = Object.freeze(this.findReferences_no_cache(referenceTypeNode, isForward));
410
+ _cache._ref.set(hash, result);
411
+ return result;
412
+ }
413
+ findReference(strReference, isForward) {
414
+ const refs = this.findReferences(strReference, isForward);
415
+ if (refs.length !== 1 && refs.length !== 0) {
416
+ throw new Error("findReference: expecting only one or zero element here");
417
+ }
418
+ return refs[0] || null;
419
+ }
420
+ findReferencesExAsObject(referenceType, browseDirection) {
421
+ const references = this.findReferencesEx(referenceType, browseDirection);
422
+ return _asObject(references, this.addressSpace);
423
+ }
424
+ findReferencesAsObject(referenceType, isForward) {
425
+ const references = this.findReferences(referenceType, isForward);
426
+ return _asObject(references, this.addressSpace);
427
+ }
428
+ /**
429
+ * return an array with the Aggregates of this object.
430
+ */
431
+ getAggregates() {
432
+ return this.findReferencesExAsObject("Aggregates", node_opcua_data_model_1.BrowseDirection.Forward);
433
+ }
434
+ /**
435
+ * return an array with the components of this object.
436
+ */
437
+ getComponents() {
438
+ return this.findReferencesExAsObject("HasComponent", node_opcua_data_model_1.BrowseDirection.Forward);
439
+ }
440
+ /**
441
+ * return a array with the properties of this object.
442
+ */
443
+ getProperties() {
444
+ return this.findReferencesExAsObject("HasProperty", node_opcua_data_model_1.BrowseDirection.Forward);
445
+ }
446
+ static _hasChild = new node_opcua_nodeid_1.NodeId(node_opcua_nodeid_1.NodeIdType.NUMERIC, node_opcua_constants_1.ReferenceTypeIds.HasChild);
447
+ getChildren() {
448
+ // return this.findReferencesExAsObject(BaseNodeImpl._hasChild, BrowseDirection.Forward);
449
+ const _cache = (0, base_node_private_js_1.BaseNode_getCache)(this);
450
+ if (!_cache._children) {
451
+ _cache._children = this.findReferencesExAsObject(BaseNodeImpl._hasChild, node_opcua_data_model_1.BrowseDirection.Forward);
452
+ }
453
+ return _cache._children;
454
+ }
455
+ /**
456
+ * return a array with the notifiers of this object.
457
+ * only reference of exact type HasNotifier are returned.
458
+ */
459
+ getNotifiers() {
460
+ return this.findReferencesAsObject(HasNotifierReferenceType, true);
461
+ }
462
+ /**
463
+ * return a array with the event source of this object.
464
+ * only reference of exact type HasEventSource are returned.
465
+ */
466
+ getEventSources() {
467
+ return this.findReferencesAsObject(HasEventSourceReferenceType, true);
468
+ }
469
+ /**
470
+ * return a array of the objects for which this node is an EventSource
471
+ */
472
+ getEventSourceOfs() {
473
+ return this.findReferencesAsObject(HasEventSourceReferenceType, false);
474
+ }
475
+ /**
476
+ * the children of this node named `browseName` reached through a reference of type
477
+ * `referenceType` or a subtype of it, read from the child index rather than by scanning the
478
+ * references of the node again
479
+ */
480
+ _selectChildren(browseName, namespaceIndex, referenceType) {
481
+ const references = _select_by_browse_name((0, base_node_private_js_1._get_HierarchicalReference)(this), browseName, namespaceIndex);
482
+ if (references.length === 0) {
483
+ return [];
484
+ }
485
+ const referenceTypeNode = this.addressSpace.findReferenceType(referenceType);
486
+ if (!referenceTypeNode) {
487
+ return [];
488
+ }
489
+ const selected = [];
490
+ for (const reference of references) {
491
+ if (referenceTypeNode.checkHasSubtype(reference.referenceType)) {
492
+ const node = reference_impl_js_1.ReferenceImpl.resolveReferenceNode(this.addressSpace, reference);
493
+ if (node) {
494
+ selected.push(node);
495
+ }
496
+ }
497
+ }
498
+ if (selected.length > 1 && typeof browseName === "string" && (namespaceIndex === null || namespaceIndex === undefined)) {
499
+ warningLog("Multiple children exist with name ", browseName, " please specify a namespace index");
500
+ }
501
+ return selected;
502
+ }
503
+ getComponentByName(browseName, namespaceIndex) {
504
+ const select = this._selectChildren(browseName, namespaceIndex, HasComponentReferenceType);
505
+ (0, node_opcua_assert_1.assert)(select.length <= 1, "BaseNode#getComponentByName found duplicated reference");
506
+ if (select.length === 1) {
507
+ const component = select[0];
508
+ if (component.nodeClass === node_opcua_data_model_1.NodeClass.Method) {
509
+ warningLog("please use getMethodByName to retrieve a method");
510
+ return null;
511
+ }
512
+ (0, node_opcua_assert_1.assert)(component.nodeClass === node_opcua_data_model_1.NodeClass.Variable || component.nodeClass === node_opcua_data_model_1.NodeClass.Object);
513
+ return component;
514
+ }
515
+ else {
516
+ return null;
517
+ }
518
+ }
519
+ getPropertyByName(browseName, namespaceIndex) {
520
+ const select = this._selectChildren(browseName, namespaceIndex, HasPropertyReferenceType);
521
+ (0, node_opcua_assert_1.assert)(select.length <= 1, "BaseNode#getPropertyByName found duplicated reference");
522
+ if (select.length === 1 && select[0].nodeClass !== node_opcua_data_model_1.NodeClass.Variable) {
523
+ throw new Error("Expecting a property to be of nodeClass==NodeClass.Variable");
524
+ }
525
+ return select.length === 1 ? select[0] : null;
526
+ }
527
+ getFolderElementByName(browseName, namespaceIndex) {
528
+ const select = this._selectChildren(browseName, namespaceIndex, OrganizesReferenceType);
529
+ return select.length === 1 ? select[0] : null;
530
+ }
531
+ /**
532
+ * returns the list of nodes that this folder object organizes
533
+ */
534
+ getFolderElements() {
535
+ return this.findReferencesExAsObject("Organizes", node_opcua_data_model_1.BrowseDirection.Forward);
536
+ }
537
+ /**
538
+ * returns the list of methods that this object provides
539
+ * @return an array with Method objects.
540
+ *
541
+ *
542
+ * Note: internally, methods are special types of components
543
+ */
544
+ getMethods() {
545
+ const components = this.getComponents();
546
+ return components.filter((obj) => obj.nodeClass === node_opcua_data_model_1.NodeClass.Method);
547
+ }
548
+ /**
549
+ * returns the method exposed by this object and with the given nodeId
550
+ */
551
+ getMethodById(nodeId) {
552
+ const methods = this.getMethods();
553
+ const found = methods.find((m) => m.nodeId.toString() === nodeId.toString());
554
+ return found || null;
555
+ }
556
+ getMethodByName(methodName, namespaceIndex) {
557
+ // methods are components of a special node class
558
+ const select = this._selectChildren(methodName, namespaceIndex, HasComponentReferenceType).filter((node) => node.nodeClass === node_opcua_data_model_1.NodeClass.Method);
559
+ (0, node_opcua_assert_1.assert)(select.length <= 1, "BaseNode#getMethodByName found duplicated reference");
560
+ return select.length === 1 ? select[0] : null;
561
+ }
562
+ getWriteMask() {
563
+ return 0;
564
+ }
565
+ getUserWriteMask() {
566
+ return 0;
567
+ }
568
+ readAttribute(context, attributeId, indexRange, dataEncoding) {
569
+ indexRange;
570
+ dataEncoding;
571
+ (0, node_opcua_assert_1.assert)(!context || context instanceof session_context_js_1.SessionContext);
572
+ const options = {};
573
+ options.statusCode = node_opcua_status_code_1.StatusCodes.Good;
574
+ switch (attributeId) {
575
+ case node_opcua_data_model_1.AttributeIds.NodeId: // NodeId
576
+ options.value = { dataType: node_opcua_variant_1.DataType.NodeId, value: this.nodeId };
577
+ break;
578
+ case node_opcua_data_model_1.AttributeIds.NodeClass: // NodeClass
579
+ (0, node_opcua_assert_1.assert)(Number.isFinite(this.nodeClass));
580
+ options.value = { dataType: node_opcua_variant_1.DataType.Int32, value: this.nodeClass };
581
+ break;
582
+ case node_opcua_data_model_1.AttributeIds.BrowseName: // QualifiedName
583
+ (0, node_opcua_assert_1.assert)(this.browseName instanceof node_opcua_data_model_1.QualifiedName);
584
+ options.value = { dataType: node_opcua_variant_1.DataType.QualifiedName, value: this.browseName };
585
+ break;
586
+ case node_opcua_data_model_1.AttributeIds.DisplayName: // LocalizedText
587
+ options.value = { dataType: node_opcua_variant_1.DataType.LocalizedText, value: this.displayName[0] };
588
+ break;
589
+ case node_opcua_data_model_1.AttributeIds.Description: // LocalizedText
590
+ options.value = { dataType: node_opcua_variant_1.DataType.LocalizedText, value: this.description };
591
+ break;
592
+ case node_opcua_data_model_1.AttributeIds.WriteMask:
593
+ options.value = { dataType: node_opcua_variant_1.DataType.UInt32, value: this.getWriteMask() };
594
+ break;
595
+ case node_opcua_data_model_1.AttributeIds.UserWriteMask:
596
+ options.value = { dataType: node_opcua_variant_1.DataType.UInt32, value: this.getUserWriteMask() };
597
+ break;
598
+ case node_opcua_data_model_1.AttributeIds.AccessRestrictions:
599
+ return this._readAccessRestrictions(context);
600
+ case node_opcua_data_model_1.AttributeIds.RolePermissions:
601
+ return this._readRolePermissions(context);
602
+ case node_opcua_data_model_1.AttributeIds.UserRolePermissions:
603
+ return this._readUserRolePermissions(context);
604
+ default:
605
+ options.value = null;
606
+ options.statusCode = node_opcua_status_code_1.StatusCodes.BadAttributeIdInvalid;
607
+ break;
608
+ }
609
+ // xx options.serverTimestamp = new Date();
610
+ return new node_opcua_data_value_1.DataValue(options);
611
+ }
612
+ writeAttribute(context, writeValue, callback) {
613
+ context = context || session_context_js_1.SessionContext.defaultContext;
614
+ (0, node_opcua_assert_1.assert)(context instanceof session_context_js_1.SessionContext);
615
+ (0, node_opcua_assert_1.assert)(typeof callback === "function");
616
+ if (writeValue.attributeId === undefined ||
617
+ writeValue.attributeId <= 0 ||
618
+ writeValue.attributeId > node_opcua_data_model_1.AttributeIds.AccessLevelEx) {
619
+ callback(null, node_opcua_status_code_1.StatusCodes.BadAttributeIdInvalid);
620
+ return;
621
+ }
622
+ if (!this.canUserWriteAttribute(context, writeValue.attributeId)) {
623
+ callback(null, node_opcua_status_code_1.StatusCodes.BadUserAccessDenied);
624
+ return;
625
+ }
626
+ // by default Node is read-only,
627
+ // this method needs to be overridden to change the behavior
628
+ callback(null, node_opcua_status_code_1.StatusCodes.BadNotWritable);
629
+ }
630
+ fullName() {
631
+ if (this.parentNodeId) {
632
+ const parent = this.addressSpace.findNode(this.parentNodeId);
633
+ // c8 ignore next
634
+ if (parent) {
635
+ return `${parent.fullName()}.${this.browseName.toString()}`;
636
+ }
637
+ else {
638
+ return `NOT YET REGISTERED${this.parentNodeId.toString()}.${this.browseName.toString()}`;
639
+ }
640
+ }
641
+ return this.browseName.toString();
642
+ }
643
+ ownReferences() {
644
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
645
+ return [..._private._referenceIdx.values()];
646
+ }
647
+ /**
648
+ *
649
+ * @param relativePathElement
650
+ * @param isLast
651
+ * @return {NodeId[]}
652
+ */
653
+ browseNodeByTargetName(relativePathElement, isLast) {
654
+ relativePathElement.targetName = relativePathElement.targetName || new node_opcua_data_model_1.QualifiedName({});
655
+ // part 4.0 v1.03 $7.26 RelativePath
656
+ // The BrowseName of the target node.
657
+ // The final element may have an empty targetName. In this situation all targets of the references identified by
658
+ // the referenceTypeId are the targets of the RelativePath.
659
+ // The targetName shall be specified for all other elements.
660
+ // The current path cannot be followed any further if no targets with the specified BrowseName exist.
661
+ (0, node_opcua_assert_1.assert)(relativePathElement.targetName instanceof node_opcua_data_model_1.QualifiedName);
662
+ (0, node_opcua_assert_1.assert)(relativePathElement.targetName.namespaceIndex >= 0);
663
+ (0, node_opcua_assert_1.assert)((relativePathElement.targetName.name?.length || 0) > 0);
664
+ // The type of reference to follow from the current node.
665
+ // The current path cannot be followed any further if the referenceTypeId is not available on the Node instance.
666
+ // If not specified then all References are included and the parameter includeSubtypes is ignored.
667
+ (0, node_opcua_assert_1.assert)(Object.hasOwn(relativePathElement, "referenceTypeId"));
668
+ // Indicates whether the inverse Reference should be followed.
669
+ // The inverse reference is followed if this value is TRUE.
670
+ (0, node_opcua_assert_1.assert)(Object.hasOwn(relativePathElement, "isInverse"));
671
+ // Indicates whether subtypes of the ReferenceType should be followed.
672
+ // Subtypes are included if this value is TRUE.
673
+ (0, node_opcua_assert_1.assert)(Object.hasOwn(relativePathElement, "includeSubtypes"));
674
+ // A forward step naming its target through a hierarchical reference type, the shape of
675
+ // almost every TranslateBrowsePath element, is a lookup in the child index rather than a
676
+ // scan of every reference of the node; the filter below still applies to what it finds.
677
+ const references = this._hierarchicalStepCandidates(relativePathElement) ?? this.allReferences();
678
+ const _check_reference = (reference) => {
679
+ if (relativePathElement.referenceTypeId.isEmpty()) {
680
+ return true;
681
+ }
682
+ (0, node_opcua_assert_1.assert)(relativePathElement.referenceTypeId instanceof node_opcua_nodeid_1.NodeId);
683
+ if ((relativePathElement.isInverse && reference.isForward) ||
684
+ (!relativePathElement.isInverse && !reference.isForward)) {
685
+ return false;
686
+ }
687
+ (0, node_opcua_assert_1.assert)(Object.hasOwn(reference, "isForward"));
688
+ const referenceType = resolveReferenceType(this.addressSpace, reference);
689
+ const referenceTypeId = referenceType.nodeId;
690
+ if ((0, node_opcua_nodeid_1.sameNodeId)(relativePathElement.referenceTypeId, referenceTypeId)) {
691
+ return true;
692
+ }
693
+ if (relativePathElement.includeSubtypes) {
694
+ const baseType = this.addressSpace.findReferenceType(relativePathElement.referenceTypeId);
695
+ if (baseType && referenceType.isSubtypeOf(baseType)) {
696
+ return true;
697
+ }
698
+ }
699
+ return false;
700
+ };
701
+ const nodeIdsMap = {};
702
+ let nodeIds = [];
703
+ for (const reference of references) {
704
+ if (!_check_reference(reference)) {
705
+ continue;
706
+ }
707
+ const obj = resolveReferenceNode(this.addressSpace, reference);
708
+ // c8 ignore next
709
+ if (!obj) {
710
+ throw new Error(` cannot find node with id ${reference.nodeId.toString()}`);
711
+ }
712
+ if ((0, node_util_1.isDeepStrictEqual)(obj.browseName, relativePathElement.targetName)) {
713
+ // compare QualifiedName
714
+ const key = obj.nodeId.toString();
715
+ if (!Object.hasOwn(nodeIdsMap, key)) {
716
+ nodeIds.push(obj.nodeId);
717
+ nodeIdsMap[key] = obj;
718
+ }
719
+ }
720
+ }
721
+ if (nodeIds.length === 0 && (this.nodeClass === node_opcua_data_model_1.NodeClass.ObjectType || this.nodeClass === node_opcua_data_model_1.NodeClass.VariableType)) {
722
+ const nodeType = this;
723
+ if (nodeType.subtypeOf) {
724
+ // browsing also InstanceDeclarations included in base type
725
+ const baseType = this.addressSpace.findNode(nodeType.subtypeOf);
726
+ const n = baseType.browseNodeByTargetName(relativePathElement, isLast);
727
+ nodeIds = [].concat(nodeIds, n);
728
+ }
729
+ }
730
+ return nodeIds;
731
+ }
732
+ /**
733
+ * the references of this node that can answer a relative path element, taken from the child
734
+ * index, or null when the element is one the index cannot answer (an inverse step, an
735
+ * unspecified or non-hierarchical reference type, no target name)
736
+ */
737
+ _hierarchicalStepCandidates(relativePathElement) {
738
+ const targetName = relativePathElement.targetName;
739
+ if (relativePathElement.isInverse || !targetName?.name || relativePathElement.referenceTypeId.isEmpty()) {
740
+ return null;
741
+ }
742
+ const wellKnown = wellKnownReferenceTypes(this.addressSpace);
743
+ const referenceType = this.addressSpace.findReferenceType(relativePathElement.referenceTypeId);
744
+ if (!wellKnown || !referenceType) {
745
+ return null;
746
+ }
747
+ if (referenceType !== wellKnown.hierarchicalReferences && !referenceType.isSubtypeOf(wellKnown.hierarchicalReferences)) {
748
+ return null;
749
+ }
750
+ return _select_by_browse_name((0, base_node_private_js_1._get_HierarchicalReference)(this), targetName, targetName.namespaceIndex);
751
+ }
752
+ /**
753
+ * browse the node to extract information requested in browseDescription
754
+ * and returns an array with reference descriptions
755
+ *
756
+ *
757
+ *
758
+ */
759
+ browseNode(browseDescription, context) {
760
+ (0, node_opcua_assert_1.assert)(Number.isFinite(browseDescription.nodeClassMask));
761
+ const do_debug = false;
762
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
763
+ const addressSpace = this.addressSpace;
764
+ const referenceTypeId = normalize_referenceTypeId(addressSpace, browseDescription.referenceTypeId);
765
+ (0, node_opcua_assert_1.assert)(referenceTypeId instanceof node_opcua_nodeid_1.NodeId);
766
+ const browseDirection = browseDescription.browseDirection !== undefined ? browseDescription.browseDirection : node_opcua_data_model_1.BrowseDirection.Both;
767
+ // get all possible references
768
+ let references = this.allReferences();
769
+ /* c8 ignore next */
770
+ if (do_debug) {
771
+ // c8 ignore next
772
+ doDebug && debugLog("all references :", this.nodeId.toString(), this.browseName.toString());
773
+ (0, dump_tools_js_1.dumpReferences)(addressSpace, _private._referenceIdx.values());
774
+ }
775
+ // filter out references not matching referenceType
776
+ references = _filter_by_referenceType.call(this, browseDescription, references, referenceTypeId);
777
+ references = _filter_by_direction(references, browseDirection);
778
+ references = _filter_by_nodeClass.call(this, references, browseDescription.nodeClassMask);
779
+ references = _filter_by_userFilter.call(this, references, context);
780
+ if (context) {
781
+ references = _filter_by_context(this, references, context);
782
+ }
783
+ const referenceDescriptions = (0, base_node_private_js_1._constructReferenceDescription)(addressSpace, references, browseDescription.resultMask);
784
+ /* c8 ignore next */
785
+ if (do_debug) {
786
+ (0, dump_tools_js_1.dumpReferenceDescriptions)(this.addressSpace, referenceDescriptions);
787
+ }
788
+ return referenceDescriptions;
789
+ }
790
+ allReferences() {
791
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
792
+ const references = [..._private._referenceIdx.values(), ..._private._back_referenceIdx.values()];
793
+ const addressSpace = this.addressSpace;
794
+ for (const ref of references) {
795
+ if (!ref.node) {
796
+ resolveReferenceNode(addressSpace, ref);
797
+ }
798
+ }
799
+ return references;
800
+ }
801
+ /**
802
+ * @param reference
803
+ * @param reference.referenceType {String}
804
+ * @param [reference.isForward = true] {Boolean}
805
+ * @param reference.nodeId {Node|NodeId|String}
806
+ *
807
+ * @example
808
+ *
809
+ * view.addReference({ referenceType: "Organizes", nodeId: myDevice });
810
+ *
811
+ * or
812
+ *
813
+ * myDevice1.addReference({ referenceType: "OrganizedBy", nodeId: view });
814
+ */
815
+ addReference(reference) {
816
+ const referenceNode = this.__addReference(reference);
817
+ const addressSpace = this.addressSpace;
818
+ if (!resolveReferenceType(addressSpace, referenceNode)) {
819
+ throw new Error(`BaseNode#addReference : invalid reference ${reference.toString()}`);
820
+ }
821
+ _propagate_ref.call(this, addressSpace, referenceNode);
822
+ this.install_extra_properties();
823
+ (0, address_space_change_event_tools_js_1._handle_add_reference_change_event)(this, referenceNode.nodeId);
824
+ }
825
+ removeReference(referenceOpts) {
826
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
827
+ (0, node_opcua_assert_1.assert)(Object.hasOwn(referenceOpts, "referenceType"));
828
+ // xx isForward is optional : assert(Object.prototype.hasOwnProperty.call(reference,"isForward"));
829
+ (0, node_opcua_assert_1.assert)(Object.hasOwn(referenceOpts, "nodeId"));
830
+ const addressSpace = this.addressSpace;
831
+ const reference = addressSpace.normalizeReferenceTypes([referenceOpts])?.[0];
832
+ const h = reference.key(addressSpace);
833
+ const relatedNode = addressSpace.findNode(reference.nodeId);
834
+ // c8 ignore next
835
+ if (!relatedNode) {
836
+ return;
837
+ }
838
+ const backwardReference = new reference_impl_js_1.ReferenceImpl({
839
+ isForward: !reference.isForward,
840
+ nodeId: this.nodeId,
841
+ referenceType: reference.referenceType
842
+ });
843
+ if (_private._referenceIdx.has(h)) {
844
+ _private._referenceIdx.delete(h);
845
+ base_node_private_js_1.BaseNode_remove_backward_reference.call(relatedNode, backwardReference);
846
+ (0, base_node_private_js_1._remove_HierarchicalReference)(this, reference);
847
+ this.uninstall_extra_properties(reference);
848
+ this._clear_caches();
849
+ (0, base_node_private_js_1.noteReferenceTypeChange)(this, reference);
850
+ }
851
+ else if (_private._back_referenceIdx.has(h)) {
852
+ relatedNode.removeReference(backwardReference);
853
+ }
854
+ else {
855
+ // A back reference of a massively used type was never installed: _propagate_ref
856
+ // skips HasTypeDefinition and HasModellingRule deliberately, "because there are
857
+ // too many". Removal has to mirror that, or detaching any node asks its type
858
+ // definition to drop a reference it never held - which is where the hundred-odd
859
+ // "Cannot find reference to remove: ns=0;i=40" lines per run came from. The
860
+ // absence is the designed state, not a fault worth reporting.
861
+ const referenceType = resolveReferenceType(addressSpace, reference);
862
+ if (!reference.isForward && referenceType && (0, reference_impl_js_1.isMassivelyUsedReferenceType)(referenceType.nodeId)) {
863
+ return;
864
+ }
865
+ warningLog(`Cannot find reference to remove: ${reference.toString()}`);
866
+ }
867
+ }
868
+ /**
869
+ *
870
+ */
871
+ resolveNodeId(nodeId) {
872
+ return this.addressSpace.resolveNodeId(nodeId);
873
+ }
874
+ /**
875
+ * Expose the hierarchical children of this node as properties of this node, and this node as
876
+ * a property of its parents, for the browse names that have no shared accessor.
877
+ *
878
+ * A node created while a nodeset loads needs nothing here: its name got a getter on the
879
+ * prototype (see child_accessors.ts). This is the path for nodes created afterwards through the
880
+ * namespace API, whose browse names may be anything and must not touch the prototype.
881
+ */
882
+ install_extra_properties() {
883
+ const addressSpace = this.addressSpace;
884
+ if (addressSpace.isFrugal) {
885
+ return;
886
+ }
887
+ const wellKnown = wellKnownReferenceTypes(addressSpace);
888
+ if (!wellKnown) {
889
+ return; // namespace 0 is still loading
890
+ }
891
+ const { hasChild, hasComponent, hasProperty, organizes } = wellKnown;
892
+ const self = this;
893
+ const visit = (reference) => {
894
+ if (reference.isForward) {
895
+ if (hasChild.checkHasSubtype(reference.referenceType) || organizes.checkHasSubtype(reference.referenceType)) {
896
+ install_child_as_object_property(self, resolveReferenceNode(addressSpace, reference));
897
+ }
898
+ }
899
+ else if (hasComponent.checkHasSubtype(reference.referenceType) ||
900
+ hasProperty.checkHasSubtype(reference.referenceType) ||
901
+ organizes.checkHasSubtype(reference.referenceType)) {
902
+ // Only this node is new, so only this node has to appear on the parent.
903
+ // Re-walking every child the parent already has made building a folder
904
+ // of N children cost O(N^2) - measured at 7.2s for 3000 children.
905
+ install_child_as_object_property(resolveReferenceNode(addressSpace, reference), self);
906
+ }
907
+ };
908
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
909
+ for (const reference of _private._referenceIdx.values()) {
910
+ visit(reference);
911
+ }
912
+ for (const reference of _private._back_referenceIdx.values()) {
913
+ visit(reference);
914
+ }
915
+ }
916
+ /**
917
+ * undo install_extra_properties for one reference, on both ends when it is an inverse one
918
+ */
919
+ uninstall_extra_properties(reference) {
920
+ const addressSpace = this.addressSpace;
921
+ if (addressSpace.isFrugal) {
922
+ return;
923
+ }
924
+ if (!reference.isForward) {
925
+ const parentNode = resolveReferenceNode(addressSpace, reference);
926
+ if (parentNode) {
927
+ parentNode.uninstall_extra_properties({
928
+ isForward: true,
929
+ nodeId: this.nodeId,
930
+ referenceType: reference.referenceType
931
+ });
932
+ }
933
+ }
934
+ const childNode = resolveReferenceNode(addressSpace, reference);
935
+ if (childNode) {
936
+ uninstall_child_object_property(this, childNode);
937
+ }
938
+ }
939
+ toString() {
940
+ const options = new base_node_private_js_1.ToStringBuilder();
941
+ base_node_private_js_1.BaseNode_toString.call(this, options);
942
+ return options.toString();
943
+ }
944
+ toJSON() {
945
+ return {
946
+ nodeId: this.nodeId.toString(),
947
+ nodeClass: node_opcua_data_model_1.NodeClass[this.nodeClass],
948
+ browseName: this.browseName.toString(),
949
+ displayName: this.displayName.length ? this.displayName[0].text : ""
950
+ };
951
+ }
952
+ [Symbol.for("nodejs.util.inspect.custom")]() {
953
+ return this.toString();
954
+ }
955
+ /**
956
+ * @property isFalseSubStateOf
957
+ * @type {BaseNode|null}
958
+ */
959
+ get isFalseSubStateOf() {
960
+ const r = this.findReferencesAsObject("HasFalseSubState", false);
961
+ if (!r || r.length === 0) {
962
+ return null;
963
+ }
964
+ (0, node_opcua_assert_1.assert)(r.length === 1);
965
+ return r[0];
966
+ }
967
+ /**
968
+ * @property isTrueSubStateOf
969
+ * @type {BaseNode|null}
970
+ */
971
+ get isTrueSubStateOf() {
972
+ const r = this.findReferencesAsObject("HasTrueSubState", false);
973
+ if (!r || r.length === 0) {
974
+ return null;
975
+ }
976
+ (0, node_opcua_assert_1.assert)(r.length === 1);
977
+ return r[0];
978
+ }
979
+ /**
980
+ * @return {UAStateVariable[]} return an array with the SubStates of this object.
981
+ */
982
+ getFalseSubStates() {
983
+ return this.findReferencesAsObject("HasFalseSubState");
984
+ }
985
+ /**
986
+
987
+ * @return {UAStateVariable[]} return an array with the SubStates of this object.
988
+ */
989
+ getTrueSubStates() {
990
+ return this.findReferencesAsObject("HasTrueSubState");
991
+ }
992
+ findHierarchicalReferences() {
993
+ return this.findReferencesEx("HierarchicalReferences", node_opcua_data_model_1.BrowseDirection.Forward);
994
+ }
995
+ //
996
+ getChildByName(browseName, namespaceIndex) {
997
+ var childrenMap = (0, base_node_private_js_1._get_HierarchicalReference)(this);
998
+ const select = _select_by_browse_name(childrenMap, browseName, namespaceIndex);
999
+ if (select.length === 0) {
1000
+ return null;
1001
+ }
1002
+ const ref = select[0];
1003
+ const r = this.addressSpace.findReferenceType(ref.referenceType);
1004
+ if (!r)
1005
+ return null;
1006
+ const hasChild = this.addressSpace.findReferenceType("HasChild");
1007
+ if (!hasChild) {
1008
+ return null; // too early, bmy be namespace 0 is still loading
1009
+ }
1010
+ if (r.isSubtypeOf(hasChild)) {
1011
+ return ref.node || null;
1012
+ }
1013
+ return null;
1014
+ }
1015
+ getNodeVersion() {
1016
+ return this.getChildByName("NodeVersion", 0);
1017
+ /*
1018
+ const cache = BaseNode_getCache(this);
1019
+ if (cache._versionNode == undefined) {
1020
+ cache._versionNode = this.getChildByName("NodeVersion", 0) as UAProperty<string, DataType.String> | null;
1021
+ }
1022
+ return cache._versionNode as UAProperty<UAString, DataType.String> | null;
1023
+ */
1024
+ }
1025
+ get nodeVersion() {
1026
+ return this.getNodeVersion() || undefined;
1027
+ }
1028
+ set nodeVersion(_n) {
1029
+ (0, node_opcua_assert_1.assert)(false);
1030
+ }
1031
+ get toStateNode() {
1032
+ const nodes = this.findReferencesAsObject("ToState", true);
1033
+ (0, node_opcua_assert_1.assert)(nodes.length <= 1);
1034
+ return nodes.length === 1 ? nodes[0] : null;
1035
+ }
1036
+ get fromStateNode() {
1037
+ const nodes = this.findReferencesAsObject("FromState", true);
1038
+ (0, node_opcua_assert_1.assert)(nodes.length <= 1);
1039
+ return nodes.length === 1 ? nodes[0] : null;
1040
+ }
1041
+ /**
1042
+ * this methods propagates the forward references to the pointed node
1043
+ * by inserting backward references to the counter part node
1044
+ * @private
1045
+ */
1046
+ propagate_back_references() {
1047
+ this._propagate_back_references(undefined);
1048
+ }
1049
+ /**
1050
+ * propagate_back_references for a node a NodeSet2 file declared: its references may be held
1051
+ * by their target as well, so each is looked up there before a back reference is built
1052
+ */
1053
+ propagate_back_references_declared_from_both_ends() {
1054
+ this._propagate_back_references((0, reference_impl_js_1.nodeIdKey)(this.nodeId));
1055
+ }
1056
+ /** one reference of a node a NodeSet2 file declared, see propagate_back_references_declared_from_both_ends */
1057
+ propagate_back_reference_declared_from_both_ends(reference) {
1058
+ if (this.addressSpace.suspendBackReference) {
1059
+ return;
1060
+ }
1061
+ _propagate_ref.call(this, this.addressSpace, reference, (0, reference_impl_js_1.nodeIdKey)(this.nodeId));
1062
+ }
1063
+ _propagate_back_references(sourceNodeKey) {
1064
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
1065
+ if (this.addressSpace.suspendBackReference) {
1066
+ // this indicates that the base node is constructed from an xml definition
1067
+ // propagate_back_references will be called later once the file has been completely processed.
1068
+ return;
1069
+ }
1070
+ const addressSpace = this.addressSpace;
1071
+ for (const reference of _private._referenceIdx.values()) {
1072
+ _propagate_ref.call(this, addressSpace, reference, sourceNodeKey);
1073
+ }
1074
+ }
1075
+ /**
1076
+ * the dispose method should be called when the node is no longer used, to release
1077
+ * back pointer to the address space and clear caches.
1078
+ *
1079
+ * @private
1080
+ */
1081
+ dispose() {
1082
+ this.emit("dispose");
1083
+ this.removeAllListeners();
1084
+ this._clear_caches();
1085
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
1086
+ for (const ref of _private._back_referenceIdx.values()) {
1087
+ ref.dispose();
1088
+ }
1089
+ for (const ref of _private._referenceIdx.values()) {
1090
+ ref.dispose();
1091
+ }
1092
+ (0, base_node_private_js_1.BaseNode_removePrivate)(this);
1093
+ }
1094
+ isDisposed() {
1095
+ return !this.addressSpacePrivate;
1096
+ }
1097
+ // c8 ignore next
1098
+ dumpXML(xmlWriter) {
1099
+ console.error(" This ", node_opcua_data_model_1.NodeClass[this.nodeClass]);
1100
+ (0, node_opcua_assert_1.assert)(false, "BaseNode#dumpXML NOT IMPLEMENTED !");
1101
+ (0, node_opcua_assert_1.assert)(xmlWriter);
1102
+ }
1103
+ /**
1104
+ * Undo the effect of propagate_back_references
1105
+ */
1106
+ unpropagate_back_references() {
1107
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
1108
+ const addressSpace = this.addressSpace;
1109
+ for (const reference of _private._referenceIdx.values()) {
1110
+ // filter out non Hierarchical References
1111
+ const referenceType = resolveReferenceType(addressSpace, reference);
1112
+ // c8 ignore next
1113
+ if (!referenceType) {
1114
+ console.error(chalk_1.default.red(" ERROR"), " cannot find reference ", reference.referenceType, reference.toString());
1115
+ }
1116
+ const related_node = resolveReferenceNode(addressSpace, reference);
1117
+ if (related_node) {
1118
+ (0, node_opcua_assert_1.assert)(reference.nodeId.toString() !== this.nodeId.toString());
1119
+ base_node_private_js_1.BaseNode_remove_backward_reference.call(related_node, new reference_impl_js_1.ReferenceImpl({
1120
+ isForward: !reference.isForward,
1121
+ nodeId: this.nodeId,
1122
+ referenceType: reference.referenceType
1123
+ }));
1124
+ } // else addressSpace may be incomplete
1125
+ }
1126
+ }
1127
+ installPostInstallFunc(f) {
1128
+ if (!f) {
1129
+ // nothing to do
1130
+ return;
1131
+ }
1132
+ function chain(f1, f2) {
1133
+ return function chainingFunc(...args) {
1134
+ if (f1) {
1135
+ f1.apply(this, args);
1136
+ }
1137
+ if (f2) {
1138
+ f2.apply(this, args);
1139
+ }
1140
+ };
1141
+ }
1142
+ this._postInstantiateFunc = chain.call(this, this._postInstantiateFunc, f);
1143
+ }
1144
+ _on_child_added(childNode) {
1145
+ // this._clear_caches();
1146
+ // return;
1147
+ const cache = (0, base_node_private_js_1.BaseNode_getCache)(this);
1148
+ const tmpV = cache._versionNode;
1149
+ const tmpC = cache._children;
1150
+ this._clear_caches();
1151
+ const newCache = (0, base_node_private_js_1.BaseNode_getCache)(this);
1152
+ newCache._versionNode = tmpV;
1153
+ newCache._children = tmpC;
1154
+ if (newCache._children) {
1155
+ newCache._children?.push(childNode);
1156
+ }
1157
+ }
1158
+ _on_child_removed(_obj) {
1159
+ // obj; // unused;
1160
+ this._clear_caches();
1161
+ }
1162
+ /**
1163
+ * @private
1164
+ * @param reference
1165
+ */
1166
+ _add_backward_reference(reference) {
1167
+ base_node_private_js_1.BaseNode_add_backward_reference.call(this, reference);
1168
+ }
1169
+ _coerceReferenceType(referenceType) {
1170
+ let result = null;
1171
+ if (typeof referenceType === "string") {
1172
+ result = this.addressSpace.findReferenceType(referenceType);
1173
+ /* c8 ignore next */
1174
+ if (!result) {
1175
+ errorLog("referenceType ", referenceType, " cannot be found");
1176
+ throw new Error(`Cannot coerce reference with name ${referenceType}`);
1177
+ }
1178
+ }
1179
+ else if (referenceType instanceof node_opcua_nodeid_1.NodeId) {
1180
+ result = this.addressSpace.findNode(referenceType);
1181
+ if (!result) {
1182
+ return null;
1183
+ }
1184
+ }
1185
+ else {
1186
+ result = referenceType;
1187
+ }
1188
+ (0, node_opcua_assert_1.assert)(result, "reference must exists");
1189
+ (0, node_opcua_assert_1.assert)(result.nodeClass === node_opcua_data_model_1.NodeClass.ReferenceType);
1190
+ return result;
1191
+ }
1192
+ __addReference(referenceOpts, clearCaches = true) {
1193
+ const addressSpace = this.addressSpace;
1194
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
1195
+ (0, node_opcua_assert_1.assert)(Object.hasOwn(referenceOpts, "referenceType"));
1196
+ // xx isForward is optional : assert(Object.prototype.hasOwnProperty.call(reference,"isForward"));
1197
+ (0, node_opcua_assert_1.assert)(Object.hasOwn(referenceOpts, "nodeId"));
1198
+ const reference = addressSpace.normalizeReferenceType(referenceOpts);
1199
+ (0, node_opcua_assert_1.assert)(reference instanceof reference_impl_js_1.ReferenceImpl);
1200
+ const h = reference.key(addressSpace);
1201
+ (0, node_opcua_assert_1.assert)(!_private._back_referenceIdx.has(h), "reference exists already in _back_references");
1202
+ (0, node_opcua_assert_1.assert)(!_private._referenceIdx.has(h), "reference exists already in _references");
1203
+ _private._referenceIdx.set(h, reference);
1204
+ (0, base_node_private_js_1._handle_HierarchicalReference)(this, reference);
1205
+ if (clearCaches) {
1206
+ this._clear_caches();
1207
+ (0, base_node_private_js_1.noteReferenceTypeChange)(this, reference);
1208
+ }
1209
+ return reference;
1210
+ }
1211
+ /** kept as given; the LocalizedText objects are built on first read (most nodes are never asked) */
1212
+ _setDisplayName(displayName) {
1213
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
1214
+ _private._displayNameRaw = displayName;
1215
+ _private._displayName = undefined;
1216
+ }
1217
+ _setDescription(description) {
1218
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
1219
+ _private._descriptionRaw = description;
1220
+ _private._description = undefined;
1221
+ }
1222
+ _notifyAttributeChange(attributeId) {
1223
+ const event_name = BaseNodeImpl.makeAttributeEventName(attributeId);
1224
+ this.emit(event_name, this.readAttribute(session_context_js_1.SessionContext.defaultContext, attributeId));
1225
+ }
1226
+ _clear_caches() {
1227
+ (0, base_node_private_js_1.BaseNode_clearCache)(this);
1228
+ }
1229
+ canUserWriteAttribute(context, attributeId) {
1230
+ // the Client is allowed to write to Attributes other than the Value,
1231
+ // Historizing or RolePermissions Attribute
1232
+ if (!context)
1233
+ return true;
1234
+ if (attributeId === node_opcua_data_model_1.AttributeIds.Historizing) {
1235
+ return context.checkPermission(this, node_opcua_types_1.PermissionType.WriteHistorizing);
1236
+ }
1237
+ if (attributeId === node_opcua_data_model_1.AttributeIds.RolePermissions) {
1238
+ return context.checkPermission(this, node_opcua_types_1.PermissionType.WriteRolePermissions);
1239
+ }
1240
+ if (attributeId === node_opcua_data_model_1.AttributeIds.Value) {
1241
+ return context.checkPermission(this, node_opcua_types_1.PermissionType.Write);
1242
+ }
1243
+ return context.checkPermission(this, node_opcua_types_1.PermissionType.WriteAttribute);
1244
+ }
1245
+ _readAccessRestrictions(_context) {
1246
+ // https://reference.opcfoundation.org/v104/Core/docs/Part3/8.56/
1247
+ if (this.accessRestrictions === undefined) {
1248
+ return new node_opcua_data_value_1.DataValue({ statusCode: node_opcua_status_code_1.StatusCodes.BadAttributeIdInvalid });
1249
+ }
1250
+ return new node_opcua_data_value_1.DataValue({
1251
+ statusCode: node_opcua_status_code_1.StatusCodes.Good,
1252
+ value: {
1253
+ dataType: node_opcua_variant_1.DataType.UInt16,
1254
+ value: this.accessRestrictions
1255
+ }
1256
+ });
1257
+ }
1258
+ _readRolePermissions(context) {
1259
+ // https://reference.opcfoundation.org/v104/Core/docs/Part3/4.8.3/
1260
+ // to do check that current user can read permission
1261
+ if (context && !context.checkPermission(this, node_opcua_types_1.PermissionType.ReadRolePermissions)) {
1262
+ return new node_opcua_data_value_1.DataValue({
1263
+ statusCode: node_opcua_status_code_1.StatusCodes.BadSecurityModeInsufficient
1264
+ });
1265
+ }
1266
+ if (this.rolePermissions === undefined) {
1267
+ // to do : If not specified, the value of DefaultUserRolePermissions Property from
1268
+ // the Namespace Metadata Object associated with the Node is used instead.
1269
+ return new node_opcua_data_value_1.DataValue({
1270
+ statusCode: node_opcua_status_code_1.StatusCodes.BadAttributeIdInvalid
1271
+ });
1272
+ }
1273
+ const rolePermissions = this.rolePermissions.map(({ roleId, permissions }) => {
1274
+ return new node_opcua_types_1.RolePermissionType({
1275
+ roleId: toRoleNodeId(roleId),
1276
+ permissions
1277
+ });
1278
+ });
1279
+ return new node_opcua_data_value_1.DataValue({
1280
+ statusCode: node_opcua_status_code_1.StatusCodes.Good,
1281
+ value: {
1282
+ dataType: node_opcua_variant_1.DataType.ExtensionObject,
1283
+ arrayType: node_opcua_variant_1.VariantArrayType.Array,
1284
+ value: rolePermissions
1285
+ }
1286
+ });
1287
+ }
1288
+ _readUserRolePermissions(context) {
1289
+ const allUserCanSeeTheirOwnRolePermissions = true;
1290
+ if (!allUserCanSeeTheirOwnRolePermissions) {
1291
+ // to do check that current user can read permission
1292
+ if (context && !context.checkPermission(this, node_opcua_types_1.PermissionType.ReadRolePermissions)) {
1293
+ return new node_opcua_data_value_1.DataValue({
1294
+ statusCode: node_opcua_status_code_1.StatusCodes.BadSecurityModeInsufficient
1295
+ });
1296
+ }
1297
+ }
1298
+ if (this.rolePermissions === undefined) {
1299
+ // to do : If not specified, the value of DefaultUserRolePermissions Property from
1300
+ // the Namespace Metadata Object associated with the Node is used instead.
1301
+ return new node_opcua_data_value_1.DataValue({
1302
+ statusCode: node_opcua_status_code_1.StatusCodes.BadAttributeIdInvalid
1303
+ });
1304
+ }
1305
+ const context1 = context === null ? session_context_js_1.SessionContext.defaultContext : context;
1306
+ // for the time being get user Permission
1307
+ const rolePermissions = this.rolePermissions
1308
+ .map(({ roleId, permissions }) => {
1309
+ return new node_opcua_types_1.RolePermissionType({
1310
+ roleId: toRoleNodeId(roleId),
1311
+ permissions
1312
+ });
1313
+ })
1314
+ .filter(({ roleId }) => context1.currentUserHasRole(roleId));
1315
+ return new node_opcua_data_value_1.DataValue({
1316
+ statusCode: node_opcua_status_code_1.StatusCodes.Good,
1317
+ value: {
1318
+ dataType: node_opcua_variant_1.DataType.ExtensionObject,
1319
+ arrayType: node_opcua_variant_1.VariantArrayType.Array,
1320
+ value: rolePermissions
1321
+ }
1322
+ });
1323
+ }
1324
+ /**
1325
+ *
1326
+ * @param rolePermissions
1327
+ */
1328
+ setRolePermissions(rolePermissions) {
1329
+ this._rolePermissions = (0, role_permissions_js_1.coerceRolePermissions)(rolePermissions);
1330
+ }
1331
+ getRolePermissions(inherited) {
1332
+ if (this.rolePermissions === undefined && inherited) {
1333
+ return this.namespace.getDefaultRolePermissions();
1334
+ }
1335
+ return this._rolePermissions || null;
1336
+ }
1337
+ get rolePermissions() {
1338
+ return this._rolePermissions || undefined;
1339
+ }
1340
+ setAccessRestrictions(accessRestrictions) {
1341
+ this._accessRestrictions = accessRestrictions;
1342
+ }
1343
+ get accessRestrictions() {
1344
+ return this._accessRestrictions;
1345
+ }
1346
+ getAccessRestrictions(inherited) {
1347
+ if (this._accessRestrictions === undefined && inherited) {
1348
+ return this.namespace.getDefaultAccessRestrictions();
1349
+ }
1350
+ return this._accessRestrictions || node_opcua_data_model_1.AccessRestrictionsFlag.None;
1351
+ }
1352
+ }
1353
+ exports.BaseNodeImpl = BaseNodeImpl;
1354
+ function toRoleNodeId(s) {
1355
+ if (typeof s === "string") {
1356
+ return (0, node_opcua_nodeid_1.resolveNodeId)(session_context_js_1.WellKnownRolesNodeId[s]);
1357
+ }
1358
+ return (0, node_opcua_nodeid_1.coerceNodeId)(s);
1359
+ }
1360
+ let displayWarning = true;
1361
+ function toString_ReferenceDescription(ref, options) {
1362
+ const addressSpace = options.addressSpace;
1363
+ const refNode = addressSpace.findNode(ref.referenceType);
1364
+ if (!refNode) {
1365
+ return `Unknown Ref : ${ref}`;
1366
+ }
1367
+ const r = new reference_impl_js_1.ReferenceImpl({
1368
+ isForward: ref.isForward,
1369
+ nodeId: ref.nodeId,
1370
+ referenceType: refNode.nodeId
1371
+ });
1372
+ const str = r.toString(options);
1373
+ r.dispose();
1374
+ return str;
1375
+ }
1376
+ function _setup_parent_item(referencesMap) {
1377
+ let references = referencesMap.values();
1378
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(this);
1379
+ (0, node_opcua_assert_1.assert)(!_private._parent, "_setup_parent_item has been already called");
1380
+ const addressSpace = this.addressSpace;
1381
+ if (referencesMap.size > 0) {
1382
+ references = this.findReferencesEx("Aggregates", node_opcua_data_model_1.BrowseDirection.Inverse);
1383
+ if (references.length >= 1) {
1384
+ // c8 ignore next
1385
+ if (references.length > 1) {
1386
+ if (displayWarning) {
1387
+ const options = { addressSpace };
1388
+ warningLog(" More than one Aggregates reference have been found for parent of object");
1389
+ warningLog(" object node id:", this.nodeId.toString(), chalk_1.default.cyan(this.browseName.toString()));
1390
+ warningLog(" browseResults:");
1391
+ warningLog(references.map((f) => toString_ReferenceDescription(f, options)).join("\n"));
1392
+ warningLog(" first one will be used as parent");
1393
+ // xx assert(browseResults.length === 1);
1394
+ displayWarning = false;
1395
+ }
1396
+ }
1397
+ return reference_impl_js_1.ReferenceImpl.resolveReferenceNode(addressSpace, references[0]);
1398
+ }
1399
+ }
1400
+ return null;
1401
+ }
1402
+ function toObject(addressSpace, reference) {
1403
+ const obj = resolveReferenceNode(addressSpace, reference);
1404
+ // c8 ignore next
1405
+ if (doDebug && !obj) {
1406
+ // c8 ignore next
1407
+ doDebug &&
1408
+ debugLog(chalk_1.default.red(" Warning : object with nodeId ") +
1409
+ chalk_1.default.cyan(reference.nodeId.toString()) +
1410
+ chalk_1.default.red(" cannot be found in the address space !"));
1411
+ }
1412
+ return obj;
1413
+ }
1414
+ function _asObject(references, addressSpace) {
1415
+ return references.map((a) => toObject(addressSpace, a)).filter((o) => !!o);
1416
+ }
1417
+ function _select_by_browse_name(map, browseName, namespaceIndex) {
1418
+ if ((namespaceIndex === null || namespaceIndex === undefined) && typeof browseName === "string") {
1419
+ // no namespace specified and needed
1420
+ const result = map.get(browseName);
1421
+ if (result) {
1422
+ if (Array.isArray(result)) {
1423
+ return result;
1424
+ }
1425
+ return [result];
1426
+ }
1427
+ }
1428
+ else {
1429
+ const _browseName = (0, node_opcua_data_model_1.coerceQualifiedName)(typeof browseName === "string" ? { name: browseName, namespaceIndex } : browseName);
1430
+ // c8 ignore next
1431
+ if (!_browseName) {
1432
+ return [];
1433
+ }
1434
+ const result = map.get(_browseName.name || "");
1435
+ if (result) {
1436
+ if (Array.isArray(result)) {
1437
+ // only select the one with the matching namepsace index
1438
+ return result.filter((t) => t.node.browseName.namespaceIndex === _browseName.namespaceIndex);
1439
+ }
1440
+ else {
1441
+ if (result.node.browseName.namespaceIndex === _browseName.namespaceIndex) {
1442
+ return [result];
1443
+ }
1444
+ return [];
1445
+ }
1446
+ }
1447
+ }
1448
+ return [];
1449
+ }
1450
+ let displayWarningReferencePointingToItSelf = true;
1451
+ function _propagate_ref(addressSpace, reference, sourceNodeKey) {
1452
+ // filter out non Hierarchical References
1453
+ const referenceType = reference_impl_js_1.ReferenceImpl.resolveReferenceType(addressSpace, reference);
1454
+ // c8 ignore next
1455
+ if (!referenceType) {
1456
+ errorLog(chalk_1.default.red(" ERROR"), " cannot find reference ", reference.referenceType, reference.toString());
1457
+ }
1458
+ // ------------------------------- Filter out back reference when reference type
1459
+ // is HasTypeDefinition, HasModellingRule, etc ...
1460
+ //
1461
+ // var referenceNode = Reference.resolveReferenceNode(addressSpace,reference);
1462
+ // ignore propagation on back reference to UAVariableType or UAObject Type reference
1463
+ // because there are too many !
1464
+ if (!referenceType || (0, reference_impl_js_1.isMassivelyUsedReferenceType)(referenceType.nodeId)) {
1465
+ return;
1466
+ }
1467
+ const related_node = resolveReferenceNode(addressSpace, reference);
1468
+ if (related_node) {
1469
+ // verify that reference doesn't point to object it this (see mantis 3099)
1470
+ if ((0, node_opcua_nodeid_1.sameNodeId)(reference.nodeId, this.nodeId)) {
1471
+ // c8 ignore next
1472
+ if (displayWarningReferencePointingToItSelf) {
1473
+ // this could happen with method
1474
+ warningLog(" Warning: a Reference is pointing to source ", this.nodeId.toString(), this.browseName.toString(), ". Is this intentional ?");
1475
+ displayWarningReferencePointingToItSelf = false;
1476
+ }
1477
+ }
1478
+ // NodeSet2 files declare most references from both ends, so the related node usually
1479
+ // holds the inverse as a forward reference of its own already: nothing to add, and no
1480
+ // ReferenceImpl to build for BaseNode_add_backward_reference to throw away. A node
1481
+ // created at runtime rarely is, and BaseNode_add_backward_reference copes when it is.
1482
+ if (sourceNodeKey !== undefined) {
1483
+ const inverse = (0, base_node_private_js_1.BaseNode_getPrivate)(related_node)._referenceIdx.get(reference.inverseKey(addressSpace, sourceNodeKey));
1484
+ if (inverse) {
1485
+ if (!inverse.node) {
1486
+ inverse.node = this;
1487
+ }
1488
+ return;
1489
+ }
1490
+ }
1491
+ related_node._add_backward_reference(new reference_impl_js_1.ReferenceImpl({
1492
+ _referenceType: getReferenceType(reference),
1493
+ isForward: !reference.isForward,
1494
+ node: this,
1495
+ nodeId: this.nodeId,
1496
+ referenceType: reference.referenceType
1497
+ }));
1498
+ } // else addressSpace may be incomplete and under construction (while loading a nodeset.xml file for instance)
1499
+ }
1500
+ /** resolve what can be; true when a reference still has no target */
1501
+ function resolveScannedReferences(addressSpace, references) {
1502
+ let unresolved = false;
1503
+ for (const ref of references) {
1504
+ if (!ref.node && !resolveReferenceNode(addressSpace, ref)) {
1505
+ unresolved = true;
1506
+ }
1507
+ }
1508
+ return unresolved;
1509
+ }
1510
+ function nodeid_is_nothing(nodeid) {
1511
+ return nodeid.value === 0 && nodeid.namespace === 0;
1512
+ }
1513
+ /**
1514
+
1515
+ * @param addressSpace {IAddressSpace}
1516
+ * @param referenceTypeId {String|NodeId|null} : the referenceType either as a string or a nodeId
1517
+ * @return {NodeId}
1518
+ */
1519
+ function normalize_referenceTypeId(addressSpace, referenceTypeId) {
1520
+ if (!referenceTypeId) {
1521
+ return (0, node_opcua_nodeid_1.makeNodeId)(0);
1522
+ }
1523
+ if (typeof referenceTypeId === "string") {
1524
+ const ref = addressSpace.findReferenceType(referenceTypeId);
1525
+ if (ref) {
1526
+ return ref.nodeId;
1527
+ }
1528
+ }
1529
+ let nodeId;
1530
+ try {
1531
+ nodeId = addressSpace.resolveNodeId(referenceTypeId);
1532
+ }
1533
+ catch (err) {
1534
+ errorLog("cannot normalize_referenceTypeId", referenceTypeId);
1535
+ throw err;
1536
+ }
1537
+ (0, node_opcua_assert_1.assert)(nodeId);
1538
+ return nodeId;
1539
+ }
1540
+ const resolveReferenceNode = reference_impl_js_1.ReferenceImpl.resolveReferenceNode;
1541
+ const resolveReferenceType = reference_impl_js_1.ReferenceImpl.resolveReferenceType;
1542
+ function _filter_by_referenceType(browseDescription, references, referenceTypeId) {
1543
+ // make sure we have a valid referenceTypeId if not null
1544
+ if (!nodeid_is_nothing(referenceTypeId)) {
1545
+ (0, node_opcua_assert_1.assert)(referenceTypeId instanceof node_opcua_nodeid_1.NodeId);
1546
+ const referenceType = this.addressSpace.findNode(referenceTypeId);
1547
+ (0, node_opcua_debug_1.dumpIf)(!referenceType, referenceTypeId);
1548
+ // c8 ignore next
1549
+ if (!referenceType || referenceType.nodeClass !== node_opcua_data_model_1.NodeClass.ReferenceType) {
1550
+ throw new Error("Cannot find reference type");
1551
+ }
1552
+ if (!browseDescription.includeSubtypes && referenceType.isAbstract) {
1553
+ warningLog("filter by reference will skip all reference as referenceType is abstract and includeSubtypes is false");
1554
+ }
1555
+ references = references.filter((reference) => {
1556
+ const ref = resolveReferenceType(this.addressSpace, reference);
1557
+ // c8 ignore next
1558
+ if (!ref) {
1559
+ throw new Error(`Cannot find reference type ${reference.toString()}`);
1560
+ }
1561
+ // unknown type ... this may happen when the address space is not fully build
1562
+ (0, node_opcua_assert_1.assert)(ref.nodeClass === node_opcua_data_model_1.NodeClass.ReferenceType);
1563
+ const isSameType = (0, node_opcua_nodeid_1.sameNodeId)(ref.nodeId, referenceType.nodeId);
1564
+ if (isSameType) {
1565
+ return true;
1566
+ }
1567
+ if (browseDescription.includeSubtypes) {
1568
+ return ref.isSubtypeOf(referenceType);
1569
+ }
1570
+ else {
1571
+ return false;
1572
+ }
1573
+ });
1574
+ }
1575
+ return references;
1576
+ }
1577
+ function forwardOnly(reference) {
1578
+ return reference.isForward;
1579
+ }
1580
+ function reverseOnly(reference) {
1581
+ return !reference.isForward;
1582
+ }
1583
+ function _filter_by_direction(references, browseDirection) {
1584
+ if (browseDirection === node_opcua_data_model_1.BrowseDirection.Both) {
1585
+ return references;
1586
+ }
1587
+ if (browseDirection === node_opcua_data_model_1.BrowseDirection.Forward) {
1588
+ return references.filter(forwardOnly);
1589
+ }
1590
+ else {
1591
+ return references.filter(reverseOnly);
1592
+ }
1593
+ }
1594
+ /*
1595
+ function _filter_by_context(node: BaseNode, references: Reference[], context: SessionContext): Reference[] {
1596
+ if (!context.isBrowseAccessRestricted(node)) {
1597
+ return references;
1598
+ }
1599
+ // browse access is restricted for forward
1600
+ return [];
1601
+ }
1602
+ */
1603
+ function _filter_by_context(node, references, context) {
1604
+ const addressSpace = node.addressSpace;
1605
+ return references.filter((reference) => !context.isBrowseAccessRestricted(resolveReferenceNode(addressSpace, reference)));
1606
+ }
1607
+ function _filter_by_nodeClass(references, nodeClassMask) {
1608
+ (0, node_opcua_assert_1.assert)(Number.isFinite(nodeClassMask));
1609
+ if (nodeClassMask === 0) {
1610
+ return references;
1611
+ }
1612
+ const addressSpace = this.addressSpace;
1613
+ return references.filter((reference) => {
1614
+ const obj = resolveReferenceNode(addressSpace, reference);
1615
+ if (!obj) {
1616
+ return false;
1617
+ }
1618
+ // the NodeClass values are the NodeClassMask bits (Part 4, BrowseDescription.nodeClassMask)
1619
+ return (nodeClassMask & obj.nodeClass) !== 0;
1620
+ });
1621
+ }
1622
+ function _filter_by_userFilter(references, context) {
1623
+ const addressSpace = this.addressSpace;
1624
+ return references.filter((reference) => {
1625
+ const obj = resolveReferenceNode(addressSpace, reference);
1626
+ // c8 ignore next
1627
+ if (!obj) {
1628
+ return false;
1629
+ }
1630
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(obj);
1631
+ // c8 ignore next
1632
+ if (!_private._browseFilter) {
1633
+ throw Error("Internal error : cannot find browseFilter");
1634
+ }
1635
+ const filter1 = _private._browseFilter.call(obj, context);
1636
+ return filter1;
1637
+ });
1638
+ }
1639
+ /**
1640
+ * the child designated by `node.<accessorName>`: what the shared getters resolve, exposed for the
1641
+ * code that walks dotted paths by name (`_getCompositeKey`); works under `isFrugal` too, where no
1642
+ * own accessor is ever installed
1643
+ */
1644
+ function resolveChildAccessor(node, accessorName) {
1645
+ const _private = (0, base_node_private_js_1.BaseNode_getPrivate)(node);
1646
+ // the prototype itself, or a disposed node
1647
+ if (!_private?.__address_space) {
1648
+ return undefined;
1649
+ }
1650
+ // a dotted child is a component, a property, a subtype or an organized node; a node that is
1651
+ // only an event source or a notifier of this one is not exposed, and removing the structural
1652
+ // reference removes the child even when an event reference to it remains
1653
+ const wellKnown = wellKnownReferenceTypes(node.addressSpace);
1654
+ if (!wellKnown) {
1655
+ return undefined; // namespace 0 is still loading
1656
+ }
1657
+ const { hasChild, organizes } = wellKnown;
1658
+ return (0, child_accessors_js_1.resolveChildInIndex)((0, base_node_private_js_1._get_HierarchicalReference)(node), accessorName, (reference) => hasChild.checkHasSubtype(reference.referenceType) || organizes.checkHasSubtype(reference.referenceType));
1659
+ }
1660
+ /**
1661
+ * The accessor names under which a child of `node` can never be reached: the reserved names, the
1662
+ * members of the class of the node (attributes, methods, EventEmitter and Object members) and its
1663
+ * own fields. A child carrying one of these is reachable through `getChildByName` only.
1664
+ *
1665
+ * The generator of the typed nodeset interfaces reads this so that a generated interface names a
1666
+ * child exactly the way the runtime exposes it.
1667
+ *
1668
+ * @internal
1669
+ */
1670
+ function childAccessorNamesShadowedBy(node) {
1671
+ const names = new Set((0, child_accessors_js_1.reservedChildAccessorNames)());
1672
+ // a member of the class that resolves the child of that name itself, the way the shared
1673
+ // accessors do: BaseNode.nodeVersion is the NodeVersion property, and declared as such
1674
+ const membersExposingTheChild = new Set(["nodeVersion"]);
1675
+ for (const own of Object.getOwnPropertyNames(node)) {
1676
+ // an own accessor is a child installed by install_extra_properties, not a field
1677
+ if (!Object.getOwnPropertyDescriptor(node, own)?.get) {
1678
+ names.add(own);
1679
+ }
1680
+ }
1681
+ for (let proto = Object.getPrototypeOf(node); proto; proto = Object.getPrototypeOf(proto)) {
1682
+ // the shared child accessors sit on BaseNodeImpl.prototype and are the names the runtime
1683
+ // does expose; the same name on a subclass prototype is a real member that wins over them
1684
+ const sharedAccessorsLiveHere = proto === BaseNodeImpl.prototype;
1685
+ for (const member of Object.getOwnPropertyNames(proto)) {
1686
+ if (membersExposingTheChild.has(member) || (sharedAccessorsLiveHere && (0, child_accessors_js_1.hasSharedChildAccessor)(member))) {
1687
+ continue;
1688
+ }
1689
+ names.add(member);
1690
+ }
1691
+ }
1692
+ return names;
1693
+ }
1694
+ function resolveSharedChildAccessor(node, accessorName) {
1695
+ return resolveChildAccessor(node, accessorName);
1696
+ }
1697
+ /**
1698
+ * Define the shared getter of every browse name seen since the last call: the nodeset loader calls
1699
+ * it once a load is complete, so that the prototype changes in one batch rather than once per
1700
+ * new name in the middle of node creation.
1701
+ */
1702
+ function flushSharedChildAccessors() {
1703
+ return (0, child_accessors_js_1.defineSharedChildAccessors)(BaseNodeImpl.prototype, resolveSharedChildAccessor);
1704
+ }
1705
+ /**
1706
+ * Give browse names created at runtime a shared accessor, for an application that builds its
1707
+ * model through the namespace API and wants `parent.<child>` without an accessor on every parent.
1708
+ */
1709
+ function defineSharedChildAccessors(browseNames) {
1710
+ for (const browseName of browseNames) {
1711
+ (0, child_accessors_js_1.registerChildName)(browseName, true);
1712
+ }
1713
+ flushSharedChildAccessors();
1714
+ }
1715
+ /**
1716
+ * Expose `child` as `parentObj.<accessorName>` through an own accessor, unless the name is taken
1717
+ * already: by a shared accessor (which resolves it anyway), by an attribute, a method or a field
1718
+ * of the parent, or by an earlier child of the same name (first installed wins).
1719
+ *
1720
+ * This is the runtime fallback of child_accessors.ts, for names no loaded nodeset declared.
1721
+ */
1722
+ /** the child an own accessor was installed for, kept on the getter itself */
1723
+ const installedFor = Symbol("installedFor");
1724
+ function install_child_as_object_property(parentObj, child) {
1725
+ // the parent may be unresolvable while a nodeset is still loading
1726
+ if (!parentObj || !child) {
1727
+ return;
1728
+ }
1729
+ const name = (0, base_node_private_js_1.BaseNode_getPrivate)(child)?._accessorName;
1730
+ if (!name || (0, child_accessors_js_1.isReservedChildAccessorName)(name) || (0, child_accessors_js_1.hasSharedChildAccessor)(name) || name in parentObj) {
1731
+ return;
1732
+ }
1733
+ doDebug && debugLog(`Installing property ${name}`, " on ", parentObj.browseName.toString());
1734
+ const get = () =>
1735
+ // an own property wins over the prototype: should the name get a shared getter later
1736
+ // (a nodeset loaded afterwards declares it), this accessor answers what the getter
1737
+ // would, through the child index, rather than the child it was installed for
1738
+ (0, child_accessors_js_1.hasSharedChildAccessor)(name) ? resolveChildAccessor(parentObj, name) : child;
1739
+ get[installedFor] = child;
1740
+ Object.defineProperty(parentObj, name, {
1741
+ configurable: true, // so that uninstall_child_object_property can remove it
1742
+ enumerable: true,
1743
+ get
1744
+ });
1745
+ }
1746
+ function uninstall_child_object_property(parentObj, child) {
1747
+ const name = (0, base_node_private_js_1.BaseNode_getPrivate)(child)?._accessorName;
1748
+ if (!name) {
1749
+ return;
1750
+ }
1751
+ // only an accessor installed above goes, whether or not the name has a shared getter by now;
1752
+ // a field or a method of the same name stays, and so does an accessor for another child of
1753
+ // the same name. The getter is asked for the child it was installed for, not what it resolves
1754
+ const descriptor = Object.getOwnPropertyDescriptor(parentObj, name);
1755
+ if (!descriptor?.get || !descriptor.configurable || descriptor.get[installedFor] !== child) {
1756
+ return;
1757
+ }
1758
+ delete parentObj[name];
1759
+ }
1760
+ function getReferenceType(reference) {
1761
+ const r = reference._referenceType;
1762
+ // c8 ignore next
1763
+ if (!r) {
1764
+ throw new Error("Internal error : cannot find referenceType");
1765
+ }
1766
+ return r;
1767
+ }
1768
+ //# sourceMappingURL=base_node_impl.js.map