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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscription_diagnostics_variable.js","sourceRoot":"","sources":["../../../source/interfaces/subscription_diagnostics_variable.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { UAAuthorizationServiceConfiguration } from "node-opcua-nodeset-ua";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ua_authorisation_service.js","sourceRoot":"","sources":["../../../source/interfaces/ua_authorisation_service.ts"],"names":[],"mappings":""}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { DataType } from "node-opcua-variant";
|
|
2
|
-
import { NumericRange } from "node-opcua-numeric-range";
|
|
3
|
-
import { UAAddressSpaceFileType, UAObject, UAVariableT } from "./address_space_ts";
|
|
4
|
-
import { RolePermissionType } from "./session_context";
|
|
5
|
-
export declare type IdType = any;
|
|
6
|
-
export interface UANamespaceMetadataType extends UAObject {
|
|
7
|
-
/**
|
|
8
|
-
* The NamespaceUri Property contains the namespace represented by an instance of the MetaDataType.
|
|
9
|
-
*/
|
|
10
|
-
_namespaceUri: UAVariableT<string, DataType.String>;
|
|
11
|
-
/**
|
|
12
|
-
* The NamespaceVersion Property provides version information for the namespace.It is intended
|
|
13
|
-
* for display purposes and shall not be used to programmatically identify the latest version.If
|
|
14
|
-
* there is no formal version defined for the namespace this Property shall be set to a null String.
|
|
15
|
-
*/
|
|
16
|
-
namespaceVersion: UAVariableT<string, DataType.String>;
|
|
17
|
-
namespacePublicationDate: UAVariableT<Date, DataType.DateTime>;
|
|
18
|
-
/**
|
|
19
|
-
* The IsNamespaceSubset Property defines whether all Nodes of the namespace are accessible
|
|
20
|
-
* in the Server or only a subset.It is set to FALSE if the full namespace is provided and TRUE if
|
|
21
|
-
* not.If the completeness is unknown then this Property shall be set to TRUE.
|
|
22
|
-
*/
|
|
23
|
-
isNamespaceSubset: UAVariableT<boolean, DataType.Boolean>;
|
|
24
|
-
/**
|
|
25
|
-
* The StaticNodeIdTypes Property provides a list of IdTypes used for static Nodes.All Nodes in
|
|
26
|
-
* the IAddressSpace of the namespace using one of the IdTypes in the array shall be static Nodes.
|
|
27
|
-
*/
|
|
28
|
-
staticNodeIdTypes: UAVariableT<IdType[], DataType.ExtensionObject>;
|
|
29
|
-
/**
|
|
30
|
-
* The StaticNumericNodeIdRange Property provides a list of NumericRanges used for numeric
|
|
31
|
-
* NodeIds of static Nodes.If the StaticNodeIdTypes Property contains an entry for numeric
|
|
32
|
-
* NodeIds then this Property is ignored.
|
|
33
|
-
*/
|
|
34
|
-
staticNumericNodeIdRange: UAVariableT<NumericRange[], DataType.ExtensionObject>;
|
|
35
|
-
/**
|
|
36
|
-
* The StaticStringNodeIdPattern Property provides a regular expression as defined for the Like
|
|
37
|
-
* Operator defined in Part 4 to filter for string NodeIds of static Nodes.If the StaticNodeIdTypes
|
|
38
|
-
* Property contains an entry for string NodeIds then this Property is ignored.
|
|
39
|
-
*/
|
|
40
|
-
staticStringNodeIdPattern: UAVariableT<string, DataType.String>;
|
|
41
|
-
/**
|
|
42
|
-
* The Object NamespaceFile contains all Nodes and References of the namespace in an XML
|
|
43
|
-
* file where the Information Model XML Schema is defined in Part 6. The XML file is provided
|
|
44
|
-
* through an AddressSpaceFileType Object.
|
|
45
|
-
*/
|
|
46
|
-
namespaceFile?: UAAddressSpaceFileType;
|
|
47
|
-
/**
|
|
48
|
-
* The DefaultRolePermissions Property provides the default permissions if a Server supports
|
|
49
|
-
* RolePermissions for the Namespace. A Node in the Namespace overrides this default by adding
|
|
50
|
-
* a RolePermissions Attribute to the Node. If a Server implements a vendor-specific
|
|
51
|
-
* RolePermissions model for a Namespace, it does not add the DefaultRolePermissions Property
|
|
52
|
-
* to the NamespaceMetadata Object.
|
|
53
|
-
* */
|
|
54
|
-
defaultRolePermissions?: UAVariableT<RolePermissionType[], DataType.ExtensionObject>;
|
|
55
|
-
/**
|
|
56
|
-
* The DefaultUserRolePermissions Property provides the default user permissions if a Server
|
|
57
|
-
* supports UserRolePermissions for the Namespace. A Node in the Namespace overrides this
|
|
58
|
-
* default by adding a UserRolePermissions Attribute to the Node. If a Server implements a
|
|
59
|
-
* vendor-specific UserRolePermissions model for a Namespace, it does not add the
|
|
60
|
-
* DefaultUserRolePermissions Property to the NamespaceMetadata Object.
|
|
61
|
-
*/
|
|
62
|
-
defaultUserRolePermissions?: UAVariableT<RolePermissionType[], DataType.ExtensionObject>;
|
|
63
|
-
/**
|
|
64
|
-
* The DefaultAccessRestrictions Property is present if a Server supports AccessRestrictions for
|
|
65
|
-
* the Namespace and provides the defaults. A Node in the Namespace overrides this default by
|
|
66
|
-
* adding a AccessRestrictions Attribute to the Node. If a Server implements a vendor-specific
|
|
67
|
-
* AccessRestriction model for a Namespace, it does not add the DefaultAccessRestrictions
|
|
68
|
-
* Property to the NamespaceMetadata Object.
|
|
69
|
-
*/
|
|
70
|
-
defaultAccessRestrictions?: UAVariableT<number, DataType.UInt16>;
|
|
71
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ua_namespace_meta_data_type.js","sourceRoot":"","sources":["../../source/ua_namespace_meta_data_type.ts"],"names":[],"mappings":""}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { NodeId } from "node-opcua-nodeid";
|
|
2
|
-
import { DataType } from "node-opcua-variant";
|
|
3
|
-
import { UAVariableT } from "../../source";
|
|
4
|
-
import { BaseNode } from "../base_node";
|
|
5
|
-
import { UAObject } from "../ua_object";
|
|
6
|
-
export interface BaseEventType extends UAObject {
|
|
7
|
-
sourceName: UAVariableT<string, DataType.String>;
|
|
8
|
-
sourceNode: UAVariableT<NodeId, DataType.NodeId>;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* @class BaseEventType
|
|
12
|
-
* @class UAObject
|
|
13
|
-
* @constructor
|
|
14
|
-
*/
|
|
15
|
-
export declare class BaseEventType extends UAObject {
|
|
16
|
-
/**
|
|
17
|
-
* @method setSourceName
|
|
18
|
-
* @param name
|
|
19
|
-
*/
|
|
20
|
-
setSourceName(name: string): void;
|
|
21
|
-
/**
|
|
22
|
-
* @method setSourceNode
|
|
23
|
-
* @param node {NodeId|UAObject}
|
|
24
|
-
*/
|
|
25
|
-
setSourceNode(node: NodeId | BaseNode): void;
|
|
26
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BaseEventType = 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_variant_1 = require("node-opcua-variant");
|
|
9
|
-
const ua_object_1 = require("../ua_object");
|
|
10
|
-
/**
|
|
11
|
-
* @class BaseEventType
|
|
12
|
-
* @class UAObject
|
|
13
|
-
* @constructor
|
|
14
|
-
*/
|
|
15
|
-
class BaseEventType extends ua_object_1.UAObject {
|
|
16
|
-
/**
|
|
17
|
-
* @method setSourceName
|
|
18
|
-
* @param name
|
|
19
|
-
*/
|
|
20
|
-
setSourceName(name) {
|
|
21
|
-
(0, node_opcua_assert_1.assert)(typeof name === "string");
|
|
22
|
-
const self = this;
|
|
23
|
-
self.sourceName.setValueFromSource(new node_opcua_variant_1.Variant({
|
|
24
|
-
dataType: node_opcua_variant_1.DataType.String,
|
|
25
|
-
value: name
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @method setSourceNode
|
|
30
|
-
* @param node {NodeId|UAObject}
|
|
31
|
-
*/
|
|
32
|
-
setSourceNode(node) {
|
|
33
|
-
const self = this;
|
|
34
|
-
self.sourceNode.setValueFromSource(new node_opcua_variant_1.Variant({
|
|
35
|
-
dataType: node_opcua_variant_1.DataType.NodeId,
|
|
36
|
-
value: node.nodeId ? node.nodeId : node
|
|
37
|
-
}));
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.BaseEventType = BaseEventType;
|
|
41
|
-
//# sourceMappingURL=base_event_type.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base_event_type.js","sourceRoot":"","sources":["../../../src/alarms_and_conditions/base_event_type.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,yDAA2C;AAE3C,2DAAuD;AAGvD,4CAAwC;AAOxC;;;;GAIG;AACH,MAAa,aAAc,SAAQ,oBAAQ;IAEvC;;;OAGG;IACI,aAAa,CAAC,IAAY;QAC7B,IAAA,0BAAM,EAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC;QACjC,MAAM,IAAI,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAChC,IAAI,4BAAO,CAAC;YACR,QAAQ,EAAE,6BAAQ,CAAC,MAAM;YACzB,KAAK,EAAE,IAAI;SACd,CAAC,CACH,CAAC;IACN,CAAC;IAED;;;OAGG;IACI,aAAa,CAAC,IAAuB;QACxC,MAAM,IAAI,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAChC,IAAI,4BAAO,CAAC;YACR,QAAQ,EAAE,6BAAQ,CAAC,MAAM;YACzB,KAAK,EAAG,IAAY,CAAC,MAAM,CAAC,CAAC,CAAE,IAAY,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI;SAC5D,CAAC,CACH,CAAC;IACN,CAAC;CACJ;AA9BD,sCA8BC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module node-opcua-address-space.AlarmsAndConditions
|
|
3
|
-
*/
|
|
4
|
-
/// <reference types="node" />
|
|
5
|
-
import { UAMethod } from "../../source";
|
|
6
|
-
import { StateMachine } from "../state_machine/finite_state_machine";
|
|
7
|
-
import { UAObject } from "../ua_object";
|
|
8
|
-
import { UAVariable } from "../ua_variable";
|
|
9
|
-
export interface ShelvingStateMachine {
|
|
10
|
-
unshelve: UAMethod;
|
|
11
|
-
timedShelve: UAMethod;
|
|
12
|
-
oneShotShelve: UAMethod;
|
|
13
|
-
unshelveTime: UAVariable;
|
|
14
|
-
_timer: NodeJS.Timer | null;
|
|
15
|
-
_sheveldTime: Date;
|
|
16
|
-
_unshelvedTime: Date;
|
|
17
|
-
_duration: number;
|
|
18
|
-
}
|
|
19
|
-
export declare class ShelvingStateMachine extends StateMachine {
|
|
20
|
-
static promote(object: UAObject): ShelvingStateMachine;
|
|
21
|
-
}
|
|
22
|
-
export declare function _clear_timer_if_any(shelvingState: ShelvingStateMachine): void;
|
|
@@ -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 = (0, node_opcua_debug_1.make_debugLog)(__filename);
|
|
17
|
-
const doDebug = (0, node_opcua_debug_1.checkDebugFlag)(__filename);
|
|
18
|
-
class ShelvingStateMachine extends finite_state_machine_1.StateMachine {
|
|
19
|
-
static promote(object) {
|
|
20
|
-
const shelvingState = object;
|
|
21
|
-
(0, 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
|
-
(0, 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
|
-
// IAddressSpace. 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
|
-
(0, 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
|
-
(0, 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
|
-
(0, 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
|
-
(0, 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
|
-
(0, 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
|
-
(0, 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
|
-
(0, 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
|
-
// IAddressSpace. 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
|
-
(0, 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
|
-
(0, node_opcua_assert_1.assert)(isFinite(maxTimeShelved));
|
|
151
|
-
(0, node_opcua_assert_1.assert)(inputArguments[0].dataType === node_opcua_variant_1.DataType.Double); // Duration
|
|
152
|
-
(0, 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 IAddressSpace. 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
|
-
(0, 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
|
-
(0, node_opcua_assert_1.assert)(isFinite(maxTimeShelved));
|
|
197
|
-
(0, 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,IAAA,gCAAa,EAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,OAAO,GAAG,IAAA,iCAAc,EAAC,UAAU,CAAC,CAAC;AAa3C,MAAa,oBAAqB,SAAQ,mCAAY;IAC3C,MAAM,CAAC,OAAO,CAAC,MAAgB;QAClC,MAAM,aAAa,GAAG,MAA8B,CAAC;QACrD,IAAA,4CAAqB,EAAC,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,UAA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CAAC,sBAAsB;SAC5C,CAAC,CAAC;KACN;IACD,IAAI,aAAa,CAAC,eAAe,EAAE,KAAK,gBAAgB,IAAI,aAAa,CAAC,SAAS,KAAK,8CAAoB,CAAC,WAAW,EAAE;QACtH,OAAO,IAAI,4BAAO,CAAC;YACf,QAAQ,EAAE,6BAAQ,CAAC,MAAM;YACzB,KAAK,EAAE,8CAAoB,CAAC,WAAW;SAC1C,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
|
-
}
|