grenton-ts 1.0.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.
Files changed (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +86 -0
  3. package/dist/analog-din/fv02_01/analog-in.ts +271 -0
  4. package/dist/clu/calendar/v1/calendar.ts +308 -0
  5. package/dist/clu/clu-zwave-2/fv515_03/clu-zwave-2.ts +1302 -0
  6. package/dist/clu/event-scheduler/v1/event-scheduler.ts +537 -0
  7. package/dist/clu/multi-fan-ac-thermostat/v1/multi-fan-ac-thermostat.ts +1163 -0
  8. package/dist/clu/pid-controller/v1/pid-controller.ts +536 -0
  9. package/dist/clu/presence-sensor/v1/presence-sensor.ts +313 -0
  10. package/dist/clu/presence-sensor/v2/presence-sensor.ts +470 -0
  11. package/dist/clu/push/v1/push.ts +261 -0
  12. package/dist/clu/scheduler/v1/scheduler.ts +304 -0
  13. package/dist/clu/statistics/v1/statistics.ts +413 -0
  14. package/dist/clu/statistics-pulse/v1/statistics-pulse.ts +218 -0
  15. package/dist/clu/sunrise-sunset-calendar/v1/sunrise-sunset-calendar.ts +389 -0
  16. package/dist/clu/sunrise-sunset-calendar/v2/sunrise-sunset-calendar.ts +659 -0
  17. package/dist/clu/sunrise-sunset-calendar/v3/sunrise-sunset-calendar.ts +659 -0
  18. package/dist/clu/thermostat/v1/thermostat.ts +768 -0
  19. package/dist/clu/thermostat/v2/thermostat.ts +861 -0
  20. package/dist/clu/timer/v1/timer.ts +369 -0
  21. package/dist/core/execution-builder.ts +55 -0
  22. package/dist/core/remote-gate.ts +17 -0
  23. package/dist/digital-in-din/fv02_01/din.ts +310 -0
  24. package/dist/examples/light_turned_on_by_calendar/Clu_OnInit.ts +26 -0
  25. package/dist/examples/light_turned_on_by_presence_sensor/Clu_OnInit.ts +35 -0
  26. package/dist/examples/light_turned_on_by_switch/Clu_OnInit.ts +16 -0
  27. package/dist/gate/cool-master/v1/cool-master.ts +782 -0
  28. package/dist/gate/cool-master-net/v1/cool-master-net.ts +334 -0
  29. package/dist/gate/denon-marantz-avr/v1/denon-marantz-avr.ts +724 -0
  30. package/dist/gate/heos/v1/heos.ts +1224 -0
  31. package/dist/gate/http/fv1000_03/clu-gate-http.ts +405 -0
  32. package/dist/gate/http/fv1000_03_hv1/clu-gate-http.ts +352 -0
  33. package/dist/gate/http/fv1100_03/clu-gate-http.ts +589 -0
  34. package/dist/gate/http/fv1110_03/clu-gate-http.ts +589 -0
  35. package/dist/gate/http/fv1300_03/clu-gate-http.ts +589 -0
  36. package/dist/gate/http/fv1400_03/clu-gate-http.ts +677 -0
  37. package/dist/gate/http-listener/v1/http-listener.ts +299 -0
  38. package/dist/gate/http-listener/v2/http-listener.ts +325 -0
  39. package/dist/gate/http-request/v1/http-request.ts +645 -0
  40. package/dist/gate/http-request/v2/http-request.ts +709 -0
  41. package/dist/gate/input/v1/input.ts +171 -0
  42. package/dist/gate/jablotron/v1/jablotron.ts +100 -0
  43. package/dist/gate/jablotron-device/v1/jablotron-device.ts +171 -0
  44. package/dist/gate/jablotron-output/v1/jablotron-output.ts +240 -0
  45. package/dist/gate/jablotron-section/v1/jablotron-section.ts +260 -0
  46. package/dist/gate/modbus/v1/modbus.ts +609 -0
  47. package/dist/gate/modbus/v2/modbus.ts +690 -0
  48. package/dist/gate/modbus-client/v1/modbus-client.ts +827 -0
  49. package/dist/gate/modbus-rtu/v1/modbus-rtu.ts +911 -0
  50. package/dist/gate/modbus-server/v1/modbus-server.ts +405 -0
  51. package/dist/gate/modbus-slave-config-rtu/v1/modbus-slave-config-rtu.ts +160 -0
  52. package/dist/gate/modbus-slave-rtu/v1/modbus-slave-rtu.ts +371 -0
  53. package/dist/gate/modbus-value/v1/modbus-value.ts +856 -0
  54. package/dist/gate/music-cast/v1/music-cast.ts +1298 -0
  55. package/dist/gate/output/v1/output.ts +240 -0
  56. package/dist/gate/satel/v1/satel.ts +359 -0
  57. package/dist/gate/satel-input/v1/satel-input.ts +171 -0
  58. package/dist/gate/satel-output/v1/satel-output.ts +240 -0
  59. package/dist/gate/satel-zone/v1/satel-zone.ts +235 -0
  60. package/dist/gate/sonos/v1/sonos.ts +934 -0
  61. package/dist/gate/timer/v2/timer.ts +253 -0
  62. package/dist/gate/zone/v1/zone.ts +235 -0
  63. package/dist/io-module-din-8/fv02_02/din.ts +354 -0
  64. package/dist/io-module-din-8/fv02_02/dout.ts +360 -0
  65. package/dist/one-wire/fv01_10/onew-sensor.ts +269 -0
  66. package/dist/one-wire/fv01_28/onew-sensor.ts +269 -0
  67. package/dist/one-wire/fv02_28/onew-sensor.ts +350 -0
  68. package/dist/one-wire/fv03_28/onew-sensor.ts +435 -0
  69. package/dist/relay-din-2/fv02_02/dout.ts +544 -0
  70. package/dist/relay-din-4/fv01_02/dout.ts +340 -0
  71. package/dist/relay-din-4/fv02_02/dout.ts +368 -0
  72. package/dist/roller-shutter-din-3/fv03_02/roller-shutter.ts +1078 -0
  73. package/dist/smart-panel-fm-4/fv03_03/panel-button.ts +550 -0
  74. package/dist/smart-panel-fm-4/fv03_03/panel-sens-light.ts +238 -0
  75. package/dist/smart-panel-fm-4/fv03_03/panel-sens-temp.ts +239 -0
  76. package/dist/smart-panel-fm-4/fv03_03/panel.ts +700 -0
  77. package/dist/smart-panel-fm-4/fv04_03/panel-button.ts +567 -0
  78. package/dist/smart-panel-fm-4/fv04_03/panel-page.ts +516 -0
  79. package/dist/smart-panel-fm-4/fv04_03/panel-sens-light.ts +238 -0
  80. package/dist/smart-panel-fm-4/fv04_03/panel-sens-temp.ts +239 -0
  81. package/dist/smart-panel-fm-4/fv04_03/panel.ts +1026 -0
  82. package/dist/smart-panel-fm-4/fv05_03/panel-button.ts +567 -0
  83. package/dist/smart-panel-fm-4/fv05_03/panel-page.ts +620 -0
  84. package/dist/smart-panel-fm-4/fv05_03/panel-sens-light.ts +238 -0
  85. package/dist/smart-panel-fm-4/fv05_03/panel-sens-temp.ts +266 -0
  86. package/dist/smart-panel-fm-4/fv05_03/panel.ts +1109 -0
  87. package/dist/smart-panel-fm-4/fv06_03/panel-button.ts +567 -0
  88. package/dist/smart-panel-fm-4/fv06_03/panel-page.ts +877 -0
  89. package/dist/smart-panel-fm-4/fv06_03/panel-sens-light.ts +238 -0
  90. package/dist/smart-panel-fm-4/fv06_03/panel-sens-temp.ts +297 -0
  91. package/dist/smart-panel-fm-4/fv06_03/panel.ts +1138 -0
  92. package/dist/smart-panel-fm-4/fv07_03/panel-button.ts +567 -0
  93. package/dist/smart-panel-fm-4/fv07_03/panel-page.ts +864 -0
  94. package/dist/smart-panel-fm-4/fv07_03/panel-sens-light.ts +238 -0
  95. package/dist/smart-panel-fm-4/fv07_03/panel-sens-temp.ts +297 -0
  96. package/dist/smart-panel-fm-4/fv07_03/panel.ts +1135 -0
  97. package/dist/touch-panel-fm-4/fv01_02/panel-button.ts +418 -0
  98. package/dist/touch-panel-fm-4/fv01_02/panel-sens-light.ts +238 -0
  99. package/dist/touch-panel-fm-4/fv01_02/panel-sens-temp.ts +257 -0
  100. package/dist/touch-panel-fm-4/fv01_02/panel.ts +75 -0
  101. package/dist/touch-panel-fm-4/fv01_02/power-supply-voltage.ts +322 -0
  102. package/dist/touch-panel-fm-8/fv01_02/panel-button.ts +418 -0
  103. package/dist/touch-panel-fm-8/fv01_02/panel-sens-light.ts +238 -0
  104. package/dist/touch-panel-fm-8/fv01_02/panel-sens-temp.ts +270 -0
  105. package/dist/touch-panel-fm-8/fv01_02/panel.ts +75 -0
  106. package/dist/touch-panel-fm-8/fv01_02/power-supply-voltage.ts +322 -0
  107. package/package.json +16 -0
@@ -0,0 +1,371 @@
1
+ // Created from: packages/grenton-api/interfaces/object_modbus_slave_rtu_v1.xml, object name="ModbusSlaveRTU" version="1"
2
+
3
+ import { rawExecutionBuilderFactory } from "../../../core/execution-builder"
4
+ import { RemoteGate } from "../../../core/remote-gate"
5
+
6
+ enum EventType {
7
+ OnValueChange = 0
8
+ }
9
+
10
+ enum PropertyType {
11
+ DeviceAddress = 2,
12
+ RegisterAddress = 3,
13
+ RegisterType = 4,
14
+ DataType = 6,
15
+ DataWidth = 7,
16
+ Endianness = 8,
17
+ InitialValue = 9,
18
+ Value = 10,
19
+ RawValue = 11
20
+ }
21
+
22
+ enum MethodType {
23
+ SetValue = 0
24
+ }
25
+
26
+ enum RegisterTypeType {
27
+ DiscreteOutputsCoils = 0,
28
+ DiscreteInputs = 1,
29
+ HoldingRegisters = 2,
30
+ InputRegisters = 3
31
+ }
32
+
33
+ enum DataTypeType {
34
+ UnsignedInteger = 0,
35
+ SignedInteger = 1,
36
+ FloatingPoint = 2
37
+ }
38
+
39
+ enum DataWidthType {
40
+ _16 = 16,
41
+ _32 = 32,
42
+ _48 = 48,
43
+ _64 = 64
44
+ }
45
+
46
+ enum EndiannessType {
47
+ BigEndian = 0,
48
+ LittleBigEndian = 1,
49
+ BigLittleEndian = 2,
50
+ LittleEndian = 3
51
+ }
52
+
53
+ declare class ModbusSlaveRTURaw {
54
+ add_event(event: EventType, callback: () => void): void;
55
+ get(property: PropertyType): any;
56
+ set(property: PropertyType, value: any): void;
57
+ execute(method: MethodType, ...args: any[]): any;
58
+ }
59
+
60
+ interface IModbusSlaveRTU {
61
+ /**
62
+ * Zdarzenie wywoływane w przypadku zmiany wartości cechy Value przez Modbus
63
+ * @param callback
64
+ */
65
+ addOnValueChange: (callback: () => void) => void
66
+ /**
67
+ * Ustawia wartość rejestru
68
+ * @param {string} value
69
+ */
70
+ setValue: (value: string) => void
71
+ /** Adres urządzenia Modbus */
72
+ deviceAddress: number
73
+ /** Adres obsługiwanego rejestru */
74
+ registerAddress: number
75
+ /** Typ rejestru Modbus: 0 - wyjścia dwustanowe (coils) - funkcja Modbus: 5 (zapis pojedynczego wyjścia), 15 (zapis wielu wyjść), lub 1 (odczyt stanu wyjść) 1 - wejścia dwustanowe - funkcja Modbus: 2 2 - rejestry pamiętające - funkcja Modbus: 6 (zapis pojedynczego rejestru), 16 (zapis wielu rejestrów), lub 3 (odczyt rejestrów) 3 - rejestry wejściowe - funkcja Modbus: 4 */
76
+ registerType: RegisterTypeType
77
+ /** Typ wartości: 0 - Liczba całkowita, stałoprzecinkowa lub pole bitowe bez bitu znaku 1 - Liczba całkowita, stałoprzecinkowa lub pole bitowe z bitem znaku 2 - Liczba zmiennoprzecinkowa */
78
+ dataType: DataTypeType
79
+ /** Szerokość danych (1 do 4 rejestrów 16 bitowych) */
80
+ dataWidth: DataWidthType
81
+ /** Kolejność bajtów: 0 - kolejność słów: Big Endian; kolejność bajtów w słowie: Big Endian (SwapBytesAndWords) 1 - kolejność słów: Little Endian; kolejność bajtów w słowie: Big Endian (SwapBytes) 2 - kolejność słów: Big Endian; kolejność bajtów w słowie: Little Endian (SwapWords) 3 - kolejność słów: Little Endian; kolejność bajtów w słowie: Little Endian (NoSwap) */
82
+ endianness: EndiannessType
83
+ /** Wartość rejestru */
84
+ readonly value: number
85
+ /** Nieprzeskalowana wartość rejestru */
86
+ readonly rawValue: number
87
+ }
88
+
89
+ class ModbusSlaveRTU implements IModbusSlaveRTU {
90
+ private onValueChangeCallbacks: Array<() => void> = [];
91
+
92
+ constructor(private raw: ModbusSlaveRTURaw) {
93
+ this.raw.add_event(EventType.OnValueChange, () => {
94
+ this.onValueChangeCallbacks.forEach(callback => { callback(); });
95
+ });
96
+ }
97
+
98
+ /**
99
+ * Zdarzenie wywoływane w przypadku zmiany wartości cechy Value przez Modbus
100
+ * @param callback
101
+ */
102
+ addOnValueChange(callback: () => void): void {
103
+ this.onValueChangeCallbacks.push(callback);
104
+ }
105
+ /**
106
+ * Ustawia wartość rejestru
107
+ * @param {string} value
108
+ */
109
+ setValue(value: string): void {
110
+ this.raw.execute(MethodType.SetValue, value);
111
+ }
112
+ /**
113
+ * Adres urządzenia Modbus
114
+ * @returns {number}
115
+ */
116
+ get deviceAddress(): number {
117
+ return this.raw.get(PropertyType.DeviceAddress);
118
+ }
119
+ set deviceAddress(value: number) {
120
+ this.raw.set(PropertyType.DeviceAddress, value);
121
+ }
122
+ /**
123
+ * Adres obsługiwanego rejestru
124
+ * @returns {number}
125
+ */
126
+ get registerAddress(): number {
127
+ return this.raw.get(PropertyType.RegisterAddress);
128
+ }
129
+ set registerAddress(value: number) {
130
+ this.raw.set(PropertyType.RegisterAddress, value);
131
+ }
132
+ /**
133
+ * Typ rejestru Modbus: 0 - wyjścia dwustanowe (coils) - funkcja Modbus: 5 (zapis pojedynczego wyjścia), 15 (zapis wielu wyjść), lub 1 (odczyt stanu wyjść) 1 - wejścia dwustanowe - funkcja Modbus: 2 2 - rejestry pamiętające - funkcja Modbus: 6 (zapis pojedynczego rejestru), 16 (zapis wielu rejestrów), lub 3 (odczyt rejestrów) 3 - rejestry wejściowe - funkcja Modbus: 4
134
+ * @returns {RegisterTypeType}
135
+ */
136
+ get registerType(): RegisterTypeType {
137
+ return this.raw.get(PropertyType.RegisterType);
138
+ }
139
+ set registerType(value: RegisterTypeType) {
140
+ this.raw.set(PropertyType.RegisterType, value);
141
+ }
142
+ /**
143
+ * Typ wartości: 0 - Liczba całkowita, stałoprzecinkowa lub pole bitowe bez bitu znaku 1 - Liczba całkowita, stałoprzecinkowa lub pole bitowe z bitem znaku 2 - Liczba zmiennoprzecinkowa
144
+ * @returns {DataTypeType}
145
+ */
146
+ get dataType(): DataTypeType {
147
+ return this.raw.get(PropertyType.DataType);
148
+ }
149
+ set dataType(value: DataTypeType) {
150
+ this.raw.set(PropertyType.DataType, value);
151
+ }
152
+ /**
153
+ * Szerokość danych (1 do 4 rejestrów 16 bitowych)
154
+ * @returns {DataWidthType}
155
+ */
156
+ get dataWidth(): DataWidthType {
157
+ return this.raw.get(PropertyType.DataWidth);
158
+ }
159
+ set dataWidth(value: DataWidthType) {
160
+ this.raw.set(PropertyType.DataWidth, value);
161
+ }
162
+ /**
163
+ * Kolejność bajtów: 0 - kolejność słów: Big Endian; kolejność bajtów w słowie: Big Endian (SwapBytesAndWords) 1 - kolejność słów: Little Endian; kolejność bajtów w słowie: Big Endian (SwapBytes) 2 - kolejność słów: Big Endian; kolejność bajtów w słowie: Little Endian (SwapWords) 3 - kolejność słów: Little Endian; kolejność bajtów w słowie: Little Endian (NoSwap)
164
+ * @returns {EndiannessType}
165
+ */
166
+ get endianness(): EndiannessType {
167
+ return this.raw.get(PropertyType.Endianness);
168
+ }
169
+ set endianness(value: EndiannessType) {
170
+ this.raw.set(PropertyType.Endianness, value);
171
+ }
172
+ set initialValue(value: string) {
173
+ this.raw.set(PropertyType.InitialValue, value);
174
+ }
175
+ /**
176
+ * Wartość rejestru
177
+ * @returns {number}
178
+ */
179
+ get value(): number {
180
+ return this.raw.get(PropertyType.Value);
181
+ }
182
+ /**
183
+ * Nieprzeskalowana wartość rejestru
184
+ * @returns {number}
185
+ */
186
+ get rawValue(): number {
187
+ return this.raw.get(PropertyType.RawValue);
188
+ }
189
+ }
190
+
191
+ class ModbusSlaveRTURemote implements IModbusSlaveRTU {
192
+ constructor(private objectName: string, private gate: RemoteGate) {
193
+
194
+ }
195
+
196
+ /**
197
+ * Zdarzenie wywoływane w przypadku zmiany wartości cechy Value przez Modbus
198
+ * @param callback
199
+ */
200
+ addOnValueChange(_callback: () => void): void {
201
+ // Remote events are not supported
202
+ }
203
+
204
+ /**
205
+ * Ustawia wartość rejestru
206
+ * @param {string} value
207
+ */
208
+ setValue(value: string): void {
209
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
210
+ .execute()
211
+ .addParameter(MethodType.SetValue)
212
+ .addParameter(value)
213
+ .build();
214
+ this.gate.runScript(cmd!);
215
+ }
216
+
217
+ /**
218
+ * Adres urządzenia Modbus
219
+ * @returns {number}
220
+ */
221
+ get deviceAddress(): number {
222
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
223
+ .get()
224
+ .addParameter(PropertyType.DeviceAddress)
225
+ .build();
226
+ return this.gate.runScript(cmd!);
227
+ }
228
+
229
+ set deviceAddress(value: number) {
230
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
231
+ .set()
232
+ .addParameter(PropertyType.DeviceAddress)
233
+ .addParameter(value)
234
+ .build();
235
+ this.gate.runScript(cmd!);
236
+ }
237
+
238
+ /**
239
+ * Adres obsługiwanego rejestru
240
+ * @returns {number}
241
+ */
242
+ get registerAddress(): number {
243
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
244
+ .get()
245
+ .addParameter(PropertyType.RegisterAddress)
246
+ .build();
247
+ return this.gate.runScript(cmd!);
248
+ }
249
+
250
+ set registerAddress(value: number) {
251
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
252
+ .set()
253
+ .addParameter(PropertyType.RegisterAddress)
254
+ .addParameter(value)
255
+ .build();
256
+ this.gate.runScript(cmd!);
257
+ }
258
+
259
+ /**
260
+ * Typ rejestru Modbus: 0 - wyjścia dwustanowe (coils) - funkcja Modbus: 5 (zapis pojedynczego wyjścia), 15 (zapis wielu wyjść), lub 1 (odczyt stanu wyjść) 1 - wejścia dwustanowe - funkcja Modbus: 2 2 - rejestry pamiętające - funkcja Modbus: 6 (zapis pojedynczego rejestru), 16 (zapis wielu rejestrów), lub 3 (odczyt rejestrów) 3 - rejestry wejściowe - funkcja Modbus: 4
261
+ * @returns {RegisterTypeType}
262
+ */
263
+ get registerType(): RegisterTypeType {
264
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
265
+ .get()
266
+ .addParameter(PropertyType.RegisterType)
267
+ .build();
268
+ return this.gate.runScript(cmd!);
269
+ }
270
+
271
+ set registerType(value: RegisterTypeType) {
272
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
273
+ .set()
274
+ .addParameter(PropertyType.RegisterType)
275
+ .addParameter(value)
276
+ .build();
277
+ this.gate.runScript(cmd!);
278
+ }
279
+
280
+ /**
281
+ * Typ wartości: 0 - Liczba całkowita, stałoprzecinkowa lub pole bitowe bez bitu znaku 1 - Liczba całkowita, stałoprzecinkowa lub pole bitowe z bitem znaku 2 - Liczba zmiennoprzecinkowa
282
+ * @returns {DataTypeType}
283
+ */
284
+ get dataType(): DataTypeType {
285
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
286
+ .get()
287
+ .addParameter(PropertyType.DataType)
288
+ .build();
289
+ return this.gate.runScript(cmd!);
290
+ }
291
+
292
+ set dataType(value: DataTypeType) {
293
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
294
+ .set()
295
+ .addParameter(PropertyType.DataType)
296
+ .addParameter(value)
297
+ .build();
298
+ this.gate.runScript(cmd!);
299
+ }
300
+
301
+ /**
302
+ * Szerokość danych (1 do 4 rejestrów 16 bitowych)
303
+ * @returns {DataWidthType}
304
+ */
305
+ get dataWidth(): DataWidthType {
306
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
307
+ .get()
308
+ .addParameter(PropertyType.DataWidth)
309
+ .build();
310
+ return this.gate.runScript(cmd!);
311
+ }
312
+
313
+ set dataWidth(value: DataWidthType) {
314
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
315
+ .set()
316
+ .addParameter(PropertyType.DataWidth)
317
+ .addParameter(value)
318
+ .build();
319
+ this.gate.runScript(cmd!);
320
+ }
321
+
322
+ /**
323
+ * Kolejność bajtów: 0 - kolejność słów: Big Endian; kolejność bajtów w słowie: Big Endian (SwapBytesAndWords) 1 - kolejność słów: Little Endian; kolejność bajtów w słowie: Big Endian (SwapBytes) 2 - kolejność słów: Big Endian; kolejność bajtów w słowie: Little Endian (SwapWords) 3 - kolejność słów: Little Endian; kolejność bajtów w słowie: Little Endian (NoSwap)
324
+ * @returns {EndiannessType}
325
+ */
326
+ get endianness(): EndiannessType {
327
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
328
+ .get()
329
+ .addParameter(PropertyType.Endianness)
330
+ .build();
331
+ return this.gate.runScript(cmd!);
332
+ }
333
+
334
+ set endianness(value: EndiannessType) {
335
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
336
+ .set()
337
+ .addParameter(PropertyType.Endianness)
338
+ .addParameter(value)
339
+ .build();
340
+ this.gate.runScript(cmd!);
341
+ }
342
+
343
+ /**
344
+ * Wartość rejestru
345
+ * @returns {number}
346
+ */
347
+ get value(): number {
348
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
349
+ .get()
350
+ .addParameter(PropertyType.Value)
351
+ .build();
352
+ return this.gate.runScript(cmd!);
353
+ }
354
+
355
+ /**
356
+ * Nieprzeskalowana wartość rejestru
357
+ * @returns {number}
358
+ */
359
+ get rawValue(): number {
360
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
361
+ .get()
362
+ .addParameter(PropertyType.RawValue)
363
+ .build();
364
+ return this.gate.runScript(cmd!);
365
+ }
366
+ }
367
+
368
+ export {
369
+ ModbusSlaveRTU, ModbusSlaveRTURaw, ModbusSlaveRTURemote,
370
+ RegisterTypeType, DataTypeType, DataWidthType, EndiannessType
371
+ }