@uns-kit/cli 0.0.46 → 0.0.48
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": "0.0.
|
|
3
|
+
"version": "0.0.48",
|
|
4
4
|
"description": "Command line scaffolding tool for UNS applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"azure-devops-node-api": "^15.1.1",
|
|
29
|
-
"@uns-kit/core": "1.0.
|
|
29
|
+
"@uns-kit/core": "1.0.12"
|
|
30
30
|
},
|
|
31
31
|
"unsKitPackages": {
|
|
32
32
|
"@uns-kit/core": "0.0.36",
|
|
@@ -5,12 +5,7 @@ import { UnsProxyProcess, ConfigFile, logger, type IUnsMessage } from "@uns-kit/
|
|
|
5
5
|
import { PhysicalMeasurements } from "@uns-kit/core/uns/uns-measurements.js";
|
|
6
6
|
import { UnsPacket } from "@uns-kit/core/uns/uns-packet.js";
|
|
7
7
|
import { UnsTopics } from "@uns-kit/core/uns/uns-topics.js";
|
|
8
|
-
import {
|
|
9
|
-
GeneratedObjectTypes,
|
|
10
|
-
GeneratedObjectTypeDescriptions,
|
|
11
|
-
GeneratedAttributeDescriptions,
|
|
12
|
-
GeneratedAttributes,
|
|
13
|
-
} from "../uns/uns-dictionary.generated.js";
|
|
8
|
+
import { GeneratedObjectTypes, GeneratedAttributes } from "../uns/uns-dictionary.generated.js";
|
|
14
9
|
|
|
15
10
|
/**
|
|
16
11
|
* Load the configuration from a file.
|
|
@@ -53,14 +48,16 @@ mqttInput.event.on("input", async (event) => {
|
|
|
53
48
|
data: { dataGroup, time, value: numberValue, uom: PhysicalMeasurements.None },
|
|
54
49
|
};
|
|
55
50
|
const topic: UnsTopics = "enterprise/site/area/line/";
|
|
51
|
+
const asset = "asset";
|
|
52
|
+
const assetDescription = "Sample asset";
|
|
56
53
|
const currentPacket = await UnsPacket.unsPacketFromUnsMessage(message);
|
|
57
54
|
mqttOutput.publishMqttMessage({
|
|
58
55
|
topic,
|
|
59
|
-
asset
|
|
56
|
+
asset,
|
|
57
|
+
assetDescription,
|
|
60
58
|
objectType: GeneratedObjectTypes["energy-resource"],
|
|
61
59
|
objectId: "main",
|
|
62
60
|
attribute: GeneratedAttributes["current"] ?? "current",
|
|
63
|
-
description: GeneratedAttributeDescriptions["current"] ?? "Simulated current sensor value",
|
|
64
61
|
tags: [],
|
|
65
62
|
packet: currentPacket
|
|
66
63
|
});
|
|
@@ -71,11 +68,11 @@ mqttInput.event.on("input", async (event) => {
|
|
|
71
68
|
const sensorPacket = await UnsPacket.unsPacketFromUnsMessage(sensorMessage);
|
|
72
69
|
mqttOutput.publishMqttMessage({
|
|
73
70
|
topic,
|
|
74
|
-
asset
|
|
71
|
+
asset,
|
|
72
|
+
assetDescription,
|
|
75
73
|
objectType: GeneratedObjectTypes["energy-resource"],
|
|
76
74
|
objectId: "main",
|
|
77
75
|
attribute: GeneratedAttributes["voltage"] ?? "voltage",
|
|
78
|
-
description: GeneratedAttributeDescriptions["voltage"] ?? "Simulated voltage sensor value",
|
|
79
76
|
tags: [],
|
|
80
77
|
packet: sensorPacket
|
|
81
78
|
});
|
|
@@ -1,94 +1,172 @@
|
|
|
1
|
-
/* Auto-generated
|
|
1
|
+
/* Auto-generated by generate-uns-dictionary.ts. Do not edit by hand. */
|
|
2
2
|
export const GeneratedObjectTypes = {
|
|
3
|
+
/** Fizična oprema (stroji, peči, senzorji). Uporablja se za spremljanje stanja, meritev in dogodkov. */
|
|
3
4
|
"equipment": "equipment",
|
|
5
|
+
/** Materialne enote (loti, serije, surovine, polizdelki). Za sledljivost, količine in premike. */
|
|
4
6
|
"material": "material",
|
|
7
|
+
/** Osebje (operaterji, nadzorniki, tehnologi). Za prisotnost, naloge in status. */
|
|
5
8
|
"personnel": "personnel",
|
|
9
|
+
/** Posamezen korak v procesu (npr. valjanje, hlajenje, analiza). Za faze ali aktivnosti procesa. */
|
|
6
10
|
"process-segment": "process-segment",
|
|
11
|
+
/** Definicija izdelka, recepture, tehnični opisi. Za metapodatke izdelka in revizije. */
|
|
7
12
|
"product-definition": "product-definition",
|
|
13
|
+
/** Kazalniki kakovosti izdelka (odstopanja, ocene, rezultati meritev). */
|
|
8
14
|
"product-quality": "product-quality",
|
|
15
|
+
/** Definicija nalog ali delovnih tokov. Za planirane operacije in navodila. */
|
|
9
16
|
"work-definition": "work-definition",
|
|
17
|
+
/** Status kateregakoli vira (material, osebje, oprema). Za razpoložljivost, okvare, izrabo. */
|
|
10
18
|
"resource-status": "resource-status",
|
|
19
|
+
/** Energija (elektrika, para, plin). */
|
|
11
20
|
"energy-resource": "energy-resource",
|
|
21
|
+
/** Utility viri (voda, zrak, dušik, stisnjeni plini). */
|
|
12
22
|
"utility-resource": "utility-resource",
|
|
23
|
+
/** Tekočine in plini, ki niso energenti. */
|
|
13
24
|
"fluid-resource": "fluid-resource",
|
|
25
|
+
/** Maziva, olja, čistila, ki se porabijo in niso del izdelka. */
|
|
14
26
|
"consumable-resource": "consumable-resource",
|
|
15
27
|
} as const;
|
|
16
28
|
|
|
17
29
|
export const GeneratedObjectTypeDescriptions: Record<keyof typeof GeneratedObjectTypes, string> = {
|
|
18
|
-
"equipment": "
|
|
19
|
-
"material": "Materialne enote (loti, serije, surovine, polizdelki). Za sledljivost,
|
|
30
|
+
"equipment": "Fizična oprema (stroji, peči, senzorji). Uporablja se za spremljanje stanja, meritev in dogodkov.",
|
|
31
|
+
"material": "Materialne enote (loti, serije, surovine, polizdelki). Za sledljivost, količine in premike.",
|
|
20
32
|
"personnel": "Osebje (operaterji, nadzorniki, tehnologi). Za prisotnost, naloge in status.",
|
|
21
33
|
"process-segment": "Posamezen korak v procesu (npr. valjanje, hlajenje, analiza). Za faze ali aktivnosti procesa.",
|
|
22
|
-
"product-definition": "Definicija izdelka, recepture,
|
|
34
|
+
"product-definition": "Definicija izdelka, recepture, tehnični opisi. Za metapodatke izdelka in revizije.",
|
|
23
35
|
"product-quality": "Kazalniki kakovosti izdelka (odstopanja, ocene, rezultati meritev).",
|
|
24
36
|
"work-definition": "Definicija nalog ali delovnih tokov. Za planirane operacije in navodila.",
|
|
25
|
-
"resource-status": "Status kateregakoli vira (material, osebje, oprema). Za
|
|
37
|
+
"resource-status": "Status kateregakoli vira (material, osebje, oprema). Za razpoložljivost, okvare, izrabo.",
|
|
26
38
|
"energy-resource": "Energija (elektrika, para, plin).",
|
|
27
|
-
"utility-resource": "Utility viri (voda, zrak,
|
|
28
|
-
"fluid-resource": "
|
|
29
|
-
"consumable-resource": "Maziva, olja,
|
|
39
|
+
"utility-resource": "Utility viri (voda, zrak, dušik, stisnjeni plini).",
|
|
40
|
+
"fluid-resource": "Tekočine in plini, ki niso energenti.",
|
|
41
|
+
"consumable-resource": "Maziva, olja, čistila, ki se porabijo in niso del izdelka.",
|
|
30
42
|
};
|
|
31
43
|
|
|
44
|
+
export type GeneratedObjectTypeName = keyof typeof GeneratedObjectTypes;
|
|
45
|
+
|
|
46
|
+
export function getGeneratedObjectTypeDescription(name: string): string | undefined {
|
|
47
|
+
return (GeneratedObjectTypeDescriptions as Record<string, string | undefined>)[name];
|
|
48
|
+
}
|
|
49
|
+
|
|
32
50
|
export const GeneratedAttributes = {
|
|
51
|
+
/** Trenutno stanje vira ali opreme. */
|
|
33
52
|
"status": "status",
|
|
53
|
+
/** Temperatura vira/opreme. */
|
|
34
54
|
"temperature": "temperature",
|
|
55
|
+
/** Merjena vibracija. */
|
|
35
56
|
"vibration": "vibration",
|
|
57
|
+
/** Število obratovalnih ur. */
|
|
36
58
|
"operating-hours": "operating-hours",
|
|
59
|
+
/** Koda napake. */
|
|
37
60
|
"fault-code": "fault-code",
|
|
61
|
+
/** Hitrost delovanja. */
|
|
38
62
|
"speed": "speed",
|
|
63
|
+
/** Poraba energije. */
|
|
39
64
|
"energy-consumption": "energy-consumption",
|
|
65
|
+
/** Identifikator lota. */
|
|
40
66
|
"lot-id": "lot-id",
|
|
67
|
+
/** Številka serije (batch). */
|
|
41
68
|
"batch-number": "batch-number",
|
|
69
|
+
/** Tip materiala. */
|
|
42
70
|
"material-type": "material-type",
|
|
71
|
+
/** Količina materiala. */
|
|
43
72
|
"quantity": "quantity",
|
|
73
|
+
/** Lokacija materiala ali opreme. */
|
|
44
74
|
"location": "location",
|
|
75
|
+
/** Prisotnost osebja. */
|
|
45
76
|
"presence": "presence",
|
|
77
|
+
/** Identifikator naloge. */
|
|
46
78
|
"task-id": "task-id",
|
|
79
|
+
/** Vloga osebja. */
|
|
47
80
|
"role": "role",
|
|
81
|
+
/** Nivo pooblastil. */
|
|
48
82
|
"authorization-level": "authorization-level",
|
|
83
|
+
/** Čas začetka. */
|
|
49
84
|
"start-time": "start-time",
|
|
85
|
+
/** Čas zaključka. */
|
|
50
86
|
"end-time": "end-time",
|
|
87
|
+
/** Trajanje faze ali naloge. */
|
|
51
88
|
"duration": "duration",
|
|
89
|
+
/** Izhodna količina. */
|
|
52
90
|
"output-quantity": "output-quantity",
|
|
91
|
+
/** Identifikator operaterja. */
|
|
53
92
|
"operator-id": "operator-id",
|
|
93
|
+
/** Koda izdelka. */
|
|
54
94
|
"product-code": "product-code",
|
|
95
|
+
/** Revizija izdelka. */
|
|
55
96
|
"revision": "revision",
|
|
97
|
+
/** Tehnične specifikacije. */
|
|
56
98
|
"specification": "specification",
|
|
99
|
+
/** Ciljni parametri izdelka ali procesa. */
|
|
57
100
|
"target-parameters": "target-parameters",
|
|
101
|
+
/** Sestava materiala. */
|
|
58
102
|
"material-composition": "material-composition",
|
|
103
|
+
/** Zgodovina verzij. */
|
|
59
104
|
"version-history": "version-history",
|
|
105
|
+
/** Rezultat pregleda. */
|
|
60
106
|
"inspection-result": "inspection-result",
|
|
107
|
+
/** Odstopanje od specifikacije. */
|
|
61
108
|
"deviation": "deviation",
|
|
109
|
+
/** Uspešno/neuspešno (pass/fail). */
|
|
62
110
|
"pass-fail": "pass-fail",
|
|
111
|
+
/** Površinska napaka. */
|
|
63
112
|
"surface-defect": "surface-defect",
|
|
113
|
+
/** Trdota materiala. */
|
|
64
114
|
"hardness": "hardness",
|
|
115
|
+
/** Natezna trdnost. */
|
|
65
116
|
"tensile-strength": "tensile-strength",
|
|
117
|
+
/** Identifikator delovnega naloga. */
|
|
66
118
|
"work-order-id": "work-order-id",
|
|
119
|
+
/** Seznam nalog. */
|
|
67
120
|
"task-list": "task-list",
|
|
121
|
+
/** Planirani začetek. */
|
|
68
122
|
"planned-start": "planned-start",
|
|
123
|
+
/** Planirani zaključek. */
|
|
69
124
|
"planned-end": "planned-end",
|
|
125
|
+
/** Dodeljeno osebi ali ekipi. */
|
|
70
126
|
"assigned-to": "assigned-to",
|
|
127
|
+
/** Povezava do navodil. */
|
|
71
128
|
"instruction-url": "instruction-url",
|
|
129
|
+
/** Razpoložljivost vira. */
|
|
72
130
|
"availability": "availability",
|
|
131
|
+
/** Izraba vira. */
|
|
73
132
|
"utilization": "utilization",
|
|
133
|
+
/** Zastoj/izpad. */
|
|
74
134
|
"downtime": "downtime",
|
|
135
|
+
/** Stanje vzdrževanja. */
|
|
75
136
|
"maintenance-status": "maintenance-status",
|
|
137
|
+
/** Moč. */
|
|
76
138
|
"power": "power",
|
|
139
|
+
/** Energija. */
|
|
77
140
|
"energy": "energy",
|
|
141
|
+
/** Napetost. */
|
|
78
142
|
"voltage": "voltage",
|
|
143
|
+
/** Tok. */
|
|
79
144
|
"current": "current",
|
|
145
|
+
/** Frekvenca. */
|
|
80
146
|
"frequency": "frequency",
|
|
147
|
+
/** Strošek. */
|
|
81
148
|
"cost": "cost",
|
|
149
|
+
/** Tlak. */
|
|
82
150
|
"pressure": "pressure",
|
|
151
|
+
/** Pretok. */
|
|
83
152
|
"flow": "flow",
|
|
153
|
+
/** Poraba. */
|
|
84
154
|
"consumption": "consumption",
|
|
155
|
+
/** Alarmni signal. */
|
|
85
156
|
"alarm": "alarm",
|
|
157
|
+
/** Skupni pretok. */
|
|
86
158
|
"total-flow": "total-flow",
|
|
159
|
+
/** Prevodnost. */
|
|
87
160
|
"conductivity": "conductivity",
|
|
161
|
+
/** pH vrednost. */
|
|
88
162
|
"ph": "ph",
|
|
163
|
+
/** Nivo zaloge ali rezervoarja. */
|
|
89
164
|
"level": "level",
|
|
165
|
+
/** Hitrost porabe. */
|
|
90
166
|
"consumption-rate": "consumption-rate",
|
|
167
|
+
/** Potrebno dolivanje/dopolnitev. */
|
|
91
168
|
"refill-required": "refill-required",
|
|
169
|
+
/** Zadnje polnjenje. */
|
|
92
170
|
"last-refill": "last-refill",
|
|
93
171
|
} as const;
|
|
94
172
|
|
|
@@ -96,52 +174,52 @@ export const GeneratedAttributeDescriptions: Record<keyof typeof GeneratedAttrib
|
|
|
96
174
|
"status": "Trenutno stanje vira ali opreme.",
|
|
97
175
|
"temperature": "Temperatura vira/opreme.",
|
|
98
176
|
"vibration": "Merjena vibracija.",
|
|
99
|
-
"operating-hours": "
|
|
177
|
+
"operating-hours": "Število obratovalnih ur.",
|
|
100
178
|
"fault-code": "Koda napake.",
|
|
101
179
|
"speed": "Hitrost delovanja.",
|
|
102
180
|
"energy-consumption": "Poraba energije.",
|
|
103
181
|
"lot-id": "Identifikator lota.",
|
|
104
|
-
"batch-number": "
|
|
182
|
+
"batch-number": "Številka serije (batch).",
|
|
105
183
|
"material-type": "Tip materiala.",
|
|
106
|
-
"quantity": "
|
|
184
|
+
"quantity": "Količina materiala.",
|
|
107
185
|
"location": "Lokacija materiala ali opreme.",
|
|
108
186
|
"presence": "Prisotnost osebja.",
|
|
109
187
|
"task-id": "Identifikator naloge.",
|
|
110
188
|
"role": "Vloga osebja.",
|
|
111
189
|
"authorization-level": "Nivo pooblastil.",
|
|
112
|
-
"start-time": "
|
|
113
|
-
"end-time": "
|
|
190
|
+
"start-time": "Čas začetka.",
|
|
191
|
+
"end-time": "Čas zaključka.",
|
|
114
192
|
"duration": "Trajanje faze ali naloge.",
|
|
115
|
-
"output-quantity": "Izhodna
|
|
193
|
+
"output-quantity": "Izhodna količina.",
|
|
116
194
|
"operator-id": "Identifikator operaterja.",
|
|
117
195
|
"product-code": "Koda izdelka.",
|
|
118
196
|
"revision": "Revizija izdelka.",
|
|
119
|
-
"specification": "
|
|
197
|
+
"specification": "Tehnične specifikacije.",
|
|
120
198
|
"target-parameters": "Ciljni parametri izdelka ali procesa.",
|
|
121
199
|
"material-composition": "Sestava materiala.",
|
|
122
200
|
"version-history": "Zgodovina verzij.",
|
|
123
201
|
"inspection-result": "Rezultat pregleda.",
|
|
124
202
|
"deviation": "Odstopanje od specifikacije.",
|
|
125
|
-
"pass-fail": "
|
|
126
|
-
"surface-defect": "
|
|
203
|
+
"pass-fail": "Uspešno/neuspešno (pass/fail).",
|
|
204
|
+
"surface-defect": "Površinska napaka.",
|
|
127
205
|
"hardness": "Trdota materiala.",
|
|
128
206
|
"tensile-strength": "Natezna trdnost.",
|
|
129
207
|
"work-order-id": "Identifikator delovnega naloga.",
|
|
130
208
|
"task-list": "Seznam nalog.",
|
|
131
|
-
"planned-start": "Planirani
|
|
132
|
-
"planned-end": "Planirani
|
|
209
|
+
"planned-start": "Planirani začetek.",
|
|
210
|
+
"planned-end": "Planirani zaključek.",
|
|
133
211
|
"assigned-to": "Dodeljeno osebi ali ekipi.",
|
|
134
212
|
"instruction-url": "Povezava do navodil.",
|
|
135
|
-
"availability": "
|
|
213
|
+
"availability": "Razpoložljivost vira.",
|
|
136
214
|
"utilization": "Izraba vira.",
|
|
137
215
|
"downtime": "Zastoj/izpad.",
|
|
138
|
-
"maintenance-status": "Stanje
|
|
139
|
-
"power": "Mo
|
|
216
|
+
"maintenance-status": "Stanje vzdrževanja.",
|
|
217
|
+
"power": "Moč.",
|
|
140
218
|
"energy": "Energija.",
|
|
141
219
|
"voltage": "Napetost.",
|
|
142
220
|
"current": "Tok.",
|
|
143
221
|
"frequency": "Frekvenca.",
|
|
144
|
-
"cost": "
|
|
222
|
+
"cost": "Strošek.",
|
|
145
223
|
"pressure": "Tlak.",
|
|
146
224
|
"flow": "Pretok.",
|
|
147
225
|
"consumption": "Poraba.",
|
|
@@ -155,12 +233,8 @@ export const GeneratedAttributeDescriptions: Record<keyof typeof GeneratedAttrib
|
|
|
155
233
|
"last-refill": "Zadnje polnjenje.",
|
|
156
234
|
};
|
|
157
235
|
|
|
158
|
-
export type GeneratedObjectTypeName = keyof typeof GeneratedObjectTypes;
|
|
159
|
-
export function getGeneratedObjectTypeDescription(name: string): string | undefined {
|
|
160
|
-
return (GeneratedObjectTypeDescriptions as Record<string, string | undefined>)[name];
|
|
161
|
-
}
|
|
162
|
-
|
|
163
236
|
export type GeneratedAttributeName = keyof typeof GeneratedAttributes;
|
|
237
|
+
|
|
164
238
|
export function getGeneratedAttributeDescription(name: string): string | undefined {
|
|
165
239
|
return (GeneratedAttributeDescriptions as Record<string, string | undefined>)[name];
|
|
166
240
|
}
|