node-opcua-address-space 2.51.0 → 2.52.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.
- package/dist/src/namespace_impl.d.ts +8 -8
- package/dist/src/namespace_impl.js +19 -28
- package/dist/src/namespace_impl.js.map +1 -1
- package/package.json +38 -38
- package/src/namespace_impl.ts +69 -80
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.d.ts +0 -1
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js +0 -3
- package/dist/source/interfaces/alarms_and_conditions/ua_condition_base_i.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_discrete_item.d.ts +0 -4
- package/dist/source/interfaces/data_access/ua_discrete_item.js +0 -3
- package/dist/source/interfaces/data_access/ua_discrete_item.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_multistate_discrete.d.ts +0 -25
- package/dist/source/interfaces/data_access/ua_multistate_discrete.js +0 -3
- package/dist/source/interfaces/data_access/ua_multistate_discrete.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete.d.ts +0 -27
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js +0 -3
- package/dist/source/interfaces/data_access/ua_multistate_value_discrete.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_two_state_discrete.d.ts +0 -17
- package/dist/source/interfaces/data_access/ua_two_state_discrete.js +0 -3
- package/dist/source/interfaces/data_access/ua_two_state_discrete.js.map +0 -1
- package/dist/source/interfaces/data_access/ua_y_array_item.d.ts +0 -4
- package/dist/source/interfaces/data_access/ua_y_array_item.js +0 -3
- package/dist/source/interfaces/data_access/ua_y_array_item.js.map +0 -1
- package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.d.ts +0 -11
- package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js +0 -3
- package/dist/source/interfaces/state_machine/exclusive_limit_state_machine.js.map +0 -1
- package/dist/source/interfaces/state_machine/finite_state_machine.d.ts +0 -69
- package/dist/source/interfaces/state_machine/finite_state_machine.js +0 -3
- package/dist/source/interfaces/state_machine/finite_state_machine.js.map +0 -1
- package/dist/source/interfaces/state_machine/program_finite_state_machine.d.ts +0 -74
- package/dist/source/interfaces/state_machine/program_finite_state_machine.js +0 -3
- package/dist/source/interfaces/state_machine/program_finite_state_machine.js.map +0 -1
- package/dist/source/interfaces/state_machine/state_machine.d.ts +0 -342
- package/dist/source/interfaces/state_machine/state_machine.js +0 -3
- package/dist/source/interfaces/state_machine/state_machine.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_finite_state_variable.d.ts +0 -18
- package/dist/source/interfaces/state_machine/ua_finite_state_variable.js +0 -3
- package/dist/source/interfaces/state_machine/ua_finite_state_variable.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_state_variable.d.ts +0 -29
- package/dist/source/interfaces/state_machine/ua_state_variable.js +0 -3
- package/dist/source/interfaces/state_machine/ua_state_variable.js.map +0 -1
- package/dist/source/interfaces/state_machine/ua_two_state_variable.d.ts +0 -26
- package/dist/source/interfaces/state_machine/ua_two_state_variable.js +0 -3
- package/dist/source/interfaces/state_machine/ua_two_state_variable.js.map +0 -1
- package/dist/source/interfaces/subscription_diagnostics_variable.d.ts +0 -41
- package/dist/source/interfaces/subscription_diagnostics_variable.js +0 -3
- package/dist/source/interfaces/subscription_diagnostics_variable.js.map +0 -1
- package/dist/source/interfaces/ua_authorisation_service.d.ts +0 -1
- package/dist/source/interfaces/ua_authorisation_service.js +0 -3
- package/dist/source/interfaces/ua_authorisation_service.js.map +0 -1
- package/dist/source/ua_namespace_meta_data_type.d.ts +0 -71
- package/dist/source/ua_namespace_meta_data_type.js +0 -3
- package/dist/source/ua_namespace_meta_data_type.js.map +0 -1
- package/dist/src/alarms_and_conditions/base_event_type.d.ts +0 -26
- package/dist/src/alarms_and_conditions/base_event_type.js +0 -41
- package/dist/src/alarms_and_conditions/base_event_type.js.map +0 -1
- package/dist/src/alarms_and_conditions/shelving_state_machine.d.ts +0 -22
- package/dist/src/alarms_and_conditions/shelving_state_machine.js +0 -241
- package/dist/src/alarms_and_conditions/shelving_state_machine.js.map +0 -1
- package/dist/src/alarms_and_conditions/trip_alarm.d.ts +0 -16
- package/dist/src/alarms_and_conditions/trip_alarm.js +0 -21
- package/dist/src/alarms_and_conditions/trip_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.d.ts +0 -54
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js +0 -255
- package/dist/src/alarms_and_conditions/ua_acknowledgeable_condition_base.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_alarm_condition_base.d.ts +0 -138
- package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js +0 -460
- package/dist/src/alarms_and_conditions/ua_alarm_condition_base.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.d.ts +0 -35
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js +0 -32
- package/dist/src/alarms_and_conditions/ua_certificate_expiration_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_condition_base.d.ts +0 -191
- package/dist/src/alarms_and_conditions/ua_condition_base.js +0 -1029
- package/dist/src/alarms_and_conditions/ua_condition_base.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_discrete_alarm.d.ts +0 -11
- package/dist/src/alarms_and_conditions/ua_discrete_alarm.js +0 -58
- package/dist/src/alarms_and_conditions/ua_discrete_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.d.ts +0 -24
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js +0 -59
- package/dist/src/alarms_and_conditions/ua_exclusive_deviation_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.d.ts +0 -14
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js +0 -17
- package/dist/src/alarms_and_conditions/ua_exclusive_level_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.d.ts +0 -22
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js +0 -87
- package/dist/src/alarms_and_conditions/ua_exclusive_limit_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.d.ts +0 -6
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js +0 -11
- package/dist/src/alarms_and_conditions/ua_exclusive_rate_of_change_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_limit_alarm.d.ts +0 -76
- package/dist/src/alarms_and_conditions/ua_limit_alarm.js +0 -237
- package/dist/src/alarms_and_conditions/ua_limit_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.d.ts +0 -27
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js +0 -62
- package/dist/src/alarms_and_conditions/ua_non_exclusive_deviation_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.d.ts +0 -49
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js +0 -176
- package/dist/src/alarms_and_conditions/ua_non_exclusive_limit_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm.d.ts +0 -47
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js +0 -151
- package/dist/src/alarms_and_conditions/ua_off_normal_alarm.js.map +0 -1
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.d.ts +0 -16
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js +0 -18
- package/dist/src/alarms_and_conditions/ua_system_off_normal_alarm.js.map +0 -1
- package/dist/src/base_node.d.ts +0 -279
- package/dist/src/base_node.js +0 -1364
- package/dist/src/base_node.js.map +0 -1
- package/dist/src/data_access/ua_analog_item.d.ts +0 -13
- package/dist/src/data_access/ua_analog_item.js +0 -37
- package/dist/src/data_access/ua_analog_item.js.map +0 -1
- package/dist/src/data_access/ua_data_item.d.ts +0 -16
- package/dist/src/data_access/ua_data_item.js +0 -66
- package/dist/src/data_access/ua_data_item.js.map +0 -1
- package/dist/src/data_access/ua_multistate_discrete.d.ts +0 -23
- package/dist/src/data_access/ua_multistate_discrete.js +0 -131
- package/dist/src/data_access/ua_multistate_discrete.js.map +0 -1
- package/dist/src/namespace.d.ts +0 -475
- package/dist/src/namespace.js +0 -1775
- package/dist/src/namespace.js.map +0 -1
- package/dist/src/reference.d.ts +0 -43
- package/dist/src/reference.js +0 -138
- package/dist/src/reference.js.map +0 -1
- package/dist/src/session_context.d.ts +0 -4
- package/dist/src/session_context.js +0 -9
- package/dist/src/session_context.js.map +0 -1
- package/dist/src/ua_data_type.d.ts +0 -83
- package/dist/src/ua_data_type.js +0 -289
- package/dist/src/ua_data_type.js.map +0 -1
- package/dist/src/ua_method.d.ts +0 -42
- package/dist/src/ua_method.js +0 -204
- package/dist/src/ua_method.js.map +0 -1
- package/dist/src/ua_object.d.ts +0 -29
- package/dist/src/ua_object.js +0 -153
- package/dist/src/ua_object.js.map +0 -1
- package/dist/src/ua_object_type.d.ts +0 -49
- package/dist/src/ua_object_type.js +0 -124
- package/dist/src/ua_object_type.js.map +0 -1
- package/dist/src/ua_reference_type.d.ts +0 -42
- package/dist/src/ua_reference_type.js +0 -138
- package/dist/src/ua_reference_type.js.map +0 -1
- package/dist/src/ua_variable.d.ts +0 -346
- package/dist/src/ua_variable.js +0 -1721
- package/dist/src/ua_variable.js.map +0 -1
- package/dist/src/ua_variable_type.d.ts +0 -54
- package/dist/src/ua_variable_type.js +0 -555
- package/dist/src/ua_variable_type.js.map +0 -1
- package/dist/src/ua_view.d.ts +0 -16
- package/dist/src/ua_view.js +0 -42
- package/dist/src/ua_view.js.map +0 -1
|
@@ -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
|
-
(0, 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
|
-
(0, 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
|
-
(0, 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
|
-
(0, 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
|
-
(0, node_opcua_assert_1.assert)(typeof message === "string");
|
|
134
|
-
const conditionNode = this;
|
|
135
|
-
const statusCode = (0, 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
|
-
(0, node_opcua_assert_1.assert)(typeof message === "string");
|
|
171
|
-
(0, node_opcua_assert_1.assert)(comment instanceof node_opcua_data_model_1.LocalizedText);
|
|
172
|
-
const conditionNode = this;
|
|
173
|
-
// xx var eventId = branch.getEventId();
|
|
174
|
-
(0, 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
|
-
(0, node_opcua_assert_1.assert)(branch instanceof condition_snapshot_1.ConditionSnapshot);
|
|
198
|
-
if (!this.confirmedState) {
|
|
199
|
-
// no confirmedState => ignoring
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
(0, 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
|
-
(0, node_opcua_assert_1.assert)(!conditionEventId || conditionEventId instanceof Buffer, "must have a valid eventId or null");
|
|
228
|
-
(0, node_opcua_assert_1.assert)(comment instanceof node_opcua_data_model_1.LocalizedText, "expecting a comment as LocalizedText");
|
|
229
|
-
(0, 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
|
-
(0, node_opcua_assert_1.assert)(eventId instanceof Buffer);
|
|
245
|
-
(0, node_opcua_assert_1.assert)(branch.getEventId() instanceof Buffer);
|
|
246
|
-
(0, 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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AC;IAC5B,CAAC,CACJ,CAAC;AACN,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,eAAe,CAAC,cAA6B,EAAE,OAAuB,EAAE,QAAa;IAC1F,mCAAe,CAAC,qBAAqB,CACjC,cAAc,EACd,OAAO,EACP,QAAQ,EACR,CAAC,OAAe,EAAE,OAAsB,EAAE,MAAyB,EAAE,aAA8B,EAAE,EAAE;QACnG,IAAA,0BAAM,EAAC,OAAO,YAAY,MAAM,CAAC,CAAC;QAClC,IAAA,0BAAM,EAAC,MAAM,CAAC,UAAU,EAAE,YAAY,MAAM,CAAC,CAAC;QAC9C,IAAA,0BAAM,EAAC,MAAM,CAAC,UAAU,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QAExE,MAAM,gBAAgB,GAAG,aAA+C,CAAC;QACzE,IAAI,MAAM,CAAC,iBAAiB,EAAE,EAAE;YAC5B,OAAO,oCAAW,CAAC,kCAAkC,CAAC;SACzD;QACD,gBAAgB,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;QAC7E,OAAO,oCAAW,CAAC,IAAI,CAAC;IAC5B,CAAC,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { DataValue } from "node-opcua-data-value";
|
|
2
|
-
import { NodeId } from "node-opcua-nodeid";
|
|
3
|
-
import { DataType } from "node-opcua-variant";
|
|
4
|
-
import { Namespace, UAEventType, UAVariableT } from "../../source";
|
|
5
|
-
import { BaseNode } from "../base_node";
|
|
6
|
-
import { UATwoStateVariable } from "../state_machine/ua_two_state_variable";
|
|
7
|
-
import { UAVariable } from "../ua_variable";
|
|
8
|
-
import { ConditionInfo } from "./condition_info";
|
|
9
|
-
import { ShelvingStateMachine } from "./shelving_state_machine";
|
|
10
|
-
import { UAAcknowledgeableConditionBase } from "./ua_acknowledgeable_condition_base";
|
|
11
|
-
export interface UAAlarmConditionBase {
|
|
12
|
-
activeState: UATwoStateVariable;
|
|
13
|
-
shelvingState: ShelvingStateMachine;
|
|
14
|
-
suppressedState: UATwoStateVariable;
|
|
15
|
-
suppressedOrShelved: UAVariable;
|
|
16
|
-
maxTimeShelved: UAVariable;
|
|
17
|
-
inputNode: UAVariableT<NodeId, DataType.NodeId>;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* @class UAAlarmConditionBase
|
|
21
|
-
* @constructor
|
|
22
|
-
* @extends UAAcknowledgeableConditionBase
|
|
23
|
-
*/
|
|
24
|
-
export declare class UAAlarmConditionBase extends UAAcknowledgeableConditionBase {
|
|
25
|
-
/**
|
|
26
|
-
* @class UAAlarmConditionBase
|
|
27
|
-
* @static
|
|
28
|
-
* @property MaxDuration
|
|
29
|
-
* @type {Duration}
|
|
30
|
-
*/
|
|
31
|
-
static MaxDuration: number;
|
|
32
|
-
/**
|
|
33
|
-
* @method (static)UAAlarmConditionBase.instantiate
|
|
34
|
-
* @param namespace {Namespace}
|
|
35
|
-
* @param alarmConditionTypeId
|
|
36
|
-
* @param options
|
|
37
|
-
* @param options.inputNode
|
|
38
|
-
* @param options.optionals could be "SuppressedState" , "ShelvingState"
|
|
39
|
-
* @param options.maxTimeShelved max TimeShelved duration (in ms)
|
|
40
|
-
* @param data
|
|
41
|
-
*/
|
|
42
|
-
static instantiate(namespace: Namespace, alarmConditionTypeId: UAEventType | string | NodeId, options: any, data: any): UAAlarmConditionBase;
|
|
43
|
-
dispose(): void;
|
|
44
|
-
/**
|
|
45
|
-
* @method activateAlarm
|
|
46
|
-
*/
|
|
47
|
-
activateAlarm(): void;
|
|
48
|
-
/**
|
|
49
|
-
* @method deactivateAlarm
|
|
50
|
-
*/
|
|
51
|
-
deactivateAlarm(): void;
|
|
52
|
-
/**
|
|
53
|
-
* @deprecated use deactivateAlarm instead
|
|
54
|
-
*/
|
|
55
|
-
desactivateAlarm(): void;
|
|
56
|
-
/**
|
|
57
|
-
* @method isSuppressedOrShelved
|
|
58
|
-
* @return {boolean}
|
|
59
|
-
*/
|
|
60
|
-
isSuppressedOrShelved(): boolean;
|
|
61
|
-
/**
|
|
62
|
-
* @method getSuppressedOrShelved
|
|
63
|
-
* @return {Boolean}
|
|
64
|
-
*/
|
|
65
|
-
getSuppressedOrShelved(): boolean;
|
|
66
|
-
/**
|
|
67
|
-
* @method setMaxTimeShelved
|
|
68
|
-
* @param duration ( Duration in Milliseconds)
|
|
69
|
-
*
|
|
70
|
-
* note: duration must be greater than 10ms and lesser than 2**31 ms
|
|
71
|
-
*/
|
|
72
|
-
setMaxTimeShelved(duration: number): void;
|
|
73
|
-
/**
|
|
74
|
-
* @method getMaxTimeShelved
|
|
75
|
-
* @return {Duration}
|
|
76
|
-
*/
|
|
77
|
-
getMaxTimeShelved(): number;
|
|
78
|
-
/**
|
|
79
|
-
* @method getInputNodeNode
|
|
80
|
-
* @return {BaseNode} return the node in the address space pointed by the inputNode value
|
|
81
|
-
*
|
|
82
|
-
* Note: please note the difference between alarm.inputNode
|
|
83
|
-
* * alarm.inputNode is a UAVariable property of the alarm object holding the nodeid of the input
|
|
84
|
-
* node in its value.
|
|
85
|
-
* * getInputNodeNode() is the UAVariable that contains the value that affects the state of the alarm and
|
|
86
|
-
* whose node id is stored in alarm.inputNode
|
|
87
|
-
*/
|
|
88
|
-
getInputNodeNode(): UAVariable | null;
|
|
89
|
-
/**
|
|
90
|
-
* @method getInputNodeValue
|
|
91
|
-
* @return {*}
|
|
92
|
-
*/
|
|
93
|
-
getInputNodeValue(): any | null;
|
|
94
|
-
updateState(): void;
|
|
95
|
-
_onInputDataValueChange(newValue: DataValue): void;
|
|
96
|
-
/**
|
|
97
|
-
* @method _installInputNodeMonitoring
|
|
98
|
-
* install mechanism that listen to input node datavalue changes so that alarm status
|
|
99
|
-
* can be automatically updated appropriatly.
|
|
100
|
-
* @param inputNode {BaseNode}
|
|
101
|
-
* @return {void}
|
|
102
|
-
* @protected
|
|
103
|
-
*/
|
|
104
|
-
_installInputNodeMonitoring(inputNode: BaseNode | NodeId): void;
|
|
105
|
-
getCurrentConditionInfo(): ConditionInfo;
|
|
106
|
-
/***
|
|
107
|
-
* @method _calculateConditionInfo
|
|
108
|
-
* @param stateData {Object} the new calculated state of the alarm
|
|
109
|
-
* @param isActive {Boolean}
|
|
110
|
-
* @param value {Number} the new value of the limit alarm
|
|
111
|
-
* @param oldCondition {ConditionInfo} given for information purpose
|
|
112
|
-
* @param oldCondition.severity
|
|
113
|
-
* @param oldCondition.quality
|
|
114
|
-
* @param oldCondition.message
|
|
115
|
-
* @param oldCondition.retain
|
|
116
|
-
* @return {ConditionInfo} the new condition info
|
|
117
|
-
*
|
|
118
|
-
* this method need to be overridden by the instantiate to allow custom message and severity
|
|
119
|
-
* to be set based on specific context of the alarm.
|
|
120
|
-
*
|
|
121
|
-
* @example
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* var myAlarm = addressSpace.instantiateExclusiveLimitAlarm({...});
|
|
125
|
-
* myAlarm._calculateConditionInfo = function(stateName,value,oldCondition) {
|
|
126
|
-
* var percent = Math.ceil(value * 100);
|
|
127
|
-
* return new ConditionInfo({
|
|
128
|
-
* message: "Tank is almost " + percent + "% full",
|
|
129
|
-
* severity: 100,
|
|
130
|
-
* quality: StatusCodes.Good
|
|
131
|
-
* });
|
|
132
|
-
* };
|
|
133
|
-
*
|
|
134
|
-
*/
|
|
135
|
-
_calculateConditionInfo(stateData: string | null, isActive: boolean, value: string, oldCondition: ConditionInfo): ConditionInfo;
|
|
136
|
-
_signalInitialCondition(): void;
|
|
137
|
-
_signalNewCondition(stateName: string | null, isActive?: boolean, value?: string): void;
|
|
138
|
-
}
|