node-opcua-address-space 2.56.2 → 2.60.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 (237) hide show
  1. package/LICENSE +20 -20
  2. package/dist/source/address_space_ts.d.ts +0 -2
  3. package/dist/source/helpers/argument_list.js +12 -1
  4. package/dist/source/helpers/argument_list.js.map +1 -1
  5. package/dist/source/loader/load_nodeset2.js +76 -67
  6. package/dist/source/loader/load_nodeset2.js.map +1 -1
  7. package/dist/source/session_context.js +2 -2
  8. package/dist/source/session_context.js.map +1 -1
  9. package/dist/source/set_namespace_meta_data.js +1 -1
  10. package/dist/src/address_space.d.ts +2 -3
  11. package/dist/src/address_space.js +9 -6
  12. package/dist/src/address_space.js.map +1 -1
  13. package/dist/src/address_space_private.d.ts +2 -3
  14. package/dist/src/alarms_and_conditions/condition_snapshot.js +3 -3
  15. package/dist/src/alarms_and_conditions/condition_snapshot.js.map +1 -1
  16. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js +2 -1
  17. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.js.map +1 -1
  18. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js +1 -1
  19. package/dist/src/alarms_and_conditions/ua_alarm_condition_impl.js.map +1 -1
  20. package/dist/src/alarms_and_conditions/ua_condition_impl.js +8 -6
  21. package/dist/src/alarms_and_conditions/ua_condition_impl.js.map +1 -1
  22. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js +1 -1
  23. package/dist/src/alarms_and_conditions/ua_off_normal_alarm_impl.js.map +1 -1
  24. package/dist/src/base_node_private.js +2 -2
  25. package/dist/src/base_node_private.js.map +1 -1
  26. package/dist/src/event_data.js +1 -1
  27. package/dist/src/event_data.js.map +1 -1
  28. package/dist/src/namespace_impl.d.ts +2 -2
  29. package/dist/src/namespace_impl.js +9 -9
  30. package/dist/src/namespace_impl.js.map +1 -1
  31. package/dist/src/nodeset_tools/nodeset_to_xml.js +16 -10
  32. package/dist/src/nodeset_tools/nodeset_to_xml.js.map +1 -1
  33. package/dist/src/nodeset_tools/typedictionary_to_xml.js +17 -10
  34. package/dist/src/nodeset_tools/typedictionary_to_xml.js.map +1 -1
  35. package/dist/src/reference_impl.js +1 -1
  36. package/dist/src/reference_impl.js.map +1 -1
  37. package/dist/src/state_machine/ua_shelving_state_machine_ex.js +20 -13
  38. package/dist/src/state_machine/ua_shelving_state_machine_ex.js.map +1 -1
  39. package/dist/src/ua_data_type_impl.d.ts +15 -5
  40. package/dist/src/ua_data_type_impl.js +129 -51
  41. package/dist/src/ua_data_type_impl.js.map +1 -1
  42. package/dist/src/ua_method_impl.d.ts +3 -2
  43. package/dist/src/ua_method_impl.js +5 -0
  44. package/dist/src/ua_method_impl.js.map +1 -1
  45. package/dist/src/ua_variable_impl.d.ts +6 -6
  46. package/dist/src/ua_variable_impl.js +236 -188
  47. package/dist/src/ua_variable_impl.js.map +1 -1
  48. package/dist/src/ua_variable_type_impl.d.ts +3 -4
  49. package/dist/src/ua_variable_type_impl.js +13 -18
  50. package/dist/src/ua_variable_type_impl.js.map +1 -1
  51. package/distHelpers/add_event_generator_object.js.map +1 -1
  52. package/distHelpers/mock_session.js +1 -1
  53. package/distHelpers/mock_session.js.map +1 -1
  54. package/generate.js +1 -1
  55. package/nodeJS.d.ts +1 -1
  56. package/package.json +36 -36
  57. package/source/address_space_ts.ts +0 -1
  58. package/source/helpers/argument_list.ts +13 -3
  59. package/source/loader/load_nodeset2.ts +99 -79
  60. package/source/session_context.ts +1 -1
  61. package/source/set_namespace_meta_data.ts +1 -1
  62. package/source_nodejs/index.ts +1 -1
  63. package/src/address_space.ts +21 -14
  64. package/src/address_space_private.ts +3 -3
  65. package/src/alarms_and_conditions/condition_snapshot.ts +4 -4
  66. package/src/alarms_and_conditions/ua_acknowledgeable_condition_impl.ts +7 -6
  67. package/src/alarms_and_conditions/ua_alarm_condition_impl.ts +2 -2
  68. package/src/alarms_and_conditions/ua_condition_impl.ts +29 -15
  69. package/src/alarms_and_conditions/ua_off_normal_alarm_impl.ts +1 -1
  70. package/src/base_node_private.ts +6 -2
  71. package/src/event_data.ts +1 -1
  72. package/src/namespace_impl.ts +9 -9
  73. package/src/nodeset_tools/nodeset_to_xml.ts +22 -12
  74. package/src/nodeset_tools/typedictionary_to_xml.ts +17 -7
  75. package/src/reference_impl.ts +3 -3
  76. package/src/state_machine/ua_shelving_state_machine_ex.ts +32 -19
  77. package/src/ua_data_type_impl.ts +168 -61
  78. package/src/ua_method_impl.ts +11 -5
  79. package/src/ua_variable_impl.ts +290 -218
  80. package/src/ua_variable_type_impl.ts +9 -15
  81. package/testHelpers.d.ts +1 -1
  82. package/test_helpers/add_event_generator_object.ts +4 -3
  83. package/test_helpers/mock_session.ts +1 -1
  84. package/test_helpers/test_fixtures/dataType_in_separateNamespace.xml +150 -150
  85. package/test_helpers/test_fixtures/dataType_in_separateNamespace_basic.xml +57 -57
  86. package/test_helpers/test_fixtures/dataType_in_separateNamespace_mix.xml +135 -135
  87. package/test_helpers/test_fixtures/dataType_withEnumeration.xml +82 -82
  88. package/test_helpers/test_fixtures/dataType_with_isOptionSet.xml +194 -194
  89. package/test_helpers/test_fixtures/dataType_with_union.xml +1 -1
  90. package/test_helpers/test_fixtures/fixture_empty_nodeset2.xml +106 -106
  91. package/test_helpers/test_fixtures/fixture_simple_statemachine_nodeset2.xml +1312 -1303
  92. package/test_helpers/test_fixtures/fixuture_nodeset_objects_with_some_methods.xml +362 -362
  93. package/test_helpers/test_fixtures/issue_846.xml +3172 -3172
  94. package/test_helpers/test_fixtures/issue_899_variable_with_nodeid_value.xml +32 -32
  95. package/test_helpers/test_fixtures/mini.Node.Set2.xml +14 -0
  96. package/test_helpers/test_fixtures/mini.nodeset.withVariousVariables.xml +194 -194
  97. package/test_helpers/test_fixtures/minimalist_nodeset_with_models.xml +8 -8
  98. package/test_helpers/test_fixtures/minimalist_nodeset_with_models_more_complex.xml +16 -16
  99. package/test_helpers/test_fixtures/nodeset_with_analog_items.xml +45 -45
  100. package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.d.ts +0 -23
  101. package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js +0 -3
  102. package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js.map +0 -1
  103. package/dist/source/interfaces/data_access/ua_discrete_item.d.ts +0 -6
  104. package/dist/source/interfaces/data_access/ua_discrete_item.js +0 -3
  105. package/dist/source/interfaces/data_access/ua_discrete_item.js.map +0 -1
  106. package/dist/source/interfaces/data_access/ua_multistate_discrete.d.ts +0 -25
  107. package/dist/source/interfaces/data_access/ua_multistate_discrete.js +0 -3
  108. package/dist/source/interfaces/data_access/ua_multistate_discrete.js.map +0 -1
  109. package/dist/source/interfaces/data_access/ua_multistate_value_discrete.d.ts +0 -27
  110. package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js +0 -3
  111. package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js.map +0 -1
  112. package/dist/source/interfaces/data_access/ua_two_state_discrete.d.ts +0 -17
  113. package/dist/source/interfaces/data_access/ua_two_state_discrete.js +0 -3
  114. package/dist/source/interfaces/data_access/ua_two_state_discrete.js.map +0 -1
  115. package/dist/source/interfaces/data_access/ua_y_array_item.d.ts +0 -19
  116. package/dist/source/interfaces/data_access/ua_y_array_item.js +0 -3
  117. package/dist/source/interfaces/data_access/ua_y_array_item.js.map +0 -1
  118. package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.d.ts +0 -11
  119. package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js +0 -3
  120. package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js.map +0 -1
  121. package/dist/source/interfaces/state_machine/finite_state_machine.d.ts +0 -70
  122. package/dist/source/interfaces/state_machine/finite_state_machine.js +0 -3
  123. package/dist/source/interfaces/state_machine/finite_state_machine.js.map +0 -1
  124. package/dist/source/interfaces/state_machine/program_finite_state_machine.d.ts +0 -74
  125. package/dist/source/interfaces/state_machine/program_finite_state_machine.js +0 -3
  126. package/dist/source/interfaces/state_machine/program_finite_state_machine.js.map +0 -1
  127. package/dist/source/interfaces/state_machine/state_machine.d.ts +0 -342
  128. package/dist/source/interfaces/state_machine/state_machine.js +0 -3
  129. package/dist/source/interfaces/state_machine/state_machine.js.map +0 -1
  130. package/dist/source/interfaces/state_machine/ua_finite_state_variable.d.ts +0 -18
  131. package/dist/source/interfaces/state_machine/ua_finite_state_variable.js +0 -3
  132. package/dist/source/interfaces/state_machine/ua_finite_state_variable.js.map +0 -1
  133. package/dist/source/interfaces/state_machine/ua_state_variable.d.ts +0 -29
  134. package/dist/source/interfaces/state_machine/ua_state_variable.js +0 -3
  135. package/dist/source/interfaces/state_machine/ua_state_variable.js.map +0 -1
  136. package/dist/source/interfaces/state_machine/ua_two_state_variable.d.ts +0 -26
  137. package/dist/source/interfaces/state_machine/ua_two_state_variable.js +0 -3
  138. package/dist/source/interfaces/state_machine/ua_two_state_variable.js.map +0 -1
  139. package/dist/source/interfaces/subscription_diagnostics_variable.d.ts +0 -41
  140. package/dist/source/interfaces/subscription_diagnostics_variable.js +0 -3
  141. package/dist/source/interfaces/subscription_diagnostics_variable.js.map +0 -1
  142. package/dist/src/alarms_and_conditions/base_event_type.d.ts +0 -26
  143. package/dist/src/alarms_and_conditions/base_event_type.js +0 -41
  144. package/dist/src/alarms_and_conditions/base_event_type.js.map +0 -1
  145. package/dist/src/alarms_and_conditions/shelving_state_machine.d.ts +0 -22
  146. package/dist/src/alarms_and_conditions/shelving_state_machine.js +0 -241
  147. package/dist/src/alarms_and_conditions/shelving_state_machine.js.map +0 -1
  148. package/dist/src/alarms_and_conditions/trip_alarm.d.ts +0 -16
  149. package/dist/src/alarms_and_conditions/trip_alarm.js +0 -21
  150. package/dist/src/alarms_and_conditions/trip_alarm.js.map +0 -1
  151. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.d.ts +0 -54
  152. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js +0 -255
  153. package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js.map +0 -1
  154. package/dist/src/alarms_and_conditions/ua_alarm_condition_base.d.ts +0 -138
  155. package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js +0 -460
  156. package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js.map +0 -1
  157. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.d.ts +0 -35
  158. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js +0 -32
  159. package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js.map +0 -1
  160. package/dist/src/alarms_and_conditions/ua_condition_base.d.ts +0 -191
  161. package/dist/src/alarms_and_conditions/ua_condition_base.js +0 -1029
  162. package/dist/src/alarms_and_conditions/ua_condition_base.js.map +0 -1
  163. package/dist/src/alarms_and_conditions/ua_discrete_alarm.d.ts +0 -11
  164. package/dist/src/alarms_and_conditions/ua_discrete_alarm.js +0 -58
  165. package/dist/src/alarms_and_conditions/ua_discrete_alarm.js.map +0 -1
  166. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.d.ts +0 -24
  167. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js +0 -59
  168. package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js.map +0 -1
  169. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.d.ts +0 -14
  170. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js +0 -17
  171. package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js.map +0 -1
  172. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.d.ts +0 -22
  173. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js +0 -87
  174. package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js.map +0 -1
  175. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.d.ts +0 -6
  176. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js +0 -11
  177. package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js.map +0 -1
  178. package/dist/src/alarms_and_conditions/ua_limit_alarm.d.ts +0 -76
  179. package/dist/src/alarms_and_conditions/ua_limit_alarm.js +0 -237
  180. package/dist/src/alarms_and_conditions/ua_limit_alarm.js.map +0 -1
  181. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.d.ts +0 -27
  182. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js +0 -62
  183. package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js.map +0 -1
  184. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.d.ts +0 -49
  185. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js +0 -176
  186. package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js.map +0 -1
  187. package/dist/src/alarms_and_conditions/ua_off_normal_alarm.d.ts +0 -47
  188. package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js +0 -151
  189. package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js.map +0 -1
  190. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.d.ts +0 -16
  191. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js +0 -18
  192. package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js.map +0 -1
  193. package/dist/src/base_node.d.ts +0 -289
  194. package/dist/src/base_node.js +0 -1345
  195. package/dist/src/base_node.js.map +0 -1
  196. package/dist/src/data_access/ua_analog_item.d.ts +0 -13
  197. package/dist/src/data_access/ua_analog_item.js +0 -37
  198. package/dist/src/data_access/ua_analog_item.js.map +0 -1
  199. package/dist/src/data_access/ua_data_item.d.ts +0 -16
  200. package/dist/src/data_access/ua_data_item.js +0 -66
  201. package/dist/src/data_access/ua_data_item.js.map +0 -1
  202. package/dist/src/data_access/ua_multistate_discrete.d.ts +0 -24
  203. package/dist/src/data_access/ua_multistate_discrete.js +0 -132
  204. package/dist/src/data_access/ua_multistate_discrete.js.map +0 -1
  205. package/dist/src/namespace.d.ts +0 -472
  206. package/dist/src/namespace.js +0 -1751
  207. package/dist/src/namespace.js.map +0 -1
  208. package/dist/src/reference.d.ts +0 -43
  209. package/dist/src/reference.js +0 -138
  210. package/dist/src/reference.js.map +0 -1
  211. package/dist/src/session_context.d.ts +0 -4
  212. package/dist/src/session_context.js +0 -9
  213. package/dist/src/session_context.js.map +0 -1
  214. package/dist/src/ua_data_type.d.ts +0 -83
  215. package/dist/src/ua_data_type.js +0 -289
  216. package/dist/src/ua_data_type.js.map +0 -1
  217. package/dist/src/ua_method.d.ts +0 -41
  218. package/dist/src/ua_method.js +0 -202
  219. package/dist/src/ua_method.js.map +0 -1
  220. package/dist/src/ua_object.d.ts +0 -28
  221. package/dist/src/ua_object.js +0 -153
  222. package/dist/src/ua_object.js.map +0 -1
  223. package/dist/src/ua_object_type.d.ts +0 -49
  224. package/dist/src/ua_object_type.js +0 -123
  225. package/dist/src/ua_object_type.js.map +0 -1
  226. package/dist/src/ua_reference_type.d.ts +0 -42
  227. package/dist/src/ua_reference_type.js +0 -138
  228. package/dist/src/ua_reference_type.js.map +0 -1
  229. package/dist/src/ua_variable.d.ts +0 -339
  230. package/dist/src/ua_variable.js +0 -1706
  231. package/dist/src/ua_variable.js.map +0 -1
  232. package/dist/src/ua_variable_type.d.ts +0 -57
  233. package/dist/src/ua_variable_type.js +0 -530
  234. package/dist/src/ua_variable_type.js.map +0 -1
  235. package/dist/src/ua_view.d.ts +0 -16
  236. package/dist/src/ua_view.js +0 -42
  237. package/dist/src/ua_view.js.map +0 -1
@@ -1,241 +0,0 @@
1
- "use strict";
2
- /**
3
- * @module node-opcua-address-space.AlarmsAndConditions
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports._clear_timer_if_any = exports.ShelvingStateMachine = void 0;
7
- // --------------------------------------------------------------------------------------------------
8
- // ShelvingStateMachine
9
- // --------------------------------------------------------------------------------------------------
10
- const node_opcua_assert_1 = require("node-opcua-assert");
11
- const node_opcua_status_code_1 = require("node-opcua-status-code");
12
- const node_opcua_variant_1 = require("node-opcua-variant");
13
- const finite_state_machine_1 = require("../state_machine/finite_state_machine");
14
- const ua_alarm_condition_base_1 = require("./ua_alarm_condition_base");
15
- const node_opcua_debug_1 = require("node-opcua-debug");
16
- const debugLog = node_opcua_debug_1.make_debugLog(__filename);
17
- const doDebug = node_opcua_debug_1.checkDebugFlag(__filename);
18
- class ShelvingStateMachine extends finite_state_machine_1.StateMachine {
19
- static promote(object) {
20
- const shelvingState = object;
21
- finite_state_machine_1.promoteToStateMachine(shelvingState);
22
- Object.setPrototypeOf(shelvingState, ShelvingStateMachine.prototype);
23
- shelvingState._timer = null;
24
- if (shelvingState.unshelve) {
25
- shelvingState.unshelve.bindMethod(_unshelve_method);
26
- }
27
- if (shelvingState.timedShelve) {
28
- shelvingState.timedShelve.bindMethod(_timedShelve_method);
29
- }
30
- if (shelvingState.oneShotShelve) {
31
- shelvingState.oneShotShelve.bindMethod(_oneShotShelve_method);
32
- }
33
- // install unshelveTime
34
- if (shelvingState.unshelveTime) {
35
- shelvingState.unshelveTime.minimumSamplingInterval = 500;
36
- shelvingState.unshelveTime.bindVariable({
37
- get: _unShelveTimeFunc.bind(null, shelvingState)
38
- }, true);
39
- }
40
- node_opcua_assert_1.assert(shelvingState instanceof ShelvingStateMachine);
41
- return shelvingState;
42
- }
43
- }
44
- exports.ShelvingStateMachine = ShelvingStateMachine;
45
- // The Unshelve Method sets the AlarmCondition to the Unshelved state. Normally, the MethodId found
46
- // the Shelving child of the Condition instance and the NodeId of the Shelving object as the ObjectId
47
- // are passed to the Call Service. However, some Servers do not expose Condition instances in the
48
- // AddressSpace. Therefore all Servers shall also allow Clients to call the Unshelve Method by
49
- // specifying ConditionId as the ObjectId. The Method cannot be called with an ObjectId of the
50
- // ShelvedStateMachineType Node.
51
- // output => BadConditionNotShelved
52
- function _unshelve_method(inputArguments, context, callback) {
53
- node_opcua_assert_1.assert(inputArguments.length === 0);
54
- // var alarmNode = context.object.parent;
55
- // if (!(alarmNode instanceof UAAlarmConditionBase)) {
56
- // return callback(null, {statusCode: StatusCodes.BadNodeIdInvalid});
57
- // }
58
- //
59
- // if (!alarmNode.getEnabledState() ) {
60
- // return callback(null, {statusCode: StatusCodes.BadConditionDisabled});
61
- // }
62
- const shelvingState = context.object;
63
- finite_state_machine_1.promoteToStateMachine(shelvingState);
64
- if (shelvingState.getCurrentState() === "Unshelved") {
65
- return callback(null, {
66
- statusCode: node_opcua_status_code_1.StatusCodes.BadConditionNotShelved
67
- });
68
- }
69
- shelvingState.setState("Unshelved");
70
- shelvingState._unsheveldTime = new Date(); // now
71
- _clear_timer_if_any(shelvingState);
72
- node_opcua_assert_1.assert(!shelvingState._timer);
73
- return callback(null, {
74
- statusCode: node_opcua_status_code_1.StatusCodes.Good
75
- });
76
- }
77
- function _clear_timer_if_any(shelvingState) {
78
- if (shelvingState._timer) {
79
- clearTimeout(shelvingState._timer);
80
- // xx console.log("_clear_timer_if_any shelvingState = ",shelvingState._timer,shelvingState.constructor.name);
81
- shelvingState._timer = null;
82
- }
83
- }
84
- exports._clear_timer_if_any = _clear_timer_if_any;
85
- function _automatically_unshelve(shelvingState) {
86
- node_opcua_assert_1.assert(shelvingState._timer, "expecting timerId to be set");
87
- shelvingState._timer = null;
88
- if (doDebug) {
89
- debugLog("Automatically unshelving variable ", shelvingState.browseName.toString());
90
- }
91
- if (shelvingState.getCurrentState() === "Unshelved") {
92
- // just ignore !!!
93
- return;
94
- // throw new Error(StatusCodes.BadConditionNotShelved);
95
- }
96
- shelvingState.setState("Unshelved");
97
- shelvingState._unshelvedTime = new Date(); // now
98
- node_opcua_assert_1.assert(!shelvingState._timer);
99
- }
100
- function _start_timer_for_automatic_unshelve(shelvingState, duration) {
101
- if (duration < 10 || duration >= Math.pow(2, 31)) {
102
- throw new Error(" Invalid maxTimeShelved duration: " + duration + " must be [10,2**31] ");
103
- }
104
- node_opcua_assert_1.assert(!shelvingState._timer);
105
- shelvingState._sheveldTime = new Date(); // now
106
- shelvingState._duration = duration;
107
- if (doDebug) {
108
- debugLog("shelvingState._duration", shelvingState._duration);
109
- }
110
- if (duration !== ua_alarm_condition_base_1.UAAlarmConditionBase.MaxDuration) {
111
- node_opcua_assert_1.assert(!shelvingState._timer);
112
- shelvingState._timer = setTimeout(_automatically_unshelve.bind(null, shelvingState), shelvingState._duration);
113
- }
114
- }
115
- // Spec 1.03:
116
- // The TimedShelve Method sets the AlarmCondition to the TimedShelved state
117
- // (parameters are defined in Table 38 and result codes are described in Table 39).
118
- // Normally, the MethodId found in the Shelving child of the Condition instance and the NodeId of the Shelving object
119
- // as the ObjectId are passed to the Call Service. However, some Servers do not expose Condition instances in the
120
- // AddressSpace. Therefore all Servers shall also allow Clients to call the TimedShelve Method by specifying
121
- // ConditionId as the ObjectId. The Method cannot be called with an ObjectId of the ShelvedStateMachineType Node.
122
- //
123
- // Signature: TimedShelve([in] Duration ShelvingTime);
124
- //
125
- // ShelvingTime Specifies a fixed time for which the Alarm is to be shelved. The Server may refuse
126
- // the provided duration.
127
- // If a MaxTimeShelved Property exist on the Alarm than the Shelving time shall be less than or equal
128
- // to the value of this Property.
129
- // StatusCode :
130
- // BadConditionAlreadyShelved The Alarm is already in TimedShelved state and the system does not allow
131
- // a reset of the shelved timer.
132
- // BadShelvingTimeOutOfRange
133
- function _timedShelve_method(inputArguments, context, callback) {
134
- node_opcua_assert_1.assert(inputArguments.length === 1);
135
- const shelvingState = context.object;
136
- if (shelvingState.getCurrentState() !== "Unshelved") {
137
- return callback(null, {
138
- statusCode: node_opcua_status_code_1.StatusCodes.BadConditionAlreadyShelved
139
- });
140
- }
141
- // checking duration ...
142
- const alarmNode = shelvingState.parent;
143
- // istanbul ignore next
144
- if (!(alarmNode instanceof ua_alarm_condition_base_1.UAAlarmConditionBase)) {
145
- return callback(null, {
146
- statusCode: node_opcua_status_code_1.StatusCodes.BadNodeIdInvalid
147
- });
148
- }
149
- const maxTimeShelved = alarmNode.getMaxTimeShelved();
150
- node_opcua_assert_1.assert(isFinite(maxTimeShelved));
151
- node_opcua_assert_1.assert(inputArguments[0].dataType === node_opcua_variant_1.DataType.Double); // Duration
152
- node_opcua_assert_1.assert(inputArguments[0] instanceof node_opcua_variant_1.Variant);
153
- // xx console.log("inputArguments",inputArguments[0].toString());
154
- const proposedDuration = inputArguments[0].value; // as double (milliseconds)
155
- if (proposedDuration > maxTimeShelved) {
156
- return callback(null, {
157
- statusCode: node_opcua_status_code_1.StatusCodes.BadShelvingTimeOutOfRange
158
- });
159
- }
160
- if (proposedDuration < 0) {
161
- return callback(null, {
162
- statusCode: node_opcua_status_code_1.StatusCodes.BadShelvingTimeOutOfRange
163
- });
164
- }
165
- _clear_timer_if_any(shelvingState);
166
- shelvingState.setState("TimedShelved");
167
- _start_timer_for_automatic_unshelve(shelvingState, proposedDuration);
168
- return callback(null, {
169
- statusCode: node_opcua_status_code_1.StatusCodes.Good
170
- });
171
- }
172
- // Spec 1.03:
173
- // OneShotShelve Method
174
- // The OneShotShelve Method sets the AlarmCondition to the OneShotShelved state. Normally, the MethodId found in the
175
- // Shelving child of the Condition instance and the NodeId of the Shelving object as the ObjectId are passed to the
176
- // Call Service. However, some Servers do not expose Condition instances in the AddressSpace. Therefore all Servers
177
- // shall also allow Clients to call the OneShotShelve Method by specifying ConditionId as the ObjectId. The Method
178
- // cannot be called with an ObjectId of the ShelvedStateMachineType Node
179
- function _oneShotShelve_method(inputArguments, context, callback) {
180
- node_opcua_assert_1.assert(inputArguments.length === 0);
181
- const shelvingState = context.object;
182
- if (shelvingState.getCurrentState() === "OneShotShelved") {
183
- return callback(null, {
184
- statusCode: node_opcua_status_code_1.StatusCodes.BadConditionAlreadyShelved
185
- });
186
- }
187
- // checking duration ...
188
- const alarmNode = shelvingState.parent;
189
- // istanbul ignore next
190
- if (!(alarmNode instanceof ua_alarm_condition_base_1.UAAlarmConditionBase)) {
191
- return callback(null, {
192
- statusCode: node_opcua_status_code_1.StatusCodes.BadNodeIdInvalid
193
- });
194
- }
195
- const maxTimeShelved = alarmNode.getMaxTimeShelved();
196
- node_opcua_assert_1.assert(isFinite(maxTimeShelved));
197
- node_opcua_assert_1.assert(maxTimeShelved !== ua_alarm_condition_base_1.UAAlarmConditionBase.MaxDuration);
198
- // set automatic unshelving timer
199
- _clear_timer_if_any(shelvingState);
200
- shelvingState.setState("OneShotShelved");
201
- _start_timer_for_automatic_unshelve(shelvingState, maxTimeShelved);
202
- return callback(null, {
203
- statusCode: node_opcua_status_code_1.StatusCodes.Good
204
- });
205
- }
206
- // from spec 1.03 :
207
- // * UnshelveTime specifies the remaining time in milliseconds until the Alarm automatically
208
- // transitions into the Un-shelved state.
209
- // * For the TimedShelved state this time is initialised with the ShelvingTime argument of the
210
- // TimedShelve Method call.
211
- // * For the OneShotShelved state the UnshelveTime will be a constant set to the maximum Duration
212
- // except if a MaxTimeShelved Property is provided.
213
- function _unShelveTimeFunc(shelvingState) {
214
- if (shelvingState.getCurrentState() === "Unshelved") {
215
- return new node_opcua_variant_1.Variant({
216
- dataType: node_opcua_variant_1.DataType.StatusCode,
217
- value: node_opcua_status_code_1.StatusCodes.BadConditionNotShelved
218
- });
219
- }
220
- if (!shelvingState._sheveldTime) {
221
- return new node_opcua_variant_1.Variant({
222
- dataType: node_opcua_variant_1.DataType.StatusCode,
223
- value: node_opcua_status_code_1.StatusCodes.BadConditionNotShelved
224
- });
225
- }
226
- if (shelvingState.getCurrentState() === "OneShotShelved" && shelvingState._duration === ua_alarm_condition_base_1.UAAlarmConditionBase.MaxDuration) {
227
- return new node_opcua_variant_1.Variant({
228
- dataType: node_opcua_variant_1.DataType.Double,
229
- value: ua_alarm_condition_base_1.UAAlarmConditionBase.MaxDuration
230
- });
231
- }
232
- const now = new Date();
233
- let timeToAutomaticUnshelvedState = shelvingState._duration - (now.getTime() - shelvingState._sheveldTime.getTime());
234
- // timeToAutomaticUnshelvedState should always be greater than (or equal) zero
235
- timeToAutomaticUnshelvedState = Math.max(timeToAutomaticUnshelvedState, 0);
236
- return new node_opcua_variant_1.Variant({
237
- dataType: node_opcua_variant_1.DataType.Double,
238
- value: timeToAutomaticUnshelvedState
239
- });
240
- }
241
- //# sourceMappingURL=shelving_state_machine.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shelving_state_machine.js","sourceRoot":"","sources":["../../../src/alarms_and_conditions/shelving_state_machine.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,qGAAqG;AACrG,uBAAuB;AACvB,qGAAqG;AAErG,yDAA2C;AAC3C,mEAAqD;AACrD,2DAAoE;AAGpE,gFAA4F;AAG5F,uEAAiE;AAEjE,uDAAiE;AACjE,MAAM,QAAQ,GAAG,gCAAa,CAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,OAAO,GAAG,iCAAc,CAAC,UAAU,CAAC,CAAC;AAa3C,MAAa,oBAAqB,SAAQ,mCAAY;IAC3C,MAAM,CAAC,OAAO,CAAC,MAAgB;QAClC,MAAM,aAAa,GAAG,MAA8B,CAAC;QACrD,4CAAqB,CAAC,aAAa,CAAC,CAAC;QAErC,MAAM,CAAC,cAAc,CAAC,aAAa,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;QACrE,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC;QAE5B,IAAI,aAAa,CAAC,QAAQ,EAAE;YACxB,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;SACvD;QACD,IAAI,aAAa,CAAC,WAAW,EAAE;YAC3B,aAAa,CAAC,WAAW,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;SAC7D;QACD,IAAI,aAAa,CAAC,aAAa,EAAE;YAC7B,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;SACjE;QACD,uBAAuB;QACvB,IAAI,aAAa,CAAC,YAAY,EAAE;YAC5B,aAAa,CAAC,YAAY,CAAC,uBAAuB,GAAG,GAAG,CAAC;YACzD,aAAa,CAAC,YAAY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C1C,CAAC,CAAC;KACN;IACD,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IAEvB,IAAI,6BAA6B,GAAG,aAAa,CAAC,SAAS,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC;IAErH,8EAA8E;IAC9E,6BAA6B,GAAG,IAAI,CAAC,GAAG,CAAC,6BAA6B,EAAE,CAAC,CAAC,CAAC;IAC3E,OAAO,IAAI,4BAAO,CAAC;QACf,QAAQ,EAAE,6BAAQ,CAAC,MAAM;QACzB,KAAK,EAAE,6BAA6B;KACvC,CAAC,CAAC;AACP,CAAC"}
@@ -1,16 +0,0 @@
1
- /**
2
- * @module node-opcua-address-space.AlarmsAndConditions
3
- */
4
- import { UAOffNormalAlarm } from "./ua_off_normal_alarm";
5
- /**
6
- * The TripAlarmType is a specialization of the OffNormalAlarmType intended to represent an equipment trip Condition.
7
- * The Alarm becomes active when the monitored piece of equipment experiences some abnormal fault such as a motor
8
- * shutting down due to an overload Condition. This Type is mainly used for categorization.
9
- *
10
- * @class UATripAlarm
11
- * @extends UAOffNormalAlarm
12
- * @constructor
13
- *
14
- */
15
- export declare class UATripAlarm extends UAOffNormalAlarm {
16
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UATripAlarm = void 0;
4
- /**
5
- * @module node-opcua-address-space.AlarmsAndConditions
6
- */
7
- const ua_off_normal_alarm_1 = require("./ua_off_normal_alarm");
8
- /**
9
- * The TripAlarmType is a specialization of the OffNormalAlarmType intended to represent an equipment trip Condition.
10
- * The Alarm becomes active when the monitored piece of equipment experiences some abnormal fault such as a motor
11
- * shutting down due to an overload Condition. This Type is mainly used for categorization.
12
- *
13
- * @class UATripAlarm
14
- * @extends UAOffNormalAlarm
15
- * @constructor
16
- *
17
- */
18
- class UATripAlarm extends ua_off_normal_alarm_1.UAOffNormalAlarm {
19
- }
20
- exports.UATripAlarm = UATripAlarm;
21
- //# sourceMappingURL=trip_alarm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trip_alarm.js","sourceRoot":"","sources":["../../../src/alarms_and_conditions/trip_alarm.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,+DAAyD;AACzD;;;;;;;;;GASG;AACH,MAAa,WAAY,SAAQ,sCAAgB;CAAG;AAApD,kCAAoD"}
@@ -1,54 +0,0 @@
1
- /// <reference types="node" />
2
- import { LocalizedText, LocalizedTextLike } from "node-opcua-data-model";
3
- import { NodeId } from "node-opcua-nodeid";
4
- import { Namespace, UAEventType } from "../../source";
5
- import { AddressSpacePrivate } from "../address_space_private";
6
- import { UAMethod } from "../ua_method";
7
- import { UATwoStateVariable } from "../state_machine/ua_two_state_variable";
8
- import { ConditionSnapshot } from "./condition_snapshot";
9
- import { UAConditionBase } from "./ua_condition_base";
10
- export interface UAAcknowledgeableConditionBase extends UAConditionBase {
11
- ackedState: UATwoStateVariable;
12
- acknowledge: UAMethod;
13
- confirmedState?: UATwoStateVariable;
14
- confirm?: UAMethod;
15
- }
16
- export interface UAAcknowledgeableConditionBase extends UAConditionBase {
17
- on(eventName: string, eventHandler: (...args: any[]) => void): this;
18
- on(eventName: "acknowledged" | "confirmed", eventHandler: (eventId: Buffer | null, comment: LocalizedText, branch: ConditionSnapshot) => void): this;
19
- }
20
- /**
21
- * @class UAAcknowledgeableConditionBase
22
- * @constructor
23
- * @extends UAConditionBase
24
- */
25
- export declare class UAAcknowledgeableConditionBase extends UAConditionBase {
26
- /**
27
- */
28
- static instantiate(namespace: Namespace, conditionTypeId: UAEventType | NodeId | string, options: any, data: any): UAAcknowledgeableConditionBase;
29
- static install_method_handle_on_type(addressSpace: AddressSpacePrivate): void;
30
- _raiseAuditConditionAcknowledgeEvent(branch: ConditionSnapshot): void;
31
- _raiseAuditConditionConfirmEvent(branch: ConditionSnapshot): void;
32
- _acknowledge_branch(conditionEventId: Buffer, comment: string | LocalizedTextLike | LocalizedText, branch: ConditionSnapshot, message: string): import("node-opcua-status-code").ConstantStatusCode;
33
- /**
34
- * @method _confirm_branch
35
- * @param conditionEventId The ConditionEventId field shall contain the id of the Event that was conformed
36
- * @param comment
37
- * @param branch
38
- * @param message
39
- * @private
40
- */
41
- _confirm_branch(conditionEventId: Buffer, comment: string | LocalizedTextLike, branch: ConditionSnapshot, message: string): any;
42
- /**
43
- * @method autoConfirmBranch
44
- * @param branch
45
- * @param comment
46
- */
47
- autoConfirmBranch(branch: ConditionSnapshot, comment: LocalizedTextLike): void;
48
- /**
49
- * @method acknowledgeAndAutoConfirmBranch
50
- * @param branch {ConditionSnapshot}
51
- * @param comment {String|LocalizedText}
52
- */
53
- acknowledgeAndAutoConfirmBranch(branch: ConditionSnapshot, comment: string | LocalizedTextLike | LocalizedText): void;
54
- }
@@ -1,255 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UAAcknowledgeableConditionBase = void 0;
4
- /**
5
- * @module node-opcua-address-space.AlarmsAndConditions
6
- */
7
- const node_opcua_assert_1 = require("node-opcua-assert");
8
- const node_opcua_data_model_1 = require("node-opcua-data-model");
9
- const node_opcua_status_code_1 = require("node-opcua-status-code");
10
- const node_opcua_variant_1 = require("node-opcua-variant");
11
- const ua_two_state_variable_1 = require("../state_machine/ua_two_state_variable");
12
- const condition_1 = require("./condition");
13
- const condition_snapshot_1 = require("./condition_snapshot");
14
- const ua_condition_base_1 = require("./ua_condition_base");
15
- /**
16
- * @class UAAcknowledgeableConditionBase
17
- * @constructor
18
- * @extends UAConditionBase
19
- */
20
- class UAAcknowledgeableConditionBase extends ua_condition_base_1.UAConditionBase {
21
- /**
22
- */
23
- static instantiate(namespace, conditionTypeId, options, data) {
24
- const conditionNode = ua_condition_base_1.UAConditionBase.instantiate(namespace, conditionTypeId, options, data);
25
- Object.setPrototypeOf(conditionNode, UAAcknowledgeableConditionBase.prototype);
26
- // ----------------------- Install Acknowledge-able Condition stuff
27
- // install ackedState - Mandatory
28
- /**
29
- * @property ackedState
30
- * @type TwoStateVariable
31
- */
32
- ua_two_state_variable_1._install_TwoStateVariable_machinery(conditionNode.ackedState, {
33
- falseState: "Unacknowledged",
34
- trueState: "Acknowledged"
35
- });
36
- /**
37
- * @property acknowledge
38
- * @type UAMethod
39
- */
40
- conditionNode.acknowledge.bindMethod(_acknowledge_method);
41
- // install confirmedState - Optional
42
- /**
43
- * @property confirmedState
44
- * @type TwoStateVariable
45
- */
46
- if (conditionNode.confirmedState) {
47
- ua_two_state_variable_1._install_TwoStateVariable_machinery(conditionNode.confirmedState, {
48
- falseState: "Unconfirmed",
49
- trueState: "Confirmed"
50
- });
51
- }
52
- // install confirm Method - Optional
53
- /**
54
- * @property confirm
55
- * @type UAMethod
56
- */
57
- if (conditionNode.confirm) {
58
- conditionNode.confirm.bindMethod(_confirm_method);
59
- }
60
- node_opcua_assert_1.assert(conditionNode instanceof UAAcknowledgeableConditionBase);
61
- return conditionNode;
62
- }
63
- static install_method_handle_on_type(addressSpace) {
64
- const acknowledgeableConditionType = addressSpace.findEventType("AcknowledgeableConditionType");
65
- node_opcua_assert_1.assert(acknowledgeableConditionType !== null);
66
- acknowledgeableConditionType.acknowledge.bindMethod(_acknowledge_method);
67
- acknowledgeableConditionType.confirm.bindMethod(_confirm_method);
68
- }
69
- _raiseAuditConditionAcknowledgeEvent(branch) {
70
- // raise the AuditConditionAcknowledgeEventType
71
- const eventData = {
72
- actionTimeStamp: { dataType: node_opcua_variant_1.DataType.DateTime, value: new Date() },
73
- // xx branchId: branch.branchId.readValue().value,
74
- // AuditEventType
75
- clientAuditEntryId: {
76
- dataType: node_opcua_variant_1.DataType.Null
77
- },
78
- clientUserId: {
79
- dataType: node_opcua_variant_1.DataType.Null
80
- },
81
- // The ConditionEventId field shall contain the id of the event for which the comment was added
82
- conditionEventId: { dataType: node_opcua_variant_1.DataType.ByteString, value: branch.getEventId() },
83
- // The Comment contains the actual comment that was added
84
- comment: { dataType: node_opcua_variant_1.DataType.LocalizedText, value: branch.getComment() },
85
- inputArguments: {
86
- dataType: node_opcua_variant_1.DataType.Null
87
- },
88
- methodId: {
89
- dataType: node_opcua_variant_1.DataType.Null
90
- },
91
- serverId: {
92
- dataType: node_opcua_variant_1.DataType.Null
93
- },
94
- status: {
95
- dataType: node_opcua_variant_1.DataType.StatusCode,
96
- value: node_opcua_status_code_1.StatusCodes.Good
97
- }
98
- };
99
- this.raiseEvent("AuditConditionAcknowledgeEventType", eventData);
100
- }
101
- _raiseAuditConditionConfirmEvent(branch) {
102
- // raise the AuditConditionConfirmEventType
103
- const eventData = {
104
- actionTimeStamp: { dataType: node_opcua_variant_1.DataType.DateTime, value: new Date() },
105
- // ConditionEventId The ConditionEventId field shall contain the id of the Event that was confirmed
106
- conditionEventId: { dataType: node_opcua_variant_1.DataType.ByteString, value: branch.getEventId() },
107
- // xx branchId: branch.branchId.readValue().value,
108
- // AuditEventType
109
- clientAuditEntryId: {
110
- dataType: node_opcua_variant_1.DataType.Null
111
- },
112
- clientUserId: {
113
- dataType: node_opcua_variant_1.DataType.Null
114
- },
115
- comment: { dataType: node_opcua_variant_1.DataType.LocalizedText, value: branch.getComment() },
116
- inputArguments: {
117
- dataType: node_opcua_variant_1.DataType.Null
118
- },
119
- methodId: {
120
- dataType: node_opcua_variant_1.DataType.Null
121
- },
122
- serverId: {
123
- dataType: node_opcua_variant_1.DataType.Null
124
- },
125
- status: {
126
- dataType: node_opcua_variant_1.DataType.StatusCode,
127
- value: node_opcua_status_code_1.StatusCodes.Good
128
- }
129
- };
130
- this.raiseEvent("AuditConditionConfirmEventType", eventData);
131
- }
132
- _acknowledge_branch(conditionEventId, comment, branch, message) {
133
- node_opcua_assert_1.assert(typeof message === "string");
134
- const conditionNode = this;
135
- const statusCode = condition_1._setAckedState(branch, true, conditionEventId, comment);
136
- if (statusCode !== node_opcua_status_code_1.StatusCodes.Good) {
137
- return statusCode;
138
- }
139
- if (conditionNode.confirmedState) {
140
- // alarm has a confirmed state !
141
- // we should be waiting for confirmation now
142
- branch.setConfirmedState(false);
143
- branch.setRetain(true);
144
- }
145
- else {
146
- branch.setRetain(false);
147
- }
148
- branch.setComment(comment);
149
- conditionNode.raiseNewBranchState(branch);
150
- conditionNode._raiseAuditConditionAcknowledgeEvent(branch);
151
- /**
152
- * @event acknowledged
153
- * @param eventId {Buffer|null}
154
- * @param comment {LocalizedText}
155
- * @param branch {ConditionSnapshot}
156
- * raised when the alarm branch has been acknowledged
157
- */
158
- conditionNode.emit("acknowledged", conditionEventId, comment, branch);
159
- return node_opcua_status_code_1.StatusCodes.Good;
160
- }
161
- /**
162
- * @method _confirm_branch
163
- * @param conditionEventId The ConditionEventId field shall contain the id of the Event that was conformed
164
- * @param comment
165
- * @param branch
166
- * @param message
167
- * @private
168
- */
169
- _confirm_branch(conditionEventId, comment, branch, message) {
170
- node_opcua_assert_1.assert(typeof message === "string");
171
- node_opcua_assert_1.assert(comment instanceof node_opcua_data_model_1.LocalizedText);
172
- const conditionNode = this;
173
- // xx var eventId = branch.getEventId();
174
- node_opcua_assert_1.assert(branch.getEventId().toString("hex") === conditionEventId.toString("hex"));
175
- branch.setConfirmedState(true);
176
- // once confirmed a branch do not need to be retained
177
- branch.setRetain(false);
178
- branch.setComment(comment);
179
- conditionNode._raiseAuditConditionCommentEvent(message, conditionEventId, comment);
180
- conditionNode._raiseAuditConditionConfirmEvent(branch);
181
- conditionNode.raiseNewBranchState(branch);
182
- /**
183
- * @event confirmed
184
- * @param eventId
185
- * @param comment
186
- * @param eventId
187
- * raised when the alarm branch has been confirmed
188
- */
189
- conditionNode.emit("confirmed", conditionEventId, comment, branch);
190
- }
191
- /**
192
- * @method autoConfirmBranch
193
- * @param branch
194
- * @param comment
195
- */
196
- autoConfirmBranch(branch, comment) {
197
- node_opcua_assert_1.assert(branch instanceof condition_snapshot_1.ConditionSnapshot);
198
- if (!this.confirmedState) {
199
- // no confirmedState => ignoring
200
- return;
201
- }
202
- node_opcua_assert_1.assert(!branch.getConfirmedState(), "already confirmed ?");
203
- const conditionNode = this;
204
- const conditionEventId = branch.getEventId();
205
- // tslint:disable-next-line:no-console
206
- console.log("autoConfirmBranch getAckedState ", branch.getAckedState());
207
- conditionNode._confirm_branch(conditionEventId, comment, branch, "Server/Confirm");
208
- }
209
- /**
210
- * @method acknowledgeAndAutoConfirmBranch
211
- * @param branch {ConditionSnapshot}
212
- * @param comment {String|LocalizedText}
213
- */
214
- acknowledgeAndAutoConfirmBranch(branch, comment) {
215
- comment = node_opcua_data_model_1.LocalizedText.coerce(comment);
216
- const conditionEventId = branch.getEventId();
217
- branch.setRetain(false);
218
- this._acknowledge_branch(conditionEventId, comment, branch, "Server/Acknowledge");
219
- this.autoConfirmBranch(branch, comment);
220
- }
221
- }
222
- exports.UAAcknowledgeableConditionBase = UAAcknowledgeableConditionBase;
223
- function _acknowledge_method(inputArguments, context, callback) {
224
- ua_condition_base_1.UAConditionBase.with_condition_method(inputArguments, context, callback, (conditionEventId, comment, branch, conditionNode) => {
225
- const ackConditionNode = conditionNode;
226
- // precondition checking
227
- node_opcua_assert_1.assert(!conditionEventId || conditionEventId instanceof Buffer, "must have a valid eventId or null");
228
- node_opcua_assert_1.assert(comment instanceof node_opcua_data_model_1.LocalizedText, "expecting a comment as LocalizedText");
229
- node_opcua_assert_1.assert(conditionNode instanceof UAAcknowledgeableConditionBase);
230
- ackConditionNode._acknowledge_branch(conditionEventId, comment, branch, "Method/Acknowledged");
231
- return node_opcua_status_code_1.StatusCodes.Good;
232
- });
233
- }
234
- /*
235
- *
236
- * param inputArguments {Variant[]}
237
- * param context {Object}
238
- * param callback {Function}
239
- *
240
- * @private
241
- */
242
- function _confirm_method(inputArguments, context, callback) {
243
- ua_condition_base_1.UAConditionBase.with_condition_method(inputArguments, context, callback, (eventId, comment, branch, conditionNode) => {
244
- node_opcua_assert_1.assert(eventId instanceof Buffer);
245
- node_opcua_assert_1.assert(branch.getEventId() instanceof Buffer);
246
- node_opcua_assert_1.assert(branch.getEventId().toString("hex") === eventId.toString("hex"));
247
- const ackConditionNode = conditionNode;
248
- if (branch.getConfirmedState()) {
249
- return node_opcua_status_code_1.StatusCodes.BadConditionBranchAlreadyConfirmed;
250
- }
251
- ackConditionNode._confirm_branch(eventId, comment, branch, "Method/Confirm");
252
- return node_opcua_status_code_1.StatusCodes.Good;
253
- });
254
- }
255
- //# sourceMappingURL=ua_acknowledgeable_condition_base.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ua_acknowledgeable_condition_base.js","sourceRoot":"","sources":["../../../src/alarms_and_conditions/ua_acknowledgeable_condition_base.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,yDAA2C;AAC3C,iEAAyE;AAEzE,mEAAqD;AACrD,2DAA2D;AAK3D,kFAAiH;AAEjH,2CAA6C;AAC7C,6DAAyD;AACzD,2DAAsD;AAkBtD;;;;GAIG;AACH,MAAa,8BAA+B,SAAQ,mCAAe;IAC/D;OACG;IACI,MAAM,CAAC,WAAW,CACrB,SAAoB,EACpB,eAA8C,EAC9C,OAAY,EACZ,IAAS;QAET,MAAM,aAAa,GAAG,mCAAe,CAAC,WAAW,CAC7C,SAAS,EACT,eAAe,EACf,OAAO,EACP,IAAI,CAC2B,CAAC;QAEpC,MAAM,CAAC,cAAc,CAAC,aAAa,EAAE,8BAA8B,CAAC,SAAS,CAAC,CAAC;QAE/E,mEAAmE;QACnE,iCAAiC;QACjC;;;WAGG;QACH,2DAAmC,CAAC,aAAa,CAAC,UAAU,EAAE;YAC1D,UAAU,EAAE,gBAAgB;YAC5B,SAAS,EAAE,cAAc;SAC5B,CAAC,CAAC;QAEH;;;WAGG;QACH,aAAa,CAAC,WAAW,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;QAE1D,oCAAoC;QACpC;;;WAGG;QACH,IAAI,aAAa,CAAC,cAAc,EAAE;YAC9B,2DAAmC,CAAC,aAAa,CAAC,cAAc,EAAE;gBAC9D,UAAU,EAAE,aAAa;gBACzB,SAAS,EAAE,WA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