wiliot-certificate 4.4.0__py3-none-any.whl → 4.4.1__py3-none-any.whl

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 (28) hide show
  1. brg_certificate/ag/energous_v0_defines.py +114 -105
  2. brg_certificate/ag/energous_v1_defines.py +114 -105
  3. brg_certificate/ag/energous_v2_defines.py +114 -105
  4. brg_certificate/ag/energous_v3_defines.py +114 -105
  5. brg_certificate/ag/energous_v4_defines.py +114 -105
  6. brg_certificate/ag/fanstel_lan_v0_defines.py +114 -105
  7. brg_certificate/ag/fanstel_lte_v0_defines.py +114 -105
  8. brg_certificate/ag/fanstel_wifi_v0_defines.py +114 -105
  9. brg_certificate/ag/minew_lte_v0_defines.py +114 -105
  10. brg_certificate/ag/wlt_types.html +153 -986
  11. brg_certificate/ag/wlt_types_ag.py +268 -1346
  12. brg_certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +0 -69
  13. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +0 -101
  14. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +0 -45
  15. brg_certificate/ag/wlt_types_ag_jsons/calibration.json +0 -75
  16. brg_certificate/ag/wlt_types_ag_jsons/custom.json +0 -99
  17. brg_certificate/ag/wlt_types_ag_jsons/datapath.json +8 -133
  18. brg_certificate/ag/wlt_types_ag_jsons/energy2400.json +0 -99
  19. brg_certificate/ag/wlt_types_ag_jsons/energySub1g.json +0 -96
  20. brg_certificate/ag/wlt_types_ag_jsons/externalSensor.json +0 -113
  21. brg_certificate/ag/wlt_types_ag_jsons/interface.json +0 -157
  22. brg_certificate/ag/wlt_types_ag_jsons/powerManagement.json +0 -205
  23. {wiliot_certificate-4.4.0.dist-info → wiliot_certificate-4.4.1.dist-info}/METADATA +7 -7
  24. {wiliot_certificate-4.4.0.dist-info → wiliot_certificate-4.4.1.dist-info}/RECORD +28 -28
  25. {wiliot_certificate-4.4.0.dist-info → wiliot_certificate-4.4.1.dist-info}/WHEEL +0 -0
  26. {wiliot_certificate-4.4.0.dist-info → wiliot_certificate-4.4.1.dist-info}/entry_points.txt +0 -0
  27. {wiliot_certificate-4.4.0.dist-info → wiliot_certificate-4.4.1.dist-info}/licenses/LICENSE +0 -0
  28. {wiliot_certificate-4.4.0.dist-info → wiliot_certificate-4.4.1.dist-info}/top_level.txt +0 -0
@@ -38,7 +38,7 @@ RSSI_VAL_MAX = 103 # min val + 63 (6 bits)
38
38
  API_VERSION_V0 = 0
39
39
  API_VERSION_V1 = 1
40
40
  API_VERSION_V2 = 2
41
- API_VERSION_V5 = 5 # Because of backward compatibility issue we jumped from V2 to V5
41
+ API_VERSION_V5 = 5 # Because of backward compatabilty issue we jumped from V2 to V5
42
42
  API_VERSION_V6 = 6
43
43
  API_VERSION_V7 = 7
44
44
  API_VERSION_V8 = 8
@@ -46,8 +46,7 @@ API_VERSION_V9 = 9
46
46
  API_VERSION_V10 = 10
47
47
  API_VERSION_V11 = 11
48
48
  API_VERSION_V12 = 12
49
- API_VERSION_V13 = 13
50
- API_VERSION_LATEST = 13
49
+ API_VERSION_LATEST = 12
51
50
 
52
51
  API_VERSION_SENSOR_V0 = 0
53
52
  API_VERSION_SENSOR_LATEST = 0
@@ -543,248 +542,6 @@ class DataHdr():
543
542
  self.pkt_type = d[5]
544
543
  self.group_id_major = d[6]
545
544
 
546
- class SideInfo():
547
- def __init__(self, raw='', brg_mac=0, nfpkt=0, rssi=0, unused2=0, unused0=0, unused1=0, pkt_id=0):
548
- self.brg_mac = brg_mac
549
- self.nfpkt = nfpkt
550
- self.rssi = rssi
551
- self.unused2 = unused2
552
- self.unused0 = unused0
553
- self.unused1 = unused1
554
- self.pkt_id = pkt_id
555
- if raw:
556
- self.set(raw)
557
-
558
- def __repr__(self) -> str:
559
- return "\n==> Packet side_info <==\n" + tabulate.tabulate([['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['nfpkt', f"0x{self.nfpkt:X}", self.nfpkt],['rssi', f"0x{self.rssi:X}", self.rssi],['pkt_id', f"0x{self.pkt_id:X}", self.pkt_id]], tablefmt="texttable")
560
-
561
- def __eq__(self, other):
562
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
563
- return (
564
- self.brg_mac == other.brg_mac and
565
- self.nfpkt == other.nfpkt and
566
- self.rssi == other.rssi and
567
- self.pkt_id == other.pkt_id
568
- )
569
- return False
570
-
571
- def dump(self):
572
- string = bitstruct.pack("u48u16u8u4u4u80u32", self.brg_mac, self.nfpkt, self.rssi, self.unused2, self.unused0, self.unused1, self.pkt_id)
573
- return string.hex().upper()
574
-
575
- def set(self, string):
576
- d = bitstruct.unpack("u48u16u8u4u4u80u32", binascii.unhexlify(string))
577
- self.brg_mac = d[0]
578
- self.nfpkt = d[1]
579
- self.rssi = d[2]
580
- self.unused2 = d[3]
581
- self.unused0 = d[4]
582
- self.unused1 = d[5]
583
- self.pkt_id = d[6]
584
-
585
- class SensorData():
586
- def __init__(self, raw='', data=0, pkt_id=0):
587
- self.data = data
588
- self.pkt_id = pkt_id
589
- if raw:
590
- self.set(raw)
591
-
592
- def __repr__(self) -> str:
593
- return "\n==> Packet sensor_data <==\n" + tabulate.tabulate([['data', f"0x{self.data:X}", self.data],['pkt_id', f"0x{self.pkt_id:X}", self.pkt_id]], tablefmt="texttable")
594
-
595
- def __eq__(self, other):
596
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
597
- return (
598
- self.data == other.data and
599
- self.pkt_id == other.pkt_id
600
- )
601
- return False
602
-
603
- def dump(self):
604
- string = bitstruct.pack("u216u32", self.data, self.pkt_id)
605
- return string.hex().upper()
606
-
607
- def set(self, string):
608
- d = bitstruct.unpack("u216u32", binascii.unhexlify(string))
609
- self.data = d[0]
610
- self.pkt_id = d[1]
611
-
612
- class SideInfoSensor():
613
- def __init__(self, raw='', brg_mac=0, nfpkt=0, rssi=0, unused2=0, unused0=0, sensor_mac=0, sensor_ad_type=0, sensor_uuid_msb=0, sensor_uuid_lsb=0, api_version=0, unused1=0, is_scrambled=0, is_sensor_embedded=0, is_sensor=0, pkt_id=0):
614
- self.brg_mac = brg_mac
615
- self.nfpkt = nfpkt
616
- self.rssi = rssi
617
- self.unused2 = unused2
618
- self.unused0 = unused0
619
- self.sensor_mac = sensor_mac
620
- self.sensor_ad_type = sensor_ad_type
621
- self.sensor_uuid_msb = sensor_uuid_msb
622
- self.sensor_uuid_lsb = sensor_uuid_lsb
623
- self.api_version = api_version
624
- self.unused1 = unused1
625
- self.is_scrambled = is_scrambled
626
- self.is_sensor_embedded = is_sensor_embedded
627
- self.is_sensor = is_sensor
628
- self.pkt_id = pkt_id
629
- if raw:
630
- self.set(raw)
631
-
632
- def __repr__(self) -> str:
633
- return "\n==> Packet side_info_sensor <==\n" + tabulate.tabulate([['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['nfpkt', f"0x{self.nfpkt:X}", self.nfpkt],['rssi', f"0x{self.rssi:X}", self.rssi],['sensor_mac', f"0x{self.sensor_mac:X}", self.sensor_mac],['sensor_ad_type', f"0x{self.sensor_ad_type:X}", self.sensor_ad_type],['sensor_uuid_msb', f"0x{self.sensor_uuid_msb:X}", self.sensor_uuid_msb],['sensor_uuid_lsb', f"0x{self.sensor_uuid_lsb:X}", self.sensor_uuid_lsb],['api_version', f"0x{self.api_version:X}", self.api_version],['is_scrambled', f"0x{self.is_scrambled:X}", self.is_scrambled],['is_sensor_embedded', f"0x{self.is_sensor_embedded:X}", self.is_sensor_embedded],['is_sensor', f"0x{self.is_sensor:X}", self.is_sensor],['pkt_id', f"0x{self.pkt_id:X}", self.pkt_id]], tablefmt="texttable")
634
-
635
- def __eq__(self, other):
636
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
637
- return (
638
- self.brg_mac == other.brg_mac and
639
- self.nfpkt == other.nfpkt and
640
- self.rssi == other.rssi and
641
- self.sensor_mac == other.sensor_mac and
642
- self.sensor_ad_type == other.sensor_ad_type and
643
- self.sensor_uuid_msb == other.sensor_uuid_msb and
644
- self.sensor_uuid_lsb == other.sensor_uuid_lsb and
645
- self.api_version == other.api_version and
646
- self.is_scrambled == other.is_scrambled and
647
- self.is_sensor_embedded == other.is_sensor_embedded and
648
- self.is_sensor == other.is_sensor and
649
- self.pkt_id == other.pkt_id
650
- )
651
- return False
652
-
653
- def dump(self):
654
- string = bitstruct.pack("u48u16u8u4u4u48u8u8u8u4u1u1u1u1u32", self.brg_mac, self.nfpkt, self.rssi, self.unused2, self.unused0, self.sensor_mac, self.sensor_ad_type, self.sensor_uuid_msb, self.sensor_uuid_lsb, self.api_version, self.unused1, self.is_scrambled, self.is_sensor_embedded, self.is_sensor, self.pkt_id)
655
- return string.hex().upper()
656
-
657
- def set(self, string):
658
- d = bitstruct.unpack("u48u16u8u4u4u48u8u8u8u4u1u1u1u1u32", binascii.unhexlify(string))
659
- self.brg_mac = d[0]
660
- self.nfpkt = d[1]
661
- self.rssi = d[2]
662
- self.unused2 = d[3]
663
- self.unused0 = d[4]
664
- self.sensor_mac = d[5]
665
- self.sensor_ad_type = d[6]
666
- self.sensor_uuid_msb = d[7]
667
- self.sensor_uuid_lsb = d[8]
668
- self.api_version = d[9]
669
- self.unused1 = d[10]
670
- self.is_scrambled = d[11]
671
- self.is_sensor_embedded = d[12]
672
- self.is_sensor = d[13]
673
- self.pkt_id = d[14]
674
-
675
- class PktFilterStruct():
676
- def __init__(self, raw='', unused=0, mask_enable=0, p3_pacing=0, p2_pacing=0, p1_pacing=0, p0_pacing=0):
677
- self.unused = unused
678
- self.mask_enable = mask_enable
679
- self.p3_pacing = p3_pacing
680
- self.p2_pacing = p2_pacing
681
- self.p1_pacing = p1_pacing
682
- self.p0_pacing = p0_pacing
683
- if raw:
684
- self.set(raw)
685
-
686
- def __repr__(self) -> str:
687
- return "\n==> Packet pkt_filter_struct <==\n" + tabulate.tabulate([['mask_enable', f"0x{self.mask_enable:X}", self.mask_enable],['p3_pacing', f"0x{self.p3_pacing:X}", self.p3_pacing],['p2_pacing', f"0x{self.p2_pacing:X}", self.p2_pacing],['p1_pacing', f"0x{self.p1_pacing:X}", self.p1_pacing],['p0_pacing', f"0x{self.p0_pacing:X}", self.p0_pacing]], tablefmt="texttable")
688
-
689
- def __eq__(self, other):
690
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
691
- return (
692
- self.mask_enable == other.mask_enable and
693
- self.p3_pacing == other.p3_pacing and
694
- self.p2_pacing == other.p2_pacing and
695
- self.p1_pacing == other.p1_pacing and
696
- self.p0_pacing == other.p0_pacing
697
- )
698
- return False
699
-
700
- def dump(self):
701
- string = bitstruct.pack("u3u1u1u1u1u1", self.unused, self.mask_enable, self.p3_pacing, self.p2_pacing, self.p1_pacing, self.p0_pacing)
702
- return string.hex().upper()
703
-
704
- def set(self, string):
705
- d = bitstruct.unpack("u3u1u1u1u1u1", binascii.unhexlify(string))
706
- self.unused = d[0]
707
- self.mask_enable = d[1]
708
- self.p3_pacing = d[2]
709
- self.p2_pacing = d[3]
710
- self.p1_pacing = d[4]
711
- self.p0_pacing = d[5]
712
-
713
- class PwrMgmt():
714
- def __init__(self, raw='', leds_on=PWR_MGMT_DEFAULTS_LEDS_ON, keep_alive_scan=PWR_MGMT_DEFAULTS_KEEP_ALIVE_SCAN, keep_alive_period=PWR_MGMT_DEFAULTS_KEEP_ALIVE_PERIOD, on_duration=PWR_MGMT_DEFAULTS_ON_DURATION, sleep_duration=PWR_MGMT_DEFAULTS_SLEEP_DURATION, unused=0):
715
- self.leds_on = leds_on
716
- self.keep_alive_scan = keep_alive_scan # 10 [msec] resolution
717
- self.keep_alive_period = keep_alive_period # 5 [sec] resolution
718
- self.on_duration = on_duration # 30 [sec] resolution
719
- self.sleep_duration = sleep_duration # 60 [sec] resolution
720
- self.unused = unused
721
- if raw:
722
- self.set(raw)
723
-
724
- def __repr__(self) -> str:
725
- return "\n==> Packet pwr_mgmt <==\n" + tabulate.tabulate([['leds_on', f"0x{self.leds_on:X}", self.leds_on],['keep_alive_scan', f"0x{self.keep_alive_scan:X}", self.keep_alive_scan],['keep_alive_period', f"0x{self.keep_alive_period:X}", self.keep_alive_period],['on_duration', f"0x{self.on_duration:X}", self.on_duration],['sleep_duration', f"0x{self.sleep_duration:X}", self.sleep_duration]], tablefmt="texttable")
726
-
727
- def __eq__(self, other):
728
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
729
- return (
730
- self.leds_on == other.leds_on and
731
- self.keep_alive_scan == other.keep_alive_scan and
732
- self.keep_alive_period == other.keep_alive_period and
733
- self.on_duration == other.on_duration and
734
- self.sleep_duration == other.sleep_duration
735
- )
736
- return False
737
-
738
- def dump(self):
739
- string = bitstruct.pack("u1u6u5u7u11u2", self.leds_on, self.keep_alive_scan, self.keep_alive_period, self.on_duration, self.sleep_duration, self.unused)
740
- return string.hex().upper()
741
-
742
- def set(self, string):
743
- d = bitstruct.unpack("u1u6u5u7u11u2", binascii.unhexlify(string))
744
- self.leds_on = d[0]
745
- self.keep_alive_scan = d[1]
746
- self.keep_alive_period = d[2]
747
- self.on_duration = d[3]
748
- self.sleep_duration = d[4]
749
- self.unused = d[5]
750
-
751
- class GenericV13():
752
- def __init__(self, raw='', module_type=0, msg_type=0, api_version=API_VERSION_V13, seq_id=0, brg_mac=0, unused=0):
753
- self.module_type = module_type
754
- self.msg_type = msg_type
755
- self.api_version = api_version
756
- self.seq_id = seq_id
757
- self.brg_mac = brg_mac
758
- self.unused = unused
759
- if raw:
760
- self.set(raw)
761
-
762
- def __repr__(self) -> str:
763
- return "\n==> Packet generic_v13 <==\n" + tabulate.tabulate([['module_type', f"0x{self.module_type:X}", self.module_type],['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac]], tablefmt="texttable")
764
-
765
- def __eq__(self, other):
766
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
767
- return (
768
- self.module_type == other.module_type and
769
- self.msg_type == other.msg_type and
770
- self.api_version == other.api_version and
771
- self.brg_mac == other.brg_mac
772
- )
773
- return False
774
-
775
- def dump(self):
776
- string = bitstruct.pack("u4u4u8u8u48u120", self.module_type, self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.unused)
777
- return string.hex().upper()
778
-
779
- def set(self, string):
780
- d = bitstruct.unpack("u4u4u8u8u48u120", binascii.unhexlify(string))
781
- self.module_type = d[0]
782
- self.msg_type = d[1]
783
- self.api_version = d[2]
784
- self.seq_id = d[3]
785
- self.brg_mac = d[4]
786
- self.unused = d[5]
787
-
788
545
  class GenericV12():
789
546
  def __init__(self, raw='', module_type=0, msg_type=0, api_version=API_VERSION_V12, seq_id=0, brg_mac=0, unused=0):
790
547
  self.module_type = module_type
@@ -1042,44 +799,6 @@ class GenericV1():
1042
799
  self.brg_mac = d[4]
1043
800
  self.unused2 = d[5]
1044
801
 
1045
- class ActionGenericV13():
1046
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V13, seq_id=0, brg_mac=ACTION_EMPTY, action_id=0, action_params=0):
1047
- self.msg_type = msg_type
1048
- self.api_version = api_version
1049
- self.seq_id = seq_id
1050
- self.brg_mac = brg_mac
1051
- self.action_id = action_id
1052
- self.action_params = action_params
1053
- if raw:
1054
- self.set(raw)
1055
-
1056
- def __repr__(self) -> str:
1057
- return "\n==> Packet action_generic_v13 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['action_id', f"0x{self.action_id:X}", self.action_id],['action_params', f"0x{self.action_params:X}", self.action_params]], tablefmt="texttable")
1058
-
1059
- def __eq__(self, other):
1060
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
1061
- return (
1062
- self.msg_type == other.msg_type and
1063
- self.api_version == other.api_version and
1064
- self.brg_mac == other.brg_mac and
1065
- self.action_id == other.action_id and
1066
- self.action_params == other.action_params
1067
- )
1068
- return False
1069
-
1070
- def dump(self):
1071
- string = bitstruct.pack("u8u8u8u48u8u112", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.action_id, self.action_params)
1072
- return string.hex().upper()
1073
-
1074
- def set(self, string):
1075
- d = bitstruct.unpack("u8u8u8u48u8u112", binascii.unhexlify(string))
1076
- self.msg_type = d[0]
1077
- self.api_version = d[1]
1078
- self.seq_id = d[2]
1079
- self.brg_mac = d[3]
1080
- self.action_id = d[4]
1081
- self.action_params = d[5]
1082
-
1083
802
  class ActionGenericV12():
1084
803
  def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V12, seq_id=0, brg_mac=ACTION_EMPTY, action_id=0, action_params=0):
1085
804
  self.msg_type = msg_type
@@ -1308,47 +1027,6 @@ class ActionGenericV7():
1308
1027
  self.action_id = d[4]
1309
1028
  self.action_params = d[5]
1310
1029
 
1311
- class ActionGwHbV13():
1312
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V13, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_GW_HB, gw_id=0, rssi=0):
1313
- self.msg_type = msg_type
1314
- self.api_version = api_version
1315
- self.seq_id = seq_id
1316
- self.brg_mac = brg_mac
1317
- self.action_id = action_id
1318
- self.gw_id = gw_id
1319
- self.rssi = rssi
1320
- if raw:
1321
- self.set(raw)
1322
-
1323
- def __repr__(self) -> str:
1324
- return "\n==> Packet action_gw_hb_v13 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['action_id', f"0x{self.action_id:X}", self.action_id],['gw_id', f"0x{self.gw_id:X}", self.gw_id],['rssi', f"0x{self.rssi:X}", self.rssi]], tablefmt="texttable")
1325
-
1326
- def __eq__(self, other):
1327
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
1328
- return (
1329
- self.msg_type == other.msg_type and
1330
- self.api_version == other.api_version and
1331
- self.brg_mac == other.brg_mac and
1332
- self.action_id == other.action_id and
1333
- self.gw_id == other.gw_id and
1334
- self.rssi == other.rssi
1335
- )
1336
- return False
1337
-
1338
- def dump(self):
1339
- string = bitstruct.pack("u8u8u8u48u8u104u8", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.action_id, self.gw_id, self.rssi)
1340
- return string.hex().upper()
1341
-
1342
- def set(self, string):
1343
- d = bitstruct.unpack("u8u8u8u48u8u104u8", binascii.unhexlify(string))
1344
- self.msg_type = d[0]
1345
- self.api_version = d[1]
1346
- self.seq_id = d[2]
1347
- self.brg_mac = d[3]
1348
- self.action_id = d[4]
1349
- self.gw_id = d[5]
1350
- self.rssi = d[6]
1351
-
1352
1030
  class ActionGwHbV12():
1353
1031
  def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V12, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_GW_HB, gw_id=0, rssi=0):
1354
1032
  self.msg_type = msg_type
@@ -1554,44 +1232,6 @@ class ActionGwHbV8():
1554
1232
  self.gw_id = d[5]
1555
1233
  self.rssi = d[6]
1556
1234
 
1557
- class ActionRebootV13():
1558
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V13, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_REBOOT, gw_id=0):
1559
- self.msg_type = msg_type
1560
- self.api_version = api_version
1561
- self.seq_id = seq_id
1562
- self.brg_mac = brg_mac
1563
- self.action_id = action_id
1564
- self.gw_id = gw_id
1565
- if raw:
1566
- self.set(raw)
1567
-
1568
- def __repr__(self) -> str:
1569
- return "\n==> Packet action_reboot_v13 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['action_id', f"0x{self.action_id:X}", self.action_id],['gw_id', f"0x{self.gw_id:X}", self.gw_id]], tablefmt="texttable")
1570
-
1571
- def __eq__(self, other):
1572
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
1573
- return (
1574
- self.msg_type == other.msg_type and
1575
- self.api_version == other.api_version and
1576
- self.brg_mac == other.brg_mac and
1577
- self.action_id == other.action_id and
1578
- self.gw_id == other.gw_id
1579
- )
1580
- return False
1581
-
1582
- def dump(self):
1583
- string = bitstruct.pack("u8u8u8u48u8u112", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.action_id, self.gw_id)
1584
- return string.hex().upper()
1585
-
1586
- def set(self, string):
1587
- d = bitstruct.unpack("u8u8u8u48u8u112", binascii.unhexlify(string))
1588
- self.msg_type = d[0]
1589
- self.api_version = d[1]
1590
- self.seq_id = d[2]
1591
- self.brg_mac = d[3]
1592
- self.action_id = d[4]
1593
- self.gw_id = d[5]
1594
-
1595
1235
  class ActionRebootV12():
1596
1236
  def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V12, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_REBOOT, gw_id=0):
1597
1237
  self.msg_type = msg_type
@@ -1782,43 +1422,6 @@ class ActionRebootV8():
1782
1422
  self.action_id = d[4]
1783
1423
  self.gw_id = d[5]
1784
1424
 
1785
- class ActionBlinkV13():
1786
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V13, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_BLINK, unused0=0):
1787
- self.msg_type = msg_type
1788
- self.api_version = api_version
1789
- self.seq_id = seq_id
1790
- self.brg_mac = brg_mac
1791
- self.action_id = action_id
1792
- self.unused0 = unused0
1793
- if raw:
1794
- self.set(raw)
1795
-
1796
- def __repr__(self) -> str:
1797
- return "\n==> Packet action_blink_v13 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['action_id', f"0x{self.action_id:X}", self.action_id]], tablefmt="texttable")
1798
-
1799
- def __eq__(self, other):
1800
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
1801
- return (
1802
- self.msg_type == other.msg_type and
1803
- self.api_version == other.api_version and
1804
- self.brg_mac == other.brg_mac and
1805
- self.action_id == other.action_id
1806
- )
1807
- return False
1808
-
1809
- def dump(self):
1810
- string = bitstruct.pack("u8u8u8u48u8u112", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.action_id, self.unused0)
1811
- return string.hex().upper()
1812
-
1813
- def set(self, string):
1814
- d = bitstruct.unpack("u8u8u8u48u8u112", binascii.unhexlify(string))
1815
- self.msg_type = d[0]
1816
- self.api_version = d[1]
1817
- self.seq_id = d[2]
1818
- self.brg_mac = d[3]
1819
- self.action_id = d[4]
1820
- self.unused0 = d[5]
1821
-
1822
1425
  class ActionBlinkV12():
1823
1426
  def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V12, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_BLINK, unused0=0):
1824
1427
  self.msg_type = msg_type
@@ -2004,67 +1607,6 @@ class ActionBlinkV8():
2004
1607
  self.action_id = d[4]
2005
1608
  self.unused0 = d[5]
2006
1609
 
2007
- class ActionGetModuleV13():
2008
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V13, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_GET_MODULE, interface=0, datapath=0, energy2400=0, energy_sub1g=0, calibration=0, pwr_mgmt=0, ext_sensors=0, custom=0, unused0=0):
2009
- self.msg_type = msg_type
2010
- self.api_version = api_version
2011
- self.seq_id = seq_id
2012
- self.brg_mac = brg_mac
2013
- self.action_id = action_id
2014
- self.interface = interface
2015
- self.datapath = datapath
2016
- self.energy2400 = energy2400
2017
- self.energy_sub1g = energy_sub1g
2018
- self.calibration = calibration
2019
- self.pwr_mgmt = pwr_mgmt
2020
- self.ext_sensors = ext_sensors
2021
- self.custom = custom
2022
- self.unused0 = unused0
2023
- if raw:
2024
- self.set(raw)
2025
-
2026
- def __repr__(self) -> str:
2027
- return "\n==> Packet action_get_module_v13 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['action_id', f"0x{self.action_id:X}", self.action_id],['interface', f"0x{self.interface:X}", self.interface],['datapath', f"0x{self.datapath:X}", self.datapath],['energy2400', f"0x{self.energy2400:X}", self.energy2400],['energy_sub1g', f"0x{self.energy_sub1g:X}", self.energy_sub1g],['calibration', f"0x{self.calibration:X}", self.calibration],['pwr_mgmt', f"0x{self.pwr_mgmt:X}", self.pwr_mgmt],['ext_sensors', f"0x{self.ext_sensors:X}", self.ext_sensors],['custom', f"0x{self.custom:X}", self.custom]], tablefmt="texttable")
2028
-
2029
- def __eq__(self, other):
2030
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
2031
- return (
2032
- self.msg_type == other.msg_type and
2033
- self.api_version == other.api_version and
2034
- self.brg_mac == other.brg_mac and
2035
- self.action_id == other.action_id and
2036
- self.interface == other.interface and
2037
- self.datapath == other.datapath and
2038
- self.energy2400 == other.energy2400 and
2039
- self.energy_sub1g == other.energy_sub1g and
2040
- self.calibration == other.calibration and
2041
- self.pwr_mgmt == other.pwr_mgmt and
2042
- self.ext_sensors == other.ext_sensors and
2043
- self.custom == other.custom
2044
- )
2045
- return False
2046
-
2047
- def dump(self):
2048
- string = bitstruct.pack("u8u8u8u48u8u1u1u1u1u1u1u1u1u104", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.action_id, self.interface, self.datapath, self.energy2400, self.energy_sub1g, self.calibration, self.pwr_mgmt, self.ext_sensors, self.custom, self.unused0)
2049
- return string.hex().upper()
2050
-
2051
- def set(self, string):
2052
- d = bitstruct.unpack("u8u8u8u48u8u1u1u1u1u1u1u1u1u104", binascii.unhexlify(string))
2053
- self.msg_type = d[0]
2054
- self.api_version = d[1]
2055
- self.seq_id = d[2]
2056
- self.brg_mac = d[3]
2057
- self.action_id = d[4]
2058
- self.interface = d[5]
2059
- self.datapath = d[6]
2060
- self.energy2400 = d[7]
2061
- self.energy_sub1g = d[8]
2062
- self.calibration = d[9]
2063
- self.pwr_mgmt = d[10]
2064
- self.ext_sensors = d[11]
2065
- self.custom = d[12]
2066
- self.unused0 = d[13]
2067
-
2068
1610
  class ActionGetModuleV12():
2069
1611
  def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V12, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_GET_MODULE, interface=0, datapath=0, energy2400=0, energy_sub1g=0, calibration=0, pwr_mgmt=0, ext_sensors=0, custom=0, unused0=0):
2070
1612
  self.msg_type = msg_type
@@ -2320,69 +1862,16 @@ class ActionGetModuleV8():
2320
1862
  self.datapath = datapath
2321
1863
  self.energy2400 = energy2400
2322
1864
  self.energy_sub1g = energy_sub1g
2323
- self.calibration = calibration
2324
- self.pwr_mgmt = pwr_mgmt
2325
- self.ext_sensors = ext_sensors
2326
- self.custom = custom
2327
- self.unused0 = unused0
2328
- if raw:
2329
- self.set(raw)
2330
-
2331
- def __repr__(self) -> str:
2332
- return "\n==> Packet action_get_module_v8 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['action_id', f"0x{self.action_id:X}", self.action_id],['interface', f"0x{self.interface:X}", self.interface],['datapath', f"0x{self.datapath:X}", self.datapath],['energy2400', f"0x{self.energy2400:X}", self.energy2400],['energy_sub1g', f"0x{self.energy_sub1g:X}", self.energy_sub1g],['calibration', f"0x{self.calibration:X}", self.calibration],['pwr_mgmt', f"0x{self.pwr_mgmt:X}", self.pwr_mgmt],['ext_sensors', f"0x{self.ext_sensors:X}", self.ext_sensors],['custom', f"0x{self.custom:X}", self.custom]], tablefmt="texttable")
2333
-
2334
- def __eq__(self, other):
2335
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
2336
- return (
2337
- self.msg_type == other.msg_type and
2338
- self.api_version == other.api_version and
2339
- self.brg_mac == other.brg_mac and
2340
- self.action_id == other.action_id and
2341
- self.interface == other.interface and
2342
- self.datapath == other.datapath and
2343
- self.energy2400 == other.energy2400 and
2344
- self.energy_sub1g == other.energy_sub1g and
2345
- self.calibration == other.calibration and
2346
- self.pwr_mgmt == other.pwr_mgmt and
2347
- self.ext_sensors == other.ext_sensors and
2348
- self.custom == other.custom
2349
- )
2350
- return False
2351
-
2352
- def dump(self):
2353
- string = bitstruct.pack("u8u8u8u48u8u1u1u1u1u1u1u1u1u104", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.action_id, self.interface, self.datapath, self.energy2400, self.energy_sub1g, self.calibration, self.pwr_mgmt, self.ext_sensors, self.custom, self.unused0)
2354
- return string.hex().upper()
2355
-
2356
- def set(self, string):
2357
- d = bitstruct.unpack("u8u8u8u48u8u1u1u1u1u1u1u1u1u104", binascii.unhexlify(string))
2358
- self.msg_type = d[0]
2359
- self.api_version = d[1]
2360
- self.seq_id = d[2]
2361
- self.brg_mac = d[3]
2362
- self.action_id = d[4]
2363
- self.interface = d[5]
2364
- self.datapath = d[6]
2365
- self.energy2400 = d[7]
2366
- self.energy_sub1g = d[8]
2367
- self.calibration = d[9]
2368
- self.pwr_mgmt = d[10]
2369
- self.ext_sensors = d[11]
2370
- self.custom = d[12]
2371
- self.unused0 = d[13]
2372
-
2373
- class ActionRestoreDefaultsV13():
2374
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V13, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_RESTORE_DEFAULTS, unused0=0):
2375
- self.msg_type = msg_type
2376
- self.api_version = api_version
2377
- self.seq_id = seq_id
2378
- self.brg_mac = brg_mac
2379
- self.action_id = action_id
1865
+ self.calibration = calibration
1866
+ self.pwr_mgmt = pwr_mgmt
1867
+ self.ext_sensors = ext_sensors
1868
+ self.custom = custom
2380
1869
  self.unused0 = unused0
2381
1870
  if raw:
2382
1871
  self.set(raw)
2383
1872
 
2384
1873
  def __repr__(self) -> str:
2385
- return "\n==> Packet action_restore_defaults_v13 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['action_id', f"0x{self.action_id:X}", self.action_id]], tablefmt="texttable")
1874
+ return "\n==> Packet action_get_module_v8 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['action_id', f"0x{self.action_id:X}", self.action_id],['interface', f"0x{self.interface:X}", self.interface],['datapath', f"0x{self.datapath:X}", self.datapath],['energy2400', f"0x{self.energy2400:X}", self.energy2400],['energy_sub1g', f"0x{self.energy_sub1g:X}", self.energy_sub1g],['calibration', f"0x{self.calibration:X}", self.calibration],['pwr_mgmt', f"0x{self.pwr_mgmt:X}", self.pwr_mgmt],['ext_sensors', f"0x{self.ext_sensors:X}", self.ext_sensors],['custom', f"0x{self.custom:X}", self.custom]], tablefmt="texttable")
2386
1875
 
2387
1876
  def __eq__(self, other):
2388
1877
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -2390,22 +1879,38 @@ class ActionRestoreDefaultsV13():
2390
1879
  self.msg_type == other.msg_type and
2391
1880
  self.api_version == other.api_version and
2392
1881
  self.brg_mac == other.brg_mac and
2393
- self.action_id == other.action_id
1882
+ self.action_id == other.action_id and
1883
+ self.interface == other.interface and
1884
+ self.datapath == other.datapath and
1885
+ self.energy2400 == other.energy2400 and
1886
+ self.energy_sub1g == other.energy_sub1g and
1887
+ self.calibration == other.calibration and
1888
+ self.pwr_mgmt == other.pwr_mgmt and
1889
+ self.ext_sensors == other.ext_sensors and
1890
+ self.custom == other.custom
2394
1891
  )
2395
1892
  return False
2396
1893
 
2397
1894
  def dump(self):
2398
- string = bitstruct.pack("u8u8u8u48u8u112", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.action_id, self.unused0)
1895
+ string = bitstruct.pack("u8u8u8u48u8u1u1u1u1u1u1u1u1u104", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.action_id, self.interface, self.datapath, self.energy2400, self.energy_sub1g, self.calibration, self.pwr_mgmt, self.ext_sensors, self.custom, self.unused0)
2399
1896
  return string.hex().upper()
2400
1897
 
2401
1898
  def set(self, string):
2402
- d = bitstruct.unpack("u8u8u8u48u8u112", binascii.unhexlify(string))
1899
+ d = bitstruct.unpack("u8u8u8u48u8u1u1u1u1u1u1u1u1u104", binascii.unhexlify(string))
2403
1900
  self.msg_type = d[0]
2404
1901
  self.api_version = d[1]
2405
1902
  self.seq_id = d[2]
2406
1903
  self.brg_mac = d[3]
2407
1904
  self.action_id = d[4]
2408
- self.unused0 = d[5]
1905
+ self.interface = d[5]
1906
+ self.datapath = d[6]
1907
+ self.energy2400 = d[7]
1908
+ self.energy_sub1g = d[8]
1909
+ self.calibration = d[9]
1910
+ self.pwr_mgmt = d[10]
1911
+ self.ext_sensors = d[11]
1912
+ self.custom = d[12]
1913
+ self.unused0 = d[13]
2409
1914
 
2410
1915
  class ActionRestoreDefaultsV12():
2411
1916
  def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V12, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_RESTORE_DEFAULTS, unused0=0):
@@ -2592,43 +2097,6 @@ class ActionRestoreDefaultsV8():
2592
2097
  self.action_id = d[4]
2593
2098
  self.unused0 = d[5]
2594
2099
 
2595
- class ActionSendHbV13():
2596
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V13, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_SEND_HB, unused0=0):
2597
- self.msg_type = msg_type
2598
- self.api_version = api_version
2599
- self.seq_id = seq_id
2600
- self.brg_mac = brg_mac
2601
- self.action_id = action_id
2602
- self.unused0 = unused0
2603
- if raw:
2604
- self.set(raw)
2605
-
2606
- def __repr__(self) -> str:
2607
- return "\n==> Packet action_send_hb_v13 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['action_id', f"0x{self.action_id:X}", self.action_id]], tablefmt="texttable")
2608
-
2609
- def __eq__(self, other):
2610
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
2611
- return (
2612
- self.msg_type == other.msg_type and
2613
- self.api_version == other.api_version and
2614
- self.brg_mac == other.brg_mac and
2615
- self.action_id == other.action_id
2616
- )
2617
- return False
2618
-
2619
- def dump(self):
2620
- string = bitstruct.pack("u8u8u8u48u8u112", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.action_id, self.unused0)
2621
- return string.hex().upper()
2622
-
2623
- def set(self, string):
2624
- d = bitstruct.unpack("u8u8u8u48u8u112", binascii.unhexlify(string))
2625
- self.msg_type = d[0]
2626
- self.api_version = d[1]
2627
- self.seq_id = d[2]
2628
- self.brg_mac = d[3]
2629
- self.action_id = d[4]
2630
- self.unused0 = d[5]
2631
-
2632
2100
  class ActionSendHbV12():
2633
2101
  def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V12, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_SEND_HB, unused0=0):
2634
2102
  self.msg_type = msg_type
@@ -2814,43 +2282,6 @@ class ActionSendHbV8():
2814
2282
  self.action_id = d[4]
2815
2283
  self.unused0 = d[5]
2816
2284
 
2817
- class ActionGetBatterySensorV13():
2818
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V13, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_GET_BATTERY_SENSOR, unused0=0):
2819
- self.msg_type = msg_type
2820
- self.api_version = api_version
2821
- self.seq_id = seq_id
2822
- self.brg_mac = brg_mac
2823
- self.action_id = action_id
2824
- self.unused0 = unused0
2825
- if raw:
2826
- self.set(raw)
2827
-
2828
- def __repr__(self) -> str:
2829
- return "\n==> Packet action_get_battery_sensor_v13 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['action_id', f"0x{self.action_id:X}", self.action_id]], tablefmt="texttable")
2830
-
2831
- def __eq__(self, other):
2832
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
2833
- return (
2834
- self.msg_type == other.msg_type and
2835
- self.api_version == other.api_version and
2836
- self.brg_mac == other.brg_mac and
2837
- self.action_id == other.action_id
2838
- )
2839
- return False
2840
-
2841
- def dump(self):
2842
- string = bitstruct.pack("u8u8u8u48u8u112", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.action_id, self.unused0)
2843
- return string.hex().upper()
2844
-
2845
- def set(self, string):
2846
- d = bitstruct.unpack("u8u8u8u48u8u112", binascii.unhexlify(string))
2847
- self.msg_type = d[0]
2848
- self.api_version = d[1]
2849
- self.seq_id = d[2]
2850
- self.brg_mac = d[3]
2851
- self.action_id = d[4]
2852
- self.unused0 = d[5]
2853
-
2854
2285
  class ActionGetBatterySensorV12():
2855
2286
  def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V12, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_GET_BATTERY_SENSOR, unused0=0):
2856
2287
  self.msg_type = msg_type
@@ -3036,43 +2467,6 @@ class ActionGetBatterySensorV8():
3036
2467
  self.action_id = d[4]
3037
2468
  self.unused0 = d[5]
3038
2469
 
3039
- class ActionGetPofDataV13():
3040
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V13, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_GET_POF_DATA, unused0=0):
3041
- self.msg_type = msg_type
3042
- self.api_version = api_version
3043
- self.seq_id = seq_id
3044
- self.brg_mac = brg_mac
3045
- self.action_id = action_id
3046
- self.unused0 = unused0
3047
- if raw:
3048
- self.set(raw)
3049
-
3050
- def __repr__(self) -> str:
3051
- return "\n==> Packet action_get_pof_data_v13 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['action_id', f"0x{self.action_id:X}", self.action_id]], tablefmt="texttable")
3052
-
3053
- def __eq__(self, other):
3054
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
3055
- return (
3056
- self.msg_type == other.msg_type and
3057
- self.api_version == other.api_version and
3058
- self.brg_mac == other.brg_mac and
3059
- self.action_id == other.action_id
3060
- )
3061
- return False
3062
-
3063
- def dump(self):
3064
- string = bitstruct.pack("u8u8u8u48u8u112", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.action_id, self.unused0)
3065
- return string.hex().upper()
3066
-
3067
- def set(self, string):
3068
- d = bitstruct.unpack("u8u8u8u48u8u112", binascii.unhexlify(string))
3069
- self.msg_type = d[0]
3070
- self.api_version = d[1]
3071
- self.seq_id = d[2]
3072
- self.brg_mac = d[3]
3073
- self.action_id = d[4]
3074
- self.unused0 = d[5]
3075
-
3076
2470
  class ActionGetPofDataV12():
3077
2471
  def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V12, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_GET_POF_DATA, unused0=0):
3078
2472
  self.msg_type = msg_type
@@ -3258,46 +2652,6 @@ class ActionGetPofDataV8():
3258
2652
  self.action_id = d[4]
3259
2653
  self.unused0 = d[5]
3260
2654
 
3261
- class ActionPlStatusV13():
3262
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V13, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_PL_STATUS, status=0, unused0=0):
3263
- self.msg_type = msg_type
3264
- self.api_version = api_version
3265
- self.seq_id = seq_id
3266
- self.brg_mac = brg_mac
3267
- self.action_id = action_id
3268
- self.status = status
3269
- self.unused0 = unused0
3270
- if raw:
3271
- self.set(raw)
3272
-
3273
- def __repr__(self) -> str:
3274
- return "\n==> Packet action_pl_status_v13 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['action_id', f"0x{self.action_id:X}", self.action_id],['status', f"0x{self.status:X}", self.status]], tablefmt="texttable")
3275
-
3276
- def __eq__(self, other):
3277
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
3278
- return (
3279
- self.msg_type == other.msg_type and
3280
- self.api_version == other.api_version and
3281
- self.brg_mac == other.brg_mac and
3282
- self.action_id == other.action_id and
3283
- self.status == other.status
3284
- )
3285
- return False
3286
-
3287
- def dump(self):
3288
- string = bitstruct.pack("u8u8u8u48u8u8u104", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.action_id, self.status, self.unused0)
3289
- return string.hex().upper()
3290
-
3291
- def set(self, string):
3292
- d = bitstruct.unpack("u8u8u8u48u8u8u104", binascii.unhexlify(string))
3293
- self.msg_type = d[0]
3294
- self.api_version = d[1]
3295
- self.seq_id = d[2]
3296
- self.brg_mac = d[3]
3297
- self.action_id = d[4]
3298
- self.status = d[5]
3299
- self.unused0 = d[6]
3300
-
3301
2655
  class ActionPlStatusV12():
3302
2656
  def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_ACTION, api_version=API_VERSION_V12, seq_id=0, brg_mac=ACTION_EMPTY, action_id=ACTION_PL_STATUS, status=0, unused0=0):
3303
2657
  self.msg_type = msg_type
@@ -3418,52 +2772,6 @@ class ActionPlStatusV10():
3418
2772
  self.status = d[5]
3419
2773
  self.unused0 = d[6]
3420
2774
 
3421
- class Brg2BrgOtaV13():
3422
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_BRG2BRG, api_version=API_VERSION_V13, seq_id=0, src_brg_mac=ACTION_EMPTY, action_id=BRG2BRG_ACTION_OTA, dest_brg_mac=ACTION_EMPTY, app=0, bootloader=0, unused0=0):
3423
- self.msg_type = msg_type
3424
- self.api_version = api_version
3425
- self.seq_id = seq_id
3426
- self.src_brg_mac = src_brg_mac
3427
- self.action_id = action_id
3428
- self.dest_brg_mac = dest_brg_mac
3429
- self.app = app
3430
- self.bootloader = bootloader
3431
- self.unused0 = unused0
3432
- if raw:
3433
- self.set(raw)
3434
-
3435
- def __repr__(self) -> str:
3436
- return "\n==> Packet brg2brg_ota_v13 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['src_brg_mac', f"0x{self.src_brg_mac:X}", self.src_brg_mac],['action_id', f"0x{self.action_id:X}", self.action_id],['dest_brg_mac', f"0x{self.dest_brg_mac:X}", self.dest_brg_mac],['app', f"0x{self.app:X}", self.app],['bootloader', f"0x{self.bootloader:X}", self.bootloader]], tablefmt="texttable")
3437
-
3438
- def __eq__(self, other):
3439
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
3440
- return (
3441
- self.msg_type == other.msg_type and
3442
- self.api_version == other.api_version and
3443
- self.src_brg_mac == other.src_brg_mac and
3444
- self.action_id == other.action_id and
3445
- self.dest_brg_mac == other.dest_brg_mac and
3446
- self.app == other.app and
3447
- self.bootloader == other.bootloader
3448
- )
3449
- return False
3450
-
3451
- def dump(self):
3452
- string = bitstruct.pack("u8u8u8u48u8u48u8u8u48", self.msg_type, self.api_version, self.seq_id, self.src_brg_mac, self.action_id, self.dest_brg_mac, self.app, self.bootloader, self.unused0)
3453
- return string.hex().upper()
3454
-
3455
- def set(self, string):
3456
- d = bitstruct.unpack("u8u8u8u48u8u48u8u8u48", binascii.unhexlify(string))
3457
- self.msg_type = d[0]
3458
- self.api_version = d[1]
3459
- self.seq_id = d[2]
3460
- self.src_brg_mac = d[3]
3461
- self.action_id = d[4]
3462
- self.dest_brg_mac = d[5]
3463
- self.app = d[6]
3464
- self.bootloader = d[7]
3465
- self.unused0 = d[8]
3466
-
3467
2775
  class Brg2BrgOtaV12():
3468
2776
  def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_BRG2BRG, api_version=API_VERSION_V12, seq_id=0, src_brg_mac=ACTION_EMPTY, action_id=BRG2BRG_ACTION_OTA, dest_brg_mac=ACTION_EMPTY, app=0, bootloader=0, unused0=0):
3469
2777
  self.msg_type = msg_type
@@ -3638,54 +2946,9 @@ class Brg2BrgOtaV9():
3638
2946
  self.api_version = d[1]
3639
2947
  self.seq_id = d[2]
3640
2948
  self.src_brg_mac = d[3]
3641
- self.action_id = d[4]
3642
- self.dest_brg_mac = d[5]
3643
- self.unused0 = d[6]
3644
-
3645
- class Brg2BrgCfgV13():
3646
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_BRG2BRG, api_version=API_VERSION_V13, seq_id=0, src_brg_mac=ACTION_EMPTY, action_id=BRG2BRG_ACTION_CFG, dest_brg_mac=ACTION_EMPTY, module_type=MODULE_EMPTY, unused0=0, unused1=0):
3647
- self.msg_type = msg_type
3648
- self.api_version = api_version
3649
- self.seq_id = seq_id
3650
- self.src_brg_mac = src_brg_mac
3651
- self.action_id = action_id
3652
- self.dest_brg_mac = dest_brg_mac
3653
- self.module_type = module_type
3654
- self.unused0 = unused0
3655
- self.unused1 = unused1
3656
- if raw:
3657
- self.set(raw)
3658
-
3659
- def __repr__(self) -> str:
3660
- return "\n==> Packet brg2brg_cfg_v13 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['src_brg_mac', f"0x{self.src_brg_mac:X}", self.src_brg_mac],['action_id', f"0x{self.action_id:X}", self.action_id],['dest_brg_mac', f"0x{self.dest_brg_mac:X}", self.dest_brg_mac],['module_type', f"0x{self.module_type:X}", self.module_type]], tablefmt="texttable")
3661
-
3662
- def __eq__(self, other):
3663
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
3664
- return (
3665
- self.msg_type == other.msg_type and
3666
- self.api_version == other.api_version and
3667
- self.src_brg_mac == other.src_brg_mac and
3668
- self.action_id == other.action_id and
3669
- self.dest_brg_mac == other.dest_brg_mac and
3670
- self.module_type == other.module_type
3671
- )
3672
- return False
3673
-
3674
- def dump(self):
3675
- string = bitstruct.pack("u8u8u8u48u8u48u4u4u56", self.msg_type, self.api_version, self.seq_id, self.src_brg_mac, self.action_id, self.dest_brg_mac, self.module_type, self.unused0, self.unused1)
3676
- return string.hex().upper()
3677
-
3678
- def set(self, string):
3679
- d = bitstruct.unpack("u8u8u8u48u8u48u4u4u56", binascii.unhexlify(string))
3680
- self.msg_type = d[0]
3681
- self.api_version = d[1]
3682
- self.seq_id = d[2]
3683
- self.src_brg_mac = d[3]
3684
- self.action_id = d[4]
3685
- self.dest_brg_mac = d[5]
3686
- self.module_type = d[6]
3687
- self.unused0 = d[7]
3688
- self.unused1 = d[8]
2949
+ self.action_id = d[4]
2950
+ self.dest_brg_mac = d[5]
2951
+ self.unused0 = d[6]
3689
2952
 
3690
2953
  class Brg2BrgCfgV12():
3691
2954
  def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_BRG2BRG, api_version=API_VERSION_V12, seq_id=0, src_brg_mac=ACTION_EMPTY, action_id=BRG2BRG_ACTION_CFG, dest_brg_mac=ACTION_EMPTY, module_type=MODULE_EMPTY, unused0=0, unused1=0):
@@ -4937,45 +4200,6 @@ class Gw2BrgHbV1():
4937
4200
  self.rx_rssi = d[5]
4938
4201
  self.unused1 = d[6]
4939
4202
 
4940
- class Brg2GwHbSleepV13():
4941
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB_SLEEP, api_version=API_VERSION_V13, seq_id=0, brg_mac=0, unused0=0, dynamic=0, unused1=0):
4942
- self.msg_type = msg_type
4943
- self.api_version = api_version
4944
- self.seq_id = seq_id
4945
- self.brg_mac = brg_mac
4946
- self.unused0 = unused0
4947
- self.dynamic = dynamic
4948
- self.unused1 = unused1
4949
- if raw:
4950
- self.set(raw)
4951
-
4952
- def __repr__(self) -> str:
4953
- return "\n==> Packet brg2gw_hb_sleep_v13 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['dynamic', f"0x{self.dynamic:X}", self.dynamic]], tablefmt="texttable")
4954
-
4955
- def __eq__(self, other):
4956
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
4957
- return (
4958
- self.msg_type == other.msg_type and
4959
- self.api_version == other.api_version and
4960
- self.brg_mac == other.brg_mac and
4961
- self.dynamic == other.dynamic
4962
- )
4963
- return False
4964
-
4965
- def dump(self):
4966
- string = bitstruct.pack("u8u8u8u48u7u1u112", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.unused0, self.dynamic, self.unused1)
4967
- return string.hex().upper()
4968
-
4969
- def set(self, string):
4970
- d = bitstruct.unpack("u8u8u8u48u7u1u112", binascii.unhexlify(string))
4971
- self.msg_type = d[0]
4972
- self.api_version = d[1]
4973
- self.seq_id = d[2]
4974
- self.brg_mac = d[3]
4975
- self.unused0 = d[4]
4976
- self.dynamic = d[5]
4977
- self.unused1 = d[6]
4978
-
4979
4203
  class Brg2GwHbSleepV12():
4980
4204
  def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB_SLEEP, api_version=API_VERSION_V12, seq_id=0, brg_mac=0, unused0=0, dynamic=0, unused1=0):
4981
4205
  self.msg_type = msg_type
@@ -5093,8 +4317,8 @@ class Brg2GwHbSleepV10():
5093
4317
  self.dynamic = d[5]
5094
4318
  self.unused1 = d[6]
5095
4319
 
5096
- class Brg2GwHbV13():
5097
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V13, seq_id=0, brg_mac=0, non_wlt_rx_pkts_ctr=0, bad_crc_pkts_ctr=0, wlt_rx_pkts_ctr=0, wlt_tx_pkts_ctr=0, tags_ctr=0, tx_queue_watermark=0, dynamic=0, effective_pacer_increment=0):
4320
+ class Brg2GwHbV12():
4321
+ def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V12, seq_id=0, brg_mac=0, non_wlt_rx_pkts_ctr=0, bad_crc_pkts_ctr=0, wlt_rx_pkts_ctr=0, wlt_tx_pkts_ctr=0, tags_ctr=0, tx_queue_watermark=0, dynamic=0, effective_pacer_increment=0):
5098
4322
  self.msg_type = msg_type
5099
4323
  self.api_version = api_version
5100
4324
  self.seq_id = seq_id
@@ -5111,7 +4335,7 @@ class Brg2GwHbV13():
5111
4335
  self.set(raw)
5112
4336
 
5113
4337
  def __repr__(self) -> str:
5114
- return "\n==> Packet brg2gw_hb_v13 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr],['tx_queue_watermark', f"0x{self.tx_queue_watermark:X}", self.tx_queue_watermark],['dynamic', f"0x{self.dynamic:X}", self.dynamic],['effective_pacer_increment', f"0x{self.effective_pacer_increment:X}", self.effective_pacer_increment]], tablefmt="texttable")
4338
+ return "\n==> Packet brg2gw_hb_v12 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr],['tx_queue_watermark', f"0x{self.tx_queue_watermark:X}", self.tx_queue_watermark],['dynamic', f"0x{self.dynamic:X}", self.dynamic],['effective_pacer_increment', f"0x{self.effective_pacer_increment:X}", self.effective_pacer_increment]], tablefmt="texttable")
5115
4339
 
5116
4340
  def __eq__(self, other):
5117
4341
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -5149,8 +4373,8 @@ class Brg2GwHbV13():
5149
4373
  self.dynamic = d[10]
5150
4374
  self.effective_pacer_increment = d[11]
5151
4375
 
5152
- class Brg2GwHbV12():
5153
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V12, seq_id=0, brg_mac=0, non_wlt_rx_pkts_ctr=0, bad_crc_pkts_ctr=0, wlt_rx_pkts_ctr=0, wlt_tx_pkts_ctr=0, tags_ctr=0, tx_queue_watermark=0, dynamic=0, effective_pacer_increment=0):
4376
+ class Brg2GwHbV11():
4377
+ def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V11, seq_id=0, brg_mac=0, non_wlt_rx_pkts_ctr=0, bad_crc_pkts_ctr=0, wlt_rx_pkts_ctr=0, wlt_tx_pkts_ctr=0, tags_ctr=0, tx_queue_watermark=0, dynamic=0, effective_pacer_increment=0):
5154
4378
  self.msg_type = msg_type
5155
4379
  self.api_version = api_version
5156
4380
  self.seq_id = seq_id
@@ -5167,7 +4391,7 @@ class Brg2GwHbV12():
5167
4391
  self.set(raw)
5168
4392
 
5169
4393
  def __repr__(self) -> str:
5170
- return "\n==> Packet brg2gw_hb_v12 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr],['tx_queue_watermark', f"0x{self.tx_queue_watermark:X}", self.tx_queue_watermark],['dynamic', f"0x{self.dynamic:X}", self.dynamic],['effective_pacer_increment', f"0x{self.effective_pacer_increment:X}", self.effective_pacer_increment]], tablefmt="texttable")
4394
+ return "\n==> Packet brg2gw_hb_v11 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr],['tx_queue_watermark', f"0x{self.tx_queue_watermark:X}", self.tx_queue_watermark],['dynamic', f"0x{self.dynamic:X}", self.dynamic],['effective_pacer_increment', f"0x{self.effective_pacer_increment:X}", self.effective_pacer_increment]], tablefmt="texttable")
5171
4395
 
5172
4396
  def __eq__(self, other):
5173
4397
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -5205,8 +4429,8 @@ class Brg2GwHbV12():
5205
4429
  self.dynamic = d[10]
5206
4430
  self.effective_pacer_increment = d[11]
5207
4431
 
5208
- class Brg2GwHbV11():
5209
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V11, seq_id=0, brg_mac=0, non_wlt_rx_pkts_ctr=0, bad_crc_pkts_ctr=0, wlt_rx_pkts_ctr=0, wlt_tx_pkts_ctr=0, tags_ctr=0, tx_queue_watermark=0, dynamic=0, effective_pacer_increment=0):
4432
+ class Brg2GwHbV10():
4433
+ def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V10, seq_id=0, brg_mac=0, non_wlt_rx_pkts_ctr=0, bad_crc_pkts_ctr=0, wlt_rx_pkts_ctr=0, wlt_tx_pkts_ctr=0, tags_ctr=0, tx_queue_watermark=0, dynamic=0, effective_pacer_increment=0):
5210
4434
  self.msg_type = msg_type
5211
4435
  self.api_version = api_version
5212
4436
  self.seq_id = seq_id
@@ -5223,7 +4447,7 @@ class Brg2GwHbV11():
5223
4447
  self.set(raw)
5224
4448
 
5225
4449
  def __repr__(self) -> str:
5226
- return "\n==> Packet brg2gw_hb_v11 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr],['tx_queue_watermark', f"0x{self.tx_queue_watermark:X}", self.tx_queue_watermark],['dynamic', f"0x{self.dynamic:X}", self.dynamic],['effective_pacer_increment', f"0x{self.effective_pacer_increment:X}", self.effective_pacer_increment]], tablefmt="texttable")
4450
+ return "\n==> Packet brg2gw_hb_v10 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr],['tx_queue_watermark', f"0x{self.tx_queue_watermark:X}", self.tx_queue_watermark],['dynamic', f"0x{self.dynamic:X}", self.dynamic],['effective_pacer_increment', f"0x{self.effective_pacer_increment:X}", self.effective_pacer_increment]], tablefmt="texttable")
5227
4451
 
5228
4452
  def __eq__(self, other):
5229
4453
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -5261,8 +4485,8 @@ class Brg2GwHbV11():
5261
4485
  self.dynamic = d[10]
5262
4486
  self.effective_pacer_increment = d[11]
5263
4487
 
5264
- class Brg2GwHbV10():
5265
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V10, seq_id=0, brg_mac=0, non_wlt_rx_pkts_ctr=0, bad_crc_pkts_ctr=0, wlt_rx_pkts_ctr=0, wlt_tx_pkts_ctr=0, tags_ctr=0, tx_queue_watermark=0, dynamic=0, effective_pacer_increment=0):
4488
+ class Brg2GwHbV9():
4489
+ def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V9, seq_id=0, brg_mac=0, non_wlt_rx_pkts_ctr=0, bad_crc_pkts_ctr=0, wlt_rx_pkts_ctr=0, wlt_tx_pkts_ctr=0, tags_ctr=0, tx_queue_watermark=0, effective_pacer_increment=0):
5266
4490
  self.msg_type = msg_type
5267
4491
  self.api_version = api_version
5268
4492
  self.seq_id = seq_id
@@ -5273,13 +4497,12 @@ class Brg2GwHbV10():
5273
4497
  self.wlt_tx_pkts_ctr = wlt_tx_pkts_ctr
5274
4498
  self.tags_ctr = tags_ctr
5275
4499
  self.tx_queue_watermark = tx_queue_watermark
5276
- self.dynamic = dynamic
5277
4500
  self.effective_pacer_increment = effective_pacer_increment
5278
4501
  if raw:
5279
4502
  self.set(raw)
5280
4503
 
5281
4504
  def __repr__(self) -> str:
5282
- return "\n==> Packet brg2gw_hb_v10 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr],['tx_queue_watermark', f"0x{self.tx_queue_watermark:X}", self.tx_queue_watermark],['dynamic', f"0x{self.dynamic:X}", self.dynamic],['effective_pacer_increment', f"0x{self.effective_pacer_increment:X}", self.effective_pacer_increment]], tablefmt="texttable")
4505
+ return "\n==> Packet brg2gw_hb_v9 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr],['tx_queue_watermark', f"0x{self.tx_queue_watermark:X}", self.tx_queue_watermark],['effective_pacer_increment', f"0x{self.effective_pacer_increment:X}", self.effective_pacer_increment]], tablefmt="texttable")
5283
4506
 
5284
4507
  def __eq__(self, other):
5285
4508
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -5293,17 +4516,16 @@ class Brg2GwHbV10():
5293
4516
  self.wlt_tx_pkts_ctr == other.wlt_tx_pkts_ctr and
5294
4517
  self.tags_ctr == other.tags_ctr and
5295
4518
  self.tx_queue_watermark == other.tx_queue_watermark and
5296
- self.dynamic == other.dynamic and
5297
4519
  self.effective_pacer_increment == other.effective_pacer_increment
5298
4520
  )
5299
4521
  return False
5300
4522
 
5301
4523
  def dump(self):
5302
- string = bitstruct.pack("u8u8u8u48u24u24u24u16u16u8u1u7", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.non_wlt_rx_pkts_ctr, self.bad_crc_pkts_ctr, self.wlt_rx_pkts_ctr, self.wlt_tx_pkts_ctr, self.tags_ctr, self.tx_queue_watermark, self.dynamic, self.effective_pacer_increment)
4524
+ string = bitstruct.pack("u8u8u8u48u24u24u24u16u16u8u8", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.non_wlt_rx_pkts_ctr, self.bad_crc_pkts_ctr, self.wlt_rx_pkts_ctr, self.wlt_tx_pkts_ctr, self.tags_ctr, self.tx_queue_watermark, self.effective_pacer_increment)
5303
4525
  return string.hex().upper()
5304
4526
 
5305
4527
  def set(self, string):
5306
- d = bitstruct.unpack("u8u8u8u48u24u24u24u16u16u8u1u7", binascii.unhexlify(string))
4528
+ d = bitstruct.unpack("u8u8u8u48u24u24u24u16u16u8u8", binascii.unhexlify(string))
5307
4529
  self.msg_type = d[0]
5308
4530
  self.api_version = d[1]
5309
4531
  self.seq_id = d[2]
@@ -5314,11 +4536,10 @@ class Brg2GwHbV10():
5314
4536
  self.wlt_tx_pkts_ctr = d[7]
5315
4537
  self.tags_ctr = d[8]
5316
4538
  self.tx_queue_watermark = d[9]
5317
- self.dynamic = d[10]
5318
- self.effective_pacer_increment = d[11]
4539
+ self.effective_pacer_increment = d[10]
5319
4540
 
5320
- class Brg2GwHbV9():
5321
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V9, seq_id=0, brg_mac=0, non_wlt_rx_pkts_ctr=0, bad_crc_pkts_ctr=0, wlt_rx_pkts_ctr=0, wlt_tx_pkts_ctr=0, tags_ctr=0, tx_queue_watermark=0, effective_pacer_increment=0):
4541
+ class Brg2GwHbV8():
4542
+ def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V8, seq_id=0, brg_mac=0, non_wlt_rx_pkts_ctr=0, bad_crc_pkts_ctr=0, wlt_rx_pkts_ctr=0, wlt_tx_pkts_ctr=0, tags_ctr=0, tx_queue_watermark=0, unused=0):
5322
4543
  self.msg_type = msg_type
5323
4544
  self.api_version = api_version
5324
4545
  self.seq_id = seq_id
@@ -5329,12 +4550,12 @@ class Brg2GwHbV9():
5329
4550
  self.wlt_tx_pkts_ctr = wlt_tx_pkts_ctr
5330
4551
  self.tags_ctr = tags_ctr
5331
4552
  self.tx_queue_watermark = tx_queue_watermark
5332
- self.effective_pacer_increment = effective_pacer_increment
4553
+ self.unused = unused
5333
4554
  if raw:
5334
4555
  self.set(raw)
5335
4556
 
5336
4557
  def __repr__(self) -> str:
5337
- return "\n==> Packet brg2gw_hb_v9 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr],['tx_queue_watermark', f"0x{self.tx_queue_watermark:X}", self.tx_queue_watermark],['effective_pacer_increment', f"0x{self.effective_pacer_increment:X}", self.effective_pacer_increment]], tablefmt="texttable")
4558
+ return "\n==> Packet brg2gw_hb_v8 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr],['tx_queue_watermark', f"0x{self.tx_queue_watermark:X}", self.tx_queue_watermark]], tablefmt="texttable")
5338
4559
 
5339
4560
  def __eq__(self, other):
5340
4561
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -5347,13 +4568,12 @@ class Brg2GwHbV9():
5347
4568
  self.wlt_rx_pkts_ctr == other.wlt_rx_pkts_ctr and
5348
4569
  self.wlt_tx_pkts_ctr == other.wlt_tx_pkts_ctr and
5349
4570
  self.tags_ctr == other.tags_ctr and
5350
- self.tx_queue_watermark == other.tx_queue_watermark and
5351
- self.effective_pacer_increment == other.effective_pacer_increment
4571
+ self.tx_queue_watermark == other.tx_queue_watermark
5352
4572
  )
5353
4573
  return False
5354
4574
 
5355
4575
  def dump(self):
5356
- string = bitstruct.pack("u8u8u8u48u24u24u24u16u16u8u8", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.non_wlt_rx_pkts_ctr, self.bad_crc_pkts_ctr, self.wlt_rx_pkts_ctr, self.wlt_tx_pkts_ctr, self.tags_ctr, self.tx_queue_watermark, self.effective_pacer_increment)
4576
+ string = bitstruct.pack("u8u8u8u48u24u24u24u16u16u8u8", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.non_wlt_rx_pkts_ctr, self.bad_crc_pkts_ctr, self.wlt_rx_pkts_ctr, self.wlt_tx_pkts_ctr, self.tags_ctr, self.tx_queue_watermark, self.unused)
5357
4577
  return string.hex().upper()
5358
4578
 
5359
4579
  def set(self, string):
@@ -5368,10 +4588,10 @@ class Brg2GwHbV9():
5368
4588
  self.wlt_tx_pkts_ctr = d[7]
5369
4589
  self.tags_ctr = d[8]
5370
4590
  self.tx_queue_watermark = d[9]
5371
- self.effective_pacer_increment = d[10]
4591
+ self.unused = d[10]
5372
4592
 
5373
- class Brg2GwHbV8():
5374
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V8, seq_id=0, brg_mac=0, non_wlt_rx_pkts_ctr=0, bad_crc_pkts_ctr=0, wlt_rx_pkts_ctr=0, wlt_tx_pkts_ctr=0, tags_ctr=0, tx_queue_watermark=0, unused=0):
4593
+ class Brg2GwHbV7():
4594
+ def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V7, seq_id=0, brg_mac=0, non_wlt_rx_pkts_ctr=0, bad_crc_pkts_ctr=0, wlt_rx_pkts_ctr=0, wlt_tx_pkts_ctr=0, tags_ctr=0, unused=0):
5375
4595
  self.msg_type = msg_type
5376
4596
  self.api_version = api_version
5377
4597
  self.seq_id = seq_id
@@ -5381,13 +4601,12 @@ class Brg2GwHbV8():
5381
4601
  self.wlt_rx_pkts_ctr = wlt_rx_pkts_ctr
5382
4602
  self.wlt_tx_pkts_ctr = wlt_tx_pkts_ctr
5383
4603
  self.tags_ctr = tags_ctr
5384
- self.tx_queue_watermark = tx_queue_watermark
5385
4604
  self.unused = unused
5386
4605
  if raw:
5387
4606
  self.set(raw)
5388
4607
 
5389
4608
  def __repr__(self) -> str:
5390
- return "\n==> Packet brg2gw_hb_v8 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr],['tx_queue_watermark', f"0x{self.tx_queue_watermark:X}", self.tx_queue_watermark]], tablefmt="texttable")
4609
+ return "\n==> Packet brg2gw_hb_v7 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr]], tablefmt="texttable")
5391
4610
 
5392
4611
  def __eq__(self, other):
5393
4612
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -5399,17 +4618,16 @@ class Brg2GwHbV8():
5399
4618
  self.bad_crc_pkts_ctr == other.bad_crc_pkts_ctr and
5400
4619
  self.wlt_rx_pkts_ctr == other.wlt_rx_pkts_ctr and
5401
4620
  self.wlt_tx_pkts_ctr == other.wlt_tx_pkts_ctr and
5402
- self.tags_ctr == other.tags_ctr and
5403
- self.tx_queue_watermark == other.tx_queue_watermark
4621
+ self.tags_ctr == other.tags_ctr
5404
4622
  )
5405
4623
  return False
5406
4624
 
5407
4625
  def dump(self):
5408
- string = bitstruct.pack("u8u8u8u48u24u24u24u16u16u8u8", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.non_wlt_rx_pkts_ctr, self.bad_crc_pkts_ctr, self.wlt_rx_pkts_ctr, self.wlt_tx_pkts_ctr, self.tags_ctr, self.tx_queue_watermark, self.unused)
4626
+ string = bitstruct.pack("u8u8u8u48u24u24u24u16u16u16", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.non_wlt_rx_pkts_ctr, self.bad_crc_pkts_ctr, self.wlt_rx_pkts_ctr, self.wlt_tx_pkts_ctr, self.tags_ctr, self.unused)
5409
4627
  return string.hex().upper()
5410
4628
 
5411
4629
  def set(self, string):
5412
- d = bitstruct.unpack("u8u8u8u48u24u24u24u16u16u8u8", binascii.unhexlify(string))
4630
+ d = bitstruct.unpack("u8u8u8u48u24u24u24u16u16u16", binascii.unhexlify(string))
5413
4631
  self.msg_type = d[0]
5414
4632
  self.api_version = d[1]
5415
4633
  self.seq_id = d[2]
@@ -5419,11 +4637,10 @@ class Brg2GwHbV8():
5419
4637
  self.wlt_rx_pkts_ctr = d[6]
5420
4638
  self.wlt_tx_pkts_ctr = d[7]
5421
4639
  self.tags_ctr = d[8]
5422
- self.tx_queue_watermark = d[9]
5423
- self.unused = d[10]
4640
+ self.unused = d[9]
5424
4641
 
5425
- class Brg2GwHbV7():
5426
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V7, seq_id=0, brg_mac=0, non_wlt_rx_pkts_ctr=0, bad_crc_pkts_ctr=0, wlt_rx_pkts_ctr=0, wlt_tx_pkts_ctr=0, tags_ctr=0, unused=0):
4642
+ class Brg2GwHbV6():
4643
+ def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V6, seq_id=0, brg_mac=0, non_wlt_rx_pkts_ctr=0, bad_crc_pkts_ctr=0, wlt_rx_pkts_ctr=0, wlt_tx_pkts_ctr=0, tags_ctr=0, unused=0):
5427
4644
  self.msg_type = msg_type
5428
4645
  self.api_version = api_version
5429
4646
  self.seq_id = seq_id
@@ -5438,7 +4655,7 @@ class Brg2GwHbV7():
5438
4655
  self.set(raw)
5439
4656
 
5440
4657
  def __repr__(self) -> str:
5441
- return "\n==> Packet brg2gw_hb_v7 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr]], tablefmt="texttable")
4658
+ return "\n==> Packet brg2gw_hb_v6 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr]], tablefmt="texttable")
5442
4659
 
5443
4660
  def __eq__(self, other):
5444
4661
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -5471,7 +4688,7 @@ class Brg2GwHbV7():
5471
4688
  self.tags_ctr = d[8]
5472
4689
  self.unused = d[9]
5473
4690
 
5474
- class Brg2GwHbV6():
4691
+ class Brg2GwHbV5():
5475
4692
  def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V6, seq_id=0, brg_mac=0, non_wlt_rx_pkts_ctr=0, bad_crc_pkts_ctr=0, wlt_rx_pkts_ctr=0, wlt_tx_pkts_ctr=0, tags_ctr=0, unused=0):
5476
4693
  self.msg_type = msg_type
5477
4694
  self.api_version = api_version
@@ -5487,7 +4704,7 @@ class Brg2GwHbV6():
5487
4704
  self.set(raw)
5488
4705
 
5489
4706
  def __repr__(self) -> str:
5490
- return "\n==> Packet brg2gw_hb_v6 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr]], tablefmt="texttable")
4707
+ return "\n==> Packet brg2gw_hb_v5 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr]], tablefmt="texttable")
5491
4708
 
5492
4709
  def __eq__(self, other):
5493
4710
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -5520,179 +4737,256 @@ class Brg2GwHbV6():
5520
4737
  self.tags_ctr = d[8]
5521
4738
  self.unused = d[9]
5522
4739
 
5523
- class Brg2GwHbV5():
5524
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V6, seq_id=0, brg_mac=0, non_wlt_rx_pkts_ctr=0, bad_crc_pkts_ctr=0, wlt_rx_pkts_ctr=0, wlt_tx_pkts_ctr=0, tags_ctr=0, unused=0):
4740
+ class Brg2GwHbV1():
4741
+ def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V1, seq_id=0, gw_mac=0, brg_mac=0, sent_pkts_ctr=0, non_wlt_pkts_ctr=0, tags_ctr=0, unused1=0):
5525
4742
  self.msg_type = msg_type
5526
4743
  self.api_version = api_version
5527
4744
  self.seq_id = seq_id
4745
+ self.gw_mac = gw_mac
5528
4746
  self.brg_mac = brg_mac
5529
- self.non_wlt_rx_pkts_ctr = non_wlt_rx_pkts_ctr
5530
- self.bad_crc_pkts_ctr = bad_crc_pkts_ctr
5531
- self.wlt_rx_pkts_ctr = wlt_rx_pkts_ctr
5532
- self.wlt_tx_pkts_ctr = wlt_tx_pkts_ctr
4747
+ self.sent_pkts_ctr = sent_pkts_ctr
4748
+ self.non_wlt_pkts_ctr = non_wlt_pkts_ctr
5533
4749
  self.tags_ctr = tags_ctr
5534
- self.unused = unused
4750
+ self.unused1 = unused1
5535
4751
  if raw:
5536
4752
  self.set(raw)
5537
4753
 
5538
4754
  def __repr__(self) -> str:
5539
- return "\n==> Packet brg2gw_hb_v5 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['non_wlt_rx_pkts_ctr', f"0x{self.non_wlt_rx_pkts_ctr:X}", self.non_wlt_rx_pkts_ctr],['bad_crc_pkts_ctr', f"0x{self.bad_crc_pkts_ctr:X}", self.bad_crc_pkts_ctr],['wlt_rx_pkts_ctr', f"0x{self.wlt_rx_pkts_ctr:X}", self.wlt_rx_pkts_ctr],['wlt_tx_pkts_ctr', f"0x{self.wlt_tx_pkts_ctr:X}", self.wlt_tx_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr]], tablefmt="texttable")
4755
+ return "\n==> Packet brg2gw_hb_v1 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['gw_mac', f"0x{self.gw_mac:X}", self.gw_mac],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['sent_pkts_ctr', f"0x{self.sent_pkts_ctr:X}", self.sent_pkts_ctr],['non_wlt_pkts_ctr', f"0x{self.non_wlt_pkts_ctr:X}", self.non_wlt_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr]], tablefmt="texttable")
5540
4756
 
5541
4757
  def __eq__(self, other):
5542
4758
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
5543
4759
  return (
5544
4760
  self.msg_type == other.msg_type and
5545
4761
  self.api_version == other.api_version and
4762
+ self.gw_mac == other.gw_mac and
5546
4763
  self.brg_mac == other.brg_mac and
5547
- self.non_wlt_rx_pkts_ctr == other.non_wlt_rx_pkts_ctr and
5548
- self.bad_crc_pkts_ctr == other.bad_crc_pkts_ctr and
5549
- self.wlt_rx_pkts_ctr == other.wlt_rx_pkts_ctr and
5550
- self.wlt_tx_pkts_ctr == other.wlt_tx_pkts_ctr and
4764
+ self.sent_pkts_ctr == other.sent_pkts_ctr and
4765
+ self.non_wlt_pkts_ctr == other.non_wlt_pkts_ctr and
5551
4766
  self.tags_ctr == other.tags_ctr
5552
4767
  )
5553
4768
  return False
5554
4769
 
5555
4770
  def dump(self):
5556
- string = bitstruct.pack("u8u8u8u48u24u24u24u16u16u16", self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.non_wlt_rx_pkts_ctr, self.bad_crc_pkts_ctr, self.wlt_rx_pkts_ctr, self.wlt_tx_pkts_ctr, self.tags_ctr, self.unused)
4771
+ string = bitstruct.pack("u8u8u8u48u48u16u16u16u24", self.msg_type, self.api_version, self.seq_id, self.gw_mac, self.brg_mac, self.sent_pkts_ctr, self.non_wlt_pkts_ctr, self.tags_ctr, self.unused1)
4772
+ return string.hex().upper()
4773
+
4774
+ def set(self, string):
4775
+ d = bitstruct.unpack("u8u8u8u48u48u16u16u16u24", binascii.unhexlify(string))
4776
+ self.msg_type = d[0]
4777
+ self.api_version = d[1]
4778
+ self.seq_id = d[2]
4779
+ self.gw_mac = d[3]
4780
+ self.brg_mac = d[4]
4781
+ self.sent_pkts_ctr = d[5]
4782
+ self.non_wlt_pkts_ctr = d[6]
4783
+ self.tags_ctr = d[7]
4784
+ self.unused1 = d[8]
4785
+
4786
+ class SideInfo():
4787
+ def __init__(self, raw='', brg_mac=0, nfpkt=0, rssi=0, unused2=0, unused0=0, unused1=0, pkt_id=0):
4788
+ self.brg_mac = brg_mac
4789
+ self.nfpkt = nfpkt
4790
+ self.rssi = rssi
4791
+ self.unused2 = unused2
4792
+ self.unused0 = unused0
4793
+ self.unused1 = unused1
4794
+ self.pkt_id = pkt_id
4795
+ if raw:
4796
+ self.set(raw)
4797
+
4798
+ def __repr__(self) -> str:
4799
+ return "\n==> Packet side_info <==\n" + tabulate.tabulate([['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['nfpkt', f"0x{self.nfpkt:X}", self.nfpkt],['rssi', f"0x{self.rssi:X}", self.rssi],['pkt_id', f"0x{self.pkt_id:X}", self.pkt_id]], tablefmt="texttable")
4800
+
4801
+ def __eq__(self, other):
4802
+ if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
4803
+ return (
4804
+ self.brg_mac == other.brg_mac and
4805
+ self.nfpkt == other.nfpkt and
4806
+ self.rssi == other.rssi and
4807
+ self.pkt_id == other.pkt_id
4808
+ )
4809
+ return False
4810
+
4811
+ def dump(self):
4812
+ string = bitstruct.pack("u48u16u8u4u4u80u32", self.brg_mac, self.nfpkt, self.rssi, self.unused2, self.unused0, self.unused1, self.pkt_id)
4813
+ return string.hex().upper()
4814
+
4815
+ def set(self, string):
4816
+ d = bitstruct.unpack("u48u16u8u4u4u80u32", binascii.unhexlify(string))
4817
+ self.brg_mac = d[0]
4818
+ self.nfpkt = d[1]
4819
+ self.rssi = d[2]
4820
+ self.unused2 = d[3]
4821
+ self.unused0 = d[4]
4822
+ self.unused1 = d[5]
4823
+ self.pkt_id = d[6]
4824
+
4825
+ class SensorData():
4826
+ def __init__(self, raw='', data=0, pkt_id=0):
4827
+ self.data = data
4828
+ self.pkt_id = pkt_id
4829
+ if raw:
4830
+ self.set(raw)
4831
+
4832
+ def __repr__(self) -> str:
4833
+ return "\n==> Packet sensor_data <==\n" + tabulate.tabulate([['data', f"0x{self.data:X}", self.data],['pkt_id', f"0x{self.pkt_id:X}", self.pkt_id]], tablefmt="texttable")
4834
+
4835
+ def __eq__(self, other):
4836
+ if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
4837
+ return (
4838
+ self.data == other.data and
4839
+ self.pkt_id == other.pkt_id
4840
+ )
4841
+ return False
4842
+
4843
+ def dump(self):
4844
+ string = bitstruct.pack("u216u32", self.data, self.pkt_id)
4845
+ return string.hex().upper()
4846
+
4847
+ def set(self, string):
4848
+ d = bitstruct.unpack("u216u32", binascii.unhexlify(string))
4849
+ self.data = d[0]
4850
+ self.pkt_id = d[1]
4851
+
4852
+ class SideInfoSensor():
4853
+ def __init__(self, raw='', brg_mac=0, nfpkt=0, rssi=0, unused2=0, unused0=0, sensor_mac=0, sensor_ad_type=0, sensor_uuid_msb=0, sensor_uuid_lsb=0, api_version=0, unused1=0, is_scrambled=0, is_sensor_embedded=0, is_sensor=0, pkt_id=0):
4854
+ self.brg_mac = brg_mac
4855
+ self.nfpkt = nfpkt
4856
+ self.rssi = rssi
4857
+ self.unused2 = unused2
4858
+ self.unused0 = unused0
4859
+ self.sensor_mac = sensor_mac
4860
+ self.sensor_ad_type = sensor_ad_type
4861
+ self.sensor_uuid_msb = sensor_uuid_msb
4862
+ self.sensor_uuid_lsb = sensor_uuid_lsb
4863
+ self.api_version = api_version
4864
+ self.unused1 = unused1
4865
+ self.is_scrambled = is_scrambled
4866
+ self.is_sensor_embedded = is_sensor_embedded
4867
+ self.is_sensor = is_sensor
4868
+ self.pkt_id = pkt_id
4869
+ if raw:
4870
+ self.set(raw)
4871
+
4872
+ def __repr__(self) -> str:
4873
+ return "\n==> Packet side_info_sensor <==\n" + tabulate.tabulate([['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['nfpkt', f"0x{self.nfpkt:X}", self.nfpkt],['rssi', f"0x{self.rssi:X}", self.rssi],['sensor_mac', f"0x{self.sensor_mac:X}", self.sensor_mac],['sensor_ad_type', f"0x{self.sensor_ad_type:X}", self.sensor_ad_type],['sensor_uuid_msb', f"0x{self.sensor_uuid_msb:X}", self.sensor_uuid_msb],['sensor_uuid_lsb', f"0x{self.sensor_uuid_lsb:X}", self.sensor_uuid_lsb],['api_version', f"0x{self.api_version:X}", self.api_version],['is_scrambled', f"0x{self.is_scrambled:X}", self.is_scrambled],['is_sensor_embedded', f"0x{self.is_sensor_embedded:X}", self.is_sensor_embedded],['is_sensor', f"0x{self.is_sensor:X}", self.is_sensor],['pkt_id', f"0x{self.pkt_id:X}", self.pkt_id]], tablefmt="texttable")
4874
+
4875
+ def __eq__(self, other):
4876
+ if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
4877
+ return (
4878
+ self.brg_mac == other.brg_mac and
4879
+ self.nfpkt == other.nfpkt and
4880
+ self.rssi == other.rssi and
4881
+ self.sensor_mac == other.sensor_mac and
4882
+ self.sensor_ad_type == other.sensor_ad_type and
4883
+ self.sensor_uuid_msb == other.sensor_uuid_msb and
4884
+ self.sensor_uuid_lsb == other.sensor_uuid_lsb and
4885
+ self.api_version == other.api_version and
4886
+ self.is_scrambled == other.is_scrambled and
4887
+ self.is_sensor_embedded == other.is_sensor_embedded and
4888
+ self.is_sensor == other.is_sensor and
4889
+ self.pkt_id == other.pkt_id
4890
+ )
4891
+ return False
4892
+
4893
+ def dump(self):
4894
+ string = bitstruct.pack("u48u16u8u4u4u48u8u8u8u4u1u1u1u1u32", self.brg_mac, self.nfpkt, self.rssi, self.unused2, self.unused0, self.sensor_mac, self.sensor_ad_type, self.sensor_uuid_msb, self.sensor_uuid_lsb, self.api_version, self.unused1, self.is_scrambled, self.is_sensor_embedded, self.is_sensor, self.pkt_id)
5557
4895
  return string.hex().upper()
5558
4896
 
5559
4897
  def set(self, string):
5560
- d = bitstruct.unpack("u8u8u8u48u24u24u24u16u16u16", binascii.unhexlify(string))
5561
- self.msg_type = d[0]
5562
- self.api_version = d[1]
5563
- self.seq_id = d[2]
5564
- self.brg_mac = d[3]
5565
- self.non_wlt_rx_pkts_ctr = d[4]
5566
- self.bad_crc_pkts_ctr = d[5]
5567
- self.wlt_rx_pkts_ctr = d[6]
5568
- self.wlt_tx_pkts_ctr = d[7]
5569
- self.tags_ctr = d[8]
5570
- self.unused = d[9]
4898
+ d = bitstruct.unpack("u48u16u8u4u4u48u8u8u8u4u1u1u1u1u32", binascii.unhexlify(string))
4899
+ self.brg_mac = d[0]
4900
+ self.nfpkt = d[1]
4901
+ self.rssi = d[2]
4902
+ self.unused2 = d[3]
4903
+ self.unused0 = d[4]
4904
+ self.sensor_mac = d[5]
4905
+ self.sensor_ad_type = d[6]
4906
+ self.sensor_uuid_msb = d[7]
4907
+ self.sensor_uuid_lsb = d[8]
4908
+ self.api_version = d[9]
4909
+ self.unused1 = d[10]
4910
+ self.is_scrambled = d[11]
4911
+ self.is_sensor_embedded = d[12]
4912
+ self.is_sensor = d[13]
4913
+ self.pkt_id = d[14]
5571
4914
 
5572
- class Brg2GwHbV1():
5573
- def __init__(self, raw='', msg_type=BRG_MGMT_MSG_TYPE_HB, api_version=API_VERSION_V1, seq_id=0, gw_mac=0, brg_mac=0, sent_pkts_ctr=0, non_wlt_pkts_ctr=0, tags_ctr=0, unused1=0):
5574
- self.msg_type = msg_type
5575
- self.api_version = api_version
5576
- self.seq_id = seq_id
5577
- self.gw_mac = gw_mac
5578
- self.brg_mac = brg_mac
5579
- self.sent_pkts_ctr = sent_pkts_ctr
5580
- self.non_wlt_pkts_ctr = non_wlt_pkts_ctr
5581
- self.tags_ctr = tags_ctr
5582
- self.unused1 = unused1
4915
+ class PktFilterStruct():
4916
+ def __init__(self, raw='', unused=0, mask_enable=0, p3_pacing=0, p2_pacing=0, p1_pacing=0, p0_pacing=0):
4917
+ self.unused = unused
4918
+ self.mask_enable = mask_enable
4919
+ self.p3_pacing = p3_pacing
4920
+ self.p2_pacing = p2_pacing
4921
+ self.p1_pacing = p1_pacing
4922
+ self.p0_pacing = p0_pacing
5583
4923
  if raw:
5584
4924
  self.set(raw)
5585
4925
 
5586
4926
  def __repr__(self) -> str:
5587
- return "\n==> Packet brg2gw_hb_v1 <==\n" + tabulate.tabulate([['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['gw_mac', f"0x{self.gw_mac:X}", self.gw_mac],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['sent_pkts_ctr', f"0x{self.sent_pkts_ctr:X}", self.sent_pkts_ctr],['non_wlt_pkts_ctr', f"0x{self.non_wlt_pkts_ctr:X}", self.non_wlt_pkts_ctr],['tags_ctr', f"0x{self.tags_ctr:X}", self.tags_ctr]], tablefmt="texttable")
4927
+ return "\n==> Packet pkt_filter_struct <==\n" + tabulate.tabulate([['mask_enable', f"0x{self.mask_enable:X}", self.mask_enable],['p3_pacing', f"0x{self.p3_pacing:X}", self.p3_pacing],['p2_pacing', f"0x{self.p2_pacing:X}", self.p2_pacing],['p1_pacing', f"0x{self.p1_pacing:X}", self.p1_pacing],['p0_pacing', f"0x{self.p0_pacing:X}", self.p0_pacing]], tablefmt="texttable")
5588
4928
 
5589
4929
  def __eq__(self, other):
5590
4930
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
5591
4931
  return (
5592
- self.msg_type == other.msg_type and
5593
- self.api_version == other.api_version and
5594
- self.gw_mac == other.gw_mac and
5595
- self.brg_mac == other.brg_mac and
5596
- self.sent_pkts_ctr == other.sent_pkts_ctr and
5597
- self.non_wlt_pkts_ctr == other.non_wlt_pkts_ctr and
5598
- self.tags_ctr == other.tags_ctr
4932
+ self.mask_enable == other.mask_enable and
4933
+ self.p3_pacing == other.p3_pacing and
4934
+ self.p2_pacing == other.p2_pacing and
4935
+ self.p1_pacing == other.p1_pacing and
4936
+ self.p0_pacing == other.p0_pacing
5599
4937
  )
5600
4938
  return False
5601
4939
 
5602
4940
  def dump(self):
5603
- string = bitstruct.pack("u8u8u8u48u48u16u16u16u24", self.msg_type, self.api_version, self.seq_id, self.gw_mac, self.brg_mac, self.sent_pkts_ctr, self.non_wlt_pkts_ctr, self.tags_ctr, self.unused1)
4941
+ string = bitstruct.pack("u3u1u1u1u1u1", self.unused, self.mask_enable, self.p3_pacing, self.p2_pacing, self.p1_pacing, self.p0_pacing)
5604
4942
  return string.hex().upper()
5605
4943
 
5606
4944
  def set(self, string):
5607
- d = bitstruct.unpack("u8u8u8u48u48u16u16u16u24", binascii.unhexlify(string))
5608
- self.msg_type = d[0]
5609
- self.api_version = d[1]
5610
- self.seq_id = d[2]
5611
- self.gw_mac = d[3]
5612
- self.brg_mac = d[4]
5613
- self.sent_pkts_ctr = d[5]
5614
- self.non_wlt_pkts_ctr = d[6]
5615
- self.tags_ctr = d[7]
5616
- self.unused1 = d[8]
4945
+ d = bitstruct.unpack("u3u1u1u1u1u1", binascii.unhexlify(string))
4946
+ self.unused = d[0]
4947
+ self.mask_enable = d[1]
4948
+ self.p3_pacing = d[2]
4949
+ self.p2_pacing = d[3]
4950
+ self.p1_pacing = d[4]
4951
+ self.p0_pacing = d[5]
5617
4952
 
5618
- class ModuleIfV13():
5619
- def __init__(self, raw='', module_type=MODULE_IF, msg_type=BRG_MGMT_MSG_TYPE_CFG_INFO, api_version=API_VERSION_V13, seq_id=0, brg_mac=0, board_type=0, bl_version=0, major_ver=0, minor_ver=0, patch_ver=0, sup_cap_glob=0, sup_cap_datapath=0, sup_cap_energy2400=0, sup_cap_energy_sub1g=0, sup_cap_calibration=0, sup_cap_pwr_mgmt=0, sup_cap_sensors=0, sup_cap_custom=0, cfg_hash=0, unused0=0):
5620
- self.module_type = module_type
5621
- self.msg_type = msg_type
5622
- self.api_version = api_version
5623
- self.seq_id = seq_id
5624
- self.brg_mac = brg_mac
5625
- self.board_type = board_type
5626
- self.bl_version = bl_version
5627
- self.major_ver = major_ver
5628
- self.minor_ver = minor_ver
5629
- self.patch_ver = patch_ver
5630
- self.sup_cap_glob = sup_cap_glob
5631
- self.sup_cap_datapath = sup_cap_datapath
5632
- self.sup_cap_energy2400 = sup_cap_energy2400
5633
- self.sup_cap_energy_sub1g = sup_cap_energy_sub1g
5634
- self.sup_cap_calibration = sup_cap_calibration
5635
- self.sup_cap_pwr_mgmt = sup_cap_pwr_mgmt
5636
- self.sup_cap_sensors = sup_cap_sensors
5637
- self.sup_cap_custom = sup_cap_custom
5638
- self.cfg_hash = cfg_hash
5639
- self.unused0 = unused0
4953
+ class PwrMgmt():
4954
+ def __init__(self, raw='', leds_on=PWR_MGMT_DEFAULTS_LEDS_ON, keep_alive_scan=PWR_MGMT_DEFAULTS_KEEP_ALIVE_SCAN, keep_alive_period=PWR_MGMT_DEFAULTS_KEEP_ALIVE_PERIOD, on_duration=PWR_MGMT_DEFAULTS_ON_DURATION, sleep_duration=PWR_MGMT_DEFAULTS_SLEEP_DURATION, unused=0):
4955
+ self.leds_on = leds_on
4956
+ self.keep_alive_scan = keep_alive_scan # 10 [msec] resolution
4957
+ self.keep_alive_period = keep_alive_period # 5 [sec] resolution
4958
+ self.on_duration = on_duration # 30 [sec] resolution
4959
+ self.sleep_duration = sleep_duration # 60 [sec] resolution
4960
+ self.unused = unused
5640
4961
  if raw:
5641
4962
  self.set(raw)
5642
4963
 
5643
4964
  def __repr__(self) -> str:
5644
- return "\n==> Packet module_if_v13 <==\n" + tabulate.tabulate([['module_type', f"0x{self.module_type:X}", self.module_type],['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['board_type', f"0x{self.board_type:X}", self.board_type],['bl_version', f"0x{self.bl_version:X}", self.bl_version],['major_ver', f"0x{self.major_ver:X}", self.major_ver],['minor_ver', f"0x{self.minor_ver:X}", self.minor_ver],['patch_ver', f"0x{self.patch_ver:X}", self.patch_ver],['sup_cap_glob', f"0x{self.sup_cap_glob:X}", self.sup_cap_glob],['sup_cap_datapath', f"0x{self.sup_cap_datapath:X}", self.sup_cap_datapath],['sup_cap_energy2400', f"0x{self.sup_cap_energy2400:X}", self.sup_cap_energy2400],['sup_cap_energy_sub1g', f"0x{self.sup_cap_energy_sub1g:X}", self.sup_cap_energy_sub1g],['sup_cap_calibration', f"0x{self.sup_cap_calibration:X}", self.sup_cap_calibration],['sup_cap_pwr_mgmt', f"0x{self.sup_cap_pwr_mgmt:X}", self.sup_cap_pwr_mgmt],['sup_cap_sensors', f"0x{self.sup_cap_sensors:X}", self.sup_cap_sensors],['sup_cap_custom', f"0x{self.sup_cap_custom:X}", self.sup_cap_custom],['cfg_hash', f"0x{self.cfg_hash:X}", self.cfg_hash]], tablefmt="texttable")
4965
+ return "\n==> Packet pwr_mgmt <==\n" + tabulate.tabulate([['leds_on', f"0x{self.leds_on:X}", self.leds_on],['keep_alive_scan', f"0x{self.keep_alive_scan:X}", self.keep_alive_scan],['keep_alive_period', f"0x{self.keep_alive_period:X}", self.keep_alive_period],['on_duration', f"0x{self.on_duration:X}", self.on_duration],['sleep_duration', f"0x{self.sleep_duration:X}", self.sleep_duration]], tablefmt="texttable")
5645
4966
 
5646
4967
  def __eq__(self, other):
5647
4968
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
5648
4969
  return (
5649
- self.module_type == other.module_type and
5650
- self.msg_type == other.msg_type and
5651
- self.api_version == other.api_version and
5652
- self.brg_mac == other.brg_mac and
5653
- self.board_type == other.board_type and
5654
- self.bl_version == other.bl_version and
5655
- self.major_ver == other.major_ver and
5656
- self.minor_ver == other.minor_ver and
5657
- self.patch_ver == other.patch_ver and
5658
- self.sup_cap_glob == other.sup_cap_glob and
5659
- self.sup_cap_datapath == other.sup_cap_datapath and
5660
- self.sup_cap_energy2400 == other.sup_cap_energy2400 and
5661
- self.sup_cap_energy_sub1g == other.sup_cap_energy_sub1g and
5662
- self.sup_cap_calibration == other.sup_cap_calibration and
5663
- self.sup_cap_pwr_mgmt == other.sup_cap_pwr_mgmt and
5664
- self.sup_cap_sensors == other.sup_cap_sensors and
5665
- self.sup_cap_custom == other.sup_cap_custom and
5666
- self.cfg_hash == other.cfg_hash
4970
+ self.leds_on == other.leds_on and
4971
+ self.keep_alive_scan == other.keep_alive_scan and
4972
+ self.keep_alive_period == other.keep_alive_period and
4973
+ self.on_duration == other.on_duration and
4974
+ self.sleep_duration == other.sleep_duration
5667
4975
  )
5668
4976
  return False
5669
4977
 
5670
4978
  def dump(self):
5671
- string = bitstruct.pack("u4u4u8u8u48u8u8u8u8u8u1u1u1u1u1u1u1u1u32u40", self.module_type, self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.board_type, self.bl_version, self.major_ver, self.minor_ver, self.patch_ver, self.sup_cap_glob, self.sup_cap_datapath, self.sup_cap_energy2400, self.sup_cap_energy_sub1g, self.sup_cap_calibration, self.sup_cap_pwr_mgmt, self.sup_cap_sensors, self.sup_cap_custom, self.cfg_hash, self.unused0)
4979
+ string = bitstruct.pack("u1u6u5u7u11u2", self.leds_on, self.keep_alive_scan, self.keep_alive_period, self.on_duration, self.sleep_duration, self.unused)
5672
4980
  return string.hex().upper()
5673
4981
 
5674
4982
  def set(self, string):
5675
- d = bitstruct.unpack("u4u4u8u8u48u8u8u8u8u8u1u1u1u1u1u1u1u1u32u40", binascii.unhexlify(string))
5676
- self.module_type = d[0]
5677
- self.msg_type = d[1]
5678
- self.api_version = d[2]
5679
- self.seq_id = d[3]
5680
- self.brg_mac = d[4]
5681
- self.board_type = d[5]
5682
- self.bl_version = d[6]
5683
- self.major_ver = d[7]
5684
- self.minor_ver = d[8]
5685
- self.patch_ver = d[9]
5686
- self.sup_cap_glob = d[10]
5687
- self.sup_cap_datapath = d[11]
5688
- self.sup_cap_energy2400 = d[12]
5689
- self.sup_cap_energy_sub1g = d[13]
5690
- self.sup_cap_calibration = d[14]
5691
- self.sup_cap_pwr_mgmt = d[15]
5692
- self.sup_cap_sensors = d[16]
5693
- self.sup_cap_custom = d[17]
5694
- self.cfg_hash = d[18]
5695
- self.unused0 = d[19]
4983
+ d = bitstruct.unpack("u1u6u5u7u11u2", binascii.unhexlify(string))
4984
+ self.leds_on = d[0]
4985
+ self.keep_alive_scan = d[1]
4986
+ self.keep_alive_period = d[2]
4987
+ self.on_duration = d[3]
4988
+ self.sleep_duration = d[4]
4989
+ self.unused = d[5]
5696
4990
 
5697
4991
  class ModuleIfV12():
5698
4992
  def __init__(self, raw='', module_type=MODULE_IF, msg_type=BRG_MGMT_MSG_TYPE_CFG_INFO, api_version=API_VERSION_V12, seq_id=0, brg_mac=0, board_type=0, bl_version=0, major_ver=0, minor_ver=0, patch_ver=0, sup_cap_glob=0, sup_cap_datapath=0, sup_cap_energy2400=0, sup_cap_energy_sub1g=0, sup_cap_calibration=0, sup_cap_pwr_mgmt=0, sup_cap_sensors=0, sup_cap_custom=0, cfg_hash=0, unused0=0):
@@ -6165,54 +5459,6 @@ class ModuleIfV7():
6165
5459
  self.sup_cap_custom = d[17]
6166
5460
  self.unused0 = d[18]
6167
5461
 
6168
- class ModuleCalibrationV13():
6169
- def __init__(self, raw='', module_type=MODULE_CALIBRATION, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V13, seq_id=0, brg_mac=0, interval=BRG_DEFAULT_CALIBRATION_INTERVAL, output_power=BRG_DEFAULT_OUTPUT_POWER_2_4, pattern=BRG_DEFAULT_CALIBRATION_PATTERN, unused0=0, unused1=0):
6170
- self.module_type = module_type
6171
- self.msg_type = msg_type
6172
- self.api_version = api_version
6173
- self.seq_id = seq_id
6174
- self.brg_mac = brg_mac
6175
- self.interval = interval
6176
- self.output_power = output_power
6177
- self.pattern = pattern
6178
- self.unused0 = unused0
6179
- self.unused1 = unused1
6180
- if raw:
6181
- self.set(raw)
6182
-
6183
- def __repr__(self) -> str:
6184
- return "\n==> Packet module_calibration_v13 <==\n" + tabulate.tabulate([['module_type', f"0x{self.module_type:X}", self.module_type],['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['interval', f"0x{self.interval:X}", self.interval],['output_power', f"0x{self.output_power:X}", self.output_power],['pattern', f"0x{self.pattern:X}", self.pattern]], tablefmt="texttable")
6185
-
6186
- def __eq__(self, other):
6187
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
6188
- return (
6189
- self.module_type == other.module_type and
6190
- self.msg_type == other.msg_type and
6191
- self.api_version == other.api_version and
6192
- self.brg_mac == other.brg_mac and
6193
- self.interval == other.interval and
6194
- self.output_power == other.output_power and
6195
- self.pattern == other.pattern
6196
- )
6197
- return False
6198
-
6199
- def dump(self):
6200
- string = bitstruct.pack("u4u4u8u8u48u8s8u4u4u96", self.module_type, self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.interval, self.output_power, self.pattern, self.unused0, self.unused1)
6201
- return string.hex().upper()
6202
-
6203
- def set(self, string):
6204
- d = bitstruct.unpack("u4u4u8u8u48u8s8u4u4u96", binascii.unhexlify(string))
6205
- self.module_type = d[0]
6206
- self.msg_type = d[1]
6207
- self.api_version = d[2]
6208
- self.seq_id = d[3]
6209
- self.brg_mac = d[4]
6210
- self.interval = d[5]
6211
- self.output_power = d[6]
6212
- self.pattern = d[7]
6213
- self.unused0 = d[8]
6214
- self.unused1 = d[9]
6215
-
6216
5462
  class ModuleCalibrationV12():
6217
5463
  def __init__(self, raw='', module_type=MODULE_CALIBRATION, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V12, seq_id=0, brg_mac=0, interval=BRG_DEFAULT_CALIBRATION_INTERVAL, output_power=BRG_DEFAULT_OUTPUT_POWER_2_4, pattern=BRG_DEFAULT_CALIBRATION_PATTERN, unused0=0, unused1=0):
6218
5464
  self.module_type = module_type
@@ -6471,71 +5717,13 @@ class ModuleCalibrationV7():
6471
5717
  return string.hex().upper()
6472
5718
 
6473
5719
  def set(self, string):
6474
- d = bitstruct.unpack("u4u4u8u8u48u120", binascii.unhexlify(string))
6475
- self.module_type = d[0]
6476
- self.msg_type = d[1]
6477
- self.api_version = d[2]
6478
- self.seq_id = d[3]
6479
- self.brg_mac = d[4]
6480
- self.unused0 = d[5]
6481
-
6482
- class ModuleDatapathV13():
6483
- def __init__(self, raw='', module_type=MODULE_DATAPATH, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V13, seq_id=0, brg_mac=0, rssi_threshold=BRG_DEFAULT_RSSI_THRESHOLD, pacer_interval=BRG_DEFAULT_PACER_INTERVAL, pkt_filter=BRG_DEFAULT_PKT_FILTER, tx_repetition=BRG_DEFAULT_TX_REPETITION, output_power=BRG_DEFAULT_DATAPATH_OUTPUT_POWER, pattern=BRG_DEFAULT_DATAPATH_PATTERN, rx_channel=BRG_DEFAULT_RX_CHANNEL, unused0=0):
6484
- self.module_type = module_type
6485
- self.msg_type = msg_type
6486
- self.api_version = api_version
6487
- self.seq_id = seq_id
6488
- self.brg_mac = brg_mac
6489
- self.rssi_threshold = rssi_threshold
6490
- self.pacer_interval = pacer_interval
6491
- self.pkt_filter = pkt_filter
6492
- self.tx_repetition = tx_repetition
6493
- self.output_power = output_power
6494
- self.pattern = pattern
6495
- self.rx_channel = rx_channel
6496
- self.unused0 = unused0
6497
- if raw:
6498
- self.set(raw)
6499
-
6500
- def __repr__(self) -> str:
6501
- return "\n==> Packet module_datapath_v13 <==\n" + tabulate.tabulate([['module_type', f"0x{self.module_type:X}", self.module_type],['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['rssi_threshold', f"0x{self.rssi_threshold:X}", self.rssi_threshold],['pacer_interval', f"0x{self.pacer_interval:X}", self.pacer_interval],['pkt_filter', f"0x{self.pkt_filter:X}", self.pkt_filter],['tx_repetition', f"0x{self.tx_repetition:X}", self.tx_repetition],['output_power', f"0x{self.output_power:X}", self.output_power],['pattern', f"0x{self.pattern:X}", self.pattern],['rx_channel', f"0x{self.rx_channel:X}", self.rx_channel]], tablefmt="texttable")
6502
-
6503
- def __eq__(self, other):
6504
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
6505
- return (
6506
- self.module_type == other.module_type and
6507
- self.msg_type == other.msg_type and
6508
- self.api_version == other.api_version and
6509
- self.brg_mac == other.brg_mac and
6510
- self.rssi_threshold == other.rssi_threshold and
6511
- self.pacer_interval == other.pacer_interval and
6512
- self.pkt_filter == other.pkt_filter and
6513
- self.tx_repetition == other.tx_repetition and
6514
- self.output_power == other.output_power and
6515
- self.pattern == other.pattern and
6516
- self.rx_channel == other.rx_channel
6517
- )
6518
- return False
6519
-
6520
- def dump(self):
6521
- string = bitstruct.pack("u4u4u8u8u48s8u16u5u3s8u4u4u72", self.module_type, self.msg_type, self.api_version, self.seq_id, self.brg_mac, ((self.rssi_threshold-0)//-1), self.pacer_interval, self.pkt_filter, self.tx_repetition, self.output_power, self.pattern, self.rx_channel, self.unused0)
6522
- return string.hex().upper()
6523
-
6524
- def set(self, string):
6525
- d = bitstruct.unpack("u4u4u8u8u48s8u16u5u3s8u4u4u72", binascii.unhexlify(string))
5720
+ d = bitstruct.unpack("u4u4u8u8u48u120", binascii.unhexlify(string))
6526
5721
  self.module_type = d[0]
6527
5722
  self.msg_type = d[1]
6528
5723
  self.api_version = d[2]
6529
5724
  self.seq_id = d[3]
6530
5725
  self.brg_mac = d[4]
6531
- self.rssi_threshold = ((d[5]*-1)+0)
6532
- self.pacer_interval = d[6]
6533
- self.pkt_filter = d[7]
6534
- self.tx_repetition = d[8]
6535
- self.output_power = d[9]
6536
- self.pattern = d[10]
6537
- self.rx_channel = d[11]
6538
- self.unused0 = d[12]
5726
+ self.unused0 = d[5]
6539
5727
 
6540
5728
  class ModuleDatapathV12():
6541
5729
  def __init__(self, raw='', module_type=MODULE_DATAPATH, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V12, seq_id=0, brg_mac=0, rssi_threshold=BRG_DEFAULT_RSSI_THRESHOLD, pacer_interval=BRG_DEFAULT_PACER_INTERVAL, pkt_filter=BRG_DEFAULT_PKT_FILTER, tx_repetition=BRG_DEFAULT_TX_REPETITION, output_power=BRG_DEFAULT_DATAPATH_OUTPUT_POWER, pattern=BRG_DEFAULT_DATAPATH_PATTERN, rx_channel=BRG_DEFAULT_RX_CHANNEL, unused0=0):
@@ -6842,7 +6030,7 @@ class ModuleDatapathV8():
6842
6030
  self.unused1 = d[10]
6843
6031
 
6844
6032
  class ModuleDatapathV7():
6845
- def __init__(self, raw='', module_type=MODULE_DATAPATH, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V7, seq_id=0, brg_mac=0, global_pacing_group=0, unused0=0, pacer_interval=BRG_DEFAULT_PACER_INTERVAL, unused2=0, tx_repetition=BRG_DEFAULT_TX_REPETITION, unused1=0):
6033
+ def __init__(self, raw='', module_type=MODULE_DATAPATH, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V7, seq_id=0, brg_mac=0, global_pacing_group=0, unused0=0, pacer_interval=BRG_DEFAULT_PACER_INTERVAL, unsued2=0, tx_repetition=BRG_DEFAULT_TX_REPETITION, unused1=0):
6846
6034
  self.module_type = module_type
6847
6035
  self.msg_type = msg_type
6848
6036
  self.api_version = api_version
@@ -6851,14 +6039,14 @@ class ModuleDatapathV7():
6851
6039
  self.global_pacing_group = global_pacing_group
6852
6040
  self.unused0 = unused0
6853
6041
  self.pacer_interval = pacer_interval
6854
- self.unused2 = unused2
6042
+ self.unsued2 = unsued2
6855
6043
  self.tx_repetition = tx_repetition
6856
6044
  self.unused1 = unused1
6857
6045
  if raw:
6858
6046
  self.set(raw)
6859
6047
 
6860
6048
  def __repr__(self) -> str:
6861
- return "\n==> Packet module_datapath_v7 <==\n" + tabulate.tabulate([['module_type', f"0x{self.module_type:X}", self.module_type],['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['global_pacing_group', f"0x{self.global_pacing_group:X}", self.global_pacing_group],['pacer_interval', f"0x{self.pacer_interval:X}", self.pacer_interval],['tx_repetition', f"0x{self.tx_repetition:X}", self.tx_repetition]], tablefmt="texttable")
6049
+ return "\n==> Packet module_datapath_v7 <==\n" + tabulate.tabulate([['module_type', f"0x{self.module_type:X}", self.module_type],['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['global_pacing_group', f"0x{self.global_pacing_group:X}", self.global_pacing_group],['pacer_interval', f"0x{self.pacer_interval:X}", self.pacer_interval],['unsued2', f"0x{self.unsued2:X}", self.unsued2],['tx_repetition', f"0x{self.tx_repetition:X}", self.tx_repetition]], tablefmt="texttable")
6862
6050
 
6863
6051
  def __eq__(self, other):
6864
6052
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -6869,12 +6057,13 @@ class ModuleDatapathV7():
6869
6057
  self.brg_mac == other.brg_mac and
6870
6058
  self.global_pacing_group == other.global_pacing_group and
6871
6059
  self.pacer_interval == other.pacer_interval and
6060
+ self.unsued2 == other.unsued2 and
6872
6061
  self.tx_repetition == other.tx_repetition
6873
6062
  )
6874
6063
  return False
6875
6064
 
6876
6065
  def dump(self):
6877
- string = bitstruct.pack("u4u4u8u8u48u4u4u16u5u3u88", self.module_type, self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.global_pacing_group, self.unused0, self.pacer_interval, self.unused2, self.tx_repetition, self.unused1)
6066
+ string = bitstruct.pack("u4u4u8u8u48u4u4u16u5u3u88", self.module_type, self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.global_pacing_group, self.unused0, self.pacer_interval, self.unsued2, self.tx_repetition, self.unused1)
6878
6067
  return string.hex().upper()
6879
6068
 
6880
6069
  def set(self, string):
@@ -6887,64 +6076,10 @@ class ModuleDatapathV7():
6887
6076
  self.global_pacing_group = d[5]
6888
6077
  self.unused0 = d[6]
6889
6078
  self.pacer_interval = d[7]
6890
- self.unused2 = d[8]
6079
+ self.unsued2 = d[8]
6891
6080
  self.tx_repetition = d[9]
6892
6081
  self.unused1 = d[10]
6893
6082
 
6894
- MODULE_ENERGY_2400_V13_SIGNAL_INDICATOR_REP_ENC = {SIGNAL_INDICATOR_REP_1:0, SIGNAL_INDICATOR_REP_2:1, SIGNAL_INDICATOR_REP_3:2, SIGNAL_INDICATOR_REP_4:3}
6895
- MODULE_ENERGY_2400_V13_SIGNAL_INDICATOR_REP_DEC = {0:SIGNAL_INDICATOR_REP_1, 1:SIGNAL_INDICATOR_REP_2, 2:SIGNAL_INDICATOR_REP_3, 3:SIGNAL_INDICATOR_REP_4}
6896
- class ModuleEnergy2400V13():
6897
- def __init__(self, raw='', module_type=MODULE_ENERGY_2400, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V13, seq_id=0, brg_mac=0, duty_cycle=BRG_DEFAULT_ENERGY_DUTY_CYCLE_2_4, pattern=BRG_DEFAULT_ENERGY_PATTERN_2_4, output_power=BRG_DEFAULT_OUTPUT_POWER_2_4, signal_indicator_cycle=BRG_DEFAULT_SIGNAL_INDICATOR_CYCLE, signal_indicator_rep=BRG_DEFAULT_SIGNAL_INDICATOR_REP, unused0=0):
6898
- self.module_type = module_type
6899
- self.msg_type = msg_type
6900
- self.api_version = api_version
6901
- self.seq_id = seq_id
6902
- self.brg_mac = brg_mac
6903
- self.duty_cycle = duty_cycle
6904
- self.pattern = pattern
6905
- self.output_power = output_power
6906
- self.signal_indicator_cycle = signal_indicator_cycle
6907
- self.signal_indicator_rep = signal_indicator_rep
6908
- self.unused0 = unused0
6909
- if raw:
6910
- self.set(raw)
6911
-
6912
- def __repr__(self) -> str:
6913
- return "\n==> Packet module_energy_2400_v13 <==\n" + tabulate.tabulate([['module_type', f"0x{self.module_type:X}", self.module_type],['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['duty_cycle', f"0x{self.duty_cycle:X}", self.duty_cycle],['pattern', f"0x{self.pattern:X}", self.pattern],['output_power', f"0x{self.output_power:X}", self.output_power],['signal_indicator_cycle', f"0x{self.signal_indicator_cycle:X}", self.signal_indicator_cycle],['signal_indicator_rep', f"0x{self.signal_indicator_rep:X}", self.signal_indicator_rep]], tablefmt="texttable")
6914
-
6915
- def __eq__(self, other):
6916
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
6917
- return (
6918
- self.module_type == other.module_type and
6919
- self.msg_type == other.msg_type and
6920
- self.api_version == other.api_version and
6921
- self.brg_mac == other.brg_mac and
6922
- self.duty_cycle == other.duty_cycle and
6923
- self.pattern == other.pattern and
6924
- self.output_power == other.output_power and
6925
- self.signal_indicator_cycle == other.signal_indicator_cycle and
6926
- self.signal_indicator_rep == other.signal_indicator_rep
6927
- )
6928
- return False
6929
-
6930
- def dump(self):
6931
- string = bitstruct.pack("u4u4u8u8u48u8u8s8u14u2u80", self.module_type, self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.duty_cycle, self.pattern, self.output_power, self.signal_indicator_cycle, MODULE_ENERGY_2400_V13_SIGNAL_INDICATOR_REP_ENC[self.signal_indicator_rep], self.unused0)
6932
- return string.hex().upper()
6933
-
6934
- def set(self, string):
6935
- d = bitstruct.unpack("u4u4u8u8u48u8u8s8u14u2u80", binascii.unhexlify(string))
6936
- self.module_type = d[0]
6937
- self.msg_type = d[1]
6938
- self.api_version = d[2]
6939
- self.seq_id = d[3]
6940
- self.brg_mac = d[4]
6941
- self.duty_cycle = d[5]
6942
- self.pattern = d[6]
6943
- self.output_power = d[7]
6944
- self.signal_indicator_cycle = d[8]
6945
- self.signal_indicator_rep = MODULE_ENERGY_2400_V13_SIGNAL_INDICATOR_REP_DEC[d[9]]
6946
- self.unused0 = d[10]
6947
-
6948
6083
  MODULE_ENERGY_2400_V12_SIGNAL_INDICATOR_REP_ENC = {SIGNAL_INDICATOR_REP_1:0, SIGNAL_INDICATOR_REP_2:1, SIGNAL_INDICATOR_REP_3:2, SIGNAL_INDICATOR_REP_4:3}
6949
6084
  MODULE_ENERGY_2400_V12_SIGNAL_INDICATOR_REP_DEC = {0:SIGNAL_INDICATOR_REP_1, 1:SIGNAL_INDICATOR_REP_2, 2:SIGNAL_INDICATOR_REP_3, 3:SIGNAL_INDICATOR_REP_4}
6950
6085
  class ModuleEnergy2400V12():
@@ -7256,57 +6391,6 @@ class ModuleEnergy2400V7():
7256
6391
  self.unused0 = d[10]
7257
6392
  self.unused1 = d[11]
7258
6393
 
7259
- MODULE_ENERGY_SUB1G_V13_SIGNAL_INDICATOR_REP_ENC = {SIGNAL_INDICATOR_SUB1G_REP_1:SIGNAL_INDICATOR_SUB1G_REP_PROFILE_1, SIGNAL_INDICATOR_SUB1G_REP_2:SIGNAL_INDICATOR_SUB1G_REP_PROFILE_2, SIGNAL_INDICATOR_SUB1G_REP_3:SIGNAL_INDICATOR_SUB1G_REP_PROFILE_3, SIGNAL_INDICATOR_SUB1G_REP_4:SIGNAL_INDICATOR_SUB1G_REP_PROFILE_4}
7260
- MODULE_ENERGY_SUB1G_V13_SIGNAL_INDICATOR_REP_DEC = {SIGNAL_INDICATOR_SUB1G_REP_PROFILE_1:SIGNAL_INDICATOR_SUB1G_REP_1, SIGNAL_INDICATOR_SUB1G_REP_PROFILE_2:SIGNAL_INDICATOR_SUB1G_REP_2, SIGNAL_INDICATOR_SUB1G_REP_PROFILE_3:SIGNAL_INDICATOR_SUB1G_REP_3, SIGNAL_INDICATOR_SUB1G_REP_PROFILE_4:SIGNAL_INDICATOR_SUB1G_REP_4}
7261
- class ModuleEnergySub1GV13():
7262
- def __init__(self, raw='', module_type=MODULE_ENERGY_SUB1G, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V13, seq_id=0, brg_mac=0, pattern=BRG_DEFAULT_SUB1G_ENERGY_PATTERN, duty_cycle=BRG_DEFAULT_SUB1G_DUTY_CYCLE, signal_indicator_cycle=BRG_DEFAULT_SIGNAL_INDICATOR_SUB1G_CYCLE, signal_indicator_rep=BRG_DEFAULT_SIGNAL_INDICATOR_SUB1G_REP, unused0=0):
7263
- self.module_type = module_type
7264
- self.msg_type = msg_type
7265
- self.api_version = api_version
7266
- self.seq_id = seq_id
7267
- self.brg_mac = brg_mac
7268
- self.pattern = pattern
7269
- self.duty_cycle = duty_cycle
7270
- self.signal_indicator_cycle = signal_indicator_cycle
7271
- self.signal_indicator_rep = signal_indicator_rep
7272
- self.unused0 = unused0
7273
- if raw:
7274
- self.set(raw)
7275
-
7276
- def __repr__(self) -> str:
7277
- return "\n==> Packet module_energy_sub1g_v13 <==\n" + tabulate.tabulate([['module_type', f"0x{self.module_type:X}", self.module_type],['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['pattern', f"0x{self.pattern:X}", self.pattern],['duty_cycle', f"0x{self.duty_cycle:X}", self.duty_cycle],['signal_indicator_cycle', f"0x{self.signal_indicator_cycle:X}", self.signal_indicator_cycle],['signal_indicator_rep', f"0x{self.signal_indicator_rep:X}", self.signal_indicator_rep]], tablefmt="texttable")
7278
-
7279
- def __eq__(self, other):
7280
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
7281
- return (
7282
- self.module_type == other.module_type and
7283
- self.msg_type == other.msg_type and
7284
- self.api_version == other.api_version and
7285
- self.brg_mac == other.brg_mac and
7286
- self.pattern == other.pattern and
7287
- self.duty_cycle == other.duty_cycle and
7288
- self.signal_indicator_cycle == other.signal_indicator_cycle and
7289
- self.signal_indicator_rep == other.signal_indicator_rep
7290
- )
7291
- return False
7292
-
7293
- def dump(self):
7294
- string = bitstruct.pack("u4u4u8u8u48u8u8u14u2u88", self.module_type, self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.pattern, self.duty_cycle, self.signal_indicator_cycle, MODULE_ENERGY_SUB1G_V13_SIGNAL_INDICATOR_REP_ENC[self.signal_indicator_rep], self.unused0)
7295
- return string.hex().upper()
7296
-
7297
- def set(self, string):
7298
- d = bitstruct.unpack("u4u4u8u8u48u8u8u14u2u88", binascii.unhexlify(string))
7299
- self.module_type = d[0]
7300
- self.msg_type = d[1]
7301
- self.api_version = d[2]
7302
- self.seq_id = d[3]
7303
- self.brg_mac = d[4]
7304
- self.pattern = d[5]
7305
- self.duty_cycle = d[6]
7306
- self.signal_indicator_cycle = d[7]
7307
- self.signal_indicator_rep = MODULE_ENERGY_SUB1G_V13_SIGNAL_INDICATOR_REP_DEC[d[8]]
7308
- self.unused0 = d[9]
7309
-
7310
6394
  MODULE_ENERGY_SUB1G_V12_SIGNAL_INDICATOR_REP_ENC = {SIGNAL_INDICATOR_SUB1G_REP_1:SIGNAL_INDICATOR_SUB1G_REP_PROFILE_1, SIGNAL_INDICATOR_SUB1G_REP_2:SIGNAL_INDICATOR_SUB1G_REP_PROFILE_2, SIGNAL_INDICATOR_SUB1G_REP_3:SIGNAL_INDICATOR_SUB1G_REP_PROFILE_3, SIGNAL_INDICATOR_SUB1G_REP_4:SIGNAL_INDICATOR_SUB1G_REP_PROFILE_4}
7311
6395
  MODULE_ENERGY_SUB1G_V12_SIGNAL_INDICATOR_REP_DEC = {SIGNAL_INDICATOR_SUB1G_REP_PROFILE_1:SIGNAL_INDICATOR_SUB1G_REP_1, SIGNAL_INDICATOR_SUB1G_REP_PROFILE_2:SIGNAL_INDICATOR_SUB1G_REP_2, SIGNAL_INDICATOR_SUB1G_REP_PROFILE_3:SIGNAL_INDICATOR_SUB1G_REP_3, SIGNAL_INDICATOR_SUB1G_REP_PROFILE_4:SIGNAL_INDICATOR_SUB1G_REP_4}
7312
6396
  class ModuleEnergySub1GV12():
@@ -7621,73 +6705,6 @@ class ModuleEnergySub1GV7():
7621
6705
  self.frequency = MODULE_ENERGY_SUB1G_V7_FREQUENCY_DEC[d[6]]
7622
6706
  self.unused0 = d[7]
7623
6707
 
7624
- class ModulePwrMgmtV13():
7625
- def __init__(self, raw='', module_type=MODULE_PWR_MGMT, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V13, seq_id=0, brg_mac=0, static_leds_on=PWR_MGMT_DEFAULTS_LEDS_ON, static_keep_alive_period=PWR_MGMT_DEFAULTS_KEEP_ALIVE_PERIOD, static_keep_alive_scan=PWR_MGMT_DEFAULTS_KEEP_ALIVE_SCAN, static_on_duration=PWR_MGMT_DEFAULTS_ON_DURATION, static_sleep_duration=PWR_MGMT_DEFAULTS_SLEEP_DURATION, dynamic_leds_on=PWR_MGMT_DEFAULTS_LEDS_ON, dynamic_keep_alive_period=PWR_MGMT_DEFAULTS_KEEP_ALIVE_PERIOD, dynamic_keep_alive_scan=PWR_MGMT_DEFAULTS_KEEP_ALIVE_SCAN, dynamic_on_duration=PWR_MGMT_DEFAULTS_ON_DURATION, dynamic_sleep_duration=PWR_MGMT_DEFAULTS_SLEEP_DURATION, unused0=0):
7626
- self.module_type = module_type
7627
- self.msg_type = msg_type
7628
- self.api_version = api_version
7629
- self.seq_id = seq_id
7630
- self.brg_mac = brg_mac
7631
- self.static_leds_on = static_leds_on
7632
- self.static_keep_alive_period = static_keep_alive_period # 5sec resolution
7633
- self.static_keep_alive_scan = static_keep_alive_scan # 10msec resolution
7634
- self.static_on_duration = static_on_duration # 30sec resolution
7635
- self.static_sleep_duration = static_sleep_duration # 60sec resolution
7636
- self.dynamic_leds_on = dynamic_leds_on
7637
- self.dynamic_keep_alive_period = dynamic_keep_alive_period # 5sec resolution
7638
- self.dynamic_keep_alive_scan = dynamic_keep_alive_scan # 10msec resolution
7639
- self.dynamic_on_duration = dynamic_on_duration # 30sec resolution
7640
- self.dynamic_sleep_duration = dynamic_sleep_duration # 60sec resolution
7641
- self.unused0 = unused0
7642
- if raw:
7643
- self.set(raw)
7644
-
7645
- def __repr__(self) -> str:
7646
- return "\n==> Packet module_pwr_mgmt_v13 <==\n" + tabulate.tabulate([['module_type', f"0x{self.module_type:X}", self.module_type],['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['static_leds_on', f"0x{self.static_leds_on:X}", self.static_leds_on],['static_keep_alive_period', f"0x{self.static_keep_alive_period:X}", self.static_keep_alive_period],['static_keep_alive_scan', f"0x{self.static_keep_alive_scan:X}", self.static_keep_alive_scan],['static_on_duration', f"0x{self.static_on_duration:X}", self.static_on_duration],['static_sleep_duration', f"0x{self.static_sleep_duration:X}", self.static_sleep_duration],['dynamic_leds_on', f"0x{self.dynamic_leds_on:X}", self.dynamic_leds_on],['dynamic_keep_alive_period', f"0x{self.dynamic_keep_alive_period:X}", self.dynamic_keep_alive_period],['dynamic_keep_alive_scan', f"0x{self.dynamic_keep_alive_scan:X}", self.dynamic_keep_alive_scan],['dynamic_on_duration', f"0x{self.dynamic_on_duration:X}", self.dynamic_on_duration],['dynamic_sleep_duration', f"0x{self.dynamic_sleep_duration:X}", self.dynamic_sleep_duration]], tablefmt="texttable")
7647
-
7648
- def __eq__(self, other):
7649
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
7650
- return (
7651
- self.module_type == other.module_type and
7652
- self.msg_type == other.msg_type and
7653
- self.api_version == other.api_version and
7654
- self.brg_mac == other.brg_mac and
7655
- self.static_leds_on == other.static_leds_on and
7656
- self.static_keep_alive_period == other.static_keep_alive_period and
7657
- self.static_keep_alive_scan == other.static_keep_alive_scan and
7658
- self.static_on_duration == other.static_on_duration and
7659
- self.static_sleep_duration == other.static_sleep_duration and
7660
- self.dynamic_leds_on == other.dynamic_leds_on and
7661
- self.dynamic_keep_alive_period == other.dynamic_keep_alive_period and
7662
- self.dynamic_keep_alive_scan == other.dynamic_keep_alive_scan and
7663
- self.dynamic_on_duration == other.dynamic_on_duration and
7664
- self.dynamic_sleep_duration == other.dynamic_sleep_duration
7665
- )
7666
- return False
7667
-
7668
- def dump(self):
7669
- string = bitstruct.pack("u4u4u8u8u48u8u8u8u8u16u8u8u8u8u16u24", self.module_type, self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.static_leds_on, ((self.static_keep_alive_period-0)//5), ((self.static_keep_alive_scan-0)//10), ((self.static_on_duration-0)//30), ((self.static_sleep_duration-0)//60), self.dynamic_leds_on, ((self.dynamic_keep_alive_period-0)//5), ((self.dynamic_keep_alive_scan-0)//10), ((self.dynamic_on_duration-0)//30), ((self.dynamic_sleep_duration-0)//60), self.unused0)
7670
- return string.hex().upper()
7671
-
7672
- def set(self, string):
7673
- d = bitstruct.unpack("u4u4u8u8u48u8u8u8u8u16u8u8u8u8u16u24", binascii.unhexlify(string))
7674
- self.module_type = d[0]
7675
- self.msg_type = d[1]
7676
- self.api_version = d[2]
7677
- self.seq_id = d[3]
7678
- self.brg_mac = d[4]
7679
- self.static_leds_on = d[5]
7680
- self.static_keep_alive_period = ((d[6]*5)+0)
7681
- self.static_keep_alive_scan = ((d[7]*10)+0)
7682
- self.static_on_duration = ((d[8]*30)+0)
7683
- self.static_sleep_duration = ((d[9]*60)+0)
7684
- self.dynamic_leds_on = d[10]
7685
- self.dynamic_keep_alive_period = ((d[11]*5)+0)
7686
- self.dynamic_keep_alive_scan = ((d[12]*10)+0)
7687
- self.dynamic_on_duration = ((d[13]*30)+0)
7688
- self.dynamic_sleep_duration = ((d[14]*60)+0)
7689
- self.unused0 = d[15]
7690
-
7691
6708
  class ModulePwrMgmtV12():
7692
6709
  def __init__(self, raw='', module_type=MODULE_PWR_MGMT, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V12, seq_id=0, brg_mac=0, static_leds_on=PWR_MGMT_DEFAULTS_LEDS_ON, static_keep_alive_period=PWR_MGMT_DEFAULTS_KEEP_ALIVE_PERIOD, static_keep_alive_scan=PWR_MGMT_DEFAULTS_KEEP_ALIVE_SCAN, static_on_duration=PWR_MGMT_DEFAULTS_ON_DURATION, static_sleep_duration=PWR_MGMT_DEFAULTS_SLEEP_DURATION, dynamic_leds_on=PWR_MGMT_DEFAULTS_LEDS_ON, dynamic_keep_alive_period=PWR_MGMT_DEFAULTS_KEEP_ALIVE_PERIOD, dynamic_keep_alive_scan=PWR_MGMT_DEFAULTS_KEEP_ALIVE_SCAN, dynamic_on_duration=PWR_MGMT_DEFAULTS_ON_DURATION, dynamic_sleep_duration=PWR_MGMT_DEFAULTS_SLEEP_DURATION, unused0=0):
7693
6710
  self.module_type = module_type
@@ -8090,55 +7107,6 @@ class ModulePwrMgmtV7():
8090
7107
  self.dynamic_sleep_duration = ((d[14]*60)+0)
8091
7108
  self.unused0 = d[15]
8092
7109
 
8093
- class ModuleExtSensorsV13():
8094
- def __init__(self, raw='', module_type=MODULE_EXT_SENSORS, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V13, seq_id=0, brg_mac=0, sensor0=BRG_DEFAULT_EXTERNAL_SENSOR_CFG, sensor1=BRG_DEFAULT_EXTERNAL_SENSOR_CFG, rssi_threshold=BRG_DEFAULT_RSSI_THRESHOLD, sub1g_rssi_threshold=BRG_DEFAULT_RSSI_THRESHOLD, unused=0):
8095
- self.module_type = module_type
8096
- self.msg_type = msg_type
8097
- self.api_version = api_version
8098
- self.seq_id = seq_id
8099
- self.brg_mac = brg_mac
8100
- self.sensor0 = sensor0
8101
- self.sensor1 = sensor1
8102
- self.rssi_threshold = rssi_threshold
8103
- self.sub1g_rssi_threshold = sub1g_rssi_threshold
8104
- self.unused = unused
8105
- if raw:
8106
- self.set(raw)
8107
-
8108
- def __repr__(self) -> str:
8109
- return "\n==> Packet module_ext_sensors_v13 <==\n" + tabulate.tabulate([['module_type', f"0x{self.module_type:X}", self.module_type],['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['sensor0', f"0x{self.sensor0:X}", self.sensor0],['sensor1', f"0x{self.sensor1:X}", self.sensor1],['rssi_threshold', f"0x{self.rssi_threshold:X}", self.rssi_threshold],['sub1g_rssi_threshold', f"0x{self.sub1g_rssi_threshold:X}", self.sub1g_rssi_threshold]], tablefmt="texttable")
8110
-
8111
- def __eq__(self, other):
8112
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
8113
- return (
8114
- self.module_type == other.module_type and
8115
- self.msg_type == other.msg_type and
8116
- self.api_version == other.api_version and
8117
- self.brg_mac == other.brg_mac and
8118
- self.sensor0 == other.sensor0 and
8119
- self.sensor1 == other.sensor1 and
8120
- self.rssi_threshold == other.rssi_threshold and
8121
- self.sub1g_rssi_threshold == other.sub1g_rssi_threshold
8122
- )
8123
- return False
8124
-
8125
- def dump(self):
8126
- string = bitstruct.pack("u4u4u8u8u48u32u32s8s8u40", self.module_type, self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.sensor0, self.sensor1, ((self.rssi_threshold-0)//-1), ((self.sub1g_rssi_threshold-0)//-1), self.unused)
8127
- return string.hex().upper()
8128
-
8129
- def set(self, string):
8130
- d = bitstruct.unpack("u4u4u8u8u48u32u32s8s8u40", binascii.unhexlify(string))
8131
- self.module_type = d[0]
8132
- self.msg_type = d[1]
8133
- self.api_version = d[2]
8134
- self.seq_id = d[3]
8135
- self.brg_mac = d[4]
8136
- self.sensor0 = d[5]
8137
- self.sensor1 = d[6]
8138
- self.rssi_threshold = ((d[7]*-1)+0)
8139
- self.sub1g_rssi_threshold = ((d[8]*-1)+0)
8140
- self.unused = d[9]
8141
-
8142
7110
  class ModuleExtSensorsV12():
8143
7111
  def __init__(self, raw='', module_type=MODULE_EXT_SENSORS, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V12, seq_id=0, brg_mac=0, sensor0=BRG_DEFAULT_EXTERNAL_SENSOR_CFG, sensor1=BRG_DEFAULT_EXTERNAL_SENSOR_CFG, rssi_threshold=BRG_DEFAULT_RSSI_THRESHOLD, sub1g_rssi_threshold=BRG_DEFAULT_RSSI_THRESHOLD, unused=0):
8144
7112
  self.module_type = module_type
@@ -8463,52 +7431,6 @@ class ModuleExtSensorsV7():
8463
7431
  self.unused1 = d[13]
8464
7432
  self.unused2 = d[14]
8465
7433
 
8466
- class ModuleCustomV13():
8467
- def __init__(self, raw='', module_type=MODULE_CUSTOM, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V13, seq_id=0, brg_mac=0, motion_sensitivity_threshold=LIS2DW12_DEFAULTS_MOTION_SENSITIVITY_THRESHOLD, s2d_transition_time=LIS2DW12_DEFAULTS_S2D_TRANSITION_TIME, d2s_transition_time=LIS2DW12_DEFAULTS_D2S_TRANSITION_TIME, unused1=0):
8468
- self.module_type = module_type
8469
- self.msg_type = msg_type
8470
- self.api_version = api_version
8471
- self.seq_id = seq_id
8472
- self.brg_mac = brg_mac
8473
- self.motion_sensitivity_threshold = motion_sensitivity_threshold # 31 [mg] resolution
8474
- self.s2d_transition_time = s2d_transition_time # 3 [sec] resolution
8475
- self.d2s_transition_time = d2s_transition_time # 5 [sec] resolution
8476
- self.unused1 = unused1
8477
- if raw:
8478
- self.set(raw)
8479
-
8480
- def __repr__(self) -> str:
8481
- return "\n==> Packet module_custom_v13 <==\n" + tabulate.tabulate([['module_type', f"0x{self.module_type:X}", self.module_type],['msg_type', f"0x{self.msg_type:X}", self.msg_type],['api_version', f"0x{self.api_version:X}", self.api_version],['seq_id', f"0x{self.seq_id:X}", self.seq_id],['brg_mac', f"0x{self.brg_mac:X}", self.brg_mac],['motion_sensitivity_threshold', f"0x{self.motion_sensitivity_threshold:X}", self.motion_sensitivity_threshold],['s2d_transition_time', f"0x{self.s2d_transition_time:X}", self.s2d_transition_time],['d2s_transition_time', f"0x{self.d2s_transition_time:X}", self.d2s_transition_time]], tablefmt="texttable")
8482
-
8483
- def __eq__(self, other):
8484
- if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
8485
- return (
8486
- self.module_type == other.module_type and
8487
- self.msg_type == other.msg_type and
8488
- self.api_version == other.api_version and
8489
- self.brg_mac == other.brg_mac and
8490
- self.motion_sensitivity_threshold == other.motion_sensitivity_threshold and
8491
- self.s2d_transition_time == other.s2d_transition_time and
8492
- self.d2s_transition_time == other.d2s_transition_time
8493
- )
8494
- return False
8495
-
8496
- def dump(self):
8497
- string = bitstruct.pack("u4u4u8u8u48u8u8u8u96", self.module_type, self.msg_type, self.api_version, self.seq_id, self.brg_mac, ((self.motion_sensitivity_threshold-0)//31), ((self.s2d_transition_time-0)//3), ((self.d2s_transition_time-0)//5), self.unused1)
8498
- return string.hex().upper()
8499
-
8500
- def set(self, string):
8501
- d = bitstruct.unpack("u4u4u8u8u48u8u8u8u96", binascii.unhexlify(string))
8502
- self.module_type = d[0]
8503
- self.msg_type = d[1]
8504
- self.api_version = d[2]
8505
- self.seq_id = d[3]
8506
- self.brg_mac = d[4]
8507
- self.motion_sensitivity_threshold = ((d[5]*31)+0)
8508
- self.s2d_transition_time = ((d[6]*3)+0)
8509
- self.d2s_transition_time = ((d[7]*5)+0)
8510
- self.unused1 = d[8]
8511
-
8512
7434
  class ModuleCustomV12():
8513
7435
  def __init__(self, raw='', module_type=MODULE_CUSTOM, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V12, seq_id=0, brg_mac=0, motion_sensitivity_threshold=LIS2DW12_DEFAULTS_MOTION_SENSITIVITY_THRESHOLD, s2d_transition_time=LIS2DW12_DEFAULTS_S2D_TRANSITION_TIME, d2s_transition_time=LIS2DW12_DEFAULTS_D2S_TRANSITION_TIME, unused1=0):
8514
7436
  self.module_type = module_type
@@ -8911,7 +7833,7 @@ class SignalIndicatorDataV1():
8911
7833
  self.unused0 = d[8]
8912
7834
  self.pkt_id = d[9]
8913
7835
 
8914
- MODULES_LIST = [ModuleIfV13, ModuleIfV12, ModuleIfV11, ModuleIfV10, ModuleIfV9, ModuleIfV8, ModuleIfV7, ModuleCalibrationV13, ModuleCalibrationV12, ModuleCalibrationV11, ModuleCalibrationV10, ModuleCalibrationV9, ModuleCalibrationV8, ModuleCalibrationV7, ModuleDatapathV13, ModuleDatapathV12, ModuleDatapathV11, ModuleDatapathV10, ModuleDatapathV9, ModuleDatapathV8, ModuleDatapathV7, ModuleEnergy2400V13, ModuleEnergy2400V12, ModuleEnergy2400V11, ModuleEnergy2400V10, ModuleEnergy2400V9, ModuleEnergy2400V8, ModuleEnergy2400V7, ModuleEnergySub1GV13, ModuleEnergySub1GV12, ModuleEnergySub1GV11, ModuleEnergySub1GV10, ModuleEnergySub1GV9, ModuleEnergySub1GV8, ModuleEnergySub1GV7, ModulePwrMgmtV13, ModulePwrMgmtV12, ModulePwrMgmtV11, ModulePwrMgmtV10, ModulePwrMgmtV9, ModulePwrMgmtV8, ModulePwrMgmtV7, ModuleExtSensorsV13, ModuleExtSensorsV12, ModuleExtSensorsV11, ModuleExtSensorsV10, ModuleExtSensorsV9, ModuleExtSensorsV8, ModuleExtSensorsV7, ModuleCustomV13, ModuleCustomV12, ModuleCustomV11, ModuleCustomV10, ModuleCustomV9, ModuleCustomV8]
7836
+ MODULES_LIST = [ModuleIfV12, ModuleIfV11, ModuleIfV10, ModuleIfV9, ModuleIfV8, ModuleIfV7, ModuleCalibrationV12, ModuleCalibrationV11, ModuleCalibrationV10, ModuleCalibrationV9, ModuleCalibrationV8, ModuleCalibrationV7, ModuleDatapathV12, ModuleDatapathV11, ModuleDatapathV10, ModuleDatapathV9, ModuleDatapathV8, ModuleDatapathV7, ModuleEnergy2400V12, ModuleEnergy2400V11, ModuleEnergy2400V10, ModuleEnergy2400V9, ModuleEnergy2400V8, ModuleEnergy2400V7, ModuleEnergySub1GV12, ModuleEnergySub1GV11, ModuleEnergySub1GV10, ModuleEnergySub1GV9, ModuleEnergySub1GV8, ModuleEnergySub1GV7, ModulePwrMgmtV12, ModulePwrMgmtV11, ModulePwrMgmtV10, ModulePwrMgmtV9, ModulePwrMgmtV8, ModulePwrMgmtV7, ModuleExtSensorsV12, ModuleExtSensorsV11, ModuleExtSensorsV10, ModuleExtSensorsV9, ModuleExtSensorsV8, ModuleExtSensorsV7, ModuleCustomV12, ModuleCustomV11, ModuleCustomV10, ModuleCustomV9, ModuleCustomV8]
8915
7837
  MODULES_DICT = {MODULE_IF:'ModuleIfV', MODULE_CALIBRATION:'ModuleCalibrationV', MODULE_DATAPATH:'ModuleDatapathV', MODULE_ENERGY_2400:'ModuleEnergy2400V', MODULE_ENERGY_SUB1G:'ModuleEnergySub1GV', MODULE_PWR_MGMT:'ModulePwrMgmtV', MODULE_EXT_SENSORS:'ModuleExtSensorsV', MODULE_CUSTOM:'ModuleCustomV'}
8916
7838
  ACTIONS_DICT = {ACTION_EMPTY:'ActionGenericV', ACTION_GW_HB:'ActionGwHbV', ACTION_REBOOT:'ActionRebootV', ACTION_BLINK:'ActionBlinkV', ACTION_GET_MODULE:'ActionGetModuleV', ACTION_RESTORE_DEFAULTS:'ActionRestoreDefaultsV', ACTION_SEND_HB:'ActionSendHbV', ACTION_GET_BATTERY_SENSOR:'ActionGetBatterySensorV', ACTION_GET_POF_DATA:'ActionGetPofDataV', ACTION_PL_STATUS:'ActionPlStatusV'}
8917
- WLT_PKT_TYPES = [UnifiedEchoExtPkt, UnifiedEchoPktV1, UnifiedEchoPktV0, SideInfo, SensorData, SideInfoSensor, ActionGenericV13, ActionGenericV12, ActionGenericV11, ActionGenericV10, ActionGenericV9, ActionGenericV8, ActionGenericV7, ActionGwHbV13, ActionGwHbV12, ActionGwHbV11, ActionGwHbV10, ActionGwHbV9, ActionGwHbV8, ActionRebootV13, ActionRebootV12, ActionRebootV11, ActionRebootV10, ActionRebootV9, ActionRebootV8, ActionBlinkV13, ActionBlinkV12, ActionBlinkV11, ActionBlinkV10, ActionBlinkV9, ActionBlinkV8, ActionGetModuleV13, ActionGetModuleV12, ActionGetModuleV11, ActionGetModuleV10, ActionGetModuleV9, ActionGetModuleV8, ActionRestoreDefaultsV13, ActionRestoreDefaultsV12, ActionRestoreDefaultsV11, ActionRestoreDefaultsV10, ActionRestoreDefaultsV9, ActionRestoreDefaultsV8, ActionSendHbV13, ActionSendHbV12, ActionSendHbV11, ActionSendHbV10, ActionSendHbV9, ActionSendHbV8, ActionGetBatterySensorV13, ActionGetBatterySensorV12, ActionGetBatterySensorV11, ActionGetBatterySensorV10, ActionGetBatterySensorV9, ActionGetBatterySensorV8, ActionGetPofDataV13, ActionGetPofDataV12, ActionGetPofDataV11, ActionGetPofDataV10, ActionGetPofDataV9, ActionGetPofDataV8, ActionPlStatusV13, ActionPlStatusV12, ActionPlStatusV11, ActionPlStatusV10, Brg2BrgOtaV13, Brg2BrgOtaV12, Brg2BrgOtaV11, Brg2BrgOtaV10, Brg2BrgOtaV9, Brg2BrgCfgV13, Brg2BrgCfgV12, Brg2BrgCfgV11, Brg2BrgCfgV10, Brg2BrgCfgV9, Gw2BrgCfgV8, Gw2BrgCfgV7, Brg2GwCfgV8, Brg2GwCfgV7, Brg2GwCfgV6, Brg2GwCfgV5, Brg2GwCfgV2, Brg2GwHbSleepV13, Brg2GwHbSleepV12, Brg2GwHbSleepV11, Brg2GwHbSleepV10, Brg2GwHbV13, Brg2GwHbV12, Brg2GwHbV11, Brg2GwHbV10, Brg2GwHbV9, Brg2GwHbV8, Brg2GwHbV7, Brg2GwHbV6, Brg2GwHbV5, Brg2GwHbV1, ModuleIfV13, ModuleIfV12, ModuleIfV11, ModuleIfV10, ModuleIfV9, ModuleIfV8, ModuleIfV7, ModuleCalibrationV13, ModuleCalibrationV12, ModuleCalibrationV11, ModuleCalibrationV10, ModuleCalibrationV9, ModuleCalibrationV8, ModuleCalibrationV7, ModuleDatapathV13, ModuleDatapathV12, ModuleDatapathV11, ModuleDatapathV10, ModuleDatapathV9, ModuleDatapathV8, ModuleDatapathV7, ModuleEnergy2400V13, ModuleEnergy2400V12, ModuleEnergy2400V11, ModuleEnergy2400V10, ModuleEnergy2400V9, ModuleEnergy2400V8, ModuleEnergy2400V7, ModuleEnergySub1GV13, ModuleEnergySub1GV12, ModuleEnergySub1GV11, ModuleEnergySub1GV10, ModuleEnergySub1GV9, ModuleEnergySub1GV8, ModuleEnergySub1GV7, ModulePwrMgmtV13, ModulePwrMgmtV12, ModulePwrMgmtV11, ModulePwrMgmtV10, ModulePwrMgmtV9, ModulePwrMgmtV8, ModulePwrMgmtV7, ModuleExtSensorsV13, ModuleExtSensorsV12, ModuleExtSensorsV11, ModuleExtSensorsV10, ModuleExtSensorsV9, ModuleExtSensorsV8, ModuleExtSensorsV7, ModuleCustomV13, ModuleCustomV12, ModuleCustomV11, ModuleCustomV10, ModuleCustomV9, ModuleCustomV8]
7839
+ WLT_PKT_TYPES = [UnifiedEchoExtPkt, UnifiedEchoPktV1, UnifiedEchoPktV0, ActionGenericV12, ActionGenericV11, ActionGenericV10, ActionGenericV9, ActionGenericV8, ActionGenericV7, ActionGwHbV12, ActionGwHbV11, ActionGwHbV10, ActionGwHbV9, ActionGwHbV8, ActionRebootV12, ActionRebootV11, ActionRebootV10, ActionRebootV9, ActionRebootV8, ActionBlinkV12, ActionBlinkV11, ActionBlinkV10, ActionBlinkV9, ActionBlinkV8, ActionGetModuleV12, ActionGetModuleV11, ActionGetModuleV10, ActionGetModuleV9, ActionGetModuleV8, ActionRestoreDefaultsV12, ActionRestoreDefaultsV11, ActionRestoreDefaultsV10, ActionRestoreDefaultsV9, ActionRestoreDefaultsV8, ActionSendHbV12, ActionSendHbV11, ActionSendHbV10, ActionSendHbV9, ActionSendHbV8, ActionGetBatterySensorV12, ActionGetBatterySensorV11, ActionGetBatterySensorV10, ActionGetBatterySensorV9, ActionGetBatterySensorV8, ActionGetPofDataV12, ActionGetPofDataV11, ActionGetPofDataV10, ActionGetPofDataV9, ActionGetPofDataV8, ActionPlStatusV12, ActionPlStatusV11, ActionPlStatusV10, Brg2BrgOtaV12, Brg2BrgOtaV11, Brg2BrgOtaV10, Brg2BrgOtaV9, Brg2BrgCfgV12, Brg2BrgCfgV11, Brg2BrgCfgV10, Brg2BrgCfgV9, Gw2BrgCfgV8, Gw2BrgCfgV7, Brg2GwCfgV8, Brg2GwCfgV7, Brg2GwCfgV6, Brg2GwCfgV5, Brg2GwCfgV2, Brg2GwHbSleepV12, Brg2GwHbSleepV11, Brg2GwHbSleepV10, Brg2GwHbV12, Brg2GwHbV11, Brg2GwHbV10, Brg2GwHbV9, Brg2GwHbV8, Brg2GwHbV7, Brg2GwHbV6, Brg2GwHbV5, Brg2GwHbV1, SideInfo, SensorData, SideInfoSensor, ModuleIfV12, ModuleIfV11, ModuleIfV10, ModuleIfV9, ModuleIfV8, ModuleIfV7, ModuleCalibrationV12, ModuleCalibrationV11, ModuleCalibrationV10, ModuleCalibrationV9, ModuleCalibrationV8, ModuleCalibrationV7, ModuleDatapathV12, ModuleDatapathV11, ModuleDatapathV10, ModuleDatapathV9, ModuleDatapathV8, ModuleDatapathV7, ModuleEnergy2400V12, ModuleEnergy2400V11, ModuleEnergy2400V10, ModuleEnergy2400V9, ModuleEnergy2400V8, ModuleEnergy2400V7, ModuleEnergySub1GV12, ModuleEnergySub1GV11, ModuleEnergySub1GV10, ModuleEnergySub1GV9, ModuleEnergySub1GV8, ModuleEnergySub1GV7, ModulePwrMgmtV12, ModulePwrMgmtV11, ModulePwrMgmtV10, ModulePwrMgmtV9, ModulePwrMgmtV8, ModulePwrMgmtV7, ModuleExtSensorsV12, ModuleExtSensorsV11, ModuleExtSensorsV10, ModuleExtSensorsV9, ModuleExtSensorsV8, ModuleExtSensorsV7, ModuleCustomV12, ModuleCustomV11, ModuleCustomV10, ModuleCustomV9, ModuleCustomV8]