node-opcua-address-space-base 2.98.0 → 2.98.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/address_space.d.ts +176 -0
- package/dist/address_space.js +3 -0
- package/dist/address_space.js.map +1 -0
- package/dist/base_node.d.ts +187 -0
- package/dist/base_node.js +4 -0
- package/dist/base_node.js.map +1 -0
- package/dist/bind_variable.d.ts +52 -0
- package/dist/bind_variable.js +3 -0
- package/dist/bind_variable.js.map +1 -0
- package/dist/clone_options.d.ts +49 -0
- package/dist/clone_options.js +25 -0
- package/dist/clone_options.js.map +1 -0
- package/dist/continuation_point.d.ts +2 -0
- package/dist/continuation_point.js +3 -0
- package/dist/continuation_point.js.map +1 -0
- package/dist/event_notifier_flags.d.ts +7 -0
- package/dist/event_notifier_flags.js +12 -0
- package/dist/event_notifier_flags.js.map +1 -0
- package/dist/i_event_data.d.ts +17 -0
- package/dist/i_event_data.js +3 -0
- package/dist/i_event_data.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/instantiate_options.d.ts +80 -0
- package/dist/instantiate_options.js +3 -0
- package/dist/instantiate_options.js.map +1 -0
- package/dist/modelling_rule_type.d.ts +1 -0
- package/dist/modelling_rule_type.js +3 -0
- package/dist/modelling_rule_type.js.map +1 -0
- package/dist/namespace.d.ts +287 -0
- package/dist/namespace.js +3 -0
- package/dist/namespace.js.map +1 -0
- package/dist/session_context.d.ts +56 -0
- package/dist/session_context.js +12 -0
- package/dist/session_context.js.map +1 -0
- package/dist/ua_data_type.d.ts +34 -0
- package/dist/ua_data_type.js +3 -0
- package/dist/ua_data_type.js.map +1 -0
- package/dist/ua_dynamic_variable_array.d.ts +14 -0
- package/dist/ua_dynamic_variable_array.js +3 -0
- package/dist/ua_dynamic_variable_array.js.map +1 -0
- package/dist/ua_event_type.d.ts +3 -0
- package/dist/ua_event_type.js +3 -0
- package/dist/ua_event_type.js.map +1 -0
- package/dist/ua_method.d.ts +41 -0
- package/dist/ua_method.js +5 -0
- package/dist/ua_method.js.map +1 -0
- package/dist/ua_object.d.ts +131 -0
- package/dist/ua_object.js +3 -0
- package/dist/ua_object.js.map +1 -0
- package/dist/ua_object_type.d.ts +29 -0
- package/dist/ua_object_type.js +3 -0
- package/dist/ua_object_type.js.map +1 -0
- package/dist/ua_property.d.ts +16 -0
- package/dist/ua_property.js +3 -0
- package/dist/ua_property.js.map +1 -0
- package/dist/ua_reference.d.ts +12 -0
- package/dist/ua_reference.js +3 -0
- package/dist/ua_reference.js.map +1 -0
- package/dist/ua_reference_type.d.ts +20 -0
- package/dist/ua_reference_type.js +4 -0
- package/dist/ua_reference_type.js.map +1 -0
- package/dist/ua_variable.d.ts +290 -0
- package/dist/ua_variable.js +3 -0
- package/dist/ua_variable.js.map +1 -0
- package/dist/ua_variable_t.d.ts +15 -0
- package/dist/ua_variable_t.js +3 -0
- package/dist/ua_variable_t.js.map +1 -0
- package/dist/ua_variable_type.d.ts +55 -0
- package/dist/ua_variable_type.js +4 -0
- package/dist/ua_variable_type.js.map +1 -0
- package/dist/ua_view.d.ts +7 -0
- package/dist/ua_view.js +3 -0
- package/dist/ua_view.js.map +1 -0
- package/package.json +19 -15
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { QualifiedNameLike, LocalizedTextLike } from "node-opcua-data-model";
|
|
2
|
+
import { NodeIdLike } from "node-opcua-nodeid";
|
|
3
|
+
import { BaseNode } from "./base_node";
|
|
4
|
+
import { ModellingRuleType } from "./modelling_rule_type";
|
|
5
|
+
import { INamespace } from "./namespace";
|
|
6
|
+
export interface InstantiateOptions {
|
|
7
|
+
/**
|
|
8
|
+
* the browse name of the new node to instantiate
|
|
9
|
+
*/
|
|
10
|
+
browseName: QualifiedNameLike;
|
|
11
|
+
/**
|
|
12
|
+
* an optional description
|
|
13
|
+
*
|
|
14
|
+
* if not provided the default description of the corresponding Type
|
|
15
|
+
* will be used.
|
|
16
|
+
*/
|
|
17
|
+
description?: LocalizedTextLike;
|
|
18
|
+
/**
|
|
19
|
+
* an optional displayName
|
|
20
|
+
*
|
|
21
|
+
* if not provided the default description of the corresponding browseName
|
|
22
|
+
* will be used.
|
|
23
|
+
*/
|
|
24
|
+
displayName?: LocalizedTextLike | null;
|
|
25
|
+
/**
|
|
26
|
+
* the parent Folder holding this object
|
|
27
|
+
*
|
|
28
|
+
* note
|
|
29
|
+
* - when organizedBy is specified, componentOf must not be defined
|
|
30
|
+
*/
|
|
31
|
+
organizedBy?: NodeIdLike | BaseNode;
|
|
32
|
+
/**
|
|
33
|
+
* the parent Object holding this object
|
|
34
|
+
* note
|
|
35
|
+
* - when componentOf is specified, organizedBy must not be defined
|
|
36
|
+
*/
|
|
37
|
+
componentOf?: NodeIdLike | BaseNode;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
notifierOf?: NodeIdLike | BaseNode;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
eventSourceOf?: NodeIdLike | BaseNode;
|
|
46
|
+
/**
|
|
47
|
+
* a list of components and properties names that have a HasModellingRule of Optional in the
|
|
48
|
+
* type definition that we want to instantiate.
|
|
49
|
+
* Note:
|
|
50
|
+
* - the name must follow the OPCUA naming convention and match the browse name of the property (same case)
|
|
51
|
+
* - the name can be composed to represent a path to a property or component
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
*
|
|
55
|
+
* ```javascript
|
|
56
|
+
* optionals: ["MyOptionalVariable", "MyOptionalMethod", "MyOptionalComponent.MyProperty"];
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @default: []
|
|
60
|
+
*/
|
|
61
|
+
optionals?: string[];
|
|
62
|
+
/**
|
|
63
|
+
* modellingRule
|
|
64
|
+
*/
|
|
65
|
+
modellingRule?: ModellingRuleType;
|
|
66
|
+
/**
|
|
67
|
+
* a (optional) predefined nodeId to assigned to the instance
|
|
68
|
+
* If not specified, a default nodeid will be created.
|
|
69
|
+
*/
|
|
70
|
+
nodeId?: NodeIdLike;
|
|
71
|
+
/**
|
|
72
|
+
* the namespace in which the node shall be instantiated
|
|
73
|
+
* (if not specified, the default instance namespace (`own namespace`) of the addressSpace will be used)
|
|
74
|
+
*/
|
|
75
|
+
namespace?: INamespace;
|
|
76
|
+
/**
|
|
77
|
+
* shall we also replicate the HasModelling rule reference ?
|
|
78
|
+
*/
|
|
79
|
+
copyAlsoModellingRules?: boolean;
|
|
80
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instantiate_options.js","sourceRoot":"","sources":["../source/instantiate_options.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ModellingRuleType = "Mandatory" | "Optional" | "MandatoryPlaceholder" | "OptionalPlaceholder" | "ExposesItsArray" | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelling_rule_type.js","sourceRoot":"","sources":["../source/modelling_rule_type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { QualifiedNameLike, AccessRestrictionsFlag, LocalizedTextLike } from "node-opcua-data-model";
|
|
2
|
+
import { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
3
|
+
import { ArgumentOptions, AxisInformationOptions, AxisScaleEnumeration, EnumFieldOptions, EUInformationOptions, RangeOptions, RolePermissionType, RolePermissionTypeOptions, StructureFieldOptions } from "node-opcua-types";
|
|
4
|
+
import { VariantLike } from "node-opcua-variant";
|
|
5
|
+
import { UInt32 } from "node-opcua-basic-types";
|
|
6
|
+
import { DataValueOptions } from "node-opcua-data-value";
|
|
7
|
+
import { IAddressSpace } from "./address_space";
|
|
8
|
+
import { AddReferenceOpts, BaseNode, ConstructNodeIdOptions } from "./base_node";
|
|
9
|
+
import { ModellingRuleType } from "./modelling_rule_type";
|
|
10
|
+
import { UADataType } from "./ua_data_type";
|
|
11
|
+
import { UAObject } from "./ua_object";
|
|
12
|
+
import { UAObjectType } from "./ua_object_type";
|
|
13
|
+
import { UAReferenceType } from "./ua_reference_type";
|
|
14
|
+
import { UAVariable } from "./ua_variable";
|
|
15
|
+
import { UAVariableType } from "./ua_variable_type";
|
|
16
|
+
import { BindVariableOptions } from "./bind_variable";
|
|
17
|
+
import { UAView } from "./ua_view";
|
|
18
|
+
import { UAEventType } from "./ua_event_type";
|
|
19
|
+
import { UAMethod } from "./ua_method";
|
|
20
|
+
export interface AddBaseNodeOptions {
|
|
21
|
+
browseName: QualifiedNameLike;
|
|
22
|
+
nodeId?: NodeIdLike;
|
|
23
|
+
displayName?: LocalizedTextLike | LocalizedTextLike[];
|
|
24
|
+
description?: LocalizedTextLike;
|
|
25
|
+
componentOf?: NodeIdLike | BaseNode;
|
|
26
|
+
eventSourceOf?: NodeIdLike | BaseNode;
|
|
27
|
+
notifierOf?: NodeIdLike | BaseNode;
|
|
28
|
+
organizedBy?: NodeIdLike | BaseNode;
|
|
29
|
+
propertyOf?: NodeIdLike | BaseNode;
|
|
30
|
+
modellingRule?: ModellingRuleType;
|
|
31
|
+
references?: AddReferenceOpts[];
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
accessRestrictions?: AccessRestrictionsFlag;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
rolePermissions?: RolePermissionTypeOptions[];
|
|
40
|
+
}
|
|
41
|
+
export interface AddObjectTypeOptions extends AddBaseNodeOptions {
|
|
42
|
+
isAbstract?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* @default BaseObjectType
|
|
45
|
+
*/
|
|
46
|
+
subtypeOf?: string | UAObjectType;
|
|
47
|
+
eventNotifier?: number;
|
|
48
|
+
postInstantiateFunc?: (node: UAObject) => void;
|
|
49
|
+
}
|
|
50
|
+
export interface AddVariableTypeOptions extends AddBaseNodeOptions, VariableStuff {
|
|
51
|
+
isAbstract?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @default BaseVariableType
|
|
54
|
+
*/
|
|
55
|
+
subtypeOf?: string | UAVariableType;
|
|
56
|
+
postInstantiateFunc?: (node: UAVariableType) => void;
|
|
57
|
+
value?: VariantLike;
|
|
58
|
+
}
|
|
59
|
+
export interface AddReferenceTypeOptions extends AddBaseNodeOptions {
|
|
60
|
+
isAbstract?: boolean;
|
|
61
|
+
inverseName: string;
|
|
62
|
+
subtypeOf?: string | NodeId | UAReferenceType;
|
|
63
|
+
}
|
|
64
|
+
export interface EnumerationItem {
|
|
65
|
+
description?: LocalizedTextLike;
|
|
66
|
+
displayName: LocalizedTextLike;
|
|
67
|
+
value: number;
|
|
68
|
+
}
|
|
69
|
+
export interface AddEnumerationTypeOptions extends AddBaseNodeOptions {
|
|
70
|
+
enumeration: string[] | EnumerationItem[];
|
|
71
|
+
}
|
|
72
|
+
export interface AddObjectOptions extends AddBaseNodeOptions {
|
|
73
|
+
eventNotifier?: number;
|
|
74
|
+
typeDefinition?: string | NodeId | UAObjectType;
|
|
75
|
+
nodeVersion?: string;
|
|
76
|
+
encodingOf?: NodeId | BaseNode;
|
|
77
|
+
}
|
|
78
|
+
export interface AddViewOptions extends AddBaseNodeOptions {
|
|
79
|
+
typeDefinition?: string | NodeId | UAObjectType;
|
|
80
|
+
}
|
|
81
|
+
export interface AddMethodOptions {
|
|
82
|
+
nodeId?: NodeIdLike;
|
|
83
|
+
browseName: QualifiedNameLike;
|
|
84
|
+
displayName?: LocalizedTextLike;
|
|
85
|
+
description?: LocalizedTextLike;
|
|
86
|
+
inputArguments?: ArgumentOptions[];
|
|
87
|
+
modellingRule?: ModellingRuleType;
|
|
88
|
+
outputArguments?: ArgumentOptions[];
|
|
89
|
+
componentOf?: NodeIdLike | BaseNode;
|
|
90
|
+
executable?: boolean;
|
|
91
|
+
userExecutable?: boolean;
|
|
92
|
+
accessRestrictions?: AccessRestrictionsFlag;
|
|
93
|
+
rolePermissions?: RolePermissionTypeOptions[];
|
|
94
|
+
}
|
|
95
|
+
export type AccessLevelString = string;
|
|
96
|
+
export interface VariableStuff {
|
|
97
|
+
dataType?: string | NodeIdLike | UADataType;
|
|
98
|
+
/**
|
|
99
|
+
* This Attribute indicates whether the Value Attribute of the Variable is an array and how many dimensions
|
|
100
|
+
* the array has.
|
|
101
|
+
* It may have the following values:
|
|
102
|
+
* n > 1: the Value is an array with the specified number of dimensions.
|
|
103
|
+
* OneDimension (1): The value is an array with one dimension.
|
|
104
|
+
* OneOrMoreDimensions (0): The value is an array with one or more dimensions.
|
|
105
|
+
* Scalar (?1): The value is not an array.
|
|
106
|
+
* Any (?2): The value can be a scalar or an array with any number of dimensions.
|
|
107
|
+
* ScalarOrOneDimension (?3): The value can be a scalar or a one dimensional array.
|
|
108
|
+
* NOTE All DataTypes are considered to be scalar, even if they have array-like semantics
|
|
109
|
+
* like ByteString and String.
|
|
110
|
+
*/
|
|
111
|
+
valueRank?: UInt32;
|
|
112
|
+
/**
|
|
113
|
+
* This Attribute specifies the length of each dimension for an array value. T
|
|
114
|
+
* The Attribute is intended to describe the capability of the Variable, not the current size.
|
|
115
|
+
* The number of elements shall be equal to the value of the ValueRank Attribute. Shall be null
|
|
116
|
+
* if ValueRank ? 0.
|
|
117
|
+
* A value of 0 for an individual dimension indicates that the dimension has a variable length.
|
|
118
|
+
* For example, if a Variable is defined by the following C array:
|
|
119
|
+
* Int32 myArray[346];
|
|
120
|
+
* then this Variables DataType would point to an Int32, the Variable�s ValueRank has the
|
|
121
|
+
* value 1 and the ArrayDimensions is an array with one entry having the value 346.
|
|
122
|
+
* Note that the maximum length of an array transferred on the wire is 2147483647 (max Int32)
|
|
123
|
+
* and a multi-dimensional array is encoded as a one dimensional array.
|
|
124
|
+
*/
|
|
125
|
+
arrayDimensions?: UInt32[] | null;
|
|
126
|
+
/**
|
|
127
|
+
* The AccessLevel Attribute is used to indicate how the Value of a Variable can be accessed
|
|
128
|
+
* (read/write) and if it contains current and/or historic data. The AccessLevel does not take
|
|
129
|
+
* any user access rights into account, i.e. although the Variable is writable this may be
|
|
130
|
+
* restricted to a certain user / user group.
|
|
131
|
+
*
|
|
132
|
+
* https://reference.opcfoundation.org/v104/Core/docs/Part3/8.57/
|
|
133
|
+
*/
|
|
134
|
+
accessLevel?: UInt32 | AccessLevelString;
|
|
135
|
+
/**
|
|
136
|
+
* The UserAccessLevel Attribute is used to indicate how the Value of a Variable can be accessed
|
|
137
|
+
* (read/write) and if it contains current or historic data taking user access rights into account.
|
|
138
|
+
* https://reference.opcfoundation.org/v104/Core/docs/Part3/8.57/
|
|
139
|
+
*/
|
|
140
|
+
userAccessLevel?: UInt32 | AccessLevelString;
|
|
141
|
+
/**
|
|
142
|
+
* The minimumSamplingInterval Attribute indicates how 'current' the Value of the Variable will
|
|
143
|
+
* be kept.
|
|
144
|
+
* It specifies (in milliseconds) how fast the Server can reasonably sample the value
|
|
145
|
+
* for changes (see Part 4 for a detailed description of sampling interval).
|
|
146
|
+
* A minimumSamplingInterval of 0 indicates that the Server is to monitor the item continuously.
|
|
147
|
+
* A minimumSamplingInterval of -1 means indeterminate.
|
|
148
|
+
*/
|
|
149
|
+
minimumSamplingInterval?: number;
|
|
150
|
+
/**
|
|
151
|
+
* The Historizing Attribute indicates whether the Server is actively collecting data for the
|
|
152
|
+
* history of the Variable.
|
|
153
|
+
* This differs from the AccessLevel Attribute which identifies if the
|
|
154
|
+
* Variable has any historical data. A value of TRUE indicates that the Server is actively
|
|
155
|
+
* collecting data. A value of FALSE indicates the Server is not actively collecting data.
|
|
156
|
+
* Default value is FALSE.
|
|
157
|
+
*/
|
|
158
|
+
historizing?: boolean;
|
|
159
|
+
dataValue?: DataValueOptions;
|
|
160
|
+
}
|
|
161
|
+
export interface AddVariableOptionsWithoutValue extends AddBaseNodeOptions, VariableStuff {
|
|
162
|
+
}
|
|
163
|
+
export interface AddVariableOptions extends AddVariableOptionsWithoutValue {
|
|
164
|
+
typeDefinition?: string | NodeId | UAVariableType;
|
|
165
|
+
value?: BindVariableOptions;
|
|
166
|
+
postInstantiateFunc?: (node: UAVariable) => void;
|
|
167
|
+
}
|
|
168
|
+
export interface CreateDataTypeOptions extends AddBaseNodeOptions {
|
|
169
|
+
isAbstract: boolean;
|
|
170
|
+
subtypeOf?: string | NodeId | UADataType;
|
|
171
|
+
partialDefinition?: StructureFieldOptions[] | EnumFieldOptions[];
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
*
|
|
175
|
+
* @param options.componentOf {NodeId}
|
|
176
|
+
* @param options.browseName {String}
|
|
177
|
+
* @param options.title {String}
|
|
178
|
+
* @param [options.instrumentRange]
|
|
179
|
+
* @param [options.instrumentRange.low] {Double}
|
|
180
|
+
* @param [options.instrumentRange.high] {Double}
|
|
181
|
+
* @param options.engineeringUnitsRange.low {Double}
|
|
182
|
+
* @param options.engineeringUnitsRange.high {Double}
|
|
183
|
+
* @param options.engineeringUnits {String}
|
|
184
|
+
* @param [options.nodeId = {NodeId}]
|
|
185
|
+
* @param options.accessLevel
|
|
186
|
+
* @param options.userAccessLevel
|
|
187
|
+
* @param options.title {String}
|
|
188
|
+
* @param options.axisScaleType {AxisScaleEnumeration}
|
|
189
|
+
*
|
|
190
|
+
* @param options.xAxisDefinition {AxisInformation}
|
|
191
|
+
* @param options.xAxisDefinition.engineeringUnits EURange
|
|
192
|
+
* @param options.xAxisDefinition.range
|
|
193
|
+
* @param options.xAxisDefinition.range.low
|
|
194
|
+
* @param options.xAxisDefinition.range.high
|
|
195
|
+
* @param options.xAxisDefinition.title {LocalizedText}
|
|
196
|
+
* @param options.xAxisDefinition.axisScaleType {AxisScaleEnumeration}
|
|
197
|
+
* @param options.xAxisDefinition.axisSteps = <null> {Array<Double>}
|
|
198
|
+
* @param options.value
|
|
199
|
+
*/
|
|
200
|
+
export interface AddYArrayItemOptions extends AddVariableOptions {
|
|
201
|
+
title: string;
|
|
202
|
+
instrumentRange?: RangeOptions;
|
|
203
|
+
engineeringUnitsRange?: RangeOptions;
|
|
204
|
+
engineeringUnits?: EUInformationOptions;
|
|
205
|
+
axisScaleType: AxisScaleEnumeration | string;
|
|
206
|
+
xAxisDefinition?: AxisInformationOptions;
|
|
207
|
+
}
|
|
208
|
+
export type CreateNodeOptions = any;
|
|
209
|
+
export interface RequiredModel {
|
|
210
|
+
modelUri: string;
|
|
211
|
+
version: string;
|
|
212
|
+
publicationDate: Date;
|
|
213
|
+
}
|
|
214
|
+
export declare interface INamespace {
|
|
215
|
+
version: string;
|
|
216
|
+
publicationDate: Date;
|
|
217
|
+
namespaceUri: string;
|
|
218
|
+
addressSpace: IAddressSpace;
|
|
219
|
+
index: number;
|
|
220
|
+
$emulateVersion103?: boolean;
|
|
221
|
+
getRequiredModels(): RequiredModel[] | undefined;
|
|
222
|
+
constructNodeId(options: ConstructNodeIdOptions): NodeId;
|
|
223
|
+
findObjectType(objectType: string): UAObjectType | null;
|
|
224
|
+
findVariableType(variableType: string): UAVariableType | null;
|
|
225
|
+
findDataType(dataType: string): UADataType | null;
|
|
226
|
+
findReferenceType(referenceType: string): UAReferenceType | null;
|
|
227
|
+
findReferenceTypeFromInverseName(referenceType: string): UAReferenceType | null;
|
|
228
|
+
findNode(nodeId: NodeIdLike): BaseNode | null;
|
|
229
|
+
findNode2(nodeId: NodeId): BaseNode | null;
|
|
230
|
+
addAlias(aliasName: string, nodeId: NodeId): void;
|
|
231
|
+
addObjectType(options: AddObjectTypeOptions): UAObjectType;
|
|
232
|
+
addVariableType(options: AddVariableTypeOptions): UAVariableType;
|
|
233
|
+
addReferenceType(options: AddReferenceTypeOptions): UAReferenceType;
|
|
234
|
+
addEnumerationType(options: AddEnumerationTypeOptions): UADataType;
|
|
235
|
+
createDataType(options: CreateDataTypeOptions): UADataType;
|
|
236
|
+
addVariable(options: AddVariableOptions): UAVariable;
|
|
237
|
+
addObject(options: AddObjectOptions): UAObject;
|
|
238
|
+
addView(options: AddViewOptions): UAView;
|
|
239
|
+
addFolder(parentFolder: NodeIdLike | UAObject, options: any): UAObject;
|
|
240
|
+
createNode(options: CreateNodeOptions): BaseNode;
|
|
241
|
+
/** @private */
|
|
242
|
+
internalCreateNode(options: CreateNodeOptions): BaseNode;
|
|
243
|
+
deleteNode(node: NodeId | BaseNode): void;
|
|
244
|
+
/**
|
|
245
|
+
* add a new event type to the address space
|
|
246
|
+
* @example
|
|
247
|
+
*
|
|
248
|
+
* const evtType = namespace.addEventType({
|
|
249
|
+
* browseName: "MyAuditEventType",
|
|
250
|
+
* subtypeOf: "AuditEventType"
|
|
251
|
+
* });
|
|
252
|
+
* const myConditionType = namespace.addEventType({
|
|
253
|
+
* browseName: "MyConditionType",
|
|
254
|
+
* subtypeOf: "ConditionType",
|
|
255
|
+
* isAbstract: false
|
|
256
|
+
* });
|
|
257
|
+
*
|
|
258
|
+
*/
|
|
259
|
+
addEventType(options: {
|
|
260
|
+
browseName: QualifiedNameLike;
|
|
261
|
+
/**
|
|
262
|
+
* @default BaseEventType
|
|
263
|
+
*/
|
|
264
|
+
subtypeOf?: string | UAEventType;
|
|
265
|
+
isAbstract?: boolean;
|
|
266
|
+
}): UAEventType;
|
|
267
|
+
/**
|
|
268
|
+
*
|
|
269
|
+
*/
|
|
270
|
+
addMethod(parent: UAObject | UAObjectType, options: AddMethodOptions): UAMethod;
|
|
271
|
+
toNodeset2XML(): string;
|
|
272
|
+
/**
|
|
273
|
+
* @internals
|
|
274
|
+
*/
|
|
275
|
+
getStandardsNodeIds(): {
|
|
276
|
+
referenceTypeIds: {
|
|
277
|
+
[key: string]: string;
|
|
278
|
+
};
|
|
279
|
+
objectTypeIds: {
|
|
280
|
+
[key: string]: string;
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
setDefaultRolePermissions(rolePermissions: RolePermissionTypeOptions[] | null): void;
|
|
284
|
+
getDefaultRolePermissions(): RolePermissionType[] | null;
|
|
285
|
+
setDefaultAccessRestrictions(accessRestrictions: AccessRestrictionsFlag): void;
|
|
286
|
+
getDefaultAccessRestrictions(): AccessRestrictionsFlag;
|
|
287
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespace.js","sourceRoot":"","sources":["../source/namespace.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Certificate } from "node-opcua-crypto";
|
|
2
|
+
import { DataValue } from "node-opcua-data-value";
|
|
3
|
+
import { PreciseClock } from "node-opcua-date-time";
|
|
4
|
+
import { NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
5
|
+
import { MessageSecurityMode, PermissionType, ReferenceDescription, UserIdentityToken } from "node-opcua-types";
|
|
6
|
+
import { StatusCode } from "node-opcua-status-code";
|
|
7
|
+
import { ContinuationPoint } from "./continuation_point";
|
|
8
|
+
import { BaseNode } from "./base_node";
|
|
9
|
+
import { UAObject } from "./ua_object";
|
|
10
|
+
import { UAObjectType } from ".";
|
|
11
|
+
export declare function getContextMaxMessageSize(context: ISessionContext): number;
|
|
12
|
+
export interface ITransportSettings {
|
|
13
|
+
maxMessageSize: number;
|
|
14
|
+
}
|
|
15
|
+
export interface IChannelBase {
|
|
16
|
+
clientCertificate: Certificate | null;
|
|
17
|
+
securityMode: MessageSecurityMode;
|
|
18
|
+
securityPolicy: string;
|
|
19
|
+
getTransportSettings(): ITransportSettings;
|
|
20
|
+
}
|
|
21
|
+
export interface IContinuationPointInfo<T> {
|
|
22
|
+
values: T[] | null;
|
|
23
|
+
continuationPoint: ContinuationPoint | undefined;
|
|
24
|
+
statusCode: StatusCode;
|
|
25
|
+
}
|
|
26
|
+
export interface ContinuationData {
|
|
27
|
+
continuationPoint: ContinuationPoint | null;
|
|
28
|
+
releaseContinuationPoints?: boolean;
|
|
29
|
+
index?: number;
|
|
30
|
+
}
|
|
31
|
+
export interface IContinuationPointManager {
|
|
32
|
+
registerHistoryReadRaw(maxElements: number, values: DataValue[], continuationData: ContinuationData): IContinuationPointInfo<DataValue>;
|
|
33
|
+
getNextHistoryReadRaw(numValues: number, continuationData: ContinuationData): IContinuationPointInfo<DataValue>;
|
|
34
|
+
registerReferences(maxElements: number, values: ReferenceDescription[], continuationData: ContinuationData): IContinuationPointInfo<ReferenceDescription>;
|
|
35
|
+
getNextReferences(numValues: number, continuationData: ContinuationData): IContinuationPointInfo<ReferenceDescription>;
|
|
36
|
+
}
|
|
37
|
+
export interface ISessionBase {
|
|
38
|
+
userIdentityToken?: UserIdentityToken;
|
|
39
|
+
channel?: IChannelBase;
|
|
40
|
+
getSessionId(): NodeId;
|
|
41
|
+
continuationPointManager: IContinuationPointManager;
|
|
42
|
+
}
|
|
43
|
+
export interface ContinuationPointData {
|
|
44
|
+
dataValues: DataValue[];
|
|
45
|
+
}
|
|
46
|
+
export interface ISessionContext {
|
|
47
|
+
session?: ISessionBase;
|
|
48
|
+
getCurrentUserRoles(): NodeId[];
|
|
49
|
+
checkPermission(node: BaseNode, action: PermissionType): boolean;
|
|
50
|
+
isBrowseAccessRestricted(node: BaseNode): boolean;
|
|
51
|
+
currentUserHasRole(role: NodeIdLike): boolean;
|
|
52
|
+
isAccessRestricted(node: BaseNode): boolean;
|
|
53
|
+
object?: UAObject | UAObjectType;
|
|
54
|
+
currentTime?: PreciseClock;
|
|
55
|
+
userIdentity?: string;
|
|
56
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getContextMaxMessageSize = void 0;
|
|
4
|
+
function getContextMaxMessageSize(context) {
|
|
5
|
+
var _a, _b, _c, _d;
|
|
6
|
+
if (!((_b = (_a = context.session) === null || _a === void 0 ? void 0 : _a.channel) === null || _b === void 0 ? void 0 : _b.getTransportSettings))
|
|
7
|
+
return 0;
|
|
8
|
+
const f = (_d = (_c = context.session) === null || _c === void 0 ? void 0 : _c.channel) === null || _d === void 0 ? void 0 : _d.getTransportSettings();
|
|
9
|
+
return f ? f.maxMessageSize : 0;
|
|
10
|
+
}
|
|
11
|
+
exports.getContextMaxMessageSize = getContextMaxMessageSize;
|
|
12
|
+
//# sourceMappingURL=session_context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session_context.js","sourceRoot":"","sources":["../source/session_context.ts"],"names":[],"mappings":";;;AAYA,SAAgB,wBAAwB,CAAC,OAAwB;;IAC7D,IAAI,CAAC,CAAA,MAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,OAAO,0CAAE,oBAAoB,CAAA;QAAE,OAAO,CAAC,CAAC;IAC9D,MAAM,CAAC,GAAG,MAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,OAAO,0CAAE,oBAAoB,EAAE,CAAC;IAC3D,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AACpC,CAAC;AAJD,4DAIC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { NodeClass } from "node-opcua-data-model";
|
|
2
|
+
import { ExpandedNodeId, NodeId, NodeIdLike } from "node-opcua-nodeid";
|
|
3
|
+
import { DataType } from "node-opcua-variant";
|
|
4
|
+
import { DataTypeDefinition, EnumDefinition, StructureDefinition } from "node-opcua-types";
|
|
5
|
+
import { BaseNode } from "./base_node";
|
|
6
|
+
export interface UADataType extends BaseNode {
|
|
7
|
+
readonly nodeClass: NodeClass.DataType;
|
|
8
|
+
readonly subtypeOfObj: UADataType | null;
|
|
9
|
+
readonly subtypeOf: NodeId | null;
|
|
10
|
+
readonly isAbstract: boolean;
|
|
11
|
+
readonly binaryEncodingDefinition: string | null;
|
|
12
|
+
readonly binaryEncodingNodeId: ExpandedNodeId | null;
|
|
13
|
+
readonly binaryEncoding: BaseNode | null;
|
|
14
|
+
readonly xmlEncodingDefinition: string | null;
|
|
15
|
+
readonly xmlEncodingNodeId: ExpandedNodeId | null;
|
|
16
|
+
readonly xmlEncoding: BaseNode | null;
|
|
17
|
+
readonly jsonEncodingNodeId: ExpandedNodeId | null;
|
|
18
|
+
readonly jsonEncoding: BaseNode | null;
|
|
19
|
+
readonly basicDataType: DataType;
|
|
20
|
+
readonly symbolicName: string;
|
|
21
|
+
isSubtypeOf(referenceType: NodeIdLike | UADataType): boolean;
|
|
22
|
+
/** @deprecated - use isSubtypeOf instead */
|
|
23
|
+
isSupertypeOf(referenceType: NodeIdLike | UADataType): boolean;
|
|
24
|
+
getEncodingNode(encodingName: string): BaseNode | null;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
getDefinition(): DataTypeDefinition;
|
|
29
|
+
isStructure(): boolean;
|
|
30
|
+
getStructureDefinition(): StructureDefinition;
|
|
31
|
+
isEnumeration(): boolean;
|
|
32
|
+
getEnumDefinition(): EnumDefinition;
|
|
33
|
+
getBasicDataType(): DataType;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ua_data_type.js","sourceRoot":"","sources":["../source/ua_data_type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { QualifiedName } from "node-opcua-data-model";
|
|
2
|
+
import { DataValue } from "node-opcua-data-value";
|
|
3
|
+
import { ExtensionObject } from "node-opcua-extension-object";
|
|
4
|
+
import { UADataType } from "./ua_data_type";
|
|
5
|
+
import { UAVariable } from "./ua_variable";
|
|
6
|
+
import { UAVariableType } from "./ua_variable_type";
|
|
7
|
+
export interface UADynamicVariableArray<T extends ExtensionObject = ExtensionObject> extends UAVariable {
|
|
8
|
+
$dataValue: DataValue;
|
|
9
|
+
$$variableType: UAVariableType;
|
|
10
|
+
$$dataType: UADataType;
|
|
11
|
+
$$extensionObjectArray: T[];
|
|
12
|
+
$$getElementBrowseName: (obj: T, index: number) => QualifiedName;
|
|
13
|
+
$$indexPropertyName: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ua_dynamic_variable_array.js","sourceRoot":"","sources":["../source/ua_dynamic_variable_array.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ua_event_type.js","sourceRoot":"","sources":["../source/ua_event_type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { NodeClass } from "node-opcua-data-model";
|
|
2
|
+
import { NodeId } from "node-opcua-nodeid";
|
|
3
|
+
import { Argument, CallMethodResultOptions } from "node-opcua-types";
|
|
4
|
+
import { Variant, VariantLike } from "node-opcua-variant";
|
|
5
|
+
import { CallbackT } from "node-opcua-status-code";
|
|
6
|
+
import { BaseNode } from "./base_node";
|
|
7
|
+
import { ISessionContext } from "./session_context";
|
|
8
|
+
import { UAObject } from "./ua_object";
|
|
9
|
+
import { UAObjectType } from "./ua_object_type";
|
|
10
|
+
import { UAVariable } from "./ua_variable";
|
|
11
|
+
import { CloneExtraInfo, CloneFilter, CloneOptions } from "./clone_options";
|
|
12
|
+
export declare type MethodFunctorC = (this: UAMethod, inputArguments: Variant[], context: ISessionContext, callback: CallbackT<CallMethodResultOptions>) => void;
|
|
13
|
+
export declare type MethodFunctorA = (this: UAMethod, inputArguments: Variant[], context: ISessionContext) => Promise<CallMethodResultOptions>;
|
|
14
|
+
export type MethodFunctor = MethodFunctorC | MethodFunctorA;
|
|
15
|
+
export declare class UAMethod extends BaseNode {
|
|
16
|
+
readonly nodeClass: NodeClass.Method;
|
|
17
|
+
readonly typeDefinition: NodeId;
|
|
18
|
+
readonly typeDefinitionObj: UAObjectType;
|
|
19
|
+
readonly parent: UAObject | null;
|
|
20
|
+
readonly inputArguments?: UAVariable;
|
|
21
|
+
readonly outputArguments?: UAVariable;
|
|
22
|
+
readonly methodDeclarationId: NodeId;
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
_getExecutableFlag?: (sessionContext: ISessionContext | null) => boolean;
|
|
27
|
+
bindMethod(methodFunction: MethodFunctor): void;
|
|
28
|
+
getExecutableFlag(context: ISessionContext): boolean;
|
|
29
|
+
getInputArguments(): Argument[];
|
|
30
|
+
getOutputArguments(): Argument[];
|
|
31
|
+
/**
|
|
32
|
+
* @async
|
|
33
|
+
* @param inputArguments
|
|
34
|
+
* @param context
|
|
35
|
+
* @param callback
|
|
36
|
+
*/
|
|
37
|
+
execute(object: UAObject | UAObjectType | null, inputArguments: VariantLike[] | null, context: ISessionContext, callback: CallbackT<CallMethodResultOptions>): void;
|
|
38
|
+
execute(object: UAObject | UAObjectType | null, inputArguments: null | VariantLike[], context: ISessionContext): Promise<CallMethodResultOptions>;
|
|
39
|
+
clone(options: CloneOptions, optionalFilter?: CloneFilter, extraInfo?: CloneExtraInfo): UAMethod;
|
|
40
|
+
isBound(): boolean;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ua_method.js","sourceRoot":"","sources":["../source/ua_method.ts"],"names":[],"mappings":";;AAKA,EAAE;AACF,2CAAuC"}
|