opcua-webapi-ts 1.1.4 → 1.1.6
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/cjs/client/UaWebClient.js +24 -2
- package/dist/cjs/client/utils/UaNodeReader.js +439 -517
- package/dist/cjs/common/nodes/UaDataType.js +35 -34
- package/dist/cjs/common/nodes/UaMethod.js +2 -2
- package/dist/cjs/common/nodes/UaObject.js +1 -1
- package/dist/cjs/common/nodes/UaVariable.js +10 -6
- package/dist/cjs/common/structure/UaReadProcessedDetails.js +70 -0
- package/dist/cjs/common/structure/index.js +2 -1
- package/dist/cjs/common/types/UaReference.js +59 -0
- package/dist/cjs/common/types/index.js +1 -1
- package/dist/client/UaWebClient.d.ts +1 -0
- package/dist/client/UaWebClient.js +24 -2
- package/dist/client/utils/UaNodeReader.d.ts +45 -73
- package/dist/client/utils/UaNodeReader.js +439 -517
- package/dist/common/nodes/UaDataType.d.ts +2 -2
- package/dist/common/nodes/UaDataType.js +35 -34
- package/dist/common/nodes/UaMethod.js +2 -2
- package/dist/common/nodes/UaObject.js +1 -1
- package/dist/common/nodes/UaVariable.d.ts +5 -4
- package/dist/common/nodes/UaVariable.js +10 -6
- package/dist/common/structure/UaReadProcessedDetails.d.ts +18 -0
- package/dist/common/structure/UaReadProcessedDetails.js +70 -0
- package/dist/common/structure/index.d.ts +2 -1
- package/dist/common/structure/index.js +2 -1
- package/dist/common/types/UaReference.d.ts +23 -0
- package/dist/common/types/UaReference.js +59 -0
- package/dist/common/types/index.d.ts +1 -1
- package/dist/common/types/index.js +1 -1
- package/package.json +1 -1
|
@@ -288,7 +288,7 @@ class UaWebClient {
|
|
|
288
288
|
let details = new common_2.UaReadRawModifiedDetails(startTime, endTime, (numValuesPerNode) ? numValuesPerNode : 0, (returnBounds) ? returnBounds : false, (isReadModified) ? isReadModified : false);
|
|
289
289
|
let historyReadDetails = details.toExtensionObject();
|
|
290
290
|
let nodesToRead = [nodeToRead];
|
|
291
|
-
let results = yield this.historyRead(nodesToRead, historyReadDetails, (timestampsToReturn) ? timestampsToReturn : opcua_webapi_1.TimestampsToReturn.
|
|
291
|
+
let results = yield this.historyRead(nodesToRead, historyReadDetails, (timestampsToReturn) ? timestampsToReturn : opcua_webapi_1.TimestampsToReturn.Both, (releaseContinuationPoints) ? releaseContinuationPoints : false);
|
|
292
292
|
if (results[0].statusCode.isNotGood())
|
|
293
293
|
throw new common_1.UaError(results[0].statusCode);
|
|
294
294
|
let extensionObject = results[0].historyData;
|
|
@@ -309,7 +309,29 @@ class UaWebClient {
|
|
|
309
309
|
let details = new common_2.UaReadAtTimeDetails(requiredTimes, useSimpleBounds);
|
|
310
310
|
let historyReadDetails = details.toExtensionObject();
|
|
311
311
|
let nodesToRead = [nodeToRead];
|
|
312
|
-
let results = yield this.historyRead(nodesToRead, historyReadDetails, (timestampsToReturn) ? timestampsToReturn : opcua_webapi_1.TimestampsToReturn.
|
|
312
|
+
let results = yield this.historyRead(nodesToRead, historyReadDetails, (timestampsToReturn) ? timestampsToReturn : opcua_webapi_1.TimestampsToReturn.Both, (releaseContinuationPoints) ? releaseContinuationPoints : false);
|
|
313
|
+
if (results[0].statusCode.isNotGood())
|
|
314
|
+
throw new common_1.UaError(results[0].statusCode);
|
|
315
|
+
let extensionObject = results[0].historyData;
|
|
316
|
+
if (!extensionObject)
|
|
317
|
+
throw new common_1.UaError((0, common_1.makeUaStatusCode)(opcua_webapi_1.StatusCodes.BadDecodingError));
|
|
318
|
+
let historyData = common_1.UaHistoryData.fromExtensionObject(extensionObject);
|
|
319
|
+
if (null == historyData)
|
|
320
|
+
throw new common_1.UaError((0, common_1.makeUaStatusCode)(opcua_webapi_1.StatusCodes.BadDecodingError));
|
|
321
|
+
let ret = new common_1.UaHistoryDataResult(historyData.dataValues, results[0].continuationPoint);
|
|
322
|
+
return ret;
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
historyReadProcessed(nodeId, startTime, endTime, processingInterval, aggregateType, continuationPoint, timestampsToReturn, releaseContinuationPoints) {
|
|
326
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
327
|
+
let nodeToRead = new common_1.UaHistoryReadValueId(nodeId, continuationPoint);
|
|
328
|
+
let aggregateTypeId = (aggregateType) ?
|
|
329
|
+
aggregateType :
|
|
330
|
+
common_1.UaNodeId.from(common_1.ObjectIds.AggregateFunction_Interpolative);
|
|
331
|
+
let details = new common_1.UaReadProcessedDetails(startTime, endTime, processingInterval, [aggregateTypeId]);
|
|
332
|
+
let historyReadDetails = details.toExtensionObject();
|
|
333
|
+
let nodesToRead = [nodeToRead];
|
|
334
|
+
let results = yield this.historyRead(nodesToRead, historyReadDetails, (timestampsToReturn) ? timestampsToReturn : opcua_webapi_1.TimestampsToReturn.Both, (releaseContinuationPoints) ? releaseContinuationPoints : false);
|
|
313
335
|
if (results[0].statusCode.isNotGood())
|
|
314
336
|
throw new common_1.UaError(results[0].statusCode);
|
|
315
337
|
let extensionObject = results[0].historyData;
|