node-opcua-data-access 2.54.0 → 2.57.0

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/.mocharc.yml CHANGED
@@ -1,10 +1,10 @@
1
- require:
2
- - ../../node_modules/source-map-support/register
3
- - ../../node_modules/ts-node/register
4
- - ../../node_modules/should
5
- timeout: 30000
6
- extension:
7
- - ts
8
- - js
9
- bail: true
10
- parallel: false
1
+ require:
2
+ - ../../node_modules/source-map-support/register
3
+ - ../../node_modules/ts-node/register
4
+ - ../../node_modules/should
5
+ timeout: 30000
6
+ extension:
7
+ - ts
8
+ - js
9
+ bail: true
10
+ parallel: false
package/LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2014-2021 Etienne Rossignon
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the "Software"), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
- the Software, and to permit persons to whom the Software is furnished to do so,
10
- subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014-2021 Etienne Rossignon
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -155,7 +155,7 @@ exports.standardUnits = {
155
155
  terabyte: makeEUInformation("E35", "Tbyte", "terabyte = A unit of information equal to 10¹² bytes."),
156
156
  minute: makeEUInformation("MIN", "min", " minute (unit of time) 1min = 60 s"),
157
157
  minute_angle: makeEUInformation("D61", "'", "minute [unit of angle]"),
158
- part_per_million: makeEUInformation("59", "ppm", "A unit of proportion equal to 10⁻⁶."),
158
+ part_per_million: makeEUInformation("59", "ppm", "A unit of proportion equal to 10⁻⁶.")
159
159
  // to be continued
160
160
  };
161
161
  //# sourceMappingURL=EUInformation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EUInformation.js","sourceRoot":"","sources":["../source/EUInformation.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,qDAAiD;AAAxC,iHAAA,aAAa,OAAA;AACtB,yBAAyB;AACzB,4BAA4B;AAE5B,kBAAkB;AAClB,4GAA4G;AAC5G,yCAAyC;AACzC,uGAAuG;AAC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CAAC,IAAI,EAAE,KAAK,EAAE,yBAAyB,CAAC;IACxE,kBAAkB,EAAE,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,oBAAoB,CAAC;IACzE,mBAAmB,EAAE,iBAAiB,CAClC,KAAK,EACL,QAAQ,EACR,8FAA8F,CACjG;IACD,OAAO,EAAE,iBAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,+CAA+C,CAAC;IACtF,KAAK,EAAE,iBAAiB,CAAC,KAAK,EAAE,EAAE,EAAE,8EAA8E,CAAC;IACnH,IAAI,EAAE,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,CAAC;IAE3C,IAAI,EAAE,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,+CAA+C,CAAC;IACtF,QAAQ,EAAE,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,6DAA6D,CAAC;IACzG,QAAQ,EAAE,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,gEAAgE,CAAC;IAC5G,QAAQ,EAAE,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,sDAAsD,CAAC;IACnG,QAAQ,EAAE,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,uDAAuD,CAAC;IACpG,MAAM,EAAE,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,oCAAoC,CAAC;IAC7E,YAAY,EAAE,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,wBAAwB,CAAC;IACrE,gBAAgB,EAAE,iBAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,qCAAqC,CAAC;IACvF,kBAAkB;CACrB,CAAC"}
package/fragment.yml CHANGED
@@ -1,32 +1,32 @@
1
- AxisInformation:
2
- engineeringUnits: >
3
- EngineeringUnit Holds the information about the engineering units for a given axis.
4
- euRange: >
5
- Range Limits of the range of the axis
6
- title: >
7
- LocalizedText User readable axis title, useful when the units are %, the Title may be “Particle size distribution"
8
- axisScaleType: >
9
- AxisScaleEnumeration LINEAR, LOG, LN, defined by AxisSteps
10
- axisSteps: >
11
- Double[] Specific value of each axis steps, may be set to “Null” if not used
12
-
13
- EngineeringUnit:
14
- document: >
15
- Units of measurement for AnalogItems that represent continuously- variable physical quantities ( e.g.,
16
- length, mass , time, temperature )
17
- NOTE This standard defines Properties to inform about the unit used for the DataItem
18
- value and about the highest and lowest value likely to be obtained in normal operation
19
-
20
- fields:
21
- namespaceUri: >
22
- Identifies the organization (company, standards organization) that defines the EUInformation.
23
-
24
- unitId: >
25
- Identifier for programmatic evaluation. −1 is used if a unitId is not available.
26
- The displayName of the engineering unit is typically the abbreviation of the
27
- engineering unit, for example ”h” for hour or ”m/s” for meter per second." +
28
- description: >
29
- Contains the full name of the engineering unit such as ”hour” or ”meter per second"
30
- displayName: >
31
- The displayName of the engineering ( for instance 'm/s' )"
32
-
1
+ AxisInformation:
2
+ engineeringUnits: >
3
+ EngineeringUnit Holds the information about the engineering units for a given axis.
4
+ euRange: >
5
+ Range Limits of the range of the axis
6
+ title: >
7
+ LocalizedText User readable axis title, useful when the units are %, the Title may be “Particle size distribution"
8
+ axisScaleType: >
9
+ AxisScaleEnumeration LINEAR, LOG, LN, defined by AxisSteps
10
+ axisSteps: >
11
+ Double[] Specific value of each axis steps, may be set to “Null” if not used
12
+
13
+ EngineeringUnit:
14
+ document: >
15
+ Units of measurement for AnalogItems that represent continuously- variable physical quantities ( e.g.,
16
+ length, mass , time, temperature )
17
+ NOTE This standard defines Properties to inform about the unit used for the DataItem
18
+ value and about the highest and lowest value likely to be obtained in normal operation
19
+
20
+ fields:
21
+ namespaceUri: >
22
+ Identifies the organization (company, standards organization) that defines the EUInformation.
23
+
24
+ unitId: >
25
+ Identifier for programmatic evaluation. −1 is used if a unitId is not available.
26
+ The displayName of the engineering unit is typically the abbreviation of the
27
+ engineering unit, for example ”h” for hour or ”m/s” for meter per second." +
28
+ description: >
29
+ Contains the full name of the engineering unit such as ”hour” or ”meter per second"
30
+ displayName: >
31
+ The displayName of the engineering ( for instance 'm/s' )"
32
+
package/package.json CHANGED
@@ -2,22 +2,23 @@
2
2
  "name": "node-opcua-data-access",
3
3
  "main": "./dist/index.js",
4
4
  "types": "./dist/index.d.ts",
5
- "version": "2.54.0",
5
+ "version": "2.57.0",
6
6
  "description": "pure nodejs OPCUA SDK - module -data-access",
7
7
  "scripts": {
8
8
  "build": "tsc -b",
9
9
  "test": "mocha",
10
10
  "clean": "node -e \"require('rimraf').sync('dist');\"",
11
- "lint": "eslint source/**/*.ts"
11
+ "lint": "eslint source test",
12
+ "format": "prettier --write source test"
12
13
  },
13
14
  "dependencies": {
14
- "node-opcua-assert": "2.52.0",
15
- "node-opcua-basic-types": "2.54.0",
16
- "node-opcua-binary-stream": "2.52.0",
17
- "node-opcua-data-model": "2.54.0",
18
- "node-opcua-factory": "2.54.0",
19
- "node-opcua-nodeid": "2.54.0",
20
- "node-opcua-types": "2.54.0"
15
+ "node-opcua-assert": "2.55.0",
16
+ "node-opcua-basic-types": "2.57.0",
17
+ "node-opcua-binary-stream": "2.55.0",
18
+ "node-opcua-data-model": "2.57.0",
19
+ "node-opcua-factory": "2.57.0",
20
+ "node-opcua-nodeid": "2.55.0",
21
+ "node-opcua-types": "2.57.0"
21
22
  },
22
23
  "devDependencies": {
23
24
  "should": "^13.2.3"
@@ -37,5 +38,5 @@
37
38
  "internet of things"
38
39
  ],
39
40
  "homepage": "http://node-opcua.github.io/",
40
- "gitHead": "d3093f76a2c8f574444fd59e98e7d53f34b83d8b"
41
+ "gitHead": "cb6a995ab35ea6231ffca85fbd0b624fe37119d2"
41
42
  }
@@ -1,236 +1,240 @@
1
- /**
2
- * @module node-opcua-data-access
3
- */
4
- export { EUInformation } from "node-opcua-types";
5
- /*jslint bitwise: true */
6
- // tslint:disable:no-bitwise
7
-
8
- // EngineeringUnit
9
- // Units of measurement for AnalogItems that represent continuously- variable physical quantities ( e.g.,
10
- // length, mass , time, temperature )
11
- // NOTE This standard defines Properties to inform about the unit used for the DataI tem value and
12
- // about the highest and lowest value likely to be obtained in normal operation
13
-
14
- import { EUInformation } from "node-opcua-types";
15
-
16
- const defaultUri = "http://www.opcfoundation.org/UA/units/un/cefact";
17
-
18
- const schemaEUInformation = EUInformation.schema;
19
- schemaEUInformation.fields[0].defaultValue = defaultUri;
20
- schemaEUInformation.fields[0].documentation =
21
- "Identifies the organization (company, standards organization) that defines the EUInformation.";
22
- schemaEUInformation.fields[1].documentation = "Identifier for programmatic evaluation. −1 is used if a unitId is not available.";
23
- schemaEUInformation.fields[2].documentation = "The displayName of the engineering ( for instance 'm/s' )";
24
- schemaEUInformation.fields[3].documentation = "Contains the full name of the engineering unit such as ”hour” or ”meter per second";
25
-
26
- // The displayName of the engineering unit is typically the abbreviation of the
27
- // engineering unit, for example ”h” for hour or ”m/s” for meter per second." +
28
- // "description LocalizedText Contains the full name of the engineering unit such as ”hour” or ”meter
29
- // http://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex2e.pdf
30
-
31
- // To facilitate interoperability, OPC UA specifies how to apply the widely accepted "Codes for Units of Measurement
32
- // (Recommendation N°. 20)” published by the "United Nations Centre for Trade
33
- // Facilitation and Electronic Business” (see UN/CEFACT). It uses and is based on the International System of Units
34
- // (SI Units) but in addition provides a fixed code that can be used for automated evaluation. This recommendation
35
- // has been accepted by many industries on a global basis.
36
- //
37
- // Following is a small excerpt of the published Annex with Code Lists:
38
- // Excerpt from Recommendation N°. 20, Annex 1
39
- // Common Code Name Conversion Factor Symbol
40
- // C81 radian rad
41
- // C25 milliradian 1E-3 rad mrad
42
- // MMT millimetre 1E−3 m mm
43
- // HMT hectometre 1E2 m hm
44
- // KTM kilometre 1E3 m km
45
- // KMQ kilogram per cubic metre kg/m3 kg/m3
46
- // FAH degree Fahrenheit 5/9 x K °F
47
- // J23 degree Fahrenheit per hour 1,543 210 x 10− 4 K/s °F/h
48
- // SEC second [unit of time]
49
- // C26 millisecond 1E-3 S
50
- // B98 microsecond 1E-6 S
51
- // Specific columns of this table shall be used to create the EUInformation structure as defined by the following rules:
52
- //
53
- // The Common Code is represented as an alphanumeric variable length of 3 characters. It shall be used for the
54
- // EUInformation.unitId. The following pseudo code specifies the algorithm
55
- // to convert the Common Code into an Int32 as needed for EUInformation.unitId:
56
- export function commonCodeToUInt(code: string): number {
57
- // CEL =>
58
- let unitId = 0;
59
- let c;
60
- const m = Math.min(4, code.length);
61
- for (let i = 0; i < m; i++) {
62
- c = code.charCodeAt(i);
63
- /* istanbul ignore if*/
64
- if (c === 0) {
65
- return unitId;
66
- }
67
- unitId *= 256;
68
- unitId |= c;
69
- }
70
- return unitId;
71
- }
72
-
73
- export function makeEUInformation(symbol: string, shortName: string, longName: string) {
74
- return new EUInformation({
75
- description: { text: longName },
76
- displayName: { text: shortName },
77
- unitId: commonCodeToUInt(symbol)
78
- });
79
- }
80
-
81
- export interface StandardUnits {
82
- ampere: EUInformation;
83
- bar: EUInformation;
84
- becquerel: EUInformation;
85
- byte: EUInformation;
86
- centimetre: EUInformation;
87
- cubic_centimetre: EUInformation;
88
- cubic_centimetre_per_second: EUInformation;
89
- cubic_metre: EUInformation;
90
- cubic_metre_per_hour: EUInformation;
91
- cubic_meter_per_minute: EUInformation;
92
- curie: EUInformation;
93
- curie_per_kilogram: EUInformation;
94
- degree: EUInformation;
95
- degree_celsius: EUInformation;
96
- degree_fahrenheit: EUInformation;
97
- dots_per_inch: EUInformation;
98
- electron_volt: EUInformation;
99
- farad: EUInformation;
100
- gigabecquerel: EUInformation;
101
- gigabyte: EUInformation;
102
- gram: EUInformation;
103
- hectopascal: EUInformation;
104
- hertz: EUInformation;
105
- joule: EUInformation;
106
- kelvin: EUInformation;
107
- kilo_electron_volt: EUInformation;
108
- kilobecquerel: EUInformation;
109
- kilobyte: EUInformation;
110
- kilohertz: EUInformation;
111
- kilogram: EUInformation;
112
- kilogram_force: EUInformation;
113
- kilogram_per_second: EUInformation;
114
- kilogram_per_squared_centimeter: EUInformation;
115
- kilometre_per_hour: EUInformation;
116
- kilopascal: EUInformation;
117
- kilowatt: EUInformation;
118
- mega_electron_volt: EUInformation;
119
- megabyte: EUInformation;
120
- megahertz: EUInformation;
121
- megapascal: EUInformation;
122
- megawatt: EUInformation;
123
- megawatt_per_minute: EUInformation;
124
- metre: EUInformation;
125
- metre_per_second: EUInformation;
126
- metre_per_second_squared: EUInformation;
127
- microsecond: EUInformation;
128
- mile_per_hour: EUInformation;
129
- millibar: EUInformation;
130
- millimetre: EUInformation;
131
- millipascal: EUInformation;
132
- millisecond: EUInformation;
133
- minute: EUInformation;
134
- minute_angle: EUInformation;
135
- newton: EUInformation;
136
- pascal: EUInformation;
137
- part_per_million: EUInformation;
138
- percent: EUInformation;
139
- pixel: EUInformation;
140
- revolutions_per_minute: EUInformation;
141
- revolutions_per_second: EUInformation;
142
- second: EUInformation;
143
- terabyte: EUInformation;
144
- volt: EUInformation;
145
- watt: EUInformation;
146
- }
147
-
148
- // http://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex2e.pdf
149
- export const standardUnits: StandardUnits = {
150
- // pressure
151
- bar: makeEUInformation("BAR", "bar", "bar [unit of pressure] = 1E5 Pa"),
152
- hectopascal: makeEUInformation("A97", "hPa", "hectopascal [unit of pressure] = 1E2 Pa"),
153
- millibar: makeEUInformation("MBR", "mbar", "millibar [unit of pressure] = 1E2 Pa"),
154
- pascal: makeEUInformation("PAL", "Pa", "pascal [unit of pressure]"),
155
- kilogram_per_squared_centimeter: makeEUInformation("D5", "kg/cm²", "kilogram per square centimetre"),
156
- megapascal: makeEUInformation("MPA", "MPa", "1 megapascal = 10⁶ pascal [unit of pressure]"),
157
-
158
- // time/duration
159
- microsecond: makeEUInformation("B98", "μs", "microsecond =1E-6 second"),
160
- millisecond: makeEUInformation("C26", "ms", "millisecond =1E-3 second"),
161
- second: makeEUInformation("SEC", "s", "second"),
162
- // distance
163
- centimetre: makeEUInformation("CMT", "cm", "centimetre = 1E-2 m"),
164
- metre: makeEUInformation("MTR", "m", "metre"),
165
- millimetre: makeEUInformation("MMT", "mm", "millimetre = 1E-3 metre"),
166
- // volume
167
- cubic_centimetre: makeEUInformation("CMQ", "cm³", "Cubic centimetre = 1E-6 m³"),
168
- cubic_metre: makeEUInformation("MTQ", "m³", "Cubic metre"),
169
- // temperature
170
- degree_celsius: makeEUInformation("CEL", "°C", "degree Celsius"),
171
- degree_fahrenheit: makeEUInformation("FAH", "°F", "degree Fahrenheit 9/5(°C) + 32°"),
172
- kelvin: makeEUInformation("KEL", "K", "degree Kelvin"),
173
-
174
- // weight
175
- gram: makeEUInformation("GRM", "g", "gramme 1E-3 kg"),
176
- kilogram: makeEUInformation("KGM", "kg", "A unit of mass equal to one thousand grams"),
177
- // speed
178
- metre_per_second: makeEUInformation("MTS", "m/s", "meter per second"),
179
- mile_per_hour: makeEUInformation("HM", "mile/h", "mile per hour = 2 0,447 04 m/s"),
180
- kilometre_per_hour: makeEUInformation("KMH", "km/h", "kilometre per hour = 0,277 778 m/s"),
181
-
182
- // acceleration
183
- metre_per_second_squared: makeEUInformation("MSK", "m/s²", "meter per second square"),
184
- // frequency
185
- kilohertz: makeEUInformation("KHZ", "kHz", "kilo hertz = 1E3 Hertz"),
186
- hertz: makeEUInformation("HTZ", "Hz", "Hertz"),
187
- megahertz: makeEUInformation("MHZ", "MHz", "megahertz"),
188
- revolutions_per_minute: makeEUInformation("RPM", "r/min", "revolutions per minute 1,047198 rad/(60 x s)"),
189
- revolutions_per_second: makeEUInformation("RPS", "r/s", "revolutions per minute 1,047198 rad/s"),
190
- // force
191
- newton: makeEUInformation("NEW", "N", "Newton (kg x m)/s² "),
192
- kilogram_force: makeEUInformation("B37", "kgf", "kilogram-force 1 kgf = 9.80665 N"),
193
- // power
194
- kilowatt: makeEUInformation("KWT", "kW", "kilowatt 1kW = 10³ W"),
195
- megawatt: makeEUInformation("MAW", "MW", "Mega Watt"),
196
- watt: makeEUInformation("WTT", "W", "Watt"),
197
- // rate of flow
198
- cubic_centimetre_per_second: makeEUInformation("2J", "cm³/s", "Cubic centimetre per second"),
199
- cubic_metre_per_hour: makeEUInformation("MQH", "m³/h", "Cubic metre per hours = 2,777 78 x 10⁻⁴ m³/s"),
200
- cubic_meter_per_minute: makeEUInformation("G53", "m³/min", "m³/min cubic metre per minute"),
201
- // angle
202
- degree: makeEUInformation("DD", "°", "degree [unit of angle]"),
203
-
204
- //
205
- ampere: makeEUInformation("AMP", "A", "ampere"),
206
- becquerel: makeEUInformation("BQL", "Bq", "becquerel = 27,027E-12 Ci"),
207
-
208
- curie: makeEUInformation("CUR", "Ci", "Curie = 3,7E-10 Bq"),
209
- curie_per_kilogram: makeEUInformation("A42", "Ci/kg", "Curie per kilogram = 3,7E-10 Bq/kg"),
210
-
211
- dots_per_inch: makeEUInformation("E39", "dpi", "dot per inch"),
212
- electron_volt: makeEUInformation("A53", "eV", "electron volt"),
213
- farad: makeEUInformation("FAR", "F", "Farad = kg⁻¹ x m⁻² x s⁴ x A²"),
214
- gigabecquerel: makeEUInformation("GBQ", "GBq", "Giga becquerel = 1E9 Bq"),
215
- joule: makeEUInformation("JOU", "J", "Joule"),
216
- kilo_electron_volt: makeEUInformation("B29", "keV", "kilo electron volt"),
217
- kilogram_per_second: makeEUInformation("KGS", "kg/s", "kilogram per second"),
218
- kilopascal: makeEUInformation("KPA", "kPa", "1 kilopascal = 10³ Pa"),
219
- millipascal: makeEUInformation("74", "mPa", "1 millipascal = 10⁻³ Pa"),
220
- kilobecquerel: makeEUInformation("2Q", "kBq", "kilo becquerel = 1E3 Bq"),
221
- mega_electron_volt: makeEUInformation("B71", "MeV", "mega electron volt"),
222
- megawatt_per_minute: makeEUInformation("Q35", "MW/min", "A unit of power defining the total amount of bulk energy transferred or consumer per minute."),
223
- percent: makeEUInformation("P1", "%", "Percent, a unit of proportion equal to 0.01. "),
224
- pixel: makeEUInformation("E37", "", "pixel: unit of count defining the number of pixels (pixel: picture element)"),
225
- volt: makeEUInformation("VLT", "V", "Volt"),
226
-
227
- byte: makeEUInformation("AD", "byte", "byte = A unit of information equal to 8 bits."),
228
- kilobyte: makeEUInformation("2P", "kbyte", "kilobyte = A unit of information equal to 10³ (1000) bytes."),
229
- megabyte: makeEUInformation("4L", "Mbyte", "megabyte = A unit of information equal to 10⁶ (1000000) bytes."),
230
- gigabyte: makeEUInformation("E34", "Gbyte", "gigabyte = A unit of information equal to 10⁹ bytes."),
231
- terabyte: makeEUInformation("E35", "Tbyte", "terabyte = A unit of information equal to 10¹² bytes."),
232
- minute: makeEUInformation("MIN", "min", " minute (unit of time) 1min = 60 s"),
233
- minute_angle: makeEUInformation("D61", "'", "minute [unit of angle]"),
234
- part_per_million: makeEUInformation("59", "ppm", "A unit of proportion equal to 10⁻⁶."),
235
- // to be continued
236
- };
1
+ /**
2
+ * @module node-opcua-data-access
3
+ */
4
+ export { EUInformation } from "node-opcua-types";
5
+ /*jslint bitwise: true */
6
+ // tslint:disable:no-bitwise
7
+
8
+ // EngineeringUnit
9
+ // Units of measurement for AnalogItems that represent continuously- variable physical quantities ( e.g.,
10
+ // length, mass , time, temperature )
11
+ // NOTE This standard defines Properties to inform about the unit used for the DataI tem value and
12
+ // about the highest and lowest value likely to be obtained in normal operation
13
+
14
+ import { EUInformation } from "node-opcua-types";
15
+
16
+ const defaultUri = "http://www.opcfoundation.org/UA/units/un/cefact";
17
+
18
+ const schemaEUInformation = EUInformation.schema;
19
+ schemaEUInformation.fields[0].defaultValue = defaultUri;
20
+ schemaEUInformation.fields[0].documentation =
21
+ "Identifies the organization (company, standards organization) that defines the EUInformation.";
22
+ schemaEUInformation.fields[1].documentation = "Identifier for programmatic evaluation. −1 is used if a unitId is not available.";
23
+ schemaEUInformation.fields[2].documentation = "The displayName of the engineering ( for instance 'm/s' )";
24
+ schemaEUInformation.fields[3].documentation = "Contains the full name of the engineering unit such as ”hour” or ”meter per second";
25
+
26
+ // The displayName of the engineering unit is typically the abbreviation of the
27
+ // engineering unit, for example ”h” for hour or ”m/s” for meter per second." +
28
+ // "description LocalizedText Contains the full name of the engineering unit such as ”hour” or ”meter
29
+ // http://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex2e.pdf
30
+
31
+ // To facilitate interoperability, OPC UA specifies how to apply the widely accepted "Codes for Units of Measurement
32
+ // (Recommendation N°. 20)” published by the "United Nations Centre for Trade
33
+ // Facilitation and Electronic Business” (see UN/CEFACT). It uses and is based on the International System of Units
34
+ // (SI Units) but in addition provides a fixed code that can be used for automated evaluation. This recommendation
35
+ // has been accepted by many industries on a global basis.
36
+ //
37
+ // Following is a small excerpt of the published Annex with Code Lists:
38
+ // Excerpt from Recommendation N°. 20, Annex 1
39
+ // Common Code Name Conversion Factor Symbol
40
+ // C81 radian rad
41
+ // C25 milliradian 1E-3 rad mrad
42
+ // MMT millimetre 1E−3 m mm
43
+ // HMT hectometre 1E2 m hm
44
+ // KTM kilometre 1E3 m km
45
+ // KMQ kilogram per cubic metre kg/m3 kg/m3
46
+ // FAH degree Fahrenheit 5/9 x K °F
47
+ // J23 degree Fahrenheit per hour 1,543 210 x 10− 4 K/s °F/h
48
+ // SEC second [unit of time]
49
+ // C26 millisecond 1E-3 S
50
+ // B98 microsecond 1E-6 S
51
+ // Specific columns of this table shall be used to create the EUInformation structure as defined by the following rules:
52
+ //
53
+ // The Common Code is represented as an alphanumeric variable length of 3 characters. It shall be used for the
54
+ // EUInformation.unitId. The following pseudo code specifies the algorithm
55
+ // to convert the Common Code into an Int32 as needed for EUInformation.unitId:
56
+ export function commonCodeToUInt(code: string): number {
57
+ // CEL =>
58
+ let unitId = 0;
59
+ let c;
60
+ const m = Math.min(4, code.length);
61
+ for (let i = 0; i < m; i++) {
62
+ c = code.charCodeAt(i);
63
+ /* istanbul ignore if*/
64
+ if (c === 0) {
65
+ return unitId;
66
+ }
67
+ unitId *= 256;
68
+ unitId |= c;
69
+ }
70
+ return unitId;
71
+ }
72
+
73
+ export function makeEUInformation(symbol: string, shortName: string, longName: string): EUInformation {
74
+ return new EUInformation({
75
+ description: { text: longName },
76
+ displayName: { text: shortName },
77
+ unitId: commonCodeToUInt(symbol)
78
+ });
79
+ }
80
+
81
+ export interface StandardUnits {
82
+ ampere: EUInformation;
83
+ bar: EUInformation;
84
+ becquerel: EUInformation;
85
+ byte: EUInformation;
86
+ centimetre: EUInformation;
87
+ cubic_centimetre: EUInformation;
88
+ cubic_centimetre_per_second: EUInformation;
89
+ cubic_metre: EUInformation;
90
+ cubic_metre_per_hour: EUInformation;
91
+ cubic_meter_per_minute: EUInformation;
92
+ curie: EUInformation;
93
+ curie_per_kilogram: EUInformation;
94
+ degree: EUInformation;
95
+ degree_celsius: EUInformation;
96
+ degree_fahrenheit: EUInformation;
97
+ dots_per_inch: EUInformation;
98
+ electron_volt: EUInformation;
99
+ farad: EUInformation;
100
+ gigabecquerel: EUInformation;
101
+ gigabyte: EUInformation;
102
+ gram: EUInformation;
103
+ hectopascal: EUInformation;
104
+ hertz: EUInformation;
105
+ joule: EUInformation;
106
+ kelvin: EUInformation;
107
+ kilo_electron_volt: EUInformation;
108
+ kilobecquerel: EUInformation;
109
+ kilobyte: EUInformation;
110
+ kilohertz: EUInformation;
111
+ kilogram: EUInformation;
112
+ kilogram_force: EUInformation;
113
+ kilogram_per_second: EUInformation;
114
+ kilogram_per_squared_centimeter: EUInformation;
115
+ kilometre_per_hour: EUInformation;
116
+ kilopascal: EUInformation;
117
+ kilowatt: EUInformation;
118
+ mega_electron_volt: EUInformation;
119
+ megabyte: EUInformation;
120
+ megahertz: EUInformation;
121
+ megapascal: EUInformation;
122
+ megawatt: EUInformation;
123
+ megawatt_per_minute: EUInformation;
124
+ metre: EUInformation;
125
+ metre_per_second: EUInformation;
126
+ metre_per_second_squared: EUInformation;
127
+ microsecond: EUInformation;
128
+ mile_per_hour: EUInformation;
129
+ millibar: EUInformation;
130
+ millimetre: EUInformation;
131
+ millipascal: EUInformation;
132
+ millisecond: EUInformation;
133
+ minute: EUInformation;
134
+ minute_angle: EUInformation;
135
+ newton: EUInformation;
136
+ pascal: EUInformation;
137
+ part_per_million: EUInformation;
138
+ percent: EUInformation;
139
+ pixel: EUInformation;
140
+ revolutions_per_minute: EUInformation;
141
+ revolutions_per_second: EUInformation;
142
+ second: EUInformation;
143
+ terabyte: EUInformation;
144
+ volt: EUInformation;
145
+ watt: EUInformation;
146
+ }
147
+
148
+ // http://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_rev3_Annex2e.pdf
149
+ export const standardUnits: StandardUnits = {
150
+ // pressure
151
+ bar: makeEUInformation("BAR", "bar", "bar [unit of pressure] = 1E5 Pa"),
152
+ hectopascal: makeEUInformation("A97", "hPa", "hectopascal [unit of pressure] = 1E2 Pa"),
153
+ millibar: makeEUInformation("MBR", "mbar", "millibar [unit of pressure] = 1E2 Pa"),
154
+ pascal: makeEUInformation("PAL", "Pa", "pascal [unit of pressure]"),
155
+ kilogram_per_squared_centimeter: makeEUInformation("D5", "kg/cm²", "kilogram per square centimetre"),
156
+ megapascal: makeEUInformation("MPA", "MPa", "1 megapascal = 10⁶ pascal [unit of pressure]"),
157
+
158
+ // time/duration
159
+ microsecond: makeEUInformation("B98", "μs", "microsecond =1E-6 second"),
160
+ millisecond: makeEUInformation("C26", "ms", "millisecond =1E-3 second"),
161
+ second: makeEUInformation("SEC", "s", "second"),
162
+ // distance
163
+ centimetre: makeEUInformation("CMT", "cm", "centimetre = 1E-2 m"),
164
+ metre: makeEUInformation("MTR", "m", "metre"),
165
+ millimetre: makeEUInformation("MMT", "mm", "millimetre = 1E-3 metre"),
166
+ // volume
167
+ cubic_centimetre: makeEUInformation("CMQ", "cm³", "Cubic centimetre = 1E-6 m³"),
168
+ cubic_metre: makeEUInformation("MTQ", "m³", "Cubic metre"),
169
+ // temperature
170
+ degree_celsius: makeEUInformation("CEL", "°C", "degree Celsius"),
171
+ degree_fahrenheit: makeEUInformation("FAH", "°F", "degree Fahrenheit 9/5(°C) + 32°"),
172
+ kelvin: makeEUInformation("KEL", "K", "degree Kelvin"),
173
+
174
+ // weight
175
+ gram: makeEUInformation("GRM", "g", "gramme 1E-3 kg"),
176
+ kilogram: makeEUInformation("KGM", "kg", "A unit of mass equal to one thousand grams"),
177
+ // speed
178
+ metre_per_second: makeEUInformation("MTS", "m/s", "meter per second"),
179
+ mile_per_hour: makeEUInformation("HM", "mile/h", "mile per hour = 2 0,447 04 m/s"),
180
+ kilometre_per_hour: makeEUInformation("KMH", "km/h", "kilometre per hour = 0,277 778 m/s"),
181
+
182
+ // acceleration
183
+ metre_per_second_squared: makeEUInformation("MSK", "m/s²", "meter per second square"),
184
+ // frequency
185
+ kilohertz: makeEUInformation("KHZ", "kHz", "kilo hertz = 1E3 Hertz"),
186
+ hertz: makeEUInformation("HTZ", "Hz", "Hertz"),
187
+ megahertz: makeEUInformation("MHZ", "MHz", "megahertz"),
188
+ revolutions_per_minute: makeEUInformation("RPM", "r/min", "revolutions per minute 1,047198 rad/(60 x s)"),
189
+ revolutions_per_second: makeEUInformation("RPS", "r/s", "revolutions per minute 1,047198 rad/s"),
190
+ // force
191
+ newton: makeEUInformation("NEW", "N", "Newton (kg x m)/s² "),
192
+ kilogram_force: makeEUInformation("B37", "kgf", "kilogram-force 1 kgf = 9.80665 N"),
193
+ // power
194
+ kilowatt: makeEUInformation("KWT", "kW", "kilowatt 1kW = 10³ W"),
195
+ megawatt: makeEUInformation("MAW", "MW", "Mega Watt"),
196
+ watt: makeEUInformation("WTT", "W", "Watt"),
197
+ // rate of flow
198
+ cubic_centimetre_per_second: makeEUInformation("2J", "cm³/s", "Cubic centimetre per second"),
199
+ cubic_metre_per_hour: makeEUInformation("MQH", "m³/h", "Cubic metre per hours = 2,777 78 x 10⁻⁴ m³/s"),
200
+ cubic_meter_per_minute: makeEUInformation("G53", "m³/min", "m³/min cubic metre per minute"),
201
+ // angle
202
+ degree: makeEUInformation("DD", "°", "degree [unit of angle]"),
203
+
204
+ //
205
+ ampere: makeEUInformation("AMP", "A", "ampere"),
206
+ becquerel: makeEUInformation("BQL", "Bq", "becquerel = 27,027E-12 Ci"),
207
+
208
+ curie: makeEUInformation("CUR", "Ci", "Curie = 3,7E-10 Bq"),
209
+ curie_per_kilogram: makeEUInformation("A42", "Ci/kg", "Curie per kilogram = 3,7E-10 Bq/kg"),
210
+
211
+ dots_per_inch: makeEUInformation("E39", "dpi", "dot per inch"),
212
+ electron_volt: makeEUInformation("A53", "eV", "electron volt"),
213
+ farad: makeEUInformation("FAR", "F", "Farad = kg⁻¹ x m⁻² x s⁴ x A²"),
214
+ gigabecquerel: makeEUInformation("GBQ", "GBq", "Giga becquerel = 1E9 Bq"),
215
+ joule: makeEUInformation("JOU", "J", "Joule"),
216
+ kilo_electron_volt: makeEUInformation("B29", "keV", "kilo electron volt"),
217
+ kilogram_per_second: makeEUInformation("KGS", "kg/s", "kilogram per second"),
218
+ kilopascal: makeEUInformation("KPA", "kPa", "1 kilopascal = 10³ Pa"),
219
+ millipascal: makeEUInformation("74", "mPa", "1 millipascal = 10⁻³ Pa"),
220
+ kilobecquerel: makeEUInformation("2Q", "kBq", "kilo becquerel = 1E3 Bq"),
221
+ mega_electron_volt: makeEUInformation("B71", "MeV", "mega electron volt"),
222
+ megawatt_per_minute: makeEUInformation(
223
+ "Q35",
224
+ "MW/min",
225
+ "A unit of power defining the total amount of bulk energy transferred or consumer per minute."
226
+ ),
227
+ percent: makeEUInformation("P1", "%", "Percent, a unit of proportion equal to 0.01. "),
228
+ pixel: makeEUInformation("E37", "", "pixel: unit of count defining the number of pixels (pixel: picture element)"),
229
+ volt: makeEUInformation("VLT", "V", "Volt"),
230
+
231
+ byte: makeEUInformation("AD", "byte", "byte = A unit of information equal to 8 bits."),
232
+ kilobyte: makeEUInformation("2P", "kbyte", "kilobyte = A unit of information equal to 10³ (1000) bytes."),
233
+ megabyte: makeEUInformation("4L", "Mbyte", "megabyte = A unit of information equal to 10⁶ (1000000) bytes."),
234
+ gigabyte: makeEUInformation("E34", "Gbyte", "gigabyte = A unit of information equal to 10⁹ bytes."),
235
+ terabyte: makeEUInformation("E35", "Tbyte", "terabyte = A unit of information equal to 10¹² bytes."),
236
+ minute: makeEUInformation("MIN", "min", " minute (unit of time) 1min = 60 s"),
237
+ minute_angle: makeEUInformation("D61", "'", "minute [unit of angle]"),
238
+ part_per_million: makeEUInformation("59", "ppm", "A unit of proportion equal to 10⁻⁶.")
239
+ // to be continued
240
+ };
package/source/Range.ts CHANGED
@@ -1,4 +1,4 @@
1
- /**
2
- * @module node-opcua-data-access
3
- */
4
- export { Range } from "node-opcua-types";
1
+ /**
2
+ * @module node-opcua-data-access
3
+ */
4
+ export { Range } from "node-opcua-types";
package/source/imports.ts CHANGED
@@ -1,5 +1,5 @@
1
- /**
2
- * @module node-opcua-data-access
3
- */
4
- export { LocalizedText } from "node-opcua-data-model";
5
- export * from "./Range";
1
+ /**
2
+ * @module node-opcua-data-access
3
+ */
4
+ export { LocalizedText } from "node-opcua-data-model";
5
+ export * from "./Range";
package/source/index.ts CHANGED
@@ -1,6 +1,6 @@
1
- /**
2
- * @module node-opcua-data-access
3
- */
4
- export * from "./Range";
5
- export * from "./EUInformation";
6
- export { AxisInformation, AxisScaleEnumeration } from "node-opcua-types";
1
+ /**
2
+ * @module node-opcua-data-access
3
+ */
4
+ export * from "./Range";
5
+ export * from "./EUInformation";
6
+ export { AxisInformation, AxisScaleEnumeration } from "node-opcua-types";