@uns-kit/cli 2.0.58 → 2.0.59
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": "@uns-kit/cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.59",
|
|
4
4
|
"description": "Command line scaffolding tool for UNS applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"azure-devops-node-api": "^15.1.1",
|
|
29
|
-
"@uns-kit/core": "2.0.
|
|
29
|
+
"@uns-kit/core": "2.0.59"
|
|
30
30
|
},
|
|
31
31
|
"unsKitPackages": {
|
|
32
|
-
"@uns-kit/core": "2.0.
|
|
33
|
-
"@uns-kit/api": "2.0.
|
|
34
|
-
"@uns-kit/cron": "2.0.
|
|
35
|
-
"@uns-kit/database": "2.0.
|
|
32
|
+
"@uns-kit/core": "2.0.59",
|
|
33
|
+
"@uns-kit/api": "2.0.59",
|
|
34
|
+
"@uns-kit/cron": "2.0.59",
|
|
35
|
+
"@uns-kit/database": "2.0.59"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "tsc -p tsconfig.build.json",
|
|
@@ -75,6 +75,15 @@ mqttInput.event.on("input", async (event) => {
|
|
|
75
75
|
attribute: GeneratedAttributes["voltage"],
|
|
76
76
|
data: { dataGroup, time, value: sensorValue, uom: GeneratedPhysicalMeasurements.Volt, intervalStart, intervalEnd },
|
|
77
77
|
},
|
|
78
|
+
{
|
|
79
|
+
attribute: "active-energy-total",
|
|
80
|
+
description: "Cumulative active energy counter",
|
|
81
|
+
valueType: "number",
|
|
82
|
+
presentationKind: "counter",
|
|
83
|
+
defaultAggregation: "last",
|
|
84
|
+
counterResetPolicy: "new-value",
|
|
85
|
+
data: { dataGroup, time, value: numberValue, uom: GeneratedPhysicalMeasurements.KiloWattHour, intervalStart, intervalEnd },
|
|
86
|
+
},
|
|
78
87
|
],
|
|
79
88
|
});
|
|
80
89
|
}
|
|
@@ -7,12 +7,11 @@ import { registerAttributeDescriptions, registerObjectTypeDescriptions } from "@
|
|
|
7
7
|
import { UnsTopics } from "@uns-kit/core/uns/uns-topics.js";
|
|
8
8
|
import {
|
|
9
9
|
GeneratedObjectTypes,
|
|
10
|
-
GeneratedAttributes,
|
|
11
10
|
GeneratedAttributeDescriptions,
|
|
12
11
|
GeneratedObjectTypeDescriptions,
|
|
13
12
|
} from "../uns/uns-dictionary.generated.js";
|
|
14
13
|
import { GeneratedAssets, resolveGeneratedAsset } from "../uns/uns-assets.js";
|
|
15
|
-
import type { IUnsTableColumn } from "@uns-kit/core/uns/uns-interfaces.js";
|
|
14
|
+
import type { IUnsTableColumn, IUnsTableColumnMetadata } from "@uns-kit/core/uns/uns-interfaces.js";
|
|
16
15
|
import type { ISO8601 } from "@uns-kit/core/uns/uns-interfaces.js";
|
|
17
16
|
import { GeneratedPhysicalMeasurements } from "../uns/uns-measurements.generated.js";
|
|
18
17
|
|
|
@@ -64,6 +63,16 @@ mqttInput.event.on("input", async (event) => {
|
|
|
64
63
|
const columns: IUnsTableColumn[] = [
|
|
65
64
|
{ name: "current", type: "double", value: currentValue, uom: GeneratedPhysicalMeasurements.Ampere },
|
|
66
65
|
{ name: "voltage", type: "double", value: sensorValue },
|
|
66
|
+
{ name: "active_energy_total", type: "double", value: currentValue, uom: GeneratedPhysicalMeasurements.KiloWattHour },
|
|
67
|
+
];
|
|
68
|
+
const tableColumns: IUnsTableColumnMetadata[] = [
|
|
69
|
+
{
|
|
70
|
+
name: "active_energy_total",
|
|
71
|
+
valueType: "number",
|
|
72
|
+
presentationKind: "counter",
|
|
73
|
+
defaultAggregation: "last",
|
|
74
|
+
counterResetPolicy: "new-value",
|
|
75
|
+
},
|
|
67
76
|
];
|
|
68
77
|
const topic: UnsTopics = "enterprise/site/area/line/";
|
|
69
78
|
const asset = resolveGeneratedAsset("asset");
|
|
@@ -72,12 +81,13 @@ mqttInput.event.on("input", async (event) => {
|
|
|
72
81
|
topic,
|
|
73
82
|
asset,
|
|
74
83
|
assetDescription,
|
|
75
|
-
objectType: GeneratedObjectTypes["resource
|
|
84
|
+
objectType: GeneratedObjectTypes["energy-resource"],
|
|
76
85
|
objectId: "main",
|
|
77
86
|
attributes: [
|
|
78
87
|
{
|
|
79
|
-
attribute:
|
|
80
|
-
description: GeneratedAttributeDescriptions["status"] ?? "Table",
|
|
88
|
+
attribute: "measurements",
|
|
89
|
+
description: GeneratedAttributeDescriptions["status"] ?? "Table measurements with a counter column",
|
|
90
|
+
tableColumns,
|
|
81
91
|
table: {
|
|
82
92
|
dataGroup,
|
|
83
93
|
time,
|
|
@@ -21,7 +21,10 @@ message PublishRequest {
|
|
|
21
21
|
Data data = 6;
|
|
22
22
|
Table table = 7;
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
// Deprecated: producer-side delta calculation loses previous-value state
|
|
25
|
+
// across service restarts. Publish raw cumulative counter values and request
|
|
26
|
+
// delta/rate from Datahub history APIs.
|
|
27
|
+
bool value_is_cumulative = 8;
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
message Data {
|