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,1138 @@
1
+ // Created from: packages/grenton-api/interfaces/module_SMART_PANEL_FM_4_fv06_03.xml, object name="PANEL" version="06.03"
2
+
3
+ import { rawExecutionBuilderFactory } from "../../core/execution-builder"
4
+ import { RemoteGate } from "../../core/remote-gate"
5
+
6
+ enum EventType {
7
+ OnGestureUp = 0,
8
+ OnGestureDown = 1,
9
+ OnGestureLeft = 2,
10
+ OnGestureRight = 3,
11
+ OnProximityDetect = 4,
12
+ OnPageChange = 5,
13
+ OnDisplayOn = 6,
14
+ OnDisplayOff = 7,
15
+ }
16
+
17
+ enum PropertyType {
18
+ GestureIconUp = 4,
19
+ GestureIconDown = 5,
20
+ GestureIconLeft = 6,
21
+ GestureIconRight = 7,
22
+ ProximitySens = 10,
23
+ ProximityTimeout = 11,
24
+ ProximityValue = 12,
25
+ BuzzerValue = 13,
26
+ GestureMode = 15,
27
+ GestureSens = 16,
28
+ PageNr = 17,
29
+ PageDisplayMode = 18,
30
+ ButtonsLEDMode = 19,
31
+ PageControlMode = 20,
32
+ GestureDisplayMode = 21,
33
+ }
34
+
35
+ enum MethodType {
36
+ SwitchOnDisplay = 0,
37
+ ShowButtons = 1,
38
+ ClearScreen = 2,
39
+ PrintText = 3,
40
+ DrawLine = 4,
41
+ DrawPoint = 5,
42
+ DrawIcon = 6,
43
+ DisplayContent = 7,
44
+ PrintFloat = 20,
45
+ SetBeep = 21,
46
+ SetPageNr = 22,
47
+ SetNextPage = 27,
48
+ SetPrevPage = 28,
49
+ Draw = 29,
50
+ DrawBox = 30,
51
+ }
52
+
53
+ enum BuzzerValueType {
54
+ Off = 0,
55
+ On = 1,
56
+ }
57
+
58
+ enum GestureModeType {
59
+ Off = 0,
60
+ Vertical = 1,
61
+ Horizontal = 2,
62
+ VertHoriz = 3,
63
+ }
64
+
65
+ enum GestureSensType {
66
+ Low = 1,
67
+ Mid = 2,
68
+ High = 3,
69
+ }
70
+
71
+ enum PageDisplayModeType {
72
+ ShowImmediately = 0,
73
+ ShowIconOrName = 1,
74
+ ShowGesture = 2,
75
+ }
76
+
77
+ enum ButtonsLEDModeType {
78
+ LocationLedOFF = 0,
79
+ LocationLedON = 1,
80
+ LocationLedONforActive = 2,
81
+ }
82
+
83
+ enum PageControlModeType {
84
+ Command = 0,
85
+ GestureCommand = 1,
86
+ }
87
+
88
+ enum GestureDisplayModeType {
89
+ Off = 0,
90
+ On = 1,
91
+ }
92
+
93
+ enum PageNumberType {
94
+ First = 1,
95
+ Seconds = 2,
96
+ Third = 3,
97
+ Fourth = 4
98
+ }
99
+
100
+ enum FontSizeType {
101
+ One = 1,
102
+ Two = 2,
103
+ Three = 3
104
+ }
105
+
106
+ enum FloatPrecisionType {
107
+ Zero = 0,
108
+ One = 1,
109
+ Two = 2
110
+ }
111
+
112
+ enum ColorType {
113
+ Black = 0,
114
+ White = 1
115
+ }
116
+
117
+ enum ReservedType {
118
+ Zero = 0,
119
+ }
120
+
121
+ declare class PanelRaw {
122
+ add_event(event: EventType, callback: () => void): void;
123
+ get(property: PropertyType): any;
124
+ set(property: PropertyType, value: any): void;
125
+ execute(method: MethodType, ...args: any[]): any;
126
+ }
127
+
128
+ interface IPanel {
129
+ /**
130
+ * Zdarzenie wywoływane w przypadku wykonania gestu w górę
131
+ * @param callback
132
+ */
133
+ addOnGestureUp: (callback: () => void) => void
134
+ /**
135
+ * Zdarzenie wywoływane w przypadku wykonania gestu w dół
136
+ * @param callback
137
+ */
138
+ addOnGestureDown: (callback: () => void) => void
139
+ /**
140
+ * Zdarzenie wywoływane w przypadku wykonania gestu w lewo
141
+ * @param callback
142
+ */
143
+ addOnGestureLeft: (callback: () => void) => void
144
+ /**
145
+ * Zdarzenie wywoływane w przypadku wykonania gestu w prawo
146
+ * @param callback
147
+ */
148
+ addOnGestureRight: (callback: () => void) => void
149
+ /**
150
+ * Zdarzenie wywoływane w przypadku wykrycia zbliżającego się do wyświetlacza obiektu
151
+ * @param callback
152
+ */
153
+ addOnProximityDetect: (callback: () => void) => void
154
+ /**
155
+ * Zdarzenie wywoływane w przypadku zmiany strony w panelu
156
+ * @param callback
157
+ */
158
+ addOnPageChange: (callback: () => void) => void
159
+ /**
160
+ * Zdarzenie wywoływane w przypadku wybudzenia wyświetlacza
161
+ * @param callback
162
+ */
163
+ addOnDisplayOn: (callback: () => void) => void
164
+ /**
165
+ * Zdarzenie wywoływane w przypadku wyłączenia wyświetlacza
166
+ * @param callback
167
+ */
168
+ addOnDisplayOff: (callback: () => void) => void
169
+ /** Wybudza wyświetlacz z trybu uśpienia */
170
+ switchOnDisplay: () => void
171
+ /** Zmienia tryb wyświetlania na 'buttons'. Czyści wyświetlacz i wyświetla ponownie ikony (lub tekst) dla wszystkich przycisków */
172
+ showButtons: () => void
173
+ /** Czyści zawartość wyświetlacza w trybie 'freedraw' */
174
+ clearScreen: () => void
175
+ /**
176
+ * Wyświetla tekst w trybie 'freedraw'. x, y - współrzędne w pikselach; txt - tekst; fontSize - rozmiar czcionki (1: 10p, 2: 14p, 3: 32p)
177
+ * @param {number} x
178
+ * @param {number} y
179
+ * @param {string} txt
180
+ * @param {number} fontSize
181
+ */
182
+ printText: (x: number, y: number, txt: string, fontSize: number) => void
183
+ /**
184
+ * Wyświetla liczbę w trybie 'freedraw'. x, y - współrzędne w pikselach; number - wartość; precision - miejsca po przecinku; fontSize - rozmiar czcionki (1: 10p, 2: 14p, 3: 32p)
185
+ * @param {number} x
186
+ * @param {number} y
187
+ * @param {number} number
188
+ * @param {FloatPrecisionType} precision
189
+ * @param {FontSizeType} fontSize
190
+ */
191
+ printFloat: (x: number, y: number, number: number, precision: FloatPrecisionType, fontSize: FontSizeType) => void
192
+ /**
193
+ * Rysuje linię w trybie 'freedraw'. x, y - współrzędne początkowe; xe, ye - końcowe; color - 0 czarny, 1 biały
194
+ * @param {number} x
195
+ * @param {number} y
196
+ * @param {number} xe
197
+ * @param {number} ye
198
+ * @param {ColorType} color
199
+ */
200
+ drawLine: (x: number, y: number, xe: number, ye: number, color: ColorType) => void
201
+ /**
202
+ * Rysuje wypełniony prostokąt w trybie 'freedraw'. x, y - współrzędne; w - szerokość; h - wysokość; color - 0 czarny, 1 biały
203
+ * @param {number} x
204
+ * @param {number} y
205
+ * @param {number} w
206
+ * @param {number} h
207
+ * @param {ColorType} color
208
+ */
209
+ drawBox: (x: number, y: number, w: number, h: number, color: ColorType) => void
210
+ /**
211
+ * Rysuje punkt w trybie 'freedraw'. x, y - współrzędne w pikselach; color - 0 czarny, 1 biały
212
+ * @param {number} x
213
+ * @param {number} y
214
+ * @param {ColorType} color
215
+ */
216
+ drawPoint: (x: number, y: number, color: ColorType) => void
217
+ /**
218
+ * Rysuje ikonę (bmp) w trybie 'freedraw'. x, y - współrzędne w pikselach; filename - nazwa ikony bez rozszerzenia
219
+ * @param {number} x
220
+ * @param {number} y
221
+ * @param {string} filename
222
+ */
223
+ drawIcon: (x: number, y: number, filename: string) => void
224
+ /** Wyświetla zawartość bufora pamięci graficznej. Zmienia tryb wyświetlania na 'freedraw' */
225
+ displayContent: () => void
226
+ /**
227
+ * Generuje dźwięk o danej częstotliwości [Hz], czasie trwania [ms] i głośności
228
+ * @param {number} frequency
229
+ * @param {number} duration
230
+ * @param {number} volume
231
+ * @param {ReservedType} reserved
232
+ */
233
+ setBeep: (frequency: number, duration: number, volume: number, reserved: ReservedType) => void
234
+ /**
235
+ * Ustawia numer wyświetlanej strony
236
+ * @param {number} nr
237
+ */
238
+ setPageNr: (nr: PageNumberType) => void
239
+ /** Wyświetla następną stronę */
240
+ setNextPage: () => void
241
+ /** Wyświetla poprzednią stronę */
242
+ setPrevPage: () => void
243
+ /** Wyzwala wywołanie zdarzenia OnDraw w przypadku gdy OLED jest aktywny */
244
+ draw: () => void
245
+ /** Nazwa pliku BMP z ikoną dla gestu Góra (bez rozszerzenia) */
246
+ readonly gestureIconUp: string
247
+ /**
248
+ * Ustawia ikonę dla wykonania gestu w górę
249
+ * @param {string} filename
250
+ */
251
+ setGestureIconUp: (filename: string) => void
252
+ /** Nazwa pliku BMP z ikoną dla gestu Dół (bez rozszerzenia) */
253
+ readonly gestureIconDown: string
254
+ /**
255
+ * Ustawia ikonę dla wykonania gestu w dół
256
+ * @param {string} filename
257
+ */
258
+ setGestureIconDown: (filename: string) => void
259
+ /** Nazwa pliku BMP z ikoną dla gestu Lewo (bez rozszerzenia) */
260
+ readonly gestureIconLeft: string
261
+ /**
262
+ * Ustawia ikonę dla wykonania gestu w lewo
263
+ * @param {string} filename
264
+ */
265
+ setGestureIconLeft: (filename: string) => void
266
+ /** Nazwa pliku BMP z ikoną dla gestu Prawo (bez rozszerzenia) */
267
+ readonly gestureIconRight: string
268
+ /**
269
+ * Ustawia ikonę dla wykonania gestu w prawo
270
+ * @param {string} filename
271
+ */
272
+ setGestureIconRight: (filename: string) => void
273
+ /** Czułość sensora zbliżeniowego (mniejsza wartość-większa czułość) */
274
+ readonly proximitySens: number
275
+ /**
276
+ * Ustawia wartość ProximitySens
277
+ * @param {number} value
278
+ */
279
+ setProximitySens: (value: number) => void
280
+ /** Czas po jakim wyświetlacz zostanie wygaszony */
281
+ readonly proximityTimeout: number
282
+ /**
283
+ * Ustawia czas w sekundach po jakim aktywuje się wygaszacz ekranu
284
+ * @param {number} value
285
+ */
286
+ setProximityTimeout: (value: number) => void
287
+ /** Sygnał sensora zbliżeniowego (wartość bezwymiarowa) */
288
+ readonly proximityValue: number
289
+ /** Sterowanie sygnalizacją dźwiękową: 0 - Off, 1 - On */
290
+ readonly buzzerValue: BuzzerValueType
291
+ /**
292
+ * Sterowanie dźwiękiem (On/Off)
293
+ * @param {BuzzerValueType} value
294
+ */
295
+ setBuzzerValue: (value: BuzzerValueType) => void
296
+ /** Wybór orientacji gestów: 0 - Off, 1 - Vertical, 2 - Horizontal, 3 - Vert+Horiz */
297
+ readonly gestureMode: GestureModeType
298
+ /**
299
+ * Wybór orientacji gestów
300
+ * @param {GestureModeType} value
301
+ */
302
+ setGestureMode: (value: GestureModeType) => void
303
+ /** Wybór czułości gestów: 1 - Low, 2 - Mid, 3 - High */
304
+ readonly gestureSens: GestureSensType
305
+ /**
306
+ * Wybór czułości gestów
307
+ * @param {GestureSensType} value
308
+ */
309
+ setGestureSens: (value: GestureSensType) => void
310
+ /** Numer wyświetlanej aktualnie strony */
311
+ pageNr: PageNumberType
312
+ /** Informacja przed zmianą strony: 0 - ShowImmediately, 1 - ShowIconOrName, 2 - ShowGesture */
313
+ readonly pageDisplayMode: PageDisplayModeType
314
+ /**
315
+ * Ustawia tryb wyświetlania informacji przed zmianą strony
316
+ * @param {PageDisplayModeType} value
317
+ */
318
+ setPageDisplayMode: (value: PageDisplayModeType) => void
319
+ /** Lokalizacja przycisków za pomocą słabego światła LED: 0 - LocationLedOFF, 1 - LocationLedON, 2 - LocationLedONforActive */
320
+ readonly buttonsLEDMode: ButtonsLEDModeType
321
+ /**
322
+ * Ustawia tryb lokalizacji przycisków za pomocą diod LED
323
+ * @param {ButtonsLEDModeType} value
324
+ */
325
+ setButtonsLEDMode: (value: ButtonsLEDModeType) => void
326
+ /** Źródło, które przełącza strony: 0 - Command, 1 - Gesture/Command */
327
+ readonly pageControlMode: PageControlModeType
328
+ /**
329
+ * Ustawia źródło, które przełącza strony (komendy / gesty)
330
+ * @param {PageControlModeType} value
331
+ */
332
+ setPageControlMode: (value: PageControlModeType) => void
333
+ /** Wyświetlanie informacji o aktualnie wykonanym geście: 0 - Off, 1 - On */
334
+ readonly gestureDisplayMode: GestureDisplayModeType
335
+ /**
336
+ * Ustawia tryb wyświetlania informacji o wykonanym geście
337
+ * @param {GestureDisplayModeType} value
338
+ */
339
+ setGestureDisplayMode: (value: GestureDisplayModeType) => void
340
+ }
341
+
342
+ class PanelRemote implements IPanel {
343
+ constructor(private objectName: string, private gate: RemoteGate) {
344
+ }
345
+
346
+ addOnGestureUp(_callback: () => void): void {
347
+ // Remote events are not supported
348
+ }
349
+ addOnGestureDown(_callback: () => void): void {
350
+ // Remote events are not supported
351
+ }
352
+ addOnGestureLeft(_callback: () => void): void {
353
+ // Remote events are not supported
354
+ }
355
+ addOnGestureRight(_callback: () => void): void {
356
+ // Remote events are not supported
357
+ }
358
+ addOnProximityDetect(_callback: () => void): void {
359
+ // Remote events are not supported
360
+ }
361
+ addOnPageChange(_callback: () => void): void {
362
+ // Remote events are not supported
363
+ }
364
+ addOnDisplayOn(_callback: () => void): void {
365
+ // Remote events are not supported
366
+ }
367
+ addOnDisplayOff(_callback: () => void): void {
368
+ // Remote events are not supported
369
+ }
370
+
371
+ /** Wybudza wyświetlacz z trybu uśpienia */
372
+ switchOnDisplay(): void {
373
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
374
+ .execute()
375
+ .addParameter(MethodType.SwitchOnDisplay)
376
+ .build();
377
+ this.gate.runScript(cmd!);
378
+ }
379
+
380
+ /** Zmienia tryb wyświetlania na 'buttons'. Czyści wyświetlacz i wyświetla ponownie ikony (lub tekst) dla wszystkich przycisków */
381
+ showButtons(): void {
382
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
383
+ .execute()
384
+ .addParameter(MethodType.ShowButtons)
385
+ .build();
386
+ this.gate.runScript(cmd!);
387
+ }
388
+
389
+ /** Czyści zawartość wyświetlacza w trybie 'freedraw' */
390
+ clearScreen(): void {
391
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
392
+ .execute()
393
+ .addParameter(MethodType.ClearScreen)
394
+ .build();
395
+ this.gate.runScript(cmd!);
396
+ }
397
+
398
+ /**
399
+ * Wyświetla tekst w trybie 'freedraw'. x, y - współrzędne w pikselach; txt - tekst; fontSize - rozmiar czcionki (1: 10p, 2: 14p, 3: 32p)
400
+ * @param {number} x
401
+ * @param {number} y
402
+ * @param {string} txt
403
+ * @param {number} fontSize
404
+ */
405
+ printText(x: number, y: number, txt: string, fontSize: FontSizeType): void {
406
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
407
+ .execute()
408
+ .addParameter(MethodType.PrintText)
409
+ .addParameter(x)
410
+ .addParameter(y)
411
+ .addParameter(txt)
412
+ .addParameter(fontSize)
413
+ .build();
414
+ this.gate.runScript(cmd!);
415
+ }
416
+
417
+ /**
418
+ * Wyświetla liczbę w trybie 'freedraw'. x, y - współrzędne w pikselach; number - wartość; precision - miejsca po przecinku; fontSize - rozmiar czcionki (1: 10p, 2: 14p, 3: 32p)
419
+ * @param {number} x
420
+ * @param {number} y
421
+ * @param {number} number
422
+ * @param {FloatPrecisionType} precision
423
+ * @param {FontSizeType} fontSize
424
+ */
425
+ printFloat(x: number, y: number, number: number, precision: FloatPrecisionType, fontSize: FontSizeType): void {
426
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
427
+ .execute()
428
+ .addParameter(MethodType.PrintFloat)
429
+ .addParameter(x)
430
+ .addParameter(y)
431
+ .addParameter(number)
432
+ .addParameter(precision)
433
+ .addParameter(fontSize)
434
+ .build();
435
+ this.gate.runScript(cmd!);
436
+ }
437
+
438
+ /**
439
+ * Rysuje linię w trybie 'freedraw'. x, y - współrzędne początkowe; xe, ye - końcowe; color - 0 czarny, 1 biały
440
+ * @param {number} x
441
+ * @param {number} y
442
+ * @param {number} xe
443
+ * @param {number} ye
444
+ * @param {ColorType} color
445
+ */
446
+ drawLine(x: number, y: number, xe: number, ye: number, color: ColorType): void {
447
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
448
+ .execute()
449
+ .addParameter(MethodType.DrawLine)
450
+ .addParameter(x)
451
+ .addParameter(y)
452
+ .addParameter(xe)
453
+ .addParameter(ye)
454
+ .addParameter(color)
455
+ .build();
456
+ this.gate.runScript(cmd!);
457
+ }
458
+
459
+ /**
460
+ * Rysuje wypełniony prostokąt w trybie 'freedraw'. x, y - współrzędne; w - szerokość; h - wysokość; color - 0 czarny, 1 biały
461
+ * @param {number} x
462
+ * @param {number} y
463
+ * @param {number} w
464
+ * @param {number} h
465
+ * @param {ColorType} color
466
+ */
467
+ drawBox(x: number, y: number, w: number, h: number, color: ColorType): void {
468
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
469
+ .execute()
470
+ .addParameter(MethodType.DrawBox)
471
+ .addParameter(x)
472
+ .addParameter(y)
473
+ .addParameter(w)
474
+ .addParameter(h)
475
+ .addParameter(color)
476
+ .build();
477
+ this.gate.runScript(cmd!);
478
+ }
479
+
480
+ /**
481
+ * Rysuje punkt w trybie 'freedraw'. x, y - współrzędne w pikselach; color - 0 czarny, 1 biały
482
+ * @param {number} x
483
+ * @param {number} y
484
+ * @param {ColorType} color
485
+ */
486
+ drawPoint(x: number, y: number, color: ColorType): void {
487
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
488
+ .execute()
489
+ .addParameter(MethodType.DrawPoint)
490
+ .addParameter(x)
491
+ .addParameter(y)
492
+ .addParameter(color)
493
+ .build();
494
+ this.gate.runScript(cmd!);
495
+ }
496
+
497
+ /**
498
+ * Rysuje ikonę (bmp) w trybie 'freedraw'. x, y - współrzędne w pikselach; filename - nazwa ikony bez rozszerzenia
499
+ * @param {number} x
500
+ * @param {number} y
501
+ * @param {string} filename
502
+ */
503
+ drawIcon(x: number, y: number, filename: string): void {
504
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
505
+ .execute()
506
+ .addParameter(MethodType.DrawIcon)
507
+ .addParameter(x)
508
+ .addParameter(y)
509
+ .addParameter(filename)
510
+ .build();
511
+ this.gate.runScript(cmd!);
512
+ }
513
+
514
+ /** Wyświetla zawartość bufora pamięci graficznej. Zmienia tryb wyświetlania na 'freedraw' */
515
+ displayContent(): void {
516
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
517
+ .execute()
518
+ .addParameter(MethodType.DisplayContent)
519
+ .build();
520
+ this.gate.runScript(cmd!);
521
+ }
522
+
523
+ /**
524
+ * Generuje dźwięk o danej częstotliwości [Hz], czasie trwania [ms] i głośności
525
+ * @param {number} frequency
526
+ * @param {number} duration
527
+ * @param {number} volume
528
+ * @param {ReservedType} reserved
529
+ */
530
+ setBeep(frequency: number, duration: number, volume: number, reserved: ReservedType): void {
531
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
532
+ .execute()
533
+ .addParameter(MethodType.SetBeep)
534
+ .addParameter(frequency)
535
+ .addParameter(duration)
536
+ .addParameter(volume)
537
+ .addParameter(reserved)
538
+ .build();
539
+ this.gate.runScript(cmd!);
540
+ }
541
+
542
+ /**
543
+ * Ustawia numer wyświetlanej strony
544
+ * @param {PageNumberType} nr
545
+ */
546
+ setPageNr(nr: PageNumberType): void {
547
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
548
+ .execute()
549
+ .addParameter(MethodType.SetPageNr)
550
+ .addParameter(nr)
551
+ .build();
552
+ this.gate.runScript(cmd!);
553
+ }
554
+
555
+ /** Wyświetla następną stronę */
556
+ setNextPage(): void {
557
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
558
+ .execute()
559
+ .addParameter(MethodType.SetNextPage)
560
+ .build();
561
+ this.gate.runScript(cmd!);
562
+ }
563
+
564
+ /** Wyświetla poprzednią stronę */
565
+ setPrevPage(): void {
566
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
567
+ .execute()
568
+ .addParameter(MethodType.SetPrevPage)
569
+ .build();
570
+ this.gate.runScript(cmd!);
571
+ }
572
+
573
+ /** Wyzwala wywołanie zdarzenia OnDraw w przypadku gdy OLED jest aktywny */
574
+ draw(): void {
575
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
576
+ .execute()
577
+ .addParameter(MethodType.Draw)
578
+ .build();
579
+ this.gate.runScript(cmd!);
580
+ }
581
+
582
+ /** Nazwa pliku BMP z ikoną dla gestu Góra (bez rozszerzenia) */
583
+ get gestureIconUp(): string {
584
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
585
+ .get()
586
+ .addParameter(PropertyType.GestureIconUp)
587
+ .build();
588
+ return this.gate.runScript(cmd!);
589
+ }
590
+ setGestureIconUp(filename: string): void {
591
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
592
+ .set()
593
+ .addParameter(PropertyType.GestureIconUp)
594
+ .addParameter(filename)
595
+ .build();
596
+ this.gate.runScript(cmd!);
597
+ }
598
+
599
+ /** Nazwa pliku BMP z ikoną dla gestu Dół (bez rozszerzenia) */
600
+ get gestureIconDown(): string {
601
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
602
+ .get()
603
+ .addParameter(PropertyType.GestureIconDown)
604
+ .build();
605
+ return this.gate.runScript(cmd!);
606
+ }
607
+ setGestureIconDown(filename: string): void {
608
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
609
+ .set()
610
+ .addParameter(PropertyType.GestureIconDown)
611
+ .addParameter(filename)
612
+ .build();
613
+ this.gate.runScript(cmd!);
614
+ }
615
+
616
+ /** Nazwa pliku BMP z ikoną dla gestu Lewo (bez rozszerzenia) */
617
+ get gestureIconLeft(): string {
618
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
619
+ .get()
620
+ .addParameter(PropertyType.GestureIconLeft)
621
+ .build();
622
+ return this.gate.runScript(cmd!);
623
+ }
624
+ setGestureIconLeft(filename: string): void {
625
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
626
+ .set()
627
+ .addParameter(PropertyType.GestureIconLeft)
628
+ .addParameter(filename)
629
+ .build();
630
+ this.gate.runScript(cmd!);
631
+ }
632
+
633
+ /** Nazwa pliku BMP z ikoną dla gestu Prawo (bez rozszerzenia) */
634
+ get gestureIconRight(): string {
635
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
636
+ .get()
637
+ .addParameter(PropertyType.GestureIconRight)
638
+ .build();
639
+ return this.gate.runScript(cmd!);
640
+ }
641
+ setGestureIconRight(filename: string): void {
642
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
643
+ .set()
644
+ .addParameter(PropertyType.GestureIconRight)
645
+ .addParameter(filename)
646
+ .build();
647
+ this.gate.runScript(cmd!);
648
+ }
649
+
650
+ /** Czułość sensora zbliżeniowego (mniejsza wartość-większa czułość) */
651
+ get proximitySens(): number {
652
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
653
+ .get()
654
+ .addParameter(PropertyType.ProximitySens)
655
+ .build();
656
+ return this.gate.runScript(cmd!);
657
+ }
658
+ setProximitySens(value: number): void {
659
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
660
+ .set()
661
+ .addParameter(PropertyType.ProximitySens)
662
+ .addParameter(value)
663
+ .build();
664
+ this.gate.runScript(cmd!);
665
+ }
666
+
667
+ /** Czas po jakim wyświetlacz zostanie wygaszony */
668
+ get proximityTimeout(): number {
669
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
670
+ .get()
671
+ .addParameter(PropertyType.ProximityTimeout)
672
+ .build();
673
+ return this.gate.runScript(cmd!);
674
+ }
675
+ setProximityTimeout(value: number): void {
676
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
677
+ .set()
678
+ .addParameter(PropertyType.ProximityTimeout)
679
+ .addParameter(value)
680
+ .build();
681
+ this.gate.runScript(cmd!);
682
+ }
683
+
684
+ /** Sygnał sensora zbliżeniowego (wartość bezwymiarowa) */
685
+ get proximityValue(): number {
686
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
687
+ .get()
688
+ .addParameter(PropertyType.ProximityValue)
689
+ .build();
690
+ return this.gate.runScript(cmd!);
691
+ }
692
+
693
+ /** Sterowanie sygnalizacją dźwiękową: 0 - Off, 1 - On */
694
+ get buzzerValue(): BuzzerValueType {
695
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
696
+ .get()
697
+ .addParameter(PropertyType.BuzzerValue)
698
+ .build();
699
+ return this.gate.runScript(cmd!);
700
+ }
701
+ setBuzzerValue(value: BuzzerValueType): void {
702
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
703
+ .set()
704
+ .addParameter(PropertyType.BuzzerValue)
705
+ .addParameter(value)
706
+ .build();
707
+ this.gate.runScript(cmd!);
708
+ }
709
+
710
+ /** Wybór orientacji gestów: 0 - Off, 1 - Vertical, 2 - Horizontal, 3 - Vert+Horiz */
711
+ get gestureMode(): GestureModeType {
712
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
713
+ .get()
714
+ .addParameter(PropertyType.GestureMode)
715
+ .build();
716
+ return this.gate.runScript(cmd!);
717
+ }
718
+ setGestureMode(value: GestureModeType): void {
719
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
720
+ .set()
721
+ .addParameter(PropertyType.GestureMode)
722
+ .addParameter(value)
723
+ .build();
724
+ this.gate.runScript(cmd!);
725
+ }
726
+
727
+ /** Wybór czułości gestów: 1 - Low, 2 - Mid, 3 - High */
728
+ get gestureSens(): GestureSensType {
729
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
730
+ .get()
731
+ .addParameter(PropertyType.GestureSens)
732
+ .build();
733
+ return this.gate.runScript(cmd!);
734
+ }
735
+ setGestureSens(value: GestureSensType): void {
736
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
737
+ .set()
738
+ .addParameter(PropertyType.GestureSens)
739
+ .addParameter(value)
740
+ .build();
741
+ this.gate.runScript(cmd!);
742
+ }
743
+
744
+ /** Numer wyświetlanej aktualnie strony */
745
+ get pageNr(): PageNumberType {
746
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
747
+ .get()
748
+ .addParameter(PropertyType.PageNr)
749
+ .build();
750
+ return this.gate.runScript(cmd!);
751
+ }
752
+ set pageNr(value: number) {
753
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
754
+ .set()
755
+ .addParameter(PropertyType.PageNr)
756
+ .addParameter(value)
757
+ .build();
758
+ this.gate.runScript(cmd!);
759
+ }
760
+
761
+ /** Informacja przed zmianą strony: 0 - ShowImmediately, 1 - ShowIconOrName, 2 - ShowGesture */
762
+ get pageDisplayMode(): PageDisplayModeType {
763
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
764
+ .get()
765
+ .addParameter(PropertyType.PageDisplayMode)
766
+ .build();
767
+ return this.gate.runScript(cmd!);
768
+ }
769
+ setPageDisplayMode(value: PageDisplayModeType): void {
770
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
771
+ .set()
772
+ .addParameter(PropertyType.PageDisplayMode)
773
+ .addParameter(value)
774
+ .build();
775
+ this.gate.runScript(cmd!);
776
+ }
777
+
778
+ /** Lokalizacja przycisków za pomocą słabego światła LED: 0 - LocationLedOFF, 1 - LocationLedON, 2 - LocationLedONforActive */
779
+ get buttonsLEDMode(): ButtonsLEDModeType {
780
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
781
+ .get()
782
+ .addParameter(PropertyType.ButtonsLEDMode)
783
+ .build();
784
+ return this.gate.runScript(cmd!);
785
+ }
786
+ setButtonsLEDMode(value: ButtonsLEDModeType): void {
787
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
788
+ .set()
789
+ .addParameter(PropertyType.ButtonsLEDMode)
790
+ .addParameter(value)
791
+ .build();
792
+ this.gate.runScript(cmd!);
793
+ }
794
+
795
+ /** Źródło, które przełącza strony: 0 - Command, 1 - Gesture/Command */
796
+ get pageControlMode(): PageControlModeType {
797
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
798
+ .get()
799
+ .addParameter(PropertyType.PageControlMode)
800
+ .build();
801
+ return this.gate.runScript(cmd!);
802
+ }
803
+ setPageControlMode(value: PageControlModeType): void {
804
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
805
+ .set()
806
+ .addParameter(PropertyType.PageControlMode)
807
+ .addParameter(value)
808
+ .build();
809
+ this.gate.runScript(cmd!);
810
+ }
811
+
812
+ /** Wyświetlanie informacji o aktualnie wykonanym geście: 0 - Off, 1 - On */
813
+ get gestureDisplayMode(): GestureDisplayModeType {
814
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
815
+ .get()
816
+ .addParameter(PropertyType.GestureDisplayMode)
817
+ .build();
818
+ return this.gate.runScript(cmd!);
819
+ }
820
+ setGestureDisplayMode(value: GestureDisplayModeType): void {
821
+ const cmd: string | null = rawExecutionBuilderFactory(this.objectName)
822
+ .set()
823
+ .addParameter(PropertyType.GestureDisplayMode)
824
+ .addParameter(value)
825
+ .build();
826
+ this.gate.runScript(cmd!);
827
+ }
828
+ }
829
+
830
+ class Panel implements IPanel {
831
+ private onGestureUpCallbacks: Array<() => void> = [];
832
+ private onGestureDownCallbacks: Array<() => void> = [];
833
+ private onGestureLeftCallbacks: Array<() => void> = [];
834
+ private onGestureRightCallbacks: Array<() => void> = [];
835
+ private onProximityDetectCallbacks: Array<() => void> = [];
836
+ private onPageChangeCallbacks: Array<() => void> = [];
837
+ private onDisplayOnCallbacks: Array<() => void> = [];
838
+ private onDisplayOffCallbacks: Array<() => void> = [];
839
+
840
+ constructor(private raw: PanelRaw) {
841
+ this.raw.add_event(EventType.OnGestureUp, () => {
842
+ this.onGestureUpCallbacks.forEach(callback => { callback(); });
843
+ });
844
+ this.raw.add_event(EventType.OnGestureDown, () => {
845
+ this.onGestureDownCallbacks.forEach(callback => { callback(); });
846
+ });
847
+ this.raw.add_event(EventType.OnGestureLeft, () => {
848
+ this.onGestureLeftCallbacks.forEach(callback => { callback(); });
849
+ });
850
+ this.raw.add_event(EventType.OnGestureRight, () => {
851
+ this.onGestureRightCallbacks.forEach(callback => { callback(); });
852
+ });
853
+ this.raw.add_event(EventType.OnProximityDetect, () => {
854
+ this.onProximityDetectCallbacks.forEach(callback => { callback(); });
855
+ });
856
+ this.raw.add_event(EventType.OnPageChange, () => {
857
+ this.onPageChangeCallbacks.forEach(callback => { callback(); });
858
+ });
859
+ this.raw.add_event(EventType.OnDisplayOn, () => {
860
+ this.onDisplayOnCallbacks.forEach(callback => { callback(); });
861
+ });
862
+ this.raw.add_event(EventType.OnDisplayOff, () => {
863
+ this.onDisplayOffCallbacks.forEach(callback => { callback(); });
864
+ });
865
+ }
866
+
867
+ /**
868
+ * Zdarzenie wywoływane w przypadku wykonania gestu w górę
869
+ * @param callback
870
+ */
871
+ addOnGestureUp(callback: () => void): void {
872
+ this.onGestureUpCallbacks.push(callback);
873
+ }
874
+ /**
875
+ * Zdarzenie wywoływane w przypadku wykonania gestu w dół
876
+ * @param callback
877
+ */
878
+ addOnGestureDown(callback: () => void): void {
879
+ this.onGestureDownCallbacks.push(callback);
880
+ }
881
+ /**
882
+ * Zdarzenie wywoływane w przypadku wykonania gestu w lewo
883
+ * @param callback
884
+ */
885
+ addOnGestureLeft(callback: () => void): void {
886
+ this.onGestureLeftCallbacks.push(callback);
887
+ }
888
+ /**
889
+ * Zdarzenie wywoływane w przypadku wykonania gestu w prawo
890
+ * @param callback
891
+ */
892
+ addOnGestureRight(callback: () => void): void {
893
+ this.onGestureRightCallbacks.push(callback);
894
+ }
895
+ /**
896
+ * Zdarzenie wywoływane w przypadku wykrycia zbliżającego się do wyświetlacza obiektu
897
+ * @param callback
898
+ */
899
+ addOnProximityDetect(callback: () => void): void {
900
+ this.onProximityDetectCallbacks.push(callback);
901
+ }
902
+ /**
903
+ * Zdarzenie wywoływane w przypadku zmiany strony w panelu
904
+ * @param callback
905
+ */
906
+ addOnPageChange(callback: () => void): void {
907
+ this.onPageChangeCallbacks.push(callback);
908
+ }
909
+ /**
910
+ * Zdarzenie wywoływane w przypadku wybudzenia wyświetlacza
911
+ * @param callback
912
+ */
913
+ addOnDisplayOn(callback: () => void): void {
914
+ this.onDisplayOnCallbacks.push(callback);
915
+ }
916
+ /**
917
+ * Zdarzenie wywoływane w przypadku wyłączenia wyświetlacza
918
+ * @param callback
919
+ */
920
+ addOnDisplayOff(callback: () => void): void {
921
+ this.onDisplayOffCallbacks.push(callback);
922
+ }
923
+ /** Wybudza wyświetlacz z trybu uśpienia */
924
+ switchOnDisplay(): void {
925
+ this.raw.execute(MethodType.SwitchOnDisplay);
926
+ }
927
+ /** Zmienia tryb wyświetlania na 'buttons'. Czyści wyświetlacz i wyświetla ponownie ikony (lub tekst) dla wszystkich przycisków */
928
+ showButtons(): void {
929
+ this.raw.execute(MethodType.ShowButtons);
930
+ }
931
+ /** Czyści zawartość wyświetlacza w trybie 'freedraw' */
932
+ clearScreen(): void {
933
+ this.raw.execute(MethodType.ClearScreen);
934
+ }
935
+ /**
936
+ * Wyświetla tekst w trybie 'freedraw'. x, y - współrzędne w pikselach; txt - tekst; fontSize - rozmiar czcionki (1: 10p, 2: 14p, 3: 32p)
937
+ * @param {number} x
938
+ * @param {number} y
939
+ * @param {string} txt
940
+ * @param {number} fontSize
941
+ */
942
+ printText(x: number, y: number, txt: string, fontSize: FontSizeType): void {
943
+ this.raw.execute(MethodType.PrintText, x, y, txt, fontSize);
944
+ }
945
+ /**
946
+ * Wyświetla liczbę w trybie 'freedraw'. x, y - współrzędne w pikselach; number - wartość; precision - miejsca po przecinku; fontSize - rozmiar czcionki (1: 10p, 2: 14p, 3: 32p)
947
+ * @param {number} x
948
+ * @param {number} y
949
+ * @param {number} number
950
+ * @param {FloatPrecisionType} precision
951
+ * @param {FontSizeType} fontSize
952
+ */
953
+ printFloat(x: number, y: number, number: number, precision: FloatPrecisionType, fontSize: FontSizeType): void {
954
+ this.raw.execute(MethodType.PrintFloat, x, y, number, precision, fontSize);
955
+ }
956
+ /**
957
+ * Rysuje linię w trybie 'freedraw'. x, y - współrzędne początkowe; xe, ye - końcowe; color - 0 czarny, 1 biały
958
+ * @param {number} x
959
+ * @param {number} y
960
+ * @param {number} xe
961
+ * @param {number} ye
962
+ * @param {ColorType} color
963
+ */
964
+ drawLine(x: number, y: number, xe: number, ye: number, color: ColorType): void {
965
+ this.raw.execute(MethodType.DrawLine, x, y, xe, ye, color);
966
+ }
967
+ /**
968
+ * Rysuje wypełniony prostokąt w trybie 'freedraw'. x, y - współrzędne; w - szerokość; h - wysokość; color - 0 czarny, 1 biały
969
+ * @param {number} x
970
+ * @param {number} y
971
+ * @param {number} w
972
+ * @param {number} h
973
+ * @param {ColorType} color
974
+ */
975
+ drawBox(x: number, y: number, w: number, h: number, color: ColorType): void {
976
+ this.raw.execute(MethodType.DrawBox, x, y, w, h, color);
977
+ }
978
+ /**
979
+ * Rysuje punkt w trybie 'freedraw'. x, y - współrzędne w pikselach; color - 0 czarny, 1 biały
980
+ * @param {number} x
981
+ * @param {number} y
982
+ * @param {ColorType} color
983
+ */
984
+ drawPoint(x: number, y: number, color: ColorType): void {
985
+ this.raw.execute(MethodType.DrawPoint, x, y, color);
986
+ }
987
+ /**
988
+ * Rysuje ikonę (bmp) w trybie 'freedraw'. x, y - współrzędne w pikselach; filename - nazwa ikony bez rozszerzenia
989
+ * @param {number} x
990
+ * @param {number} y
991
+ * @param {string} filename
992
+ */
993
+ drawIcon(x: number, y: number, filename: string): void {
994
+ this.raw.execute(MethodType.DrawIcon, x, y, filename);
995
+ }
996
+ /** Wyświetla zawartość bufora pamięci graficznej. Zmienia tryb wyświetlania na 'freedraw' */
997
+ displayContent(): void {
998
+ this.raw.execute(MethodType.DisplayContent);
999
+ }
1000
+ /**
1001
+ * Generuje dźwięk o danej częstotliwości [Hz], czasie trwania [ms] i głośności
1002
+ * @param {number} frequency
1003
+ * @param {number} duration
1004
+ * @param {number} volume
1005
+ * @param {ReservedType} reserved
1006
+ */
1007
+ setBeep(frequency: number, duration: number, volume: number, reserved: ReservedType): void {
1008
+ this.raw.execute(MethodType.SetBeep, frequency, duration, volume, reserved);
1009
+ }
1010
+ /**
1011
+ * Ustawia numer wyświetlanej strony
1012
+ * @param {number} nr
1013
+ */
1014
+ setPageNr(nr: number): void {
1015
+ this.raw.execute(MethodType.SetPageNr, nr);
1016
+ }
1017
+ /** Wyświetla następną stronę */
1018
+ setNextPage(): void {
1019
+ this.raw.execute(MethodType.SetNextPage);
1020
+ }
1021
+ /** Wyświetla poprzednią stronę */
1022
+ setPrevPage(): void {
1023
+ this.raw.execute(MethodType.SetPrevPage);
1024
+ }
1025
+ /** Wyzwala wywołanie zdarzenia OnDraw w przypadku gdy OLED jest aktywny */
1026
+ draw(): void {
1027
+ this.raw.execute(MethodType.Draw);
1028
+ }
1029
+ /** Nazwa pliku BMP z ikoną dla gestu Góra (bez rozszerzenia) */
1030
+ get gestureIconUp(): string {
1031
+ return this.raw.get(PropertyType.GestureIconUp);
1032
+ }
1033
+ setGestureIconUp(filename: string): void {
1034
+ this.raw.set(PropertyType.GestureIconUp, filename);
1035
+ }
1036
+ /** Nazwa pliku BMP z ikoną dla gestu Dół (bez rozszerzenia) */
1037
+ get gestureIconDown(): string {
1038
+ return this.raw.get(PropertyType.GestureIconDown);
1039
+ }
1040
+ setGestureIconDown(filename: string): void {
1041
+ this.raw.set(PropertyType.GestureIconDown, filename);
1042
+ }
1043
+ /** Nazwa pliku BMP z ikoną dla gestu Lewo (bez rozszerzenia) */
1044
+ get gestureIconLeft(): string {
1045
+ return this.raw.get(PropertyType.GestureIconLeft);
1046
+ }
1047
+ setGestureIconLeft(filename: string): void {
1048
+ this.raw.set(PropertyType.GestureIconLeft, filename);
1049
+ }
1050
+ /** Nazwa pliku BMP z ikoną dla gestu Prawo (bez rozszerzenia) */
1051
+ get gestureIconRight(): string {
1052
+ return this.raw.get(PropertyType.GestureIconRight);
1053
+ }
1054
+ setGestureIconRight(filename: string): void {
1055
+ this.raw.set(PropertyType.GestureIconRight, filename);
1056
+ }
1057
+ /** Czułość sensora zbliżeniowego (mniejsza wartość-większa czułość) */
1058
+ get proximitySens(): number {
1059
+ return this.raw.get(PropertyType.ProximitySens);
1060
+ }
1061
+ setProximitySens(value: number): void {
1062
+ this.raw.set(PropertyType.ProximitySens, value);
1063
+ }
1064
+ /** Czas po jakim wyświetlacz zostanie wygaszony */
1065
+ get proximityTimeout(): number {
1066
+ return this.raw.get(PropertyType.ProximityTimeout);
1067
+ }
1068
+ setProximityTimeout(value: number): void {
1069
+ this.raw.set(PropertyType.ProximityTimeout, value);
1070
+ }
1071
+ /** Sygnał sensora zbliżeniowego (wartość bezwymiarowa) */
1072
+ get proximityValue(): number {
1073
+ return this.raw.get(PropertyType.ProximityValue);
1074
+ }
1075
+ /** Sterowanie sygnalizacją dźwiękową: 0 - Off, 1 - On */
1076
+ get buzzerValue(): BuzzerValueType {
1077
+ return this.raw.get(PropertyType.BuzzerValue);
1078
+ }
1079
+ setBuzzerValue(value: BuzzerValueType): void {
1080
+ this.raw.set(PropertyType.BuzzerValue, value);
1081
+ }
1082
+ /** Wybór orientacji gestów: 0 - Off, 1 - Vertical, 2 - Horizontal, 3 - Vert+Horiz */
1083
+ get gestureMode(): GestureModeType {
1084
+ return this.raw.get(PropertyType.GestureMode);
1085
+ }
1086
+ setGestureMode(value: GestureModeType): void {
1087
+ this.raw.set(PropertyType.GestureMode, value);
1088
+ }
1089
+ /** Wybór czułości gestów: 1 - Low, 2 - Mid, 3 - High */
1090
+ get gestureSens(): GestureSensType {
1091
+ return this.raw.get(PropertyType.GestureSens);
1092
+ }
1093
+ setGestureSens(value: GestureSensType): void {
1094
+ this.raw.set(PropertyType.GestureSens, value);
1095
+ }
1096
+ /** Numer wyświetlanej aktualnie strony */
1097
+ get pageNr(): number {
1098
+ return this.raw.get(PropertyType.PageNr);
1099
+ }
1100
+ set pageNr(value: number) {
1101
+ this.raw.set(PropertyType.PageNr, value);
1102
+ }
1103
+ /** Informacja przed zmianą strony: 0 - ShowImmediately, 1 - ShowIconOrName, 2 - ShowGesture */
1104
+ get pageDisplayMode(): PageDisplayModeType {
1105
+ return this.raw.get(PropertyType.PageDisplayMode);
1106
+ }
1107
+ setPageDisplayMode(value: PageDisplayModeType): void {
1108
+ this.raw.set(PropertyType.PageDisplayMode, value);
1109
+ }
1110
+ /** Lokalizacja przycisków za pomocą słabego światła LED: 0 - LocationLedOFF, 1 - LocationLedON, 2 - LocationLedONforActive */
1111
+ get buttonsLEDMode(): ButtonsLEDModeType {
1112
+ return this.raw.get(PropertyType.ButtonsLEDMode);
1113
+ }
1114
+ setButtonsLEDMode(value: ButtonsLEDModeType): void {
1115
+ this.raw.set(PropertyType.ButtonsLEDMode, value);
1116
+ }
1117
+ /** Źródło, które przełącza strony: 0 - Command, 1 - Gesture/Command */
1118
+ get pageControlMode(): PageControlModeType {
1119
+ return this.raw.get(PropertyType.PageControlMode);
1120
+ }
1121
+ setPageControlMode(value: PageControlModeType): void {
1122
+ this.raw.set(PropertyType.PageControlMode, value);
1123
+ }
1124
+ /** Wyświetlanie informacji o aktualnie wykonanym geście: 0 - Off, 1 - On */
1125
+ get gestureDisplayMode(): GestureDisplayModeType {
1126
+ return this.raw.get(PropertyType.GestureDisplayMode);
1127
+ }
1128
+ setGestureDisplayMode(value: GestureDisplayModeType): void {
1129
+ this.raw.set(PropertyType.GestureDisplayMode, value);
1130
+ }
1131
+ }
1132
+
1133
+ export {
1134
+ Panel, PanelRaw, PanelRemote,
1135
+ BuzzerValueType, GestureModeType, GestureSensType,
1136
+ PageDisplayModeType, ButtonsLEDModeType, PageControlModeType, GestureDisplayModeType, PageNumberType, FontSizeType, FloatPrecisionType, ColorType,
1137
+ ReservedType
1138
+ }