node-opcua-server 2.126.0 → 2.127.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-opcua-server",
3
- "version": "2.126.0",
3
+ "version": "2.127.0",
4
4
  "description": "pure nodejs OPCUA SDK - module server",
5
5
  "scripts": {
6
6
  "build": "tsc -b",
@@ -17,14 +17,14 @@
17
17
  "chalk": "4.1.2",
18
18
  "dequeue": "^1.0.5",
19
19
  "lodash": "4.17.21",
20
- "node-opcua-address-space": "2.126.0",
20
+ "node-opcua-address-space": "2.127.0",
21
21
  "node-opcua-address-space-base": "2.126.0",
22
22
  "node-opcua-assert": "2.120.0",
23
23
  "node-opcua-basic-types": "2.126.0",
24
24
  "node-opcua-binary-stream": "2.125.0",
25
25
  "node-opcua-certificate-manager": "2.125.0",
26
- "node-opcua-client": "2.126.0",
27
- "node-opcua-client-dynamic-extension-object": "2.126.0",
26
+ "node-opcua-client": "2.127.0",
27
+ "node-opcua-client-dynamic-extension-object": "2.127.0",
28
28
  "node-opcua-common": "2.126.0",
29
29
  "node-opcua-constants": "2.125.0",
30
30
  "node-opcua-crypto": "4.8.0",
@@ -85,7 +85,7 @@
85
85
  "internet of things"
86
86
  ],
87
87
  "homepage": "http://node-opcua.github.io/",
88
- "gitHead": "81b467f284c41813ab8caf17f6d20322d4734fdc",
88
+ "gitHead": "29da2933b3dbe51c9ca124a26655e346e6e9dcdc",
89
89
  "files": [
90
90
  "dist",
91
91
  "source"
@@ -2,13 +2,13 @@
2
2
  * @module node-opcua-server
3
3
  */
4
4
  // tslint:disable:max-classes-per-file
5
- import { UInt32 } from "node-opcua-basic-types";
5
+ import { Double, UInt32 } from "node-opcua-basic-types";
6
6
  import { BinaryStream } from "node-opcua-binary-stream";
7
7
  import { QualifiedName } from "node-opcua-data-model";
8
8
  import { make_warningLog } from "node-opcua-debug";
9
9
  import { SignedSoftwareCertificate } from "node-opcua-types";
10
10
 
11
- const warningLog =make_warningLog(__filename);
11
+ const warningLog = make_warningLog(__filename);
12
12
 
13
13
  /**
14
14
  */
@@ -64,7 +64,7 @@ export interface IServerCapabilities {
64
64
  maxArrayLength: number;
65
65
  maxByteStringLength: number;
66
66
  maxQueryContinuationPoints: number;
67
- minSupportedSampleRate: number;
67
+ minSupportedSampleRate: Double;
68
68
  operationLimits: OperationLimitsOptions;
69
69
 
70
70
  serverProfileArray: string[];
@@ -232,14 +232,14 @@ export class ServerCapabilities implements IServerCapabilities {
232
232
  this.softwareCertificates = options.softwareCertificates || [];
233
233
 
234
234
  this.maxArrayLength = options.maxArrayLength || defaultServerCapabilities.maxArrayLength;
235
-
235
+
236
236
  this.maxStringLength = options.maxStringLength || defaultServerCapabilities.maxStringLength;
237
237
  this.maxByteStringLength = options.maxByteStringLength || defaultServerCapabilities.maxByteStringLength;
238
238
 
239
239
  if (BinaryStream.maxStringLength < this.maxStringLength) {
240
240
  warningLog(`ServerCapabilities.maxStringLength ${this.maxStringLength} is greater that the allowed limite BinaryStream.maxStringLength = ${BinaryStream.maxStringLength}\nPlease adjust the value.`);
241
241
  }
242
-
242
+
243
243
  if (BinaryStream.maxByteStringLength < this.maxByteStringLength) {
244
244
  warningLog(`ServerCapabilities.maxByteStringLength ${this.maxByteStringLength} is greater that the allowed limite BinaryStream.maxByteStringLength = ${BinaryStream.maxByteStringLength}\nPlease adjust the value.`);
245
245
  }
@@ -443,7 +443,7 @@ export class ServerEngine extends EventEmitter implements IAddressSpaceAccessor
443
443
 
444
444
  // make sure minSupportedSampleRate matches MonitoredItem.minimumSamplingInterval
445
445
  (this.serverCapabilities as any).__defineGetter__("minSupportedSampleRate", () => {
446
- return options!.serverCapabilities?.minSupportedSampleRate || MonitoredItem.minimumSamplingInterval;
446
+ return options!.serverCapabilities?.minSupportedSampleRate || MonitoredItem.minimumSamplingInterval;
447
447
  });
448
448
 
449
449
  this.serverConfiguration = options.serverConfiguration;
@@ -1020,7 +1020,7 @@ export class ServerEngine extends EventEmitter implements IAddressSpaceAccessor
1020
1020
  });
1021
1021
 
1022
1022
  bindStandardScalar(VariableIds.Server_ServerCapabilities_MinSupportedSampleRate, DataType.Double, () => {
1023
- return this.serverCapabilities.minSupportedSampleRate;
1023
+ return Math.max(this.serverCapabilities.minSupportedSampleRate, defaultServerCapabilities.minSupportedSampleRate);
1024
1024
  });
1025
1025
 
1026
1026
  bindStandardScalar(VariableIds.Server_ServerCapabilities_MaxBrowseContinuationPoints, DataType.UInt16, () => {
@@ -1089,11 +1089,7 @@ export class ServerEngine extends EventEmitter implements IAddressSpaceAccessor
1089
1089
  });
1090
1090
 
1091
1091
  bindStandardScalar(VariableIds.Server_ServerCapabilities_MaxMonitoredItemsQueueSize, DataType.UInt32, () => {
1092
- return Math.max(1,this.serverCapabilities.maxMonitoredItemsQueueSize);
1093
- });
1094
-
1095
- bindStandardScalar(VariableIds.Server_ServerCapabilities_MinSupportedSampleRate, DataType.UInt32, () => {
1096
- return Math.max(this.serverCapabilities.minSupportedSampleRate, defaultServerCapabilities.minSupportedSampleRate);
1092
+ return Math.max(1, this.serverCapabilities.maxMonitoredItemsQueueSize);
1097
1093
  });
1098
1094
 
1099
1095
  const bindOperationLimits = (operationLimits: ServerOperationLimits) => {
@@ -1881,8 +1877,8 @@ export class ServerEngine extends EventEmitter implements IAddressSpaceAccessor
1881
1877
  } else {
1882
1878
  warningLog(
1883
1879
  chalk.yellow("WARNING: cannot bind a method with id ") +
1884
- chalk.cyan(nodeId.toString()) +
1885
- chalk.yellow(". please check your nodeset.xml file or add this node programmatically")
1880
+ chalk.cyan(nodeId.toString()) +
1881
+ chalk.yellow(". please check your nodeset.xml file or add this node programmatically")
1886
1882
  );
1887
1883
  warningLog(traceFromThisProjectOnly());
1888
1884
  }