@uns-kit/cli 0.0.47 → 0.0.49

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/index.js CHANGED
@@ -122,10 +122,10 @@ async function main() {
122
122
  }
123
123
  return;
124
124
  }
125
- if (command === "configure-uns-dictionary") {
125
+ if (command === "configure-uns-reference") {
126
126
  const targetPath = args[1];
127
127
  try {
128
- await configureUnsDictionary(targetPath);
128
+ await configureUnsReference(targetPath);
129
129
  }
130
130
  catch (error) {
131
131
  console.error(error.message);
@@ -167,7 +167,7 @@ function printHelp() {
167
167
  " configure-cron [dir] Copy UNS cron examples and add @uns-kit/cron\n" +
168
168
  " configure-temporal [dir] Copy UNS Temporal examples and add @uns-kit/temporal\n" +
169
169
  " configure-python [dir] Copy Python gateway client scaffolding\n" +
170
- " configure-uns-dictionary [dir] Copy UNS dictionary example (object/attribute metadata)\n" +
170
+ " configure-uns-reference [dir] Copy UNS dictionaries (objects/attributes/measurements)\n" +
171
171
  " help Show this message\n");
172
172
  }
173
173
  async function createProject(projectName) {
@@ -544,12 +544,17 @@ async function configurePython(targetPath) {
544
544
  label: "UNS Python client",
545
545
  });
546
546
  }
547
- async function configureUnsDictionary(targetPath) {
547
+ async function configureUnsReference(targetPath) {
548
548
  await configurePlugin({
549
549
  targetPath,
550
550
  templateName: "uns-dictionary",
551
551
  label: "UNS dictionary (object/attribute metadata)",
552
552
  });
553
+ await configurePlugin({
554
+ targetPath,
555
+ templateName: "uns-measurements",
556
+ label: "UNS measurements (units)",
557
+ });
553
558
  }
554
559
  const configureFeatureHandlers = {
555
560
  devops: configureDevops,
@@ -560,7 +565,7 @@ const configureFeatureHandlers = {
560
565
  cron: configureCron,
561
566
  temporal: configureTemporal,
562
567
  python: configurePython,
563
- "uns-dictionary": configureUnsDictionary,
568
+ "uns-reference": configureUnsReference,
564
569
  };
565
570
  const AVAILABLE_CONFIGURE_FEATURES = Object.keys(configureFeatureHandlers);
566
571
  const configureFeatureLabels = {
@@ -572,7 +577,7 @@ const configureFeatureLabels = {
572
577
  cron: "UNS cron resources",
573
578
  temporal: "UNS Temporal resources",
574
579
  python: "Python client scaffolding",
575
- "uns-dictionary": "UNS dictionary (object/attribute metadata)",
580
+ "uns-reference": "UNS dictionaries (objects/attributes/measurements)",
576
581
  };
577
582
  async function runConfigureCommand(args) {
578
583
  const { targetPath, features } = parseConfigureArgs(args);
@@ -645,8 +650,8 @@ const configureFeatureAliases = {
645
650
  "configure-temporal": "temporal",
646
651
  python: "python",
647
652
  "configure-python": "python",
648
- "uns-dictionary": "uns-dictionary",
649
- "configure-uns-dictionary": "uns-dictionary",
653
+ "uns-reference": "uns-reference",
654
+ "configure-uns-reference": "uns-reference",
650
655
  };
651
656
  function resolveConfigureFeatureName(input) {
652
657
  if (typeof input !== "string") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uns-kit/cli",
3
- "version": "0.0.47",
3
+ "version": "0.0.49",
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.11"
29
+ "@uns-kit/core": "1.0.13"
30
30
  },
31
31
  "unsKitPackages": {
32
32
  "@uns-kit/core": "0.0.36",
@@ -12,8 +12,10 @@ pnpm run build # emit dist/ output
12
12
  pnpm run start # run the compiled entrypoint
13
13
  pnpm run generate-config-schema # regenerate config.schema.json and AppConfig augmentations
14
14
  pnpm run codegen # regenerate typed GraphQL operations (after configure-codegen)
15
- pnpm run refresh-uns # rebuild UNS topics/tags from the live schema
15
+ pnpm run generate-uns-topics-tags # rebuild UNS topics/tags from the live schema
16
16
  pnpm run generate-uns-dictionary # generate typed object/attribute dictionary from uns-dictionary.json
17
+ pnpm run generate-uns-measurements # generate typed measurement units from uns-measurements.json
18
+ pnpm run generate-uns-reference # run both dictionary + measurements generators
17
19
  ```
18
20
 
19
21
  ## Configuration
@@ -28,7 +30,8 @@ Update `config.json` with your broker, UNS URLs, and credentials. The generated
28
30
  - Run `uns-kit configure-devops` to add the Azure DevOps pull-request tooling.
29
31
  - Run `uns-kit configure-vscode` to copy workspace/launch configuration for VS Code.
30
32
  - Run `uns-kit configure-codegen` to scaffold GraphQL code generation and UNS refresh scripts.
31
- - Edit `uns-dictionary.json` (object types/attributes + descriptions) and run `pnpm run generate-uns-dictionary` to emit `src/uns/uns-dictionary.generated.ts` for IDE hints/metadata.
33
+ - Edit `uns-dictionary.json` (object types/attributes + descriptions) and run `pnpm run generate-uns-dictionary` to emit `src/uns/uns-dictionary.generated.ts` for IDE hints/metadata; publish calls will automatically fall back to these descriptions when you omit them.
34
+ - Edit `uns-measurements.json` (units + descriptions) and run `pnpm run generate-uns-measurements` to emit `src/uns/uns-measurements.generated.ts` and feed measurement unit IntelliSense.
32
35
  - Run `uns-kit configure-api` / `configure-cron` / `configure-temporal` to pull in example stubs and install the matching UNS plugins.
33
36
  - Run `uns-kit configure-python` to copy the Python gateway client template (examples, scripts, proto).
34
37
  - Commit your new project and start building!
@@ -24,8 +24,10 @@
24
24
  "dev": "tsx watch src/index.ts",
25
25
  "start": "node dist/index.js",
26
26
  "generate-config-schema": "node ./node_modules/@uns-kit/core/dist/tools/generate-config-schema.js",
27
- "refresh-uns": "node ./node_modules/@uns-kit/core/dist/tools/refresh-uns.js",
28
- "generate-uns-dictionary": "node ./node_modules/@uns-kit/core/dist/tools/generate-uns-dictionary.js --input uns-dictionary.json --output src/uns/uns-dictionary.generated.ts"
27
+ "generate-uns-topics-tags": "node ./node_modules/@uns-kit/core/dist/tools/refresh-uns.js",
28
+ "generate-uns-dictionary": "node ./node_modules/@uns-kit/core/dist/tools/generate-uns-dictionary.js --input uns-dictionary.json --output src/uns/uns-dictionary.generated.ts",
29
+ "generate-uns-measurements": "node ./node_modules/@uns-kit/core/dist/tools/generate-uns-measurements.js --input uns-measurements.json --output src/uns/uns-measurements.generated.ts",
30
+ "generate-uns-reference": "pnpm generate-uns-dictionary && pnpm generate-uns-measurements"
29
31
  },
30
32
  "dependencies": {
31
33
  "@uns-kit/core": "__UNS_KIT_CORE_VERSION__",
@@ -1,16 +1,11 @@
1
1
  /**
2
2
  * Change this file according to your specifications and rename it to index.ts
3
3
  */
4
- import { UnsProxyProcess, ConfigFile, logger, type IUnsMessage } from "@uns-kit/core";
5
- import { PhysicalMeasurements } from "@uns-kit/core/uns/uns-measurements.js";
4
+ import { UnsProxyProcess, ConfigFile, logger } from "@uns-kit/core";
5
+ import { GeneratedPhysicalMeasurements } from "../uns/uns-measurements.generated.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, GeneratedAttributesByType } from "../uns/uns-dictionary.generated.js";
14
9
 
15
10
  /**
16
11
  * Load the configuration from a file.
@@ -49,41 +44,26 @@ mqttInput.event.on("input", async (event) => {
49
44
 
50
45
  const dataGroup = "sensor";
51
46
 
52
- const message: IUnsMessage = {
53
- data: { dataGroup, time, value: numberValue, uom: PhysicalMeasurements.None },
54
- };
55
47
  const topic: UnsTopics = "enterprise/site/area/line/";
56
48
  const asset = "asset";
57
49
  const assetDescription = "Sample asset";
58
- const currentPacket = await UnsPacket.unsPacketFromUnsMessage(message);
59
- mqttOutput.publishMqttMessage({
60
- topic,
61
- asset,
62
- assetDescription,
63
- objectType: GeneratedObjectTypes["energy-resource"],
64
- objectTypeDescription: GeneratedObjectTypes["energy-resource"],
65
- objectId: "main",
66
- attribute: GeneratedAttributes["current"] ?? "current",
67
- description: GeneratedAttributeDescriptions["current"] ?? "Simulated current sensor value",
68
- tags: [],
69
- packet: currentPacket
70
- });
71
50
 
72
- const sensorMessage: IUnsMessage = {
73
- data: { dataGroup, time, value: sensorValue, uom: PhysicalMeasurements.Celsius },
74
- };
75
- const sensorPacket = await UnsPacket.unsPacketFromUnsMessage(sensorMessage);
76
51
  mqttOutput.publishMqttMessage({
77
52
  topic,
78
53
  asset,
79
54
  assetDescription,
80
55
  objectType: GeneratedObjectTypes["energy-resource"],
81
- objectTypeDescription: GeneratedObjectTypeDescriptions["energy-resource"],
82
56
  objectId: "main",
83
- attribute: GeneratedAttributes["voltage"] ?? "voltage",
84
- description: GeneratedAttributeDescriptions["voltage"] ?? "Simulated voltage sensor value",
85
- tags: [],
86
- packet: sensorPacket
57
+ attributes: [
58
+ {
59
+ attribute: GeneratedAttributesByType["energy-resource"]["current"],
60
+ data: { dataGroup, time, value: numberValue, uom: GeneratedPhysicalMeasurements.Ampere },
61
+ },
62
+ {
63
+ attribute: GeneratedAttributes["voltage"],
64
+ data: { dataGroup, time, value: sensorValue, uom: GeneratedPhysicalMeasurements.Volt },
65
+ },
66
+ ],
87
67
  });
88
68
  }
89
69
  } catch (error) {
@@ -47,6 +47,100 @@ export function getGeneratedObjectTypeDescription(name: string): string | undefi
47
47
  return (GeneratedObjectTypeDescriptions as Record<string, string | undefined>)[name];
48
48
  }
49
49
 
50
+ export const GeneratedAttributesByType = {
51
+ "equipment": {
52
+ "status": "status",
53
+ "temperature": "temperature",
54
+ "vibration": "vibration",
55
+ "operating-hours": "operating-hours",
56
+ "fault-code": "fault-code",
57
+ "speed": "speed",
58
+ "energy-consumption": "energy-consumption",
59
+ },
60
+ "material": {
61
+ "lot-id": "lot-id",
62
+ "batch-number": "batch-number",
63
+ "material-type": "material-type",
64
+ "quantity": "quantity",
65
+ "location": "location",
66
+ "status": "status",
67
+ },
68
+ "personnel": {
69
+ "presence": "presence",
70
+ "task-id": "task-id",
71
+ "role": "role",
72
+ "status": "status",
73
+ },
74
+ "process-segment": {
75
+ "start-time": "start-time",
76
+ "end-time": "end-time",
77
+ "duration": "duration",
78
+ "status": "status",
79
+ "output-quantity": "output-quantity",
80
+ },
81
+ "product-definition": {
82
+ "product-code": "product-code",
83
+ "revision": "revision",
84
+ "specification": "specification",
85
+ "target-parameters": "target-parameters",
86
+ "material-composition": "material-composition",
87
+ "version-history": "version-history",
88
+ },
89
+ "product-quality": {
90
+ "inspection-result": "inspection-result",
91
+ "deviation": "deviation",
92
+ "pass-fail": "pass-fail",
93
+ "surface-defect": "surface-defect",
94
+ "hardness": "hardness",
95
+ "tensile-strength": "tensile-strength",
96
+ },
97
+ "work-definition": {
98
+ "work-order-id": "work-order-id",
99
+ "task-list": "task-list",
100
+ "planned-start": "planned-start",
101
+ "planned-end": "planned-end",
102
+ "assigned-to": "assigned-to",
103
+ "instruction-url": "instruction-url",
104
+ },
105
+ "resource-status": {
106
+ "availability": "availability",
107
+ "utilization": "utilization",
108
+ "downtime": "downtime",
109
+ "status": "status",
110
+ "maintenance-status": "maintenance-status",
111
+ },
112
+ "energy-resource": {
113
+ "power": "power",
114
+ "energy": "energy",
115
+ "voltage": "voltage",
116
+ "current": "current",
117
+ "frequency": "frequency",
118
+ "cost": "cost",
119
+ },
120
+ "utility-resource": {
121
+ "pressure": "pressure",
122
+ "flow": "flow",
123
+ "consumption": "consumption",
124
+ "status": "status",
125
+ "alarm": "alarm",
126
+ },
127
+ "fluid-resource": {
128
+ "flow": "flow",
129
+ "pressure": "pressure",
130
+ "temperature": "temperature",
131
+ "total-flow": "total-flow",
132
+ "conductivity": "conductivity",
133
+ "ph": "ph",
134
+ },
135
+ "consumable-resource": {
136
+ "level": "level",
137
+ "consumption-rate": "consumption-rate",
138
+ "refill-required": "refill-required",
139
+ "last-refill": "last-refill",
140
+ "status": "status",
141
+ }
142
+ } as const;
143
+
50
144
  export const GeneratedAttributes = {
51
145
  /** Trenutno stanje vira ali opreme. */
52
146
  "status": "status",
@@ -238,3 +332,5 @@ export type GeneratedAttributeName = keyof typeof GeneratedAttributes;
238
332
  export function getGeneratedAttributeDescription(name: string): string | undefined {
239
333
  return (GeneratedAttributeDescriptions as Record<string, string | undefined>)[name];
240
334
  }
335
+
336
+ export type GeneratedAttributesFor<T extends keyof typeof GeneratedAttributesByType> = keyof typeof GeneratedAttributesByType[T];
@@ -0,0 +1,102 @@
1
+ /* Auto-generated placeholder. Run generate-uns-measurements to regenerate. */
2
+ export const GeneratedPhysicalMeasurements = {
3
+ "None": "",
4
+ "MiliMeter": "mm",
5
+ "Meter": "m",
6
+ "KiloMeter": "km",
7
+ "Feet": "ft",
8
+ "Second": "s",
9
+ "Minute": "min",
10
+ "Hour": "h",
11
+ "Day": "day",
12
+ "Hertz": "Hz",
13
+ "CubicMeter": "m^3",
14
+ "Liter": "l",
15
+ "Gallon": "gal",
16
+ "Psi": "psi",
17
+ "Pascal": "Pa",
18
+ "Bar": "bar",
19
+ "Celsius": "°C",
20
+ "Fahrenheit": "°F",
21
+ "Kelvin": "K",
22
+ "Milijoule": "mJ",
23
+ "Joule": "J",
24
+ "Kilojoule": "kJ",
25
+ "Megajoule": "MJ",
26
+ "Gigajoule": "GJ",
27
+ "Terajoule": "TJ",
28
+ "Newton": "N",
29
+ "Bit": "bit",
30
+ "Byte": "byte",
31
+ "B": "B",
32
+ "MilimeterPerSecond": "mm/s",
33
+ "MeterPerSecond": "m/s",
34
+ "MeterPerMinute": "m/min",
35
+ "CentiMeterPerSecond": "cm/s",
36
+ "MeterPerHour": "m/h",
37
+ "KilometerPerHour": "km/h",
38
+ "RevolutionsPerMinute": "rpm",
39
+ "Percent": "percent",
40
+ "PartsPerMillion": "ppm",
41
+ "PartsPerBillion": "ppb",
42
+ "PartsPerTrillion": "ppt",
43
+ "Decibel": "dB",
44
+ "Degree": "°",
45
+ "Radian": "rad",
46
+ "Miligram": "mg",
47
+ "Gram": "g",
48
+ "Kilogram": "kg",
49
+ "MetricTon": "t",
50
+ "MiliVolt": "mV",
51
+ "Volt": "V",
52
+ "KiloVolt": "kV",
53
+ "MegaVolt": "MV",
54
+ "MiliAmpere": "mA",
55
+ "Ampere": "A",
56
+ "KiloAmpere": "kA",
57
+ "MegaAmpere": "MA",
58
+ "MiliWatt": "mW",
59
+ "Watt": "W",
60
+ "KiloWatt": "kW",
61
+ "MegaWatt": "MW",
62
+ "MiliWattHour": "mWh",
63
+ "WattHour": "Wh",
64
+ "KiloWattHour": "kWh",
65
+ "MegaWattHour": "MWh",
66
+ "MiliVoltAmpere": "mVA",
67
+ "VoltAmpere": "VA",
68
+ "KiloVoltAmpere": "kVA",
69
+ "MegaVoltAmpere": "MVA",
70
+ "MiliVoltAmpereReactive": "mVAR",
71
+ "VoltAmpereReactive": "VAR",
72
+ "KiloVoltAmpereReactive": "kVAR",
73
+ "MegaVoltAmpereReactive": "MVAR",
74
+ "CubicMeterPerHour": "m^3/h",
75
+ "CubicMeterPerSecond": "m^3/s",
76
+ "MegaGramPerHour": "Mg/h",
77
+ "MetricTonPerHour": "t/h",
78
+ } as const;
79
+
80
+ export const GeneratedDataSizeMeasurements = {
81
+ "Bit": "bit",
82
+ "Byte": "B",
83
+ "KiloByte": "kB",
84
+ "MegaByte": "MB",
85
+ "GigaByte": "GB",
86
+ "TeraByte": "TB",
87
+ "PetaByte": "PB",
88
+ "ExaByte": "EB",
89
+ "ZettaByte": "ZB",
90
+ "YottaByte": "YB",
91
+ } as const;
92
+
93
+ export const GeneratedCounterMeasurements = {
94
+ "Kilo": "k",
95
+ "Mega": "M",
96
+ "Giga": "G",
97
+ } as const;
98
+
99
+ export type GeneratedPhysicalMeasurement = typeof GeneratedPhysicalMeasurements[keyof typeof GeneratedPhysicalMeasurements];
100
+ export type GeneratedDataSizeMeasurement = typeof GeneratedDataSizeMeasurements[keyof typeof GeneratedDataSizeMeasurements];
101
+ export type GeneratedCounterMeasurement = typeof GeneratedCounterMeasurements[keyof typeof GeneratedCounterMeasurements];
102
+ export type GeneratedMeasurementUnit = GeneratedPhysicalMeasurement | GeneratedDataSizeMeasurement | GeneratedCounterMeasurement | (string & {});
@@ -5,84 +5,175 @@
5
5
  "descriptions": {
6
6
  "sl": "Fizična oprema (stroji, peči, senzorji). Uporablja se za spremljanje stanja, meritev in dogodkov.",
7
7
  "en": "Physical equipment (machines, furnaces, sensors). Used to monitor status, measurements, and events."
8
- }
8
+ },
9
+ "attributes": [
10
+ "status",
11
+ "temperature",
12
+ "vibration",
13
+ "operating-hours",
14
+ "fault-code",
15
+ "speed",
16
+ "energy-consumption"
17
+ ]
9
18
  },
10
19
  "material": {
11
20
  "description": "Materialne enote (loti, serije, surovine, polizdelki). Za sledljivost, količine in premike.",
12
21
  "descriptions": {
13
22
  "sl": "Materialne enote (loti, serije, surovine, polizdelki). Za sledljivost, količine in premike.",
14
23
  "en": "Material lots/batches/raw materials for traceability, quantities, and movements."
15
- }
24
+ },
25
+ "attributes": [
26
+ "lot-id",
27
+ "batch-number",
28
+ "material-type",
29
+ "quantity",
30
+ "location",
31
+ "status"
32
+ ]
16
33
  },
17
34
  "personnel": {
18
35
  "description": "Osebje (operaterji, nadzorniki, tehnologi). Za prisotnost, naloge in status.",
19
36
  "descriptions": {
20
37
  "sl": "Osebje (operaterji, nadzorniki, tehnologi). Za prisotnost, naloge in status.",
21
38
  "en": "Personnel (operators/supervisors/technologists). Track presence, tasks, and status."
22
- }
39
+ },
40
+ "attributes": [
41
+ "presence",
42
+ "task-id",
43
+ "role",
44
+ "status"
45
+ ]
23
46
  },
24
47
  "process-segment": {
25
48
  "description": "Posamezen korak v procesu (npr. valjanje, hlajenje, analiza). Za faze ali aktivnosti procesa.",
26
49
  "descriptions": {
27
50
  "sl": "Posamezen korak v procesu (npr. valjanje, hlajenje, analiza). Za faze ali aktivnosti procesa.",
28
51
  "en": "Process step or activity (e.g., rolling, cooling, analysis)."
29
- }
52
+ },
53
+ "attributes": [
54
+ "start-time",
55
+ "end-time",
56
+ "duration",
57
+ "status",
58
+ "output-quantity"
59
+ ]
30
60
  },
31
61
  "product-definition": {
32
62
  "description": "Definicija izdelka, recepture, tehnični opisi. Za metapodatke izdelka in revizije.",
33
63
  "descriptions": {
34
64
  "sl": "Definicija izdelka, recepture, tehnični opisi. Za metapodatke izdelka in revizije.",
35
65
  "en": "Product definitions/recipes/specifications and revisions."
36
- }
66
+ },
67
+ "attributes": [
68
+ "product-code",
69
+ "revision",
70
+ "specification",
71
+ "target-parameters",
72
+ "material-composition",
73
+ "version-history"
74
+ ]
37
75
  },
38
76
  "product-quality": {
39
77
  "description": "Kazalniki kakovosti izdelka (odstopanja, ocene, rezultati meritev).",
40
78
  "descriptions": {
41
79
  "sl": "Kazalniki kakovosti izdelka (odstopanja, ocene, rezultati meritev).",
42
80
  "en": "Product quality indicators/results and deviations."
43
- }
81
+ },
82
+ "attributes": [
83
+ "inspection-result",
84
+ "deviation",
85
+ "pass-fail",
86
+ "surface-defect",
87
+ "hardness",
88
+ "tensile-strength"
89
+ ]
44
90
  },
45
91
  "work-definition": {
46
92
  "description": "Definicija nalog ali delovnih tokov. Za planirane operacije in navodila.",
47
93
  "descriptions": {
48
94
  "sl": "Definicija nalog ali delovnih tokov. Za planirane operacije in navodila.",
49
95
  "en": "Work/task definitions or workflows with plans and instructions."
50
- }
96
+ },
97
+ "attributes": [
98
+ "work-order-id",
99
+ "task-list",
100
+ "planned-start",
101
+ "planned-end",
102
+ "assigned-to",
103
+ "instruction-url"
104
+ ]
51
105
  },
52
106
  "resource-status": {
53
107
  "description": "Status kateregakoli vira (material, osebje, oprema). Za razpoložljivost, okvare, izrabo.",
54
108
  "descriptions": {
55
109
  "sl": "Status kateregakoli vira (material, osebje, oprema). Za razpoložljivost, okvare, izrabo.",
56
110
  "en": "Status of any resource (material/personnel/equipment)."
57
- }
111
+ },
112
+ "attributes": [
113
+ "availability",
114
+ "utilization",
115
+ "downtime",
116
+ "status",
117
+ "maintenance-status"
118
+ ]
58
119
  },
59
120
  "energy-resource": {
60
121
  "description": "Energija (elektrika, para, plin).",
61
122
  "descriptions": {
62
123
  "sl": "Energija (elektrika, para, plin).",
63
124
  "en": "Energy carriers (electricity/steam/gas)."
64
- }
125
+ },
126
+ "attributes": [
127
+ "power",
128
+ "energy",
129
+ "voltage",
130
+ "current",
131
+ "frequency",
132
+ "cost"
133
+ ]
65
134
  },
66
135
  "utility-resource": {
67
136
  "description": "Utility viri (voda, zrak, dušik, stisnjeni plini).",
68
137
  "descriptions": {
69
138
  "sl": "Utility viri (voda, zrak, dušik, stisnjeni plini).",
70
139
  "en": "Utilities (water/air/nitrogen/etc.)."
71
- }
140
+ },
141
+ "attributes": [
142
+ "pressure",
143
+ "flow",
144
+ "consumption",
145
+ "status",
146
+ "alarm"
147
+ ]
72
148
  },
73
149
  "fluid-resource": {
74
150
  "description": "Tekočine in plini, ki niso energenti.",
75
151
  "descriptions": {
76
152
  "sl": "Tekočine in plini, ki niso energenti.",
77
153
  "en": "Fluids/gases (non-energy) used in process."
78
- }
154
+ },
155
+ "attributes": [
156
+ "flow",
157
+ "pressure",
158
+ "temperature",
159
+ "total-flow",
160
+ "conductivity",
161
+ "ph"
162
+ ]
79
163
  },
80
164
  "consumable-resource": {
81
165
  "description": "Maziva, olja, čistila, ki se porabijo in niso del izdelka.",
82
166
  "descriptions": {
83
167
  "sl": "Maziva, olja, čistila, ki se porabijo in niso del izdelka.",
84
168
  "en": "Consumables (lubricants/cleaners)."
85
- }
169
+ },
170
+ "attributes": [
171
+ "level",
172
+ "consumption-rate",
173
+ "refill-required",
174
+ "last-refill",
175
+ "status"
176
+ ]
86
177
  }
87
178
  },
88
179
  "attributes": {
@@ -0,0 +1,96 @@
1
+ {
2
+ "physical": {
3
+ "None": { "value": "", "description": "Brez enote" },
4
+ "MiliMeter": { "value": "mm", "description": "Milimeter" },
5
+ "Meter": { "value": "m", "description": "Meter" },
6
+ "KiloMeter": { "value": "km", "description": "Kilometer" },
7
+ "Feet": { "value": "ft", "description": "Čevlji" },
8
+ "Second": { "value": "s", "description": "Sekunda" },
9
+ "Minute": { "value": "min", "description": "Minuta" },
10
+ "Hour": { "value": "h", "description": "Ura" },
11
+ "Day": { "value": "day", "description": "Dan" },
12
+ "Hertz": { "value": "Hz", "description": "Herc" },
13
+ "CubicMeter": { "value": "m^3", "description": "Kubični meter" },
14
+ "Liter": { "value": "l", "description": "Liter" },
15
+ "Gallon": { "value": "gal", "description": "Galona" },
16
+ "Psi": { "value": "psi", "description": "Funt na kvadratni palec" },
17
+ "Pascal": { "value": "Pa", "description": "Pascal" },
18
+ "Bar": { "value": "bar", "description": "Bar" },
19
+ "Celsius": { "value": "°C", "description": "Stopinje Celzija" },
20
+ "Fahrenheit": { "value": "°F", "description": "Stopinje Fahrenheita" },
21
+ "Kelvin": { "value": "K", "description": "Kelvin" },
22
+ "Milijoule": { "value": "mJ", "description": "Milidžul" },
23
+ "Joule": { "value": "J", "description": "Džul" },
24
+ "Kilojoule": { "value": "kJ", "description": "Kilodžul" },
25
+ "Megajoule": { "value": "MJ", "description": "Megadžul" },
26
+ "Gigajoule": { "value": "GJ", "description": "Gigadžul" },
27
+ "Terajoule": { "value": "TJ", "description": "Teradžul" },
28
+ "Newton": { "value": "N", "description": "Njuton" },
29
+ "Bit": { "value": "bit", "description": "Bit" },
30
+ "Byte": { "value": "byte", "description": "Bajt" },
31
+ "B": { "value": "B", "description": "Bajti" },
32
+ "MilimeterPerSecond": { "value": "mm/s", "description": "Milimeter na sekundo" },
33
+ "MeterPerSecond": { "value": "m/s", "description": "Meter na sekundo" },
34
+ "MeterPerMinute": { "value": "m/min", "description": "Meter na minuto" },
35
+ "CentiMeterPerSecond": { "value": "cm/s", "description": "Centimeter na sekundo" },
36
+ "MeterPerHour": { "value": "m/h", "description": "Meter na uro" },
37
+ "KilometerPerHour": { "value": "km/h", "description": "Kilometer na uro" },
38
+ "RevolutionsPerMinute": { "value": "rpm", "description": "Obratov na minuto" },
39
+ "Percent": { "value": "percent", "description": "Odstotek" },
40
+ "PartsPerMillion": { "value": "ppm", "description": "Delci na milijon" },
41
+ "PartsPerBillion": { "value": "ppb", "description": "Delci na milijardo" },
42
+ "PartsPerTrillion": { "value": "ppt", "description": "Delci na trilijon" },
43
+ "Decibel": { "value": "dB", "description": "Decibel" },
44
+ "Degree": { "value": "°", "description": "Stopinja" },
45
+ "Radian": { "value": "rad", "description": "Radian" },
46
+ "Miligram": { "value": "mg", "description": "Miligram" },
47
+ "Gram": { "value": "g", "description": "Gram" },
48
+ "Kilogram": { "value": "kg", "description": "Kilogram" },
49
+ "MetricTon": { "value": "t", "description": "Tona" },
50
+ "MiliVolt": { "value": "mV", "description": "Milivolt" },
51
+ "Volt": { "value": "V", "description": "Volt" },
52
+ "KiloVolt": { "value": "kV", "description": "Kilovolt" },
53
+ "MegaVolt": { "value": "MV", "description": "Megavolt" },
54
+ "MiliAmpere": { "value": "mA", "description": "Miliamper" },
55
+ "Ampere": { "value": "A", "description": "Amper" },
56
+ "KiloAmpere": { "value": "kA", "description": "Kiloamper" },
57
+ "MegaAmpere": { "value": "MA", "description": "Megaamper" },
58
+ "MiliWatt": { "value": "mW", "description": "Miliwatt" },
59
+ "Watt": { "value": "W", "description": "Watt" },
60
+ "KiloWatt": { "value": "kW", "description": "Kilowatt" },
61
+ "MegaWatt": { "value": "MW", "description": "Megawatt" },
62
+ "MiliWattHour": { "value": "mWh", "description": "Miliwattna ura" },
63
+ "WattHour": { "value": "Wh", "description": "Wattna ura" },
64
+ "KiloWattHour": { "value": "kWh", "description": "Kilowattna ura" },
65
+ "MegaWattHour": { "value": "MWh", "description": "Megawattna ura" },
66
+ "MiliVoltAmpere": { "value": "mVA", "description": "Milivolt-amper" },
67
+ "VoltAmpere": { "value": "VA", "description": "Volt-amper" },
68
+ "KiloVoltAmpere": { "value": "kVA", "description": "Kilovolt-amper" },
69
+ "MegaVoltAmpere": { "value": "MVA", "description": "Megavolt-amper" },
70
+ "MiliVoltAmpereReactive": { "value": "mVAR", "description": "Milivolt-reaktivni amper" },
71
+ "VoltAmpereReactive": { "value": "VAR", "description": "Volt-reaktivni amper" },
72
+ "KiloVoltAmpereReactive": { "value": "kVAR", "description": "Kilovolt-reaktivni amper" },
73
+ "MegaVoltAmpereReactive": { "value": "MVAR", "description": "Megavolt-reaktivni amper" },
74
+ "CubicMeterPerHour": { "value": "m^3/h", "description": "Kubični meter na uro" },
75
+ "CubicMeterPerSecond": { "value": "m^3/s", "description": "Kubični meter na sekundo" },
76
+ "MegaGramPerHour": { "value": "Mg/h", "description": "Megagram na uro" },
77
+ "MetricTonPerHour": { "value": "t/h", "description": "Tona na uro" }
78
+ },
79
+ "dataSize": {
80
+ "Bit": { "value": "bit", "description": "Bit" },
81
+ "Byte": { "value": "B", "description": "Bajt" },
82
+ "KiloByte": { "value": "kB", "description": "Kilobajt" },
83
+ "MegaByte": { "value": "MB", "description": "Megabajt" },
84
+ "GigaByte": { "value": "GB", "description": "Gigabajt" },
85
+ "TeraByte": { "value": "TB", "description": "Terabajt" },
86
+ "PetaByte": { "value": "PB", "description": "Petabajt" },
87
+ "ExaByte": { "value": "EB", "description": "Eksabajt" },
88
+ "ZettaByte": { "value": "ZB", "description": "Zetabajt" },
89
+ "YottaByte": { "value": "YB", "description": "Jotabajt" }
90
+ },
91
+ "counter": {
92
+ "Kilo": { "value": "k", "description": "Kilo" },
93
+ "Mega": { "value": "M", "description": "Mega" },
94
+ "Giga": { "value": "G", "description": "Giga" }
95
+ }
96
+ }