forked from jbuehl/solaredge
-
Notifications
You must be signed in to change notification settings - Fork 2
/
seCommands.py
844 lines (841 loc) · 46.7 KB
/
seCommands.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
PROT_CMD_PARAMS_RESET = 0x0010
PROT_CMD_PARAMS_SET_SINGLE = 0x0011
PROT_CMD_PARAMS_GET_SINGLE = 0x0012
PROT_CMD_PARAMS_GET_INFO = 0x0013
PROT_CMD_PARAMS_GET_NAME = 0x0014
PROT_CMD_PARAMS_GET_NUM = 0x0015
PROT_CMD_PARAMS_GET_ALL = 0x0016
PROT_CMD_PARAMS_SET_ALL = 0x0017
PROT_CMD_PARAMS_SET_SINGLE_NOSAVE = 0x0018
PROT_CMD_PARAMS_SAVE = 0x0019
PROT_CMD_PARAMS_POLICY_ENABLE = 0x001a
PROT_CMD_PARAMS_POLICY_DISABLE = 0x001b
PROT_CMD_PARAMS_POLICY_DISABLE_VOLATILE = 0x001c
PROT_CMD_PARAMS_SET_POLICY_PASSWORD = 0x001d
PROT_CMD_PARAMS_GET_VOLATILE = 0x001e
PROT_CMD_PARAMS_SET_VOLATILE = 0x001f
PROT_CMD_UPGRADE_START = 0x0020
PROT_CMD_UPGRADE_WRITE = 0x0021
PROT_CMD_UPGRADE_FINISH = 0x0022
PROT_CMD_UPGRADE_READ_DATA = 0x0023
PROT_CMD_UPGRADE_READ_SIZE = 0x0024
PROT_CMD_MISC_RESET = 0x0030
PROT_CMD_MISC_STOP = 0x0031
PROT_CMD_MISC_DUMMY = 0x0032
PROT_CMD_MISC_GET_VER = 0x0033
PROT_CMD_MISC_GET_TYPE = 0x0034
PROT_CMD_MISC_PAYLOAD = 0x0035
PROT_CMD_MISC_SET_ID = 0x0036
PROT_CMD_MISC_READ_MEMORY = 0x0037
PROT_CMD_MISC_PARAMS_PARTIAL_RESET = 0x0038
PROT_CMD_MISC_GET_MAX_PACKET_SIZE = 0x0039
PROT_CMD_PARAMS_SMART_LOAD_PARAMS = 0x0040
PROT_CMD_MISC_PARAMS_PARTIAL_RESET2 = 0x0041
PROT_CMD_PARAMS_IGNORE_PARAMS_LIST = 0x0042
PROT_CMD_PARAMS_PARTIAL_RESET_AS_LEVEL = 0x0043
PROT_CMD_PARAMS_PARTIAL_RESET_PCB_LEVEL = 0x0044
PROT_RESP_ACK = 0x0080
PROT_RESP_NACK = 0x0081
PROT_RESP_PARAMS_SINGLE = 0x0090
PROT_RESP_PARAMS_INFO = 0x0091
PROT_RESP_PARAMS_NAME = 0x0092
PROT_RESP_PARAMS_NUM = 0x0093
PROT_RESP_PARAMS_ALL = 0x0094
PROT_RESP_PARAMS_INCORRECT_PASSWORD = 0x0095
PROT_RESP_UPGRADE_DATA = 0x00a0
PROT_RESP_UPGRADE_SIZE = 0x00a1
PROT_RESP_MISC_GET_VER = 0x00b0
PROT_RESP_MISC_GET_TYPE = 0x00b1
PROT_RESP_MISC_PAYLOAD = 0x00b2
PROT_RESP_MISC_READ_MEMORY = 0x00b3
PROT_RESP_MISC_GET_MAX_PACKET_SIZE = 0x00b4
PROT_CMD_MERCURY_PWM_SET = 0x0100
PROT_CMD_MERCURY_PWM_ENABLE = 0x0101
PROT_CMD_MERCURY_A2D_SAMPLE = 0x0102
PROT_CMD_MERCURY_KA = 0x0103
PROT_CMD_MERCURY_SET_VIREF = 0x0104
PROT_CMD_MERCURY_SET_VOMAXREF = 0x0105
PROT_CMD_MERCURY_SET_VOMINREF = 0x0106
PROT_CMD_MERCURY_READ_MEAS = 0x0107
PROT_CMD_MERCURY_CLOSED_LOOP_START = 0x0108
PROT_CMD_MERCURY_OPEN_LOOP_START = 0x0109
PROT_CMD_MERCURY_OPEN_LOOP_SET = 0x010a
PROT_CMD_MERCURY_SET_12V_10V = 0x010b
PROT_CMD_MERCURY_SET_5V_35V = 0x010c
PROT_CMD_MERCURY_SET_VO_RANGE = 0x010d
PROT_CMD_MERCURY_START_MPPT = 0x010e
PROT_CMD_MERCURY_TX_ENABLE = 0x010f
PROT_CMD_MERCURY_TX_TEST = 0x0110
PROT_CMD_MERCURY_RX_TEST = 0x0111
PROT_CMD_MERCURY_FORCE_TELEM = 0x0112
PROT_CMD_MERCURY_READ_SAMPLES_DIRECT = 0x0113
PROT_CMD_MERCURY_SET_OTP_BLOCK = 0x0114
PROT_CMD_MERCURY_SET_CAL_MODE = 0x0115
PROT_CMD_MERCURY_SET_VI_RANGE = 0x0116
PROT_CMD_MERCURY_AVG_SAMPLE = 0x0117
PROT_CMD_MERCURY_GET_TELEM = 0x0118
PROT_CMD_MERCURY_DISABLE_PROTECTION = 0x0119
PROT_CMD_MERCURY_BYPASS_MODE = 0x011a
PROT_CMD_MERCURY_SET_TEMP_CAL_PIN = 0x011b
PROT_CMD_MERCURY_SAVE_VOLATILE = 0x011c
PROT_CMD_MERCURY_BBB_MODE = 0x011d
PROT_CMD_MERCURY_GET_REG = 0x011e
PROT_CMD_MERCURY_SET_RES_CIRC_GPIOS = 0x011f
PROT_CMD_MERCURY_GET_SNR = 0x0120
PROT_CMD_MERCURY_GET_LOOP_MODE = 0x0121
PROT_CMD_MERCURY_SET_REG = 0x0122
PROT_CMD_MERCURY_DFT = 0x0123
PROT_CMD_MERCURY_SET_COMM_SW = 0x0124
PROT_CMD_MERCURY_GET_SPI_SAMPLES = 0x0125
PROT_CMD_MERCURY_SET_DT = 0x0126
PROT_CMD_MERCURY_GET_DFT_AVG = 0x0127
PROT_CMD_MERCURY_CONTROL_TEST = 0x0128
PROT_CMD_MERCURY_GET_STATUS_REG = 0x0129
PROT_CMD_MERCURY_RESET_STATUS_REG = 0x012a
PROT_CMD_MERCURY_SET_DPWM_FREQ = 0x012b
PROT_RESP_MERCURY_SAMPLES = 0x0180
PROT_RESP_MERCURY_MON = 0x0181
PROT_RESP_MERCURY_TELEM = 0x0182
PROT_RESP_MERCURY_MEAS = 0x0183
PROT_RESP_MERCURY_RX_TEST_RES = 0x0184
PROT_RESP_MERCURY_SAMPLES_DIRECT = 0x0185
PROT_RESP_MERCURY_AVG_SAMPLE = 0x0186
PROT_RESP_MERCURY_GET_TELEM = 0x0187
PROT_RESP_MERCURY_CONTROL_TEST = 0x0188
PROT_CMD_VENUSMNGR_READ_ISE_MEAS1 = 0x0200
PROT_CMD_VENUSMNGR_READ_ISE_MEAS2 = 0x0201
PROT_CMD_VENUSMNGR_READ_SE_MEAS = 0x0202
PROT_CMD_VENUSMNGR_START_INVERTER = 0x0203
PROT_CMD_VENUSMNGR_ISE_DUTY_CYCLE = 0x0204
PROT_CMD_VENUSMNGR_GET_SYS_STATUS = 0x0205
PROT_CMD_VENUSMNGR_GET_TELEM = 0x0206
PROT_CMD_VENUSMNGR_RX_TEST_INIT = 0x0207
PROT_CMD_VENUSMNGR_RX_TEST = 0x0208
PROT_CMD_VENUSMNGR_TX_TEST_START = 0x0209
PROT_CMD_VENUSMNGR_TX_TEST_STOP = 0x020a
PROT_CMD_VENUSMNGR_SET_TX_ENABLE = 0x020b
PROT_CMD_VENUSMNGR_ENABLE_ISE_WD = 0x020c
PROT_CMD_VENUSMNGR_DISABLE_ISE_WD = 0x020d
PROT_CMD_VENUSMNGR_GET_COUNTRY_CODE = 0x020e
PROT_CMD_VENUSMNGR_SET_COUNTRY = 0x020f
PROT_CMD_VENUSMNGR_PRIVILEGED_MODE = 0x0210
PROT_CMD_VENUSMNGR_PRIVILEGED_SET_PARAM = 0x0211
PROT_CMD_VENUSMNGR_PRIVILEGED_GET_EVENT = 0x0212
PROT_CMD_VENUSMNGR_PRIVILEGED_GET_STATUS = 0x0213
PROT_CMD_VENUSMNGR_CURRENT_MODEM_START = 0x0214
PROT_CMD_VENUSMNGR_CURRENT_MODEM_SEND = 0x0215
PROT_CMD_VENUSMNGR_CURRENT_MODEM_SEND_PAIRING = 0x0216
PROT_CMD_VENUSMNGR_CURRENT_MODEM_GET_STATUS = 0x0217
PROT_CMD_VENUSMNGR_KA_DATA_SEND = 0x0218
PROT_CMD_VENUSMNGR_CURRENT_MODEM_END_PAIRING = 0x0219
PROT_CMD_VENUSMNGR_FORCE_GRID_MON = 0x021a
PROT_CMD_VENUSMNGR_FORCE_SKIP_GRID_MON = 0x021b
PROT_CMD_VENUSMNGR_START_SUPERVISE = 0x021c
PROT_CMD_VENUSMNGR_READ_A2D_MEAS = 0x021d
PROT_CMD_VENUSMNGR_GET_COUNTRY_DEFAULTS = 0x021e
PROT_CMD_VENUSMNGR_SET_PRODUCT_MODEL = 0x021f
PROT_CMD_VENUSMNGR_GET_PRODUCT_MODEL = 0x0220
PROT_CMD_VENUSMNGR_SET_DYNAMIC_INVPWR_PARAM = 0x0221
PROT_CMD_INVERTER_ENTER_BURN_INVPWR_MODE = 0x0222
PROT_CMD_VENUSMNGR_MPPT_TRAVEL = 0x0223
PROT_CMD_VENUSMNGR_SET_PWR_PARAM = 0x0224
PROT_CMD_INVERTER_CURRENT_MODEM_SET_DATA_BIT = 0x0225
PROT_RESP_VENUSMNGR_READ_ISE_MEAS1 = 0x0280
PROT_RESP_VENUSMNGR_READ_ISE_MEAS2 = 0x0281
PROT_RESP_VENUSMNGR_READ_SE_MEAS = 0x0282
PROT_RESP_VENUSMNGR_GET_SYS_STATUS = 0x0283
PROT_RESP_VENUSMNGR_GET_TELEM = 0x0284
PROT_RESP_VENUSMNGR_RX_TEST = 0x0285
PROT_RESP_VENUSMNGR_GET_COUNTRY_CODE = 0x0286
PROT_RESP_VENUSMNGR_PRIVILEGED_GET_EVENT = 0x0287
PROT_RESP_VENUSMNGR_PRIVILEGED_GET_STATUS = 0x0288
PROT_RESP_VENUSMNGR_CURRENT_MODEM_GET_STATUS = 0x0289
PROT_RESP_VENUSMNGR_READ_A2D_MEAS = 0x028a
PROT_RESP_VENUSMNGR_GET_COUNTRY_DEFAULTS = 0x028b
PROT_RESP_VENUSMNGR_GET_PRODUCT_MODEL = 0x028c
PROT_RESP_VENUSMNGR_SET_DYNAMIC_ISE_PARAM = 0x028d
PROT_CMD_POLESTAR_TELEMS_START = 0x0300
PROT_CMD_POLESTAR_TELEMS_STOP = 0x0301
PROT_CMD_POLESTAR_MASTER_GRANT = 0x0302
PROT_CMD_POLESTAR_RTC_SET = 0x0303
PROT_CMD_POLESTAR_TEST_RAM = 0x0304
PROT_CMD_POLESTAR_TEST_FLASH = 0x0305
PROT_CMD_POLESTAR_MAC_ADDR_GET = 0x0306
PROT_CMD_POLESTAR_IP_ADDR_GET = 0x0307
PROT_CMD_POLESTAR_SLAVE_ID_DETECT_INIT = 0x0308
PROT_CMD_POLESTAR_SLAVE_ID_DETECT_GET_ID = 0x0309
PROT_CMD_POLESTAR_SLAVE_ID_DETECT_STOP = 0x030a
PROT_CMD_POLESTAR_UART_ZB_BRIDGE = 0x030b
PROT_CMD_POLESTAR_SEND_PING = 0x030c
PROT_CMD_POLESTAR_LCD_TEST_MODE = 0x030d
PROT_CMD_POLESTAR_CONFTOOL_START = 0x030e
PROT_CMD_POLESTAR_ETHERNET_STAT = 0x030f
PROT_CMD_POLESTAR_GET_FIFO_FLASH_INFO = 0x0310
PROT_CMD_POLESTAR_RESET_FIFO_FLASH = 0x0311
PROT_CMD_POLESTAR_RESET_FLASH = 0x0312
PROT_CMD_POLESTAR_RS485_MSTR_SLV_DET_START = 0x0313
PROT_CMD_POLESTAR_RS485_MSTR_SLV_DET_STATUS = 0x0314
PROT_CMD_POLESTAR_UART_ZB_SET = 0x0315
PROT_CMD_POLESTAR_TCP_TEST = 0x0316
PROT_CMD_POLESTAR_TIMER_ADVANCE = 0x0317
PROT_CMD_POLESTAR_ERASE_FLASH_FIFO_FAST = 0x0318
PROT_CMD_POLESTAR_SELF_KA = 0x0319
PROT_CMD_POLESTAR_ISE_BRIDGE = 0x031a
PROT_CMD_POLESTAR_ERASE_STATISTICS = 0x031b
PROT_CMD_POLESTAR_GET_POK_STATUS = 0x031c
PROT_CMD_POLESTAR_INVERTER_HW_RESET = 0x031d
PROT_CMD_POLESTAR_ZB_PRESENT_STATUS = 0x031e
PROT_CMD_POLESTAR_GET_ALL_SUPPORTED_LANGUAGES_INDEXES = 0x031f
PROT_CMD_POLESTAR_GET_ALL_SUPPORTED_GSM_MODEMS_INDEXES = 0x0320
PROT_CMD_POLESTAR_GET_S_OK_STATUS = 0x0321
PROT_CMD_POLESTAR_GET_ENERGY_STATISTICS_STATUS = 0x0322
PROT_CMD_POLESTAR_GET_GSM_PRESENT_STATUS = 0x0323
PROT_CMD_POLESTAR_SET_STATISTICS_ELEMENT = 0x0324
PROT_CMD_POLESTAR_GEMINI_RS485_MSTR_SLV_DET_START = 0x0325
PROT_CMD_POLESTAR_GEMINI_RS485_MSTR_SLV_DET_STATUS = 0x0326
PROT_CMD_POLESTAR_GET_GEMINI_GFD_STATUS = 0x0327
PROT_CMD_POLESTAR_GET_ERROR_LOG = 0x0328
PROT_CMD_POLESTAR_BLOCK_SERVER_CONTROL = 0x0329
PROT_CMD_POLESTAR_GET_SERVER_CONTROL_STATUS = 0x032a
PROT_CMD_POLESTAR_TEST_SD_FLASH = 0x032b
PROT_CMD_POLESTAR_GET_WARNING_LOG = 0x032c
PROT_CMD_POLESTAR_RESET_MODBUS_DEVICE_DATA = 0x032d
PROT_CMD_POLESTAR_TURN_OFF_INTERNAL_SRAM_BATTERY_BACKUP = 0x032e
PROT_CMD_POLESTAR_WRITE_LCD = 0x032f
PROT_CMD_POLESTAR_READ_LAST_BUTTONS = 0x0330
PROT_CMD_POLESTAR_GET_STATISTICS_ELEMENT = 0x0331
PROT_CMD_POLESTAR_SEND_POWER_REDUCER_SLAVE_PACKET = 0x0332
PROT_CMD_POLESTAR_SEND_POWER_REDUCER_MASTER_PACKET = 0x0333
PROT_CMD_POLESTAR_GET_WIFI_PRESENT_STATUS = 0x0334
PROT_CMD_POLESTAR_GET_PORT_EXPANDER_GPIO_DATA = 0x0335
PROT_CMD_POLESTAR_SET_PORT_EXPANDER_GPIO_DATA = 0x0336
PROT_CMD_POLESTAR_READ_LCD = 0x0337
PROT_CMD_POLESTAR_SIMULATE_BUTTON_PRESSING = 0x0338
PROT_CMD_POLESTAR_INV_ACTIVATE = 0x0339
PROT_CMD_POLESTAR_MODBUS_SLAVE_PACKET = 0x033a
PROT_CMD_POLESTAR_GET_BUTTON_STATE = 0x033b
PROT_CMD_POLESTAR_GET_A2D_VALS = 0x033c
PROT_CMD_POLESTAR_GET_OPMODE = 0x033d
PROT_CMD_POLESTAR_SET_BACKLIGHT = 0x033e
PROT_CMD_POLESTAR_READ_FIFO_PAGE = 0x033f
PROT_CMD_POLESTAR_GET_CURRENT_SCREEN_INDEX = 0x0340
PROT_CMD_POLESTAR_GET_IDENTITY = 0x0341
PROT_CMD_POLESTAR_GET_SUPPORTED_COMMANDS = 0x0342
PROT_CMD_POLESTAR_PAIRING_START = 0x0343
PROT_CMD_POLESTAR_PAIRING_STATUS = 0x0344
PROT_CMD_POLESTAR_PRODUCT_RESET = 0x0345
PROT_CMD_POLESTAR_PLC_CMD_EXECUTE = 0x0346
PROT_CMD_POLESTAR_GET_STATUS = 0x0347
PROT_CMD_POLESTAR_FIRE_SAFETY_LOCK_MASTER = 0x0348
PROT_CMD_POLESTAR_FIRE_SAFETY_LOCK_SLAVE = 0x0349
PROT_CMD_POLESTAR_FIRE_SAFETY_REPORT = 0x034a
PROT_CMD_POLESTAR_UART_BRIDGE_INIT = 0x034b
PROT_CMD_POLESTAR_SEND_UART_DATA = 0x034c
PROT_CMD_POLESTAR_LED_TEST = 0x034d
PROT_CMD_POLESTAR_SEND_FAKE_TELEMS = 0x034e
PROT_RESP_POLESTAR_RTC_SET = 0x0380
PROT_RESP_POLESTAR_MAC_ADDR_GET = 0x0381
PROT_RESP_POLESTAR_IP_ADDR_GET = 0x0382
PROT_RESP_POLESTAR_SEND_PING = 0x0383
PROT_RESP_POLESTAR_ETHERNET_STAT = 0x0384
PROT_RESP_POLESTAR_GET_FIFO_FLASH_INFO = 0x0385
PROT_RESP_POLESTAR_RS485_MSTR_SLV_DET_STATUS = 0x0386
PROT_RESP_POLESTAR_TCP_TEST_RESP = 0x0387
PROT_RESP_POLESTAR_GET_POK_STATUS = 0x0388
PROT_RESP_POLESTAR_INVERTER_HW_RESET = 0x0389
PROT_RESP_POLESTAR_GET_ALL_SUPPORTED_LANGUAGES_INDEXES = 0x038a
PROT_RESP_POLESTAR_GET_ALL_SUPPORTED_GSM_MODEMS_INDEXES = 0x038b
PROT_RESP_POLESTAR_GET_S_OK_STATUS = 0x038c
PROT_RESP_POLESTAR_GET_ENERGY_STATISTICS_STATUS = 0x038d
PROT_RESP_POLESTAR_GET_GSM_PRESENT_STATUS = 0x038e
PROT_RESP_POLESTAR_GEMINI_RS485_MSTR_SLV_DET_STATUS = 0x038f
PROT_RESP_POLESTAR_GET_GEMINI_GFD_STATUS = 0x0390
PROT_RESP_POLESTAR_GET_ERROR_LOG = 0x0391
PROT_RESP_POLESTAR_GET_SERVER_CONTROL_STATUS = 0x0392
PROT_RESP_POLESTAR_GET_WARNING_LOG = 0x0393
PROT_RESP_POLESTAR_READ_LAST_BUTTONS = 0x0394
PROT_RESP_POLESTAR_GET_STATISTICS_ELEMENT = 0x0395
PROT_RESP_POLESTAR_GET_WIFI_PRESENT_STATUS = 0x0396
PROT_RESP_POLESTAR_GET_PORT_EXPANDER_GPIO_DATA = 0x0397
PROT_RESP_POLESTAR_READ_LCD = 0x0398
PROT_RESP_POLESTAR_MODBUS_SLAVE_PACKET = 0x0399
PROT_RESP_POLESTAR_MASTER_GRANT_ACK = 0x039a
PROT_RESP_POLESTAR_GET_IDENTITY = 0x039b
PROT_RESP_POLESTAR_GET_SUPPORTED_COMMANDS = 0x039c
PROT_RESP_POLESTAR_PAIRING_START = 0x039d
PROT_RESP_POLESTAR_PAIRING_STATUS = 0x039e
PROT_RESP_POLESTAR_GET_STATUS = 0x039f
PROT_RESP_POLESTAR_FIRE_SAFETY_REPORT = 0x03a0
PROT_RESP_POLESTAR_SEND_UART_DATA = 0x03a1
PROT_CMD_SUNTRACER_READ_FLASH = 0x0400
PROT_CMD_SUNTRACER_START = 0x0401
PROT_CMD_SUNTRACER_SET_RTC = 0x0402
PROT_CMD_SUNTRACER_DEL_FLASH = 0x0403
PROT_CMD_SUNTRACER_DEL_FLASH_SECTOR = 0x0404
PROT_RESP_SUNTRACER_TRACE = 0x0480
PROT_RESP_SUNTRACER_FLASH = 0x0481
PROT_CMD_SERVER_POST_DATA = 0x0500
PROT_CMD_SERVER_GET_GMT = 0x0501
PROT_CMD_SERVER_GET_NAME = 0x0502
PROT_RESP_SERVER_GMT = 0x0580
PROT_RESP_SERVER_NAME = 0x0581
PROT_RESP_CONFTOOL_PLC_DATA = 0x0680
PROT_CMD_JUPMNGR_READ_JUPPWR_MEAS1 = 0x0800
PROT_CMD_JUPMNGR_READ_JUPPWR_MEAS2 = 0x0801
PROT_CMD_JUPMNGR_READ_JUPPWR_MEAS3 = 0x0802
PROT_CMD_JUPMNGR_READ_JUPPWR_MEAS4 = 0x0803
PROT_CMD_JUPMNGR_READ_JUPPWR_MEAS5 = 0x0804
PROT_CMD_JUPMNGR_READ_MEAS = 0x0805
PROT_CMD_JUPMNGR_GET_SYS_STATUS = 0x0806
PROT_CMD_JUPMNGR_GET_TELEM = 0x0807
PROT_CMD_JUPMNGR_GET_COUNTRY_CODE = 0x0808
PROT_CMD_JUPMNGR_SET_COUNTRY = 0x0809
PROT_CMD_JUPMNGR_GET_COUNTRY_DEFAULTS = 0x080a
PROT_CMD_JUPMNGR_PRIVILEGED_MODE = 0x080b
PROT_CMD_JUPMNGR_PRIVILEGED_SET_PARAM = 0x080c
PROT_CMD_JUPMNGR_PRIVILEGED_GET_EVENT = 0x080d
PROT_CMD_JUPMNGR_PRIVILEGED_GET_STATUS = 0x080e
PROT_CMD_JUPMNGR_SET_PRODUCT_MODEL = 0x080f
PROT_CMD_JUPMNGR_GET_PRODUCT_MODEL = 0x0810
PROT_CMD_JUPMNGR_DYNAMIC_SET_INVPWR_PARAM = 0x0811
PROT_CMD_JUPMNGR_GET_INVPWR_PARAM_TYPE = 0x0812
PROT_CMD_JUPMNGR_GET_FANS_STATUS = 0x0813
PROT_RESP_JUPMNGR_READ_JUPPWR_MEAS1 = 0x0880
PROT_RESP_JUPMNGR_READ_JUPPWR_MEAS2 = 0x0881
PROT_RESP_JUPMNGR_READ_JUPPWR_MEAS3 = 0x0882
PROT_RESP_JUPMNGR_READ_JUPPWR_MEAS4 = 0x0883
PROT_RESP_JUPMNGR_READ_JUPPWR_MEAS5 = 0x0884
PROT_RESP_JUPMNGR_READ_MEAS = 0x0885
PROT_RESP_JUPMNGR_GET_SYS_STATUS = 0x0886
PROT_RESP_JUPMNGR_GET_TELEM = 0x0887
PROT_RESP_JUPMNGR_GET_COUNTRY_CODE = 0x0888
PROT_RESP_JUPMNGR_GET_COUNTRY_DEFAULTS = 0x0889
PROT_RESP_JUPMNGR_PRIVILEGED_GET_EVENT = 0x088a
PROT_RESP_JUPMNGR_PRIVILEGED_GET_STATUS = 0x088b
PROT_RESP_JUPMNGR_GET_PRODUCT_MODEL = 0x088c
PROT_RESP_JUPMNGR_GET_INVPWR_PARAM_TYPE = 0x088d
PROT_RESP_JUPMNGR_GET_FANS_STATUS = 0x088e
PROT_CMD_INVERTER_TURN_15V_ON = 0x0900
PROT_CMD_INVERTER_TURN_15V_OFF = 0x0901
PROT_CMD_INVERTER_ENABLE_RELAYS = 0x0902
PROT_CMD_INVERTER_DISABLE_RELAYS = 0x0903
PROT_CMD_INVERTER_DYNAMIC_POWER_LIMIT = 0x0904
PROT_CMD_INVERTER_IVTRACE_START = 0x0905
PROT_CMD_INVERTER_GRID_TRIP_TEST = 0x0906
PROT_CMD_INVERTER_SET_LMVGC_PARAMS1 = 0x0907
PROT_CMD_INVERTER_GET_LMVGC_PARAMS1 = 0x0908
PROT_CMD_INVERTER_SET_PWR_GAIN_PARAMS = 0x0909
PROT_CMD_INVERTER_SET_LMVGC_PARAMS2 = 0x090a
PROT_CMD_INVERTER_GET_LMVGC_PARAMS2 = 0x090b
PROT_CMD_INVERTER_SET_LMVGC_PARAMS3 = 0x090c
PROT_CMD_INVERTER_GET_LMVGC_PARAMS3 = 0x090d
PROT_CMD_INVERTER_LOCK_IN = 0x090e
PROT_CMD_INVERTER_LOCK_OUT = 0x090f
PROT_CMD_INVERTER_GET_VDC = 0x0910
PROT_CMD_INVERTER_PAIRING_DO_NOTHING = 0x0911
PROT_CMD_INVERTER_PAIRING_DO_SAFETY = 0x0912
PROT_RESP_INVERTER_DYNAMIC_POWER_LIMIT = 0x0980
PROT_RESP_INVERTER_GET_LMVGC_PARAMS = 0x0981
PROT_CMD_VEGA_READ_MEAS = 0x0a00
PROT_CMD_VEGA_GET_SYS_STATUS = 0x0a01
PROT_CMD_VEGA_GET_TELEM = 0x0a02
PROT_CMD_VEGA_GET_MAX_VDC_VALUE = 0x0a03
PROT_CMD_VEGA_SET_MAX_VDC_VALUE = 0x0a04
PROT_CMD_VEGA_RELAY_SET = 0x0a05
PROT_CMD_VEGA_SET_OPMODE = 0x0a06
PROT_CMD_VEGA_GET_OPMODE = 0x0a07
PROT_CMD_VEGA_SET_RANGE = 0x0a08
PROT_RESP_VEGA_READ_MEAS = 0x0a80
PROT_RESP_VEGA_GET_SYS_STATUS = 0x0a81
PROT_RESP_VEGA_GET_TELEM = 0x0a82
PROT_RESP_VEGA_GET_MAX_VDC_VALUE = 0x0a83
PROT_CMD_COMBI_PAUSE_MONITORING = 0x0b00
PROT_CMD_COMBI_SET_TIME_STAMP = 0x0b01
PROT_CMD_COMBI_RCD_CALIBRATION = 0x0b02
PROT_CMD_COMBI_GET_TELEM = 0x0b03
PROT_CMD_COMBI_FORCE_TELEM = 0x0b04
PROT_CMD_COMBI_SWITCHES_CONNECT = 0x0b05
PROT_CMD_COMBI_SWITCHES_DISCONNECT = 0x0b06
PROT_CMD_COMBI_SWITCHES_CONNECT_ALL = 0x0b07
PROT_CMD_COMBI_SWITCHES_DISCONNECT_ALL = 0x0b08
PROT_CMD_COMBI_RCD_TEST_EXECUTE = 0x0b09
PROT_CMD_COMBI_RELAYS_TEST_EXECUTE = 0x0b0a
PROT_CMD_COMBI_GET_COMBISTRING_PARAM = 0x0b0b
PROT_CMD_COMBI_SET_COMBISTRING_PARAM = 0x0b0c
PROT_CMD_COMBI_GET_ALL_COMBISTRING_PARAMS = 0x0b0d
PROT_CMD_COMBI_GET_ALL_COMBI_PARAMS = 0x0b0e
PROT_CMD_COMBI_READ_MEASUREMENTS = 0x0b0f
PROT_CMD_COMBI_GET_STRING_STATUS = 0x0b10
PROT_CMD_COMBI_GET_COMBI_STATUS = 0x0b11
PROT_CMD_COMBI_GET_ACTIVE_STRINGS = 0x0b12
PROT_CMD_COMBI_FWD_STRING_TELEM = 0x0b13
PROT_CMD_COMBI_FWD_COMBI_TELEM = 0x0b14
PROT_CMD_COMBI_GET_UNIFIED_STRING_STATUS = 0x0b15
PROT_CMD_COMBI_GET_UNIFIED_COMBI_STATUS = 0x0b16
PROT_CMD_COMBI_CHECK_INNER_PROTOCOL = 0x0b17
PROT_CMD_COMBI_SWITCHES_CONNECT_RELAY = 0x0b18
PROT_CMD_COMBI_SWITCHES_DISCONNECT_RELAY = 0x0b19
PROT_CMD_COMBI_GET_GEMINI_STRING_IDS = 0x0b1a
PROT_CMD_COMBI_GET_ALL_SWITCHES_STATUS = 0x0b1b
PROT_CMD_COMBI_SET_RCD_TEST_PIN = 0x0b1c
PROT_CMD_COMBI_RELAYS_TEST_CHECK_CONDS = 0x0b1d
PROT_RESP_COMBI_GET_TELEM = 0x0b80
PROT_RESP_COMBI_GET_STRING_STATUS = 0x0b81
PROT_RESP_COMBI_GET_COMBI_STATUS = 0x0b82
PROT_RESP_COMBI_GET_ACTIVE_STRINGS = 0x0b83
PROT_RESP_COMBI_GET_UNIFIED_STRING_STATUS = 0x0b84
PROT_RESP_COMBI_GET_UNIFIED_COMBI_STATUS = 0x0b85
PROT_RESP_COMBI_GET_GEMINI_STRING_IDS = 0x0b86
PROT_CMD_INVPWR_GET_ERROR_STATUS = 0x0c00
PROT_CMD_INVPWR_GET_STATUS = 0x0c01
PROT_CMD_INVPWR_GO = 0x0c02
PROT_CMD_INVPWR_HALT = 0x0c03
PROT_CMD_INVPWR_CONST_DUTY_CYCLE = 0x0c04
PROT_CMD_INVPWR_DUMY_ERROR = 0x0c05
PROT_CMD_INVPWR_PAIRING_SET_STATE = 0x0c06
PROT_CMD_INVPWR_TEST_IAC_CONTROL = 0x0c07
PROT_RESP_INVPWR_GET_ERROR_STATUS = 0x0c80
PROT_RESP_INVPWR_GET_STATUS = 0x0c81
PROT_RESP_INVPWR_GO = 0x0c82
PROT_RESP_INVPWR_HALT = 0x0c83
PROT_RESP_INVPWR_CONST_DUTY_CYCLE = 0x0c84
PROT_RESP_INVPWR_DUMY_ERROR = 0x0c85
PROD_CMD_BOOTLOADER_SECURE = 0x1400
PROT_CMD_BOOTLOADER_UNSECURE = 0x1401
PROT_CMD_ACTIVATOR_ACTIVATE = 0x1500
PROT_CMD_ACTIVATOR_GET_ADC_SAMPLES = 0x1501
PROT_CMD_ACTIVATOR_SET_VO_RANGE = 0x1502
PROT_CMD_ACTIVATOR_GET_AVG_SAMPLES = 0x1503
PROT_CMD_ACTIVATOR_TX_TEST = 0x1504
PROT_CMD_ACTIVATOR_LCD_TEST = 0x1505
PROT_CMD_ACTIVATOR_BUTTONS_TEST = 0x1506
PROT_CMD_FANCONTROL_SET_PWM = 0x1600
PROT_CMD_FANCONTROL_GET_PWM = 0x1601
PROT_CMD_FANCONTROL_GET_ALL_PWM = 0x1602
PROT_CMD_FANCONTROL_SHUT_ALL_PWM = 0x1603
PROT_CMD_FANCONTROL_RES = 0x1680
PROT_CMD_DISPLAY_BOARD_LCD_WRITE = 0x1700
PROT_CMD_DISPLAY_BOARD_LED_SET = 0x1701
# function to code dictionary
function2code = {
"PROT_CMD_PARAMS_RESET": 0x0010,
"PROT_CMD_PARAMS_SET_SINGLE": 0x0011,
"PROT_CMD_PARAMS_GET_SINGLE": 0x0012,
"PROT_CMD_PARAMS_GET_INFO": 0x0013,
"PROT_CMD_PARAMS_GET_NAME": 0x0014,
"PROT_CMD_PARAMS_GET_NUM": 0x0015,
"PROT_CMD_PARAMS_GET_ALL": 0x0016,
"PROT_CMD_PARAMS_SET_ALL": 0x0017,
"PROT_CMD_PARAMS_SET_SINGLE_NOSAVE": 0x0018,
"PROT_CMD_PARAMS_SAVE": 0x0019,
"PROT_CMD_PARAMS_POLICY_ENABLE": 0x001a,
"PROT_CMD_PARAMS_POLICY_DISABLE": 0x001b,
"PROT_CMD_PARAMS_POLICY_DISABLE_VOLATILE": 0x001c,
"PROT_CMD_PARAMS_SET_POLICY_PASSWORD": 0x001d,
"PROT_CMD_PARAMS_GET_VOLATILE": 0x001e,
"PROT_CMD_PARAMS_SET_VOLATILE": 0x001f,
"PROT_CMD_UPGRADE_START": 0x0020,
"PROT_CMD_UPGRADE_WRITE": 0x0021,
"PROT_CMD_UPGRADE_FINISH": 0x0022,
"PROT_CMD_UPGRADE_READ_DATA": 0x0023,
"PROT_CMD_UPGRADE_READ_SIZE": 0x0024,
"PROT_CMD_MISC_RESET": 0x0030,
"PROT_CMD_MISC_STOP": 0x0031,
"PROT_CMD_MISC_DUMMY": 0x0032,
"PROT_CMD_MISC_GET_VER": 0x0033,
"PROT_CMD_MISC_GET_TYPE": 0x0034,
"PROT_CMD_MISC_PAYLOAD": 0x0035,
"PROT_CMD_MISC_SET_ID": 0x0036,
"PROT_CMD_MISC_READ_MEMORY": 0x0037,
"PROT_CMD_MISC_PARAMS_PARTIAL_RESET": 0x0038,
"PROT_CMD_MISC_GET_MAX_PACKET_SIZE": 0x0039,
"PROT_CMD_PARAMS_SMART_LOAD_PARAMS": 0x0040,
"PROT_CMD_MISC_PARAMS_PARTIAL_RESET2": 0x0041,
"PROT_CMD_PARAMS_IGNORE_PARAMS_LIST": 0x0042,
"PROT_CMD_PARAMS_PARTIAL_RESET_AS_LEVEL": 0x0043,
"PROT_CMD_PARAMS_PARTIAL_RESET_PCB_LEVEL": 0x0044,
"PROT_RESP_ACK": 0x0080,
"PROT_RESP_NACK": 0x0081,
"PROT_RESP_PARAMS_SINGLE": 0x0090,
"PROT_RESP_PARAMS_INFO": 0x0091,
"PROT_RESP_PARAMS_NAME": 0x0092,
"PROT_RESP_PARAMS_NUM": 0x0093,
"PROT_RESP_PARAMS_ALL": 0x0094,
"PROT_RESP_PARAMS_INCORRECT_PASSWORD": 0x0095,
"PROT_RESP_UPGRADE_DATA": 0x00a0,
"PROT_RESP_UPGRADE_SIZE": 0x00a1,
"PROT_RESP_MISC_GET_VER": 0x00b0,
"PROT_RESP_MISC_GET_TYPE": 0x00b1,
"PROT_RESP_MISC_PAYLOAD": 0x00b2,
"PROT_RESP_MISC_READ_MEMORY": 0x00b3,
"PROT_RESP_MISC_GET_MAX_PACKET_SIZE": 0x00b4,
"PROT_CMD_MERCURY_PWM_SET": 0x0100,
"PROT_CMD_MERCURY_PWM_ENABLE": 0x0101,
"PROT_CMD_MERCURY_A2D_SAMPLE": 0x0102,
"PROT_CMD_MERCURY_KA": 0x0103,
"PROT_CMD_MERCURY_SET_VIREF": 0x0104,
"PROT_CMD_MERCURY_SET_VOMAXREF": 0x0105,
"PROT_CMD_MERCURY_SET_VOMINREF": 0x0106,
"PROT_CMD_MERCURY_READ_MEAS": 0x0107,
"PROT_CMD_MERCURY_CLOSED_LOOP_START": 0x0108,
"PROT_CMD_MERCURY_OPEN_LOOP_START": 0x0109,
"PROT_CMD_MERCURY_OPEN_LOOP_SET": 0x010a,
"PROT_CMD_MERCURY_SET_12V_10V": 0x010b,
"PROT_CMD_MERCURY_SET_5V_35V": 0x010c,
"PROT_CMD_MERCURY_SET_VO_RANGE": 0x010d,
"PROT_CMD_MERCURY_START_MPPT": 0x010e,
"PROT_CMD_MERCURY_TX_ENABLE": 0x010f,
"PROT_CMD_MERCURY_TX_TEST": 0x0110,
"PROT_CMD_MERCURY_RX_TEST": 0x0111,
"PROT_CMD_MERCURY_FORCE_TELEM": 0x0112,
"PROT_CMD_MERCURY_READ_SAMPLES_DIRECT": 0x0113,
"PROT_CMD_MERCURY_SET_OTP_BLOCK": 0x0114,
"PROT_CMD_MERCURY_SET_CAL_MODE": 0x0115,
"PROT_CMD_MERCURY_SET_VI_RANGE": 0x0116,
"PROT_CMD_MERCURY_AVG_SAMPLE": 0x0117,
"PROT_CMD_MERCURY_GET_TELEM": 0x0118,
"PROT_CMD_MERCURY_DISABLE_PROTECTION": 0x0119,
"PROT_CMD_MERCURY_BYPASS_MODE": 0x011a,
"PROT_CMD_MERCURY_SET_TEMP_CAL_PIN": 0x011b,
"PROT_CMD_MERCURY_SAVE_VOLATILE": 0x011c,
"PROT_CMD_MERCURY_BBB_MODE": 0x011d,
"PROT_CMD_MERCURY_GET_REG": 0x011e,
"PROT_CMD_MERCURY_SET_RES_CIRC_GPIOS": 0x011f,
"PROT_CMD_MERCURY_GET_SNR": 0x0120,
"PROT_CMD_MERCURY_GET_LOOP_MODE": 0x0121,
"PROT_CMD_MERCURY_SET_REG": 0x0122,
"PROT_CMD_MERCURY_DFT": 0x0123,
"PROT_CMD_MERCURY_SET_COMM_SW": 0x0124,
"PROT_CMD_MERCURY_GET_SPI_SAMPLES": 0x0125,
"PROT_CMD_MERCURY_SET_DT": 0x0126,
"PROT_CMD_MERCURY_GET_DFT_AVG": 0x0127,
"PROT_CMD_MERCURY_CONTROL_TEST": 0x0128,
"PROT_CMD_MERCURY_GET_STATUS_REG": 0x0129,
"PROT_CMD_MERCURY_RESET_STATUS_REG": 0x012a,
"PROT_CMD_MERCURY_SET_DPWM_FREQ": 0x012b,
"PROT_RESP_MERCURY_SAMPLES": 0x0180,
"PROT_RESP_MERCURY_MON": 0x0181,
"PROT_RESP_MERCURY_TELEM": 0x0182,
"PROT_RESP_MERCURY_MEAS": 0x0183,
"PROT_RESP_MERCURY_RX_TEST_RES": 0x0184,
"PROT_RESP_MERCURY_SAMPLES_DIRECT": 0x0185,
"PROT_RESP_MERCURY_AVG_SAMPLE": 0x0186,
"PROT_RESP_MERCURY_GET_TELEM": 0x0187,
"PROT_RESP_MERCURY_CONTROL_TEST": 0x0188,
"PROT_CMD_VENUSMNGR_READ_ISE_MEAS1": 0x0200,
"PROT_CMD_VENUSMNGR_READ_ISE_MEAS2": 0x0201,
"PROT_CMD_VENUSMNGR_READ_SE_MEAS": 0x0202,
"PROT_CMD_VENUSMNGR_START_INVERTER": 0x0203,
"PROT_CMD_VENUSMNGR_ISE_DUTY_CYCLE": 0x0204,
"PROT_CMD_VENUSMNGR_GET_SYS_STATUS": 0x0205,
"PROT_CMD_VENUSMNGR_GET_TELEM": 0x0206,
"PROT_CMD_VENUSMNGR_RX_TEST_INIT": 0x0207,
"PROT_CMD_VENUSMNGR_RX_TEST": 0x0208,
"PROT_CMD_VENUSMNGR_TX_TEST_START": 0x0209,
"PROT_CMD_VENUSMNGR_TX_TEST_STOP": 0x020a,
"PROT_CMD_VENUSMNGR_SET_TX_ENABLE": 0x020b,
"PROT_CMD_VENUSMNGR_ENABLE_ISE_WD": 0x020c,
"PROT_CMD_VENUSMNGR_DISABLE_ISE_WD": 0x020d,
"PROT_CMD_VENUSMNGR_GET_COUNTRY_CODE": 0x020e,
"PROT_CMD_VENUSMNGR_SET_COUNTRY": 0x020f,
"PROT_CMD_VENUSMNGR_PRIVILEGED_MODE": 0x0210,
"PROT_CMD_VENUSMNGR_PRIVILEGED_SET_PARAM": 0x0211,
"PROT_CMD_VENUSMNGR_PRIVILEGED_GET_EVENT": 0x0212,
"PROT_CMD_VENUSMNGR_PRIVILEGED_GET_STATUS": 0x0213,
"PROT_CMD_VENUSMNGR_CURRENT_MODEM_START": 0x0214,
"PROT_CMD_VENUSMNGR_CURRENT_MODEM_SEND": 0x0215,
"PROT_CMD_VENUSMNGR_CURRENT_MODEM_SEND_PAIRING": 0x0216,
"PROT_CMD_VENUSMNGR_CURRENT_MODEM_GET_STATUS": 0x0217,
"PROT_CMD_VENUSMNGR_KA_DATA_SEND": 0x0218,
"PROT_CMD_VENUSMNGR_CURRENT_MODEM_END_PAIRING": 0x0219,
"PROT_CMD_VENUSMNGR_FORCE_GRID_MON": 0x021a,
"PROT_CMD_VENUSMNGR_FORCE_SKIP_GRID_MON": 0x021b,
"PROT_CMD_VENUSMNGR_START_SUPERVISE": 0x021c,
"PROT_CMD_VENUSMNGR_READ_A2D_MEAS": 0x021d,
"PROT_CMD_VENUSMNGR_GET_COUNTRY_DEFAULTS": 0x021e,
"PROT_CMD_VENUSMNGR_SET_PRODUCT_MODEL": 0x021f,
"PROT_CMD_VENUSMNGR_GET_PRODUCT_MODEL": 0x0220,
"PROT_CMD_VENUSMNGR_SET_DYNAMIC_INVPWR_PARAM": 0x0221,
"PROT_CMD_INVERTER_ENTER_BURN_INVPWR_MODE": 0x0222,
"PROT_CMD_VENUSMNGR_MPPT_TRAVEL": 0x0223,
"PROT_CMD_VENUSMNGR_SET_PWR_PARAM": 0x0224,
"PROT_CMD_INVERTER_CURRENT_MODEM_SET_DATA_BIT": 0x0225,
"PROT_RESP_VENUSMNGR_READ_ISE_MEAS1": 0x0280,
"PROT_RESP_VENUSMNGR_READ_ISE_MEAS2": 0x0281,
"PROT_RESP_VENUSMNGR_READ_SE_MEAS": 0x0282,
"PROT_RESP_VENUSMNGR_GET_SYS_STATUS": 0x0283,
"PROT_RESP_VENUSMNGR_GET_TELEM": 0x0284,
"PROT_RESP_VENUSMNGR_RX_TEST": 0x0285,
"PROT_RESP_VENUSMNGR_GET_COUNTRY_CODE": 0x0286,
"PROT_RESP_VENUSMNGR_PRIVILEGED_GET_EVENT": 0x0287,
"PROT_RESP_VENUSMNGR_PRIVILEGED_GET_STATUS": 0x0288,
"PROT_RESP_VENUSMNGR_CURRENT_MODEM_GET_STATUS": 0x0289,
"PROT_RESP_VENUSMNGR_READ_A2D_MEAS": 0x028a,
"PROT_RESP_VENUSMNGR_GET_COUNTRY_DEFAULTS": 0x028b,
"PROT_RESP_VENUSMNGR_GET_PRODUCT_MODEL": 0x028c,
"PROT_RESP_VENUSMNGR_SET_DYNAMIC_ISE_PARAM": 0x028d,
"PROT_CMD_POLESTAR_TELEMS_START": 0x0300,
"PROT_CMD_POLESTAR_TELEMS_STOP": 0x0301,
"PROT_CMD_POLESTAR_MASTER_GRANT": 0x0302,
"PROT_CMD_POLESTAR_RTC_SET": 0x0303,
"PROT_CMD_POLESTAR_TEST_RAM": 0x0304,
"PROT_CMD_POLESTAR_TEST_FLASH": 0x0305,
"PROT_CMD_POLESTAR_MAC_ADDR_GET": 0x0306,
"PROT_CMD_POLESTAR_IP_ADDR_GET": 0x0307,
"PROT_CMD_POLESTAR_SLAVE_ID_DETECT_INIT": 0x0308,
"PROT_CMD_POLESTAR_SLAVE_ID_DETECT_GET_ID": 0x0309,
"PROT_CMD_POLESTAR_SLAVE_ID_DETECT_STOP": 0x030a,
"PROT_CMD_POLESTAR_UART_ZB_BRIDGE": 0x030b,
"PROT_CMD_POLESTAR_SEND_PING": 0x030c,
"PROT_CMD_POLESTAR_LCD_TEST_MODE": 0x030d,
"PROT_CMD_POLESTAR_CONFTOOL_START": 0x030e,
"PROT_CMD_POLESTAR_ETHERNET_STAT": 0x030f,
"PROT_CMD_POLESTAR_GET_FIFO_FLASH_INFO": 0x0310,
"PROT_CMD_POLESTAR_RESET_FIFO_FLASH": 0x0311,
"PROT_CMD_POLESTAR_RESET_FLASH": 0x0312,
"PROT_CMD_POLESTAR_RS485_MSTR_SLV_DET_START": 0x0313,
"PROT_CMD_POLESTAR_RS485_MSTR_SLV_DET_STATUS": 0x0314,
"PROT_CMD_POLESTAR_UART_ZB_SET": 0x0315,
"PROT_CMD_POLESTAR_TCP_TEST": 0x0316,
"PROT_CMD_POLESTAR_TIMER_ADVANCE": 0x0317,
"PROT_CMD_POLESTAR_ERASE_FLASH_FIFO_FAST": 0x0318,
"PROT_CMD_POLESTAR_SELF_KA": 0x0319,
"PROT_CMD_POLESTAR_ISE_BRIDGE": 0x031a,
"PROT_CMD_POLESTAR_ERASE_STATISTICS": 0x031b,
"PROT_CMD_POLESTAR_GET_POK_STATUS": 0x031c,
"PROT_CMD_POLESTAR_INVERTER_HW_RESET": 0x031d,
"PROT_CMD_POLESTAR_ZB_PRESENT_STATUS": 0x031e,
"PROT_CMD_POLESTAR_GET_ALL_SUPPORTED_LANGUAGES_INDEXES": 0x031f,
"PROT_CMD_POLESTAR_GET_ALL_SUPPORTED_GSM_MODEMS_INDEXES": 0x0320,
"PROT_CMD_POLESTAR_GET_S_OK_STATUS": 0x0321,
"PROT_CMD_POLESTAR_GET_ENERGY_STATISTICS_STATUS": 0x0322,
"PROT_CMD_POLESTAR_GET_GSM_PRESENT_STATUS": 0x0323,
"PROT_CMD_POLESTAR_SET_STATISTICS_ELEMENT": 0x0324,
"PROT_CMD_POLESTAR_GEMINI_RS485_MSTR_SLV_DET_START": 0x0325,
"PROT_CMD_POLESTAR_GEMINI_RS485_MSTR_SLV_DET_STATUS": 0x0326,
"PROT_CMD_POLESTAR_GET_GEMINI_GFD_STATUS": 0x0327,
"PROT_CMD_POLESTAR_GET_ERROR_LOG": 0x0328,
"PROT_CMD_POLESTAR_BLOCK_SERVER_CONTROL": 0x0329,
"PROT_CMD_POLESTAR_GET_SERVER_CONTROL_STATUS": 0x032a,
"PROT_CMD_POLESTAR_TEST_SD_FLASH": 0x032b,
"PROT_CMD_POLESTAR_GET_WARNING_LOG": 0x032c,
"PROT_CMD_POLESTAR_RESET_MODBUS_DEVICE_DATA": 0x032d,
"PROT_CMD_POLESTAR_TURN_OFF_INTERNAL_SRAM_BATTERY_BACKUP": 0x032e,
"PROT_CMD_POLESTAR_WRITE_LCD": 0x032f,
"PROT_CMD_POLESTAR_READ_LAST_BUTTONS": 0x0330,
"PROT_CMD_POLESTAR_GET_STATISTICS_ELEMENT": 0x0331,
"PROT_CMD_POLESTAR_SEND_POWER_REDUCER_SLAVE_PACKET": 0x0332,
"PROT_CMD_POLESTAR_SEND_POWER_REDUCER_MASTER_PACKET": 0x0333,
"PROT_CMD_POLESTAR_GET_WIFI_PRESENT_STATUS": 0x0334,
"PROT_CMD_POLESTAR_GET_PORT_EXPANDER_GPIO_DATA": 0x0335,
"PROT_CMD_POLESTAR_SET_PORT_EXPANDER_GPIO_DATA": 0x0336,
"PROT_CMD_POLESTAR_READ_LCD": 0x0337,
"PROT_CMD_POLESTAR_SIMULATE_BUTTON_PRESSING": 0x0338,
"PROT_CMD_POLESTAR_INV_ACTIVATE": 0x0339,
"PROT_CMD_POLESTAR_MODBUS_SLAVE_PACKET": 0x033a,
"PROT_CMD_POLESTAR_GET_BUTTON_STATE": 0x033b,
"PROT_CMD_POLESTAR_GET_A2D_VALS": 0x033c,
"PROT_CMD_POLESTAR_GET_OPMODE": 0x033d,
"PROT_CMD_POLESTAR_SET_BACKLIGHT": 0x033e,
"PROT_CMD_POLESTAR_READ_FIFO_PAGE": 0x033f,
"PROT_CMD_POLESTAR_GET_CURRENT_SCREEN_INDEX": 0x0340,
"PROT_CMD_POLESTAR_GET_IDENTITY": 0x0341,
"PROT_CMD_POLESTAR_GET_SUPPORTED_COMMANDS": 0x0342,
"PROT_CMD_POLESTAR_PAIRING_START": 0x0343,
"PROT_CMD_POLESTAR_PAIRING_STATUS": 0x0344,
"PROT_CMD_POLESTAR_PRODUCT_RESET": 0x0345,
"PROT_CMD_POLESTAR_PLC_CMD_EXECUTE": 0x0346,
"PROT_CMD_POLESTAR_GET_STATUS": 0x0347,
"PROT_CMD_POLESTAR_FIRE_SAFETY_LOCK_MASTER": 0x0348,
"PROT_CMD_POLESTAR_FIRE_SAFETY_LOCK_SLAVE": 0x0349,
"PROT_CMD_POLESTAR_FIRE_SAFETY_REPORT": 0x034a,
"PROT_CMD_POLESTAR_UART_BRIDGE_INIT": 0x034b,
"PROT_CMD_POLESTAR_SEND_UART_DATA": 0x034c,
"PROT_CMD_POLESTAR_LED_TEST": 0x034d,
"PROT_CMD_POLESTAR_SEND_FAKE_TELEMS": 0x034e,
"PROT_RESP_POLESTAR_RTC_SET": 0x0380,
"PROT_RESP_POLESTAR_MAC_ADDR_GET": 0x0381,
"PROT_RESP_POLESTAR_IP_ADDR_GET": 0x0382,
"PROT_RESP_POLESTAR_SEND_PING": 0x0383,
"PROT_RESP_POLESTAR_ETHERNET_STAT": 0x0384,
"PROT_RESP_POLESTAR_GET_FIFO_FLASH_INFO": 0x0385,
"PROT_RESP_POLESTAR_RS485_MSTR_SLV_DET_STATUS": 0x0386,
"PROT_RESP_POLESTAR_TCP_TEST_RESP": 0x0387,
"PROT_RESP_POLESTAR_GET_POK_STATUS": 0x0388,
"PROT_RESP_POLESTAR_INVERTER_HW_RESET": 0x0389,
"PROT_RESP_POLESTAR_GET_ALL_SUPPORTED_LANGUAGES_INDEXES": 0x038a,
"PROT_RESP_POLESTAR_GET_ALL_SUPPORTED_GSM_MODEMS_INDEXES": 0x038b,
"PROT_RESP_POLESTAR_GET_S_OK_STATUS": 0x038c,
"PROT_RESP_POLESTAR_GET_ENERGY_STATISTICS_STATUS": 0x038d,
"PROT_RESP_POLESTAR_GET_GSM_PRESENT_STATUS": 0x038e,
"PROT_RESP_POLESTAR_GEMINI_RS485_MSTR_SLV_DET_STATUS": 0x038f,
"PROT_RESP_POLESTAR_GET_GEMINI_GFD_STATUS": 0x0390,
"PROT_RESP_POLESTAR_GET_ERROR_LOG": 0x0391,
"PROT_RESP_POLESTAR_GET_SERVER_CONTROL_STATUS": 0x0392,
"PROT_RESP_POLESTAR_GET_WARNING_LOG": 0x0393,
"PROT_RESP_POLESTAR_READ_LAST_BUTTONS": 0x0394,
"PROT_RESP_POLESTAR_GET_STATISTICS_ELEMENT": 0x0395,
"PROT_RESP_POLESTAR_GET_WIFI_PRESENT_STATUS": 0x0396,
"PROT_RESP_POLESTAR_GET_PORT_EXPANDER_GPIO_DATA": 0x0397,
"PROT_RESP_POLESTAR_READ_LCD": 0x0398,
"PROT_RESP_POLESTAR_MODBUS_SLAVE_PACKET": 0x0399,
"PROT_RESP_POLESTAR_MASTER_GRANT_ACK": 0x039a,
"PROT_RESP_POLESTAR_GET_IDENTITY": 0x039b,
"PROT_RESP_POLESTAR_GET_SUPPORTED_COMMANDS": 0x039c,
"PROT_RESP_POLESTAR_PAIRING_START": 0x039d,
"PROT_RESP_POLESTAR_PAIRING_STATUS": 0x039e,
"PROT_RESP_POLESTAR_GET_STATUS": 0x039f,
"PROT_RESP_POLESTAR_FIRE_SAFETY_REPORT": 0x03a0,
"PROT_RESP_POLESTAR_SEND_UART_DATA": 0x03a1,
"PROT_CMD_SUNTRACER_READ_FLASH": 0x0400,
"PROT_CMD_SUNTRACER_START": 0x0401,
"PROT_CMD_SUNTRACER_SET_RTC": 0x0402,
"PROT_CMD_SUNTRACER_DEL_FLASH": 0x0403,
"PROT_CMD_SUNTRACER_DEL_FLASH_SECTOR": 0x0404,
"PROT_RESP_SUNTRACER_TRACE": 0x0480,
"PROT_RESP_SUNTRACER_FLASH": 0x0481,
"PROT_CMD_SERVER_POST_DATA": 0x0500,
"PROT_CMD_SERVER_GET_GMT": 0x0501,
"PROT_CMD_SERVER_GET_NAME": 0x0502,
"PROT_RESP_SERVER_GMT": 0x0580,
"PROT_RESP_SERVER_NAME": 0x0581,
"PROT_RESP_CONFTOOL_PLC_DATA": 0x0680,
"PROT_CMD_JUPMNGR_READ_JUPPWR_MEAS1": 0x0800,
"PROT_CMD_JUPMNGR_READ_JUPPWR_MEAS2": 0x0801,
"PROT_CMD_JUPMNGR_READ_JUPPWR_MEAS3": 0x0802,
"PROT_CMD_JUPMNGR_READ_JUPPWR_MEAS4": 0x0803,
"PROT_CMD_JUPMNGR_READ_JUPPWR_MEAS5": 0x0804,
"PROT_CMD_JUPMNGR_READ_MEAS": 0x0805,
"PROT_CMD_JUPMNGR_GET_SYS_STATUS": 0x0806,
"PROT_CMD_JUPMNGR_GET_TELEM": 0x0807,
"PROT_CMD_JUPMNGR_GET_COUNTRY_CODE": 0x0808,
"PROT_CMD_JUPMNGR_SET_COUNTRY": 0x0809,
"PROT_CMD_JUPMNGR_GET_COUNTRY_DEFAULTS": 0x080a,
"PROT_CMD_JUPMNGR_PRIVILEGED_MODE": 0x080b,
"PROT_CMD_JUPMNGR_PRIVILEGED_SET_PARAM": 0x080c,
"PROT_CMD_JUPMNGR_PRIVILEGED_GET_EVENT": 0x080d,
"PROT_CMD_JUPMNGR_PRIVILEGED_GET_STATUS": 0x080e,
"PROT_CMD_JUPMNGR_SET_PRODUCT_MODEL": 0x080f,
"PROT_CMD_JUPMNGR_GET_PRODUCT_MODEL": 0x0810,
"PROT_CMD_JUPMNGR_DYNAMIC_SET_INVPWR_PARAM": 0x0811,
"PROT_CMD_JUPMNGR_GET_INVPWR_PARAM_TYPE": 0x0812,
"PROT_CMD_JUPMNGR_GET_FANS_STATUS": 0x0813,
"PROT_RESP_JUPMNGR_READ_JUPPWR_MEAS1": 0x0880,
"PROT_RESP_JUPMNGR_READ_JUPPWR_MEAS2": 0x0881,
"PROT_RESP_JUPMNGR_READ_JUPPWR_MEAS3": 0x0882,
"PROT_RESP_JUPMNGR_READ_JUPPWR_MEAS4": 0x0883,
"PROT_RESP_JUPMNGR_READ_JUPPWR_MEAS5": 0x0884,
"PROT_RESP_JUPMNGR_READ_MEAS": 0x0885,
"PROT_RESP_JUPMNGR_GET_SYS_STATUS": 0x0886,
"PROT_RESP_JUPMNGR_GET_TELEM": 0x0887,
"PROT_RESP_JUPMNGR_GET_COUNTRY_CODE": 0x0888,
"PROT_RESP_JUPMNGR_GET_COUNTRY_DEFAULTS": 0x0889,
"PROT_RESP_JUPMNGR_PRIVILEGED_GET_EVENT": 0x088a,
"PROT_RESP_JUPMNGR_PRIVILEGED_GET_STATUS": 0x088b,
"PROT_RESP_JUPMNGR_GET_PRODUCT_MODEL": 0x088c,
"PROT_RESP_JUPMNGR_GET_INVPWR_PARAM_TYPE": 0x088d,
"PROT_RESP_JUPMNGR_GET_FANS_STATUS": 0x088e,
"PROT_CMD_INVERTER_TURN_15V_ON": 0x0900,
"PROT_CMD_INVERTER_TURN_15V_OFF": 0x0901,
"PROT_CMD_INVERTER_ENABLE_RELAYS": 0x0902,
"PROT_CMD_INVERTER_DISABLE_RELAYS": 0x0903,
"PROT_CMD_INVERTER_DYNAMIC_POWER_LIMIT": 0x0904,
"PROT_CMD_INVERTER_IVTRACE_START": 0x0905,
"PROT_CMD_INVERTER_GRID_TRIP_TEST": 0x0906,
"PROT_CMD_INVERTER_SET_LMVGC_PARAMS1": 0x0907,
"PROT_CMD_INVERTER_GET_LMVGC_PARAMS1": 0x0908,
"PROT_CMD_INVERTER_SET_PWR_GAIN_PARAMS": 0x0909,
"PROT_CMD_INVERTER_SET_LMVGC_PARAMS2": 0x090a,
"PROT_CMD_INVERTER_GET_LMVGC_PARAMS2": 0x090b,
"PROT_CMD_INVERTER_SET_LMVGC_PARAMS3": 0x090c,
"PROT_CMD_INVERTER_GET_LMVGC_PARAMS3": 0x090d,
"PROT_CMD_INVERTER_LOCK_IN": 0x090e,
"PROT_CMD_INVERTER_LOCK_OUT": 0x090f,
"PROT_CMD_INVERTER_GET_VDC": 0x0910,
"PROT_CMD_INVERTER_PAIRING_DO_NOTHING": 0x0911,
"PROT_CMD_INVERTER_PAIRING_DO_SAFETY": 0x0912,
"PROT_RESP_INVERTER_DYNAMIC_POWER_LIMIT": 0x0980,
"PROT_RESP_INVERTER_GET_LMVGC_PARAMS": 0x0981,
"PROT_CMD_VEGA_READ_MEAS": 0x0a00,
"PROT_CMD_VEGA_GET_SYS_STATUS": 0x0a01,
"PROT_CMD_VEGA_GET_TELEM": 0x0a02,
"PROT_CMD_VEGA_GET_MAX_VDC_VALUE": 0x0a03,
"PROT_CMD_VEGA_SET_MAX_VDC_VALUE": 0x0a04,
"PROT_CMD_VEGA_RELAY_SET": 0x0a05,
"PROT_CMD_VEGA_SET_OPMODE": 0x0a06,
"PROT_CMD_VEGA_GET_OPMODE": 0x0a07,
"PROT_CMD_VEGA_SET_RANGE": 0x0a08,
"PROT_RESP_VEGA_READ_MEAS": 0x0a80,
"PROT_RESP_VEGA_GET_SYS_STATUS": 0x0a81,
"PROT_RESP_VEGA_GET_TELEM": 0x0a82,
"PROT_RESP_VEGA_GET_MAX_VDC_VALUE": 0x0a83,
"PROT_CMD_COMBI_PAUSE_MONITORING": 0x0b00,
"PROT_CMD_COMBI_SET_TIME_STAMP": 0x0b01,
"PROT_CMD_COMBI_RCD_CALIBRATION": 0x0b02,
"PROT_CMD_COMBI_GET_TELEM": 0x0b03,
"PROT_CMD_COMBI_FORCE_TELEM": 0x0b04,
"PROT_CMD_COMBI_SWITCHES_CONNECT": 0x0b05,
"PROT_CMD_COMBI_SWITCHES_DISCONNECT": 0x0b06,
"PROT_CMD_COMBI_SWITCHES_CONNECT_ALL": 0x0b07,
"PROT_CMD_COMBI_SWITCHES_DISCONNECT_ALL": 0x0b08,
"PROT_CMD_COMBI_RCD_TEST_EXECUTE": 0x0b09,
"PROT_CMD_COMBI_RELAYS_TEST_EXECUTE": 0x0b0a,
"PROT_CMD_COMBI_GET_COMBISTRING_PARAM": 0x0b0b,
"PROT_CMD_COMBI_SET_COMBISTRING_PARAM": 0x0b0c,
"PROT_CMD_COMBI_GET_ALL_COMBISTRING_PARAMS": 0x0b0d,
"PROT_CMD_COMBI_GET_ALL_COMBI_PARAMS": 0x0b0e,
"PROT_CMD_COMBI_READ_MEASUREMENTS": 0x0b0f,
"PROT_CMD_COMBI_GET_STRING_STATUS": 0x0b10,
"PROT_CMD_COMBI_GET_COMBI_STATUS": 0x0b11,
"PROT_CMD_COMBI_GET_ACTIVE_STRINGS": 0x0b12,
"PROT_CMD_COMBI_FWD_STRING_TELEM": 0x0b13,
"PROT_CMD_COMBI_FWD_COMBI_TELEM": 0x0b14,
"PROT_CMD_COMBI_GET_UNIFIED_STRING_STATUS": 0x0b15,
"PROT_CMD_COMBI_GET_UNIFIED_COMBI_STATUS": 0x0b16,
"PROT_CMD_COMBI_CHECK_INNER_PROTOCOL": 0x0b17,
"PROT_CMD_COMBI_SWITCHES_CONNECT_RELAY": 0x0b18,
"PROT_CMD_COMBI_SWITCHES_DISCONNECT_RELAY": 0x0b19,
"PROT_CMD_COMBI_GET_GEMINI_STRING_IDS": 0x0b1a,
"PROT_CMD_COMBI_GET_ALL_SWITCHES_STATUS": 0x0b1b,
"PROT_CMD_COMBI_SET_RCD_TEST_PIN": 0x0b1c,
"PROT_CMD_COMBI_RELAYS_TEST_CHECK_CONDS": 0x0b1d,
"PROT_RESP_COMBI_GET_TELEM": 0x0b80,
"PROT_RESP_COMBI_GET_STRING_STATUS": 0x0b81,
"PROT_RESP_COMBI_GET_COMBI_STATUS": 0x0b82,
"PROT_RESP_COMBI_GET_ACTIVE_STRINGS": 0x0b83,
"PROT_RESP_COMBI_GET_UNIFIED_STRING_STATUS": 0x0b84,
"PROT_RESP_COMBI_GET_UNIFIED_COMBI_STATUS": 0x0b85,
"PROT_RESP_COMBI_GET_GEMINI_STRING_IDS": 0x0b86,
"PROT_CMD_INVPWR_GET_ERROR_STATUS": 0x0c00,
"PROT_CMD_INVPWR_GET_STATUS": 0x0c01,
"PROT_CMD_INVPWR_GO": 0x0c02,
"PROT_CMD_INVPWR_HALT": 0x0c03,
"PROT_CMD_INVPWR_CONST_DUTY_CYCLE": 0x0c04,
"PROT_CMD_INVPWR_DUMY_ERROR": 0x0c05,
"PROT_CMD_INVPWR_PAIRING_SET_STATE": 0x0c06,
"PROT_CMD_INVPWR_TEST_IAC_CONTROL": 0x0c07,
"PROT_RESP_INVPWR_GET_ERROR_STATUS": 0x0c80,
"PROT_RESP_INVPWR_GET_STATUS": 0x0c81,
"PROT_RESP_INVPWR_GO": 0x0c82,
"PROT_RESP_INVPWR_HALT": 0x0c83,
"PROT_RESP_INVPWR_CONST_DUTY_CYCLE": 0x0c84,
"PROT_RESP_INVPWR_DUMY_ERROR": 0x0c85,
"PROD_CMD_BOOTLOADER_SECURE": 0x1400,
"PROT_CMD_BOOTLOADER_UNSECURE": 0x1401,
"PROT_CMD_ACTIVATOR_ACTIVATE": 0x1500,
"PROT_CMD_ACTIVATOR_GET_ADC_SAMPLES": 0x1501,
"PROT_CMD_ACTIVATOR_SET_VO_RANGE": 0x1502,
"PROT_CMD_ACTIVATOR_GET_AVG_SAMPLES": 0x1503,
"PROT_CMD_ACTIVATOR_TX_TEST": 0x1504,
"PROT_CMD_ACTIVATOR_LCD_TEST": 0x1505,
"PROT_CMD_ACTIVATOR_BUTTONS_TEST": 0x1506,
"PROT_CMD_FANCONTROL_SET_PWM": 0x1600,
"PROT_CMD_FANCONTROL_GET_PWM": 0x1601,
"PROT_CMD_FANCONTROL_GET_ALL_PWM": 0x1602,
"PROT_CMD_FANCONTROL_SHUT_ALL_PWM": 0x1603,
"PROT_CMD_FANCONTROL_RES": 0x1680,
"PROT_CMD_DISPLAY_BOARD_LCD_WRITE": 0x1700,
"PROT_CMD_DISPLAY_BOARD_LED_SET": 0x1701,
}
# create reverse lookup code to function dictionary
code2function = dict((function2code[key], key) for key in function2code.keys())