node-opcua-aggregates 2.97.0 → 2.98.1
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/aggregates.d.ts +22 -22
- package/dist/aggregates.js +275 -275
- package/dist/average.d.ts +3 -3
- package/dist/average.js +60 -60
- package/dist/calculate_bad_good.d.ts +10 -10
- package/dist/calculate_bad_good.js +117 -117
- package/dist/common.d.ts +8 -8
- package/dist/common.js +93 -93
- package/dist/count.d.ts +3 -3
- package/dist/count.js +86 -86
- package/dist/duration_bad.d.ts +4 -4
- package/dist/duration_bad.js +31 -31
- package/dist/duration_good.d.ts +4 -4
- package/dist/duration_good.js +31 -31
- package/dist/index.d.ts +11 -11
- package/dist/index.js +34 -34
- package/dist/interpolate.d.ts +16 -16
- package/dist/interpolate.js +130 -130
- package/dist/interval.d.ts +62 -62
- package/dist/interval.js +199 -199
- package/dist/minmax.d.ts +18 -18
- package/dist/minmax.js +148 -148
- package/dist/percent_bad.d.ts +4 -4
- package/dist/percent_bad.js +24 -24
- package/dist/percent_good.d.ts +7 -7
- package/dist/percent_good.js +48 -48
- package/dist/read_processed_details.d.ts +6 -6
- package/dist/read_processed_details.js +143 -143
- package/package.json +22 -18
- package/.mocharc.yml +0 -7
- package/bin/sample_aggregate_server.js +0 -15
- package/nyc.config.js +0 -16
package/dist/count.js
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCountData = void 0;
|
|
4
|
-
const node_opcua_data_value_1 = require("node-opcua-data-value");
|
|
5
|
-
const node_opcua_status_code_1 = require("node-opcua-status-code");
|
|
6
|
-
const node_opcua_variant_1 = require("node-opcua-variant");
|
|
7
|
-
const common_1 = require("./common");
|
|
8
|
-
const interval_1 = require("./interval");
|
|
9
|
-
/**
|
|
10
|
-
* The Count Aggregate retrieves a count of all the raw values within an interval.
|
|
11
|
-
* If one or more raw values are non-Good, they are not included in the count, and the Aggregate
|
|
12
|
-
* StatusCode is determined using the StatusCode Calculation for non-time based Aggregates.
|
|
13
|
-
* If no Good data exists for an interval, the count is zero.
|
|
14
|
-
*/
|
|
15
|
-
function calculateCountValue(interval, options) {
|
|
16
|
-
const indexStart = interval.index;
|
|
17
|
-
let statusCode = node_opcua_status_code_1.StatusCodes.Good;
|
|
18
|
-
let isPartial = interval.isPartial;
|
|
19
|
-
let nbBad = 0;
|
|
20
|
-
let nbGood = 0;
|
|
21
|
-
let nbUncertain = 0;
|
|
22
|
-
let badDuration = 0;
|
|
23
|
-
let uncertainDuration = 0;
|
|
24
|
-
let goodDuration = 0;
|
|
25
|
-
for (let i = indexStart; i < indexStart + interval.count; i++) {
|
|
26
|
-
const dataValue = interval.dataValues[i];
|
|
27
|
-
if (dataValue.statusCode.equals(node_opcua_status_code_1.StatusCodes.BadNoData)) {
|
|
28
|
-
isPartial = true;
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
const regionDuration = interval.regionDuration(i);
|
|
32
|
-
if (dataValue.statusCode.isBad()) {
|
|
33
|
-
nbBad++;
|
|
34
|
-
badDuration += regionDuration;
|
|
35
|
-
}
|
|
36
|
-
else if ((0, interval_1.isUncertain)(dataValue.statusCode)) {
|
|
37
|
-
nbUncertain++;
|
|
38
|
-
uncertainDuration += regionDuration;
|
|
39
|
-
}
|
|
40
|
-
else if (dataValue.statusCode.isGoodish()) {
|
|
41
|
-
nbGood++;
|
|
42
|
-
goodDuration += regionDuration;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
const partialFlag = isPartial ? node_opcua_status_code_1.extraStatusCodeBits.HistorianPartial : 0;
|
|
46
|
-
// console.log(" ", goodDuration, uncertainDuration, badDuration);
|
|
47
|
-
if (nbBad > 0) {
|
|
48
|
-
const duration = interval.duration();
|
|
49
|
-
if (options.treatUncertainAsBad) {
|
|
50
|
-
badDuration += uncertainDuration;
|
|
51
|
-
}
|
|
52
|
-
const actualPercentDataBad = (badDuration / duration) * 100.0;
|
|
53
|
-
const percentDataBad = options.percentDataBad === undefined ? 100 : options.percentDataBad;
|
|
54
|
-
if (actualPercentDataBad >= percentDataBad) {
|
|
55
|
-
return new node_opcua_data_value_1.DataValue({
|
|
56
|
-
sourceTimestamp: interval.startTime,
|
|
57
|
-
statusCode: node_opcua_status_code_1.StatusCodes.Bad
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
if (nbUncertain > 0 || nbBad > 0) {
|
|
62
|
-
statusCode = node_opcua_status_code_1.StatusCode.makeStatusCode(node_opcua_status_code_1.StatusCodes.UncertainDataSubNormal, node_opcua_status_code_1.extraStatusCodeBits.HistorianCalculated | partialFlag);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
statusCode = node_opcua_status_code_1.StatusCode.makeStatusCode(node_opcua_status_code_1.StatusCodes.Good, node_opcua_status_code_1.extraStatusCodeBits.HistorianCalculated | partialFlag);
|
|
66
|
-
}
|
|
67
|
-
if (nbUncertain === 0 && nbGood === 0) {
|
|
68
|
-
statusCode = node_opcua_status_code_1.StatusCodes.BadNoData;
|
|
69
|
-
return new node_opcua_data_value_1.DataValue({
|
|
70
|
-
sourceTimestamp: interval.startTime,
|
|
71
|
-
statusCode: statusCode
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
return new node_opcua_data_value_1.DataValue({
|
|
75
|
-
sourceTimestamp: interval.startTime,
|
|
76
|
-
statusCode: statusCode,
|
|
77
|
-
value: {
|
|
78
|
-
dataType: node_opcua_variant_1.DataType.UInt32,
|
|
79
|
-
value: nbGood
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
function getCountData(node, processingInterval, startDate, endDate, callback) {
|
|
84
|
-
(0, common_1.getAggregateData)(node, processingInterval, startDate, endDate, calculateCountValue, callback);
|
|
85
|
-
}
|
|
86
|
-
exports.getCountData = getCountData;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCountData = void 0;
|
|
4
|
+
const node_opcua_data_value_1 = require("node-opcua-data-value");
|
|
5
|
+
const node_opcua_status_code_1 = require("node-opcua-status-code");
|
|
6
|
+
const node_opcua_variant_1 = require("node-opcua-variant");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
const interval_1 = require("./interval");
|
|
9
|
+
/**
|
|
10
|
+
* The Count Aggregate retrieves a count of all the raw values within an interval.
|
|
11
|
+
* If one or more raw values are non-Good, they are not included in the count, and the Aggregate
|
|
12
|
+
* StatusCode is determined using the StatusCode Calculation for non-time based Aggregates.
|
|
13
|
+
* If no Good data exists for an interval, the count is zero.
|
|
14
|
+
*/
|
|
15
|
+
function calculateCountValue(interval, options) {
|
|
16
|
+
const indexStart = interval.index;
|
|
17
|
+
let statusCode = node_opcua_status_code_1.StatusCodes.Good;
|
|
18
|
+
let isPartial = interval.isPartial;
|
|
19
|
+
let nbBad = 0;
|
|
20
|
+
let nbGood = 0;
|
|
21
|
+
let nbUncertain = 0;
|
|
22
|
+
let badDuration = 0;
|
|
23
|
+
let uncertainDuration = 0;
|
|
24
|
+
let goodDuration = 0;
|
|
25
|
+
for (let i = indexStart; i < indexStart + interval.count; i++) {
|
|
26
|
+
const dataValue = interval.dataValues[i];
|
|
27
|
+
if (dataValue.statusCode.equals(node_opcua_status_code_1.StatusCodes.BadNoData)) {
|
|
28
|
+
isPartial = true;
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
const regionDuration = interval.regionDuration(i);
|
|
32
|
+
if (dataValue.statusCode.isBad()) {
|
|
33
|
+
nbBad++;
|
|
34
|
+
badDuration += regionDuration;
|
|
35
|
+
}
|
|
36
|
+
else if ((0, interval_1.isUncertain)(dataValue.statusCode)) {
|
|
37
|
+
nbUncertain++;
|
|
38
|
+
uncertainDuration += regionDuration;
|
|
39
|
+
}
|
|
40
|
+
else if (dataValue.statusCode.isGoodish()) {
|
|
41
|
+
nbGood++;
|
|
42
|
+
goodDuration += regionDuration;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const partialFlag = isPartial ? node_opcua_status_code_1.extraStatusCodeBits.HistorianPartial : 0;
|
|
46
|
+
// console.log(" ", goodDuration, uncertainDuration, badDuration);
|
|
47
|
+
if (nbBad > 0) {
|
|
48
|
+
const duration = interval.duration();
|
|
49
|
+
if (options.treatUncertainAsBad) {
|
|
50
|
+
badDuration += uncertainDuration;
|
|
51
|
+
}
|
|
52
|
+
const actualPercentDataBad = (badDuration / duration) * 100.0;
|
|
53
|
+
const percentDataBad = options.percentDataBad === undefined ? 100 : options.percentDataBad;
|
|
54
|
+
if (actualPercentDataBad >= percentDataBad) {
|
|
55
|
+
return new node_opcua_data_value_1.DataValue({
|
|
56
|
+
sourceTimestamp: interval.startTime,
|
|
57
|
+
statusCode: node_opcua_status_code_1.StatusCodes.Bad
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (nbUncertain > 0 || nbBad > 0) {
|
|
62
|
+
statusCode = node_opcua_status_code_1.StatusCode.makeStatusCode(node_opcua_status_code_1.StatusCodes.UncertainDataSubNormal, node_opcua_status_code_1.extraStatusCodeBits.HistorianCalculated | partialFlag);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
statusCode = node_opcua_status_code_1.StatusCode.makeStatusCode(node_opcua_status_code_1.StatusCodes.Good, node_opcua_status_code_1.extraStatusCodeBits.HistorianCalculated | partialFlag);
|
|
66
|
+
}
|
|
67
|
+
if (nbUncertain === 0 && nbGood === 0) {
|
|
68
|
+
statusCode = node_opcua_status_code_1.StatusCodes.BadNoData;
|
|
69
|
+
return new node_opcua_data_value_1.DataValue({
|
|
70
|
+
sourceTimestamp: interval.startTime,
|
|
71
|
+
statusCode: statusCode
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
return new node_opcua_data_value_1.DataValue({
|
|
75
|
+
sourceTimestamp: interval.startTime,
|
|
76
|
+
statusCode: statusCode,
|
|
77
|
+
value: {
|
|
78
|
+
dataType: node_opcua_variant_1.DataType.UInt32,
|
|
79
|
+
value: nbGood
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
function getCountData(node, processingInterval, startDate, endDate, callback) {
|
|
84
|
+
(0, common_1.getAggregateData)(node, processingInterval, startDate, endDate, calculateCountValue, callback);
|
|
85
|
+
}
|
|
86
|
+
exports.getCountData = getCountData;
|
|
87
87
|
//# sourceMappingURL=count.js.map
|
package/dist/duration_bad.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UAVariable } from "node-opcua-address-space";
|
|
2
|
-
import { DataValue } from "node-opcua-data-value";
|
|
3
|
-
/**Retrieve the percentage of data (0 to 100) in the interval which has Bad StatusCode. */
|
|
4
|
-
export declare function getDurationBadData(node: UAVariable, processingInterval: number, startDate: Date, endDate: Date, callback: (err: Error | null, dataValues?: DataValue[]) => void): void;
|
|
1
|
+
import { UAVariable } from "node-opcua-address-space";
|
|
2
|
+
import { DataValue } from "node-opcua-data-value";
|
|
3
|
+
/**Retrieve the percentage of data (0 to 100) in the interval which has Bad StatusCode. */
|
|
4
|
+
export declare function getDurationBadData(node: UAVariable, processingInterval: number, startDate: Date, endDate: Date, callback: (err: Error | null, dataValues?: DataValue[]) => void): void;
|
package/dist/duration_bad.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDurationBadData = void 0;
|
|
4
|
-
const node_opcua_data_value_1 = require("node-opcua-data-value");
|
|
5
|
-
const node_opcua_variant_1 = require("node-opcua-variant");
|
|
6
|
-
const node_opcua_status_code_1 = require("node-opcua-status-code");
|
|
7
|
-
const common_1 = require("./common");
|
|
8
|
-
const calculate_bad_good_1 = require("./calculate_bad_good");
|
|
9
|
-
function calculateDurationBad(interval, options) {
|
|
10
|
-
const { durationBad, durationUnknown, statusCode } = (0, calculate_bad_good_1.calculateBadAndGood)(interval, options);
|
|
11
|
-
if (durationUnknown > 0 && durationBad === 0) {
|
|
12
|
-
return new node_opcua_data_value_1.DataValue({
|
|
13
|
-
sourceTimestamp: interval.startTime,
|
|
14
|
-
statusCode: node_opcua_status_code_1.StatusCodes.Bad
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
const value = durationBad;
|
|
18
|
-
if (statusCode.isGoodish()) {
|
|
19
|
-
return new node_opcua_data_value_1.DataValue({
|
|
20
|
-
sourceTimestamp: interval.startTime,
|
|
21
|
-
statusCode,
|
|
22
|
-
value: { dataType: node_opcua_variant_1.DataType.Double, value }
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
return new node_opcua_data_value_1.DataValue({ sourceTimestamp: interval.startTime, statusCode, value: { dataType: node_opcua_variant_1.DataType.Null } });
|
|
26
|
-
}
|
|
27
|
-
/**Retrieve the percentage of data (0 to 100) in the interval which has Bad StatusCode. */
|
|
28
|
-
function getDurationBadData(node, processingInterval, startDate, endDate, callback) {
|
|
29
|
-
(0, common_1.getAggregateData)(node, processingInterval, startDate, endDate, calculateDurationBad, callback);
|
|
30
|
-
}
|
|
31
|
-
exports.getDurationBadData = getDurationBadData;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDurationBadData = void 0;
|
|
4
|
+
const node_opcua_data_value_1 = require("node-opcua-data-value");
|
|
5
|
+
const node_opcua_variant_1 = require("node-opcua-variant");
|
|
6
|
+
const node_opcua_status_code_1 = require("node-opcua-status-code");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
const calculate_bad_good_1 = require("./calculate_bad_good");
|
|
9
|
+
function calculateDurationBad(interval, options) {
|
|
10
|
+
const { durationBad, durationUnknown, statusCode } = (0, calculate_bad_good_1.calculateBadAndGood)(interval, options);
|
|
11
|
+
if (durationUnknown > 0 && durationBad === 0) {
|
|
12
|
+
return new node_opcua_data_value_1.DataValue({
|
|
13
|
+
sourceTimestamp: interval.startTime,
|
|
14
|
+
statusCode: node_opcua_status_code_1.StatusCodes.Bad
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
const value = durationBad;
|
|
18
|
+
if (statusCode.isGoodish()) {
|
|
19
|
+
return new node_opcua_data_value_1.DataValue({
|
|
20
|
+
sourceTimestamp: interval.startTime,
|
|
21
|
+
statusCode,
|
|
22
|
+
value: { dataType: node_opcua_variant_1.DataType.Double, value }
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return new node_opcua_data_value_1.DataValue({ sourceTimestamp: interval.startTime, statusCode, value: { dataType: node_opcua_variant_1.DataType.Null } });
|
|
26
|
+
}
|
|
27
|
+
/**Retrieve the percentage of data (0 to 100) in the interval which has Bad StatusCode. */
|
|
28
|
+
function getDurationBadData(node, processingInterval, startDate, endDate, callback) {
|
|
29
|
+
(0, common_1.getAggregateData)(node, processingInterval, startDate, endDate, calculateDurationBad, callback);
|
|
30
|
+
}
|
|
31
|
+
exports.getDurationBadData = getDurationBadData;
|
|
32
32
|
//# sourceMappingURL=duration_bad.js.map
|
package/dist/duration_good.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UAVariable } from "node-opcua-address-space";
|
|
2
|
-
import { DataValue } from "node-opcua-data-value";
|
|
3
|
-
/**Retrieve the percentage of data (0 to 100) in the interval which has Bad StatusCode. */
|
|
4
|
-
export declare function getDurationGoodData(node: UAVariable, processingInterval: number, startDate: Date, endDate: Date, callback: (err: Error | null, dataValues?: DataValue[]) => void): void;
|
|
1
|
+
import { UAVariable } from "node-opcua-address-space";
|
|
2
|
+
import { DataValue } from "node-opcua-data-value";
|
|
3
|
+
/**Retrieve the percentage of data (0 to 100) in the interval which has Bad StatusCode. */
|
|
4
|
+
export declare function getDurationGoodData(node: UAVariable, processingInterval: number, startDate: Date, endDate: Date, callback: (err: Error | null, dataValues?: DataValue[]) => void): void;
|
package/dist/duration_good.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDurationGoodData = void 0;
|
|
4
|
-
const node_opcua_data_value_1 = require("node-opcua-data-value");
|
|
5
|
-
const node_opcua_variant_1 = require("node-opcua-variant");
|
|
6
|
-
const node_opcua_status_code_1 = require("node-opcua-status-code");
|
|
7
|
-
const common_1 = require("./common");
|
|
8
|
-
const calculate_bad_good_1 = require("./calculate_bad_good");
|
|
9
|
-
function calculateDurationGood(interval, options) {
|
|
10
|
-
const { durationGood, durationUnknown, statusCode } = (0, calculate_bad_good_1.calculateBadAndGood)(interval, options);
|
|
11
|
-
if (durationUnknown > 0 && durationGood === 0) {
|
|
12
|
-
return new node_opcua_data_value_1.DataValue({
|
|
13
|
-
sourceTimestamp: interval.startTime,
|
|
14
|
-
statusCode: node_opcua_status_code_1.StatusCodes.Bad
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
const value = durationGood;
|
|
18
|
-
if (statusCode.isGoodish()) {
|
|
19
|
-
return new node_opcua_data_value_1.DataValue({
|
|
20
|
-
sourceTimestamp: interval.startTime,
|
|
21
|
-
statusCode,
|
|
22
|
-
value: { dataType: node_opcua_variant_1.DataType.Double, value }
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
return new node_opcua_data_value_1.DataValue({ sourceTimestamp: interval.startTime, statusCode, value: { dataType: node_opcua_variant_1.DataType.Null } });
|
|
26
|
-
}
|
|
27
|
-
/**Retrieve the percentage of data (0 to 100) in the interval which has Bad StatusCode. */
|
|
28
|
-
function getDurationGoodData(node, processingInterval, startDate, endDate, callback) {
|
|
29
|
-
(0, common_1.getAggregateData)(node, processingInterval, startDate, endDate, calculateDurationGood, callback);
|
|
30
|
-
}
|
|
31
|
-
exports.getDurationGoodData = getDurationGoodData;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDurationGoodData = void 0;
|
|
4
|
+
const node_opcua_data_value_1 = require("node-opcua-data-value");
|
|
5
|
+
const node_opcua_variant_1 = require("node-opcua-variant");
|
|
6
|
+
const node_opcua_status_code_1 = require("node-opcua-status-code");
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
const calculate_bad_good_1 = require("./calculate_bad_good");
|
|
9
|
+
function calculateDurationGood(interval, options) {
|
|
10
|
+
const { durationGood, durationUnknown, statusCode } = (0, calculate_bad_good_1.calculateBadAndGood)(interval, options);
|
|
11
|
+
if (durationUnknown > 0 && durationGood === 0) {
|
|
12
|
+
return new node_opcua_data_value_1.DataValue({
|
|
13
|
+
sourceTimestamp: interval.startTime,
|
|
14
|
+
statusCode: node_opcua_status_code_1.StatusCodes.Bad
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
const value = durationGood;
|
|
18
|
+
if (statusCode.isGoodish()) {
|
|
19
|
+
return new node_opcua_data_value_1.DataValue({
|
|
20
|
+
sourceTimestamp: interval.startTime,
|
|
21
|
+
statusCode,
|
|
22
|
+
value: { dataType: node_opcua_variant_1.DataType.Double, value }
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return new node_opcua_data_value_1.DataValue({ sourceTimestamp: interval.startTime, statusCode, value: { dataType: node_opcua_variant_1.DataType.Null } });
|
|
26
|
+
}
|
|
27
|
+
/**Retrieve the percentage of data (0 to 100) in the interval which has Bad StatusCode. */
|
|
28
|
+
function getDurationGoodData(node, processingInterval, startDate, endDate, callback) {
|
|
29
|
+
(0, common_1.getAggregateData)(node, processingInterval, startDate, endDate, calculateDurationGood, callback);
|
|
30
|
+
}
|
|
31
|
+
exports.getDurationGoodData = getDurationGoodData;
|
|
32
32
|
//# sourceMappingURL=duration_good.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module node-opca-aggregates
|
|
3
|
-
*/
|
|
4
|
-
export { addAggregateSupport, installAggregateConfigurationOptions, getAggregateConfiguration, addAggregateStandardFunctionSupport, addAggregateFunctionSupport } from "./aggregates";
|
|
5
|
-
export * from "./interpolate";
|
|
6
|
-
export * from "./minmax";
|
|
7
|
-
export * from "./interval";
|
|
8
|
-
export * from "./common";
|
|
9
|
-
export * from "./average";
|
|
10
|
-
export * from "./read_processed_details";
|
|
11
|
-
export { AggregateFunction } from "node-opcua-constants";
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opca-aggregates
|
|
3
|
+
*/
|
|
4
|
+
export { addAggregateSupport, installAggregateConfigurationOptions, getAggregateConfiguration, addAggregateStandardFunctionSupport, addAggregateFunctionSupport } from "./aggregates";
|
|
5
|
+
export * from "./interpolate";
|
|
6
|
+
export * from "./minmax";
|
|
7
|
+
export * from "./interval";
|
|
8
|
+
export * from "./common";
|
|
9
|
+
export * from "./average";
|
|
10
|
+
export * from "./read_processed_details";
|
|
11
|
+
export { AggregateFunction } from "node-opcua-constants";
|
package/dist/index.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.AggregateFunction = exports.addAggregateFunctionSupport = exports.addAggregateStandardFunctionSupport = exports.getAggregateConfiguration = exports.installAggregateConfigurationOptions = exports.addAggregateSupport = void 0;
|
|
18
|
-
/**
|
|
19
|
-
* @module node-opca-aggregates
|
|
20
|
-
*/
|
|
21
|
-
var aggregates_1 = require("./aggregates");
|
|
22
|
-
Object.defineProperty(exports, "addAggregateSupport", { enumerable: true, get: function () { return aggregates_1.addAggregateSupport; } });
|
|
23
|
-
Object.defineProperty(exports, "installAggregateConfigurationOptions", { enumerable: true, get: function () { return aggregates_1.installAggregateConfigurationOptions; } });
|
|
24
|
-
Object.defineProperty(exports, "getAggregateConfiguration", { enumerable: true, get: function () { return aggregates_1.getAggregateConfiguration; } });
|
|
25
|
-
Object.defineProperty(exports, "addAggregateStandardFunctionSupport", { enumerable: true, get: function () { return aggregates_1.addAggregateStandardFunctionSupport; } });
|
|
26
|
-
Object.defineProperty(exports, "addAggregateFunctionSupport", { enumerable: true, get: function () { return aggregates_1.addAggregateFunctionSupport; } });
|
|
27
|
-
__exportStar(require("./interpolate"), exports);
|
|
28
|
-
__exportStar(require("./minmax"), exports);
|
|
29
|
-
__exportStar(require("./interval"), exports);
|
|
30
|
-
__exportStar(require("./common"), exports);
|
|
31
|
-
__exportStar(require("./average"), exports);
|
|
32
|
-
__exportStar(require("./read_processed_details"), exports);
|
|
33
|
-
var node_opcua_constants_1 = require("node-opcua-constants");
|
|
34
|
-
Object.defineProperty(exports, "AggregateFunction", { enumerable: true, get: function () { return node_opcua_constants_1.AggregateFunction; } });
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.AggregateFunction = exports.addAggregateFunctionSupport = exports.addAggregateStandardFunctionSupport = exports.getAggregateConfiguration = exports.installAggregateConfigurationOptions = exports.addAggregateSupport = void 0;
|
|
18
|
+
/**
|
|
19
|
+
* @module node-opca-aggregates
|
|
20
|
+
*/
|
|
21
|
+
var aggregates_1 = require("./aggregates");
|
|
22
|
+
Object.defineProperty(exports, "addAggregateSupport", { enumerable: true, get: function () { return aggregates_1.addAggregateSupport; } });
|
|
23
|
+
Object.defineProperty(exports, "installAggregateConfigurationOptions", { enumerable: true, get: function () { return aggregates_1.installAggregateConfigurationOptions; } });
|
|
24
|
+
Object.defineProperty(exports, "getAggregateConfiguration", { enumerable: true, get: function () { return aggregates_1.getAggregateConfiguration; } });
|
|
25
|
+
Object.defineProperty(exports, "addAggregateStandardFunctionSupport", { enumerable: true, get: function () { return aggregates_1.addAggregateStandardFunctionSupport; } });
|
|
26
|
+
Object.defineProperty(exports, "addAggregateFunctionSupport", { enumerable: true, get: function () { return aggregates_1.addAggregateFunctionSupport; } });
|
|
27
|
+
__exportStar(require("./interpolate"), exports);
|
|
28
|
+
__exportStar(require("./minmax"), exports);
|
|
29
|
+
__exportStar(require("./interval"), exports);
|
|
30
|
+
__exportStar(require("./common"), exports);
|
|
31
|
+
__exportStar(require("./average"), exports);
|
|
32
|
+
__exportStar(require("./read_processed_details"), exports);
|
|
33
|
+
var node_opcua_constants_1 = require("node-opcua-constants");
|
|
34
|
+
Object.defineProperty(exports, "AggregateFunction", { enumerable: true, get: function () { return node_opcua_constants_1.AggregateFunction; } });
|
|
35
35
|
//# sourceMappingURL=index.js.map
|
package/dist/interpolate.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module node-opcua-aggregates
|
|
3
|
-
*/
|
|
4
|
-
import { UAVariable } from "node-opcua-address-space";
|
|
5
|
-
import { DataValue } from "node-opcua-data-value";
|
|
6
|
-
import { AggregateConfigurationOptionsEx, Interval } from "./interval";
|
|
7
|
-
export declare function interpolatedValue(interval: Interval, options: AggregateConfigurationOptionsEx): DataValue;
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* @param node
|
|
11
|
-
* @param processingInterval
|
|
12
|
-
* @param startDate
|
|
13
|
-
* @param endDate
|
|
14
|
-
* @param callback
|
|
15
|
-
*/
|
|
16
|
-
export declare function getInterpolatedData(node: UAVariable, processingInterval: number, startDate: Date, endDate: Date, callback: (err: Error | null, dataValues?: DataValue[]) => void): void;
|
|
1
|
+
/**
|
|
2
|
+
* @module node-opcua-aggregates
|
|
3
|
+
*/
|
|
4
|
+
import { UAVariable } from "node-opcua-address-space";
|
|
5
|
+
import { DataValue } from "node-opcua-data-value";
|
|
6
|
+
import { AggregateConfigurationOptionsEx, Interval } from "./interval";
|
|
7
|
+
export declare function interpolatedValue(interval: Interval, options: AggregateConfigurationOptionsEx): DataValue;
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param node
|
|
11
|
+
* @param processingInterval
|
|
12
|
+
* @param startDate
|
|
13
|
+
* @param endDate
|
|
14
|
+
* @param callback
|
|
15
|
+
*/
|
|
16
|
+
export declare function getInterpolatedData(node: UAVariable, processingInterval: number, startDate: Date, endDate: Date, callback: (err: Error | null, dataValues?: DataValue[]) => void): void;
|