wiliot-certificate 1.5.2a1__py3-none-any.whl → 4.4.0__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 (120) hide show
  1. brg_certificate/ag/energous_v0_defines.py +105 -114
  2. brg_certificate/ag/energous_v1_defines.py +105 -114
  3. brg_certificate/ag/energous_v2_defines.py +105 -114
  4. brg_certificate/ag/energous_v3_defines.py +105 -114
  5. brg_certificate/ag/energous_v4_defines.py +105 -114
  6. brg_certificate/ag/fanstel_lan_v0_defines.py +105 -114
  7. brg_certificate/ag/fanstel_lte_v0_defines.py +105 -114
  8. brg_certificate/ag/fanstel_wifi_v0_defines.py +105 -114
  9. brg_certificate/ag/minew_lte_v0_defines.py +105 -114
  10. brg_certificate/ag/wlt_types.html +983 -150
  11. brg_certificate/ag/wlt_types_ag.py +1326 -248
  12. brg_certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +69 -0
  13. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +101 -0
  14. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +45 -0
  15. brg_certificate/ag/wlt_types_ag_jsons/calibration.json +75 -0
  16. brg_certificate/ag/wlt_types_ag_jsons/custom.json +99 -0
  17. brg_certificate/ag/wlt_types_ag_jsons/datapath.json +133 -8
  18. brg_certificate/ag/wlt_types_ag_jsons/energy2400.json +99 -0
  19. brg_certificate/ag/wlt_types_ag_jsons/energySub1g.json +96 -0
  20. brg_certificate/ag/wlt_types_ag_jsons/externalSensor.json +113 -0
  21. brg_certificate/ag/wlt_types_ag_jsons/interface.json +157 -0
  22. brg_certificate/ag/wlt_types_ag_jsons/powerManagement.json +205 -0
  23. brg_certificate/cert_common.py +61 -11
  24. brg_certificate/cert_config.py +12 -7
  25. brg_certificate/cert_utils.py +3 -1
  26. brg_certificate/certificate_bcc_test_list.txt +0 -2
  27. brg_certificate/certificate_test_list.txt +4 -4
  28. brg_certificate/tests/calibration/interval_test/interval_test.json +1 -1
  29. brg_certificate/tests/calibration/interval_test/interval_test.py +5 -5
  30. brg_certificate/tests/calibration/output_power_test/output_power_test.json +1 -1
  31. brg_certificate/tests/calibration/output_power_test/output_power_test.py +5 -5
  32. brg_certificate/tests/calibration/pattern_test/pattern_test.json +1 -1
  33. brg_certificate/tests/calibration/pattern_test/pattern_test.py +16 -10
  34. brg_certificate/tests/datapath/aging_test/aging_test.py +10 -9
  35. brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.py +8 -13
  36. brg_certificate/tests/datapath/output_power_test/output_power_test.json +1 -1
  37. brg_certificate/tests/datapath/output_power_test/output_power_test.py +5 -5
  38. brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +1 -1
  39. brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +11 -7
  40. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +11 -4
  41. brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.py +10 -10
  42. brg_certificate/tests/datapath/pattern_test/pattern_test.json +1 -1
  43. brg_certificate/tests/datapath/pattern_test/pattern_test.py +5 -6
  44. brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +1 -1
  45. brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +10 -9
  46. brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +1 -1
  47. brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +11 -10
  48. brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.json +1 -1
  49. brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.py +11 -10
  50. brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +1 -1
  51. brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +11 -10
  52. brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.json +1 -1
  53. brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.py +5 -6
  54. brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +39 -37
  55. brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +46 -46
  56. brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +2 -3
  57. brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +21 -17
  58. brg_certificate/tests/datapath/stress_test/stress_test.json +2 -3
  59. brg_certificate/tests/datapath/stress_test/stress_test.py +20 -17
  60. brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +1 -1
  61. brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.json +1 -1
  62. brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.py +12 -10
  63. brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +1 -1
  64. brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +13 -13
  65. brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +1 -1
  66. brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +2 -2
  67. brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.json +1 -1
  68. brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.py +5 -5
  69. brg_certificate/tests/energy2400/output_power_test/output_power_test.json +1 -1
  70. brg_certificate/tests/energy2400/output_power_test/output_power_test.py +5 -5
  71. brg_certificate/tests/energy2400/pattern_test/pattern_test.json +1 -1
  72. brg_certificate/tests/energy2400/pattern_test/pattern_test.py +5 -5
  73. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.json +2 -2
  74. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.py +256 -278
  75. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.json +2 -2
  76. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.py +256 -278
  77. brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +3 -3
  78. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +30 -91
  79. brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +1 -1
  80. brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +5 -5
  81. brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.json +1 -1
  82. brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.py +5 -5
  83. brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +2 -2
  84. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +1 -1
  85. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +5 -5
  86. brg_certificate/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.py +2 -2
  87. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.json +1 -1
  88. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +6 -7
  89. brg_certificate/wltPb_pb2.py +4 -4
  90. brg_certificate/wltPb_pb2.pyi +2 -1
  91. gw_certificate/api_if/gw_capabilities.py +37 -1
  92. gw_certificate/common/serialization_formatter.py +93 -0
  93. gw_certificate/common/wltPb_pb2.py +50 -38
  94. gw_certificate/common/wltPb_pb2.pyi +42 -35
  95. gw_certificate/gw_certificate.py +4 -2
  96. gw_certificate/gw_certificate_cli.py +5 -4
  97. gw_certificate/interface/4.4.91_app.zip +0 -0
  98. gw_certificate/interface/{4.4.52_sd_bl_app.zip → 4.4.91_sd_bl_app.zip} +0 -0
  99. gw_certificate/interface/ble_simulator.py +5 -3
  100. gw_certificate/interface/flash_fw.py +90 -0
  101. gw_certificate/interface/mqtt.py +39 -23
  102. gw_certificate/interface/pkt_generator.py +0 -44
  103. gw_certificate/interface/uart_if.py +25 -12
  104. gw_certificate/tests/actions.py +33 -5
  105. gw_certificate/tests/connection.py +3 -1
  106. gw_certificate/tests/downlink.py +2 -2
  107. gw_certificate/tests/generic.py +5 -4
  108. gw_certificate/tests/registration.py +4 -4
  109. gw_certificate/tests/static/generated_packet_table.py +47 -25
  110. gw_certificate/tests/static/packet_table.csv +10067 -10051
  111. gw_certificate/tests/static/uplink_defines.py +2 -1
  112. gw_certificate/tests/throughput.py +3 -2
  113. gw_certificate/tests/uplink.py +171 -32
  114. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/METADATA +71 -30
  115. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/RECORD +119 -117
  116. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/WHEEL +1 -1
  117. gw_certificate/interface/4.4.52_app.zip +0 -0
  118. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/entry_points.txt +0 -0
  119. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/licenses/LICENSE +0 -0
  120. {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/top_level.txt +0 -0
@@ -3,15 +3,15 @@
3
3
  import bitstruct
4
4
  import binascii
5
5
  import tabulate
6
- from brg_certificate.ag.wlt_types_ag import API_VERSION_V0, API_VERSION_V1, API_VERSION_V2, API_VERSION_V5, API_VERSION_V6, API_VERSION_V7, API_VERSION_V8, API_VERSION_V9, API_VERSION_V10, API_VERSION_V11, API_VERSION_V12, API_VERSION_LATEST, MODULE_EMPTY, MODULE_GLOBAL, MODULE_IF, MODULE_DATAPATH, MODULE_ENERGY_2400, MODULE_ENERGY_SUB1G, MODULE_CALIBRATION, MODULE_PWR_MGMT, MODULE_EXT_SENSORS, MODULE_CUSTOM, SUB1G_ENERGY_PATTERN_NO_ENERGIZING, SUB1G_ENERGY_PATTERN_SINGLE_TONE_915000, SUB1G_ENERGY_PATTERN_FCC_HOPPING, SUB1G_ENERGY_PATTERN_JAPAN_1W, SUB1G_ENERGY_PATTERN_JAPAN_350MW, SUB1G_ENERGY_PATTERN_KOREA, SUB1G_ENERGY_PATTERN_SINGLE_TONE_916300, SUB1G_ENERGY_PATTERN_SINGLE_TONE_917500, SUB1G_ENERGY_PATTERN_AUSTRALIA, SUB1G_ENERGY_PATTERN_ISRAEL, SUB1G_ENERGY_PATTERN_NZ_HOPPING, SUB1G_ENERGY_PATTERN_LAST, CHANNEL_FREQ_37, CHANNEL_FREQ_38, CHANNEL_FREQ_39, CHANNEL_37, CHANNEL_38, CHANNEL_39, OUTPUT_POWER_2_4_NEG_12, OUTPUT_POWER_2_4_NEG_8, OUTPUT_POWER_2_4_NEG_4, OUTPUT_POWER_2_4_POS_0, OUTPUT_POWER_2_4_POS_2, OUTPUT_POWER_2_4_POS_3, OUTPUT_POWER_2_4_POS_4, OUTPUT_POWER_2_4_POS_5, OUTPUT_POWER_2_4_POS_6, OUTPUT_POWER_2_4_POS_7, OUTPUT_POWER_2_4_POS_8, RX_CHANNEL_37, RX_CHANNEL_38, RX_CHANNEL_39, RX_CHANNEL_10_250K, RX_CHANNEL_10_500K, RX_CHANNEL_V11_37, RX_CHANNEL_V11_38, RX_CHANNEL_V11_39, RX_CHANNEL_V11_4_1MBPS, RX_CHANNEL_V11_10_1MBPS, RX_CHANNEL_V11_4_2MBPS, RX_CHANNEL_V11_10_2MBPS, SECONDARY_RX_CHANNEL_10, SUB1G_OUTPUT_POWER_11, SUB1G_OUTPUT_POWER_14, SUB1G_OUTPUT_POWER_17, SUB1G_OUTPUT_POWER_19, SUB1G_OUTPUT_POWER_20, SUB1G_OUTPUT_POWER_23, SUB1G_OUTPUT_POWER_25, SUB1G_OUTPUT_POWER_26, SUB1G_OUTPUT_POWER_27, SUB1G_OUTPUT_POWER_29, SUB1G_OUTPUT_POWER_32, SUB1G_OUTPUT_POWER_PROFILE_14, SUB1G_OUTPUT_POWER_PROFILE_17, SUB1G_OUTPUT_POWER_PROFILE_20, SUB1G_OUTPUT_POWER_PROFILE_23, SUB1G_OUTPUT_POWER_PROFILE_26, SUB1G_OUTPUT_POWER_PROFILE_29, SUB1G_OUTPUT_POWER_PROFILE_32, SIGNAL_INDICATOR_REP_1, SIGNAL_INDICATOR_REP_2, SIGNAL_INDICATOR_REP_3, SIGNAL_INDICATOR_REP_4, SIGNAL_INDICATOR_SUB1G_REP_1, SIGNAL_INDICATOR_SUB1G_REP_2, SIGNAL_INDICATOR_SUB1G_REP_3, SIGNAL_INDICATOR_SUB1G_REP_4, SIGNAL_INDICATOR_REP_PROFILE_1, SIGNAL_INDICATOR_REP_PROFILE_2, SIGNAL_INDICATOR_REP_PROFILE_3, SIGNAL_INDICATOR_REP_PROFILE_4, SIGNAL_INDICATOR_SUB1G_REP_PROFILE_1, SIGNAL_INDICATOR_SUB1G_REP_PROFILE_2, SIGNAL_INDICATOR_SUB1G_REP_PROFILE_3, SIGNAL_INDICATOR_SUB1G_REP_PROFILE_4, BRG_DEFAULT_CALIBRATION_INTERVAL, BRG_DEFAULT_CALIBRATION_OUTPUT_POWER, BRG_DEFAULT_CALIBRATION_PATTERN, BRG_DEFAULT_DATAPATH_PATTERN, BRG_DEFAULT_PKT_FILTER, BRG_DEFAULT_RX_CHANNEL_OR_FREQ, BRG_DEFAULT_DATAPATH_OUTPUT_POWER, BRG_DEFAULT_TX_REPETITION, BRG_DEFAULT_PACER_INTERVAL, BRG_DEFAULT_RSSI_THRESHOLD, BRG_DEFAULT_RX_CHANNEL, BRG_DEFAULT_ENERGY_PATTERN_2_4, BRG_DEFAULT_ENERGY_DUTY_CYCLE_2_4, BRG_DEFAULT_OUTPUT_POWER_2_4, BRG_DEFAULT_SIGNAL_INDICATOR_REP, BRG_DEFAULT_SIGNAL_INDICATOR_REP_PROFILE, BRG_DEFAULT_SIGNAL_INDICATOR_CYCLE, BRG_DEFAULT_SUB1G_DUTY_CYCLE, BRG_DEFAULT_OUTPUT_POWER_SUB1G, BRG_DEFAULT_OUTPUT_POWER_SUB1G_PROFILE, BRG_DEFAULT_SUB1G_ENERGY_PATTERN, BRG_DEFAULT_SIGNAL_INDICATOR_SUB1G_REP, BRG_DEFAULT_SIGNAL_INDICATOR_SUB1G_REP_PROFILE, BRG_DEFAULT_SIGNAL_INDICATOR_SUB1G_CYCLE, BRG_DEFAULT_EXTERNAL_SENSOR_CFG, BRG_DEFAULT_TX_PERIOD, BRG_DEFAULT_TRANSMIT_TIME_SUB1G, BRG_DEFAULT_SUB1G_FREQ, BRG_DEFAULT_SUB1G_FREQ_PROFILE, BRG_DEFAULT_ENERGY_PATTERN_IDX_OLD, BRG_DEFAULT_RXTX_PERIOD, BRG_DEFAULT_PKT_TYPES_MASK, BRG_MGMT_MSG_TYPE_CFG_INFO, BRG_MGMT_MSG_TYPE_OTA_UPDATE, BRG_MGMT_MSG_TYPE_HB, BRG_MGMT_MSG_TYPE_REBOOT, BRG_MGMT_MSG_TYPE_CFG_SET, BRG_MGMT_MSG_TYPE_ACTION, BRG_MGMT_MSG_TYPE_BRG2BRG, BRG_MGMT_MSG_TYPE_HB_SLEEP, PWR_MGMT_DEFAULTS_LEDS_ON, PWR_MGMT_DEFAULTS_KEEP_ALIVE_PERIOD, PWR_MGMT_DEFAULTS_KEEP_ALIVE_SCAN, PWR_MGMT_DEFAULTS_ON_DURATION, PWR_MGMT_DEFAULTS_SLEEP_DURATION, LIS2DW12_DEFAULTS_PACKET_VERSION, LIS2DW12_DEFAULTS_STATE_THRESHOLD, LIS2DW12_DEFAULTS_WAKE_UP_DURATION, LIS2DW12_DEFAULTS_SLEEP_DURATION
6
+ from brg_certificate.ag.wlt_types_ag import API_VERSION_V0, API_VERSION_V1, API_VERSION_V2, API_VERSION_V5, API_VERSION_V6, API_VERSION_V7, API_VERSION_V8, API_VERSION_V9, API_VERSION_V10, API_VERSION_V11, API_VERSION_V12, API_VERSION_V13, API_VERSION_LATEST, MODULE_EMPTY, MODULE_GLOBAL, MODULE_IF, MODULE_DATAPATH, MODULE_ENERGY_2400, MODULE_ENERGY_SUB1G, MODULE_CALIBRATION, MODULE_PWR_MGMT, MODULE_EXT_SENSORS, MODULE_CUSTOM, SUB1G_ENERGY_PATTERN_NO_ENERGIZING, SUB1G_ENERGY_PATTERN_SINGLE_TONE_915000, SUB1G_ENERGY_PATTERN_FCC_HOPPING, SUB1G_ENERGY_PATTERN_JAPAN_1W, SUB1G_ENERGY_PATTERN_JAPAN_350MW, SUB1G_ENERGY_PATTERN_KOREA, SUB1G_ENERGY_PATTERN_SINGLE_TONE_916300, SUB1G_ENERGY_PATTERN_SINGLE_TONE_917500, SUB1G_ENERGY_PATTERN_AUSTRALIA, SUB1G_ENERGY_PATTERN_ISRAEL, SUB1G_ENERGY_PATTERN_NZ_HOPPING, SUB1G_ENERGY_PATTERN_LAST, CHANNEL_FREQ_37, CHANNEL_FREQ_38, CHANNEL_FREQ_39, CHANNEL_37, CHANNEL_38, CHANNEL_39, OUTPUT_POWER_2_4_NEG_12, OUTPUT_POWER_2_4_NEG_8, OUTPUT_POWER_2_4_NEG_4, OUTPUT_POWER_2_4_POS_0, OUTPUT_POWER_2_4_POS_2, OUTPUT_POWER_2_4_POS_3, OUTPUT_POWER_2_4_POS_4, OUTPUT_POWER_2_4_POS_5, OUTPUT_POWER_2_4_POS_6, OUTPUT_POWER_2_4_POS_7, OUTPUT_POWER_2_4_POS_8, RX_CHANNEL_37, RX_CHANNEL_38, RX_CHANNEL_39, RX_CHANNEL_10_250K, RX_CHANNEL_10_500K, RX_CHANNEL_V11_37, RX_CHANNEL_V11_38, RX_CHANNEL_V11_39, RX_CHANNEL_V11_4_1MBPS, RX_CHANNEL_V11_10_1MBPS, RX_CHANNEL_V11_4_2MBPS, RX_CHANNEL_V11_10_2MBPS, SECONDARY_RX_CHANNEL_10, SUB1G_OUTPUT_POWER_11, SUB1G_OUTPUT_POWER_14, SUB1G_OUTPUT_POWER_17, SUB1G_OUTPUT_POWER_19, SUB1G_OUTPUT_POWER_20, SUB1G_OUTPUT_POWER_23, SUB1G_OUTPUT_POWER_25, SUB1G_OUTPUT_POWER_26, SUB1G_OUTPUT_POWER_27, SUB1G_OUTPUT_POWER_29, SUB1G_OUTPUT_POWER_32, SUB1G_OUTPUT_POWER_PROFILE_14, SUB1G_OUTPUT_POWER_PROFILE_17, SUB1G_OUTPUT_POWER_PROFILE_20, SUB1G_OUTPUT_POWER_PROFILE_23, SUB1G_OUTPUT_POWER_PROFILE_26, SUB1G_OUTPUT_POWER_PROFILE_29, SUB1G_OUTPUT_POWER_PROFILE_32, SIGNAL_INDICATOR_REP_1, SIGNAL_INDICATOR_REP_2, SIGNAL_INDICATOR_REP_3, SIGNAL_INDICATOR_REP_4, SIGNAL_INDICATOR_SUB1G_REP_1, SIGNAL_INDICATOR_SUB1G_REP_2, SIGNAL_INDICATOR_SUB1G_REP_3, SIGNAL_INDICATOR_SUB1G_REP_4, SIGNAL_INDICATOR_REP_PROFILE_1, SIGNAL_INDICATOR_REP_PROFILE_2, SIGNAL_INDICATOR_REP_PROFILE_3, SIGNAL_INDICATOR_REP_PROFILE_4, SIGNAL_INDICATOR_SUB1G_REP_PROFILE_1, SIGNAL_INDICATOR_SUB1G_REP_PROFILE_2, SIGNAL_INDICATOR_SUB1G_REP_PROFILE_3, SIGNAL_INDICATOR_SUB1G_REP_PROFILE_4, BRG_DEFAULT_CALIBRATION_INTERVAL, BRG_DEFAULT_CALIBRATION_OUTPUT_POWER, BRG_DEFAULT_CALIBRATION_PATTERN, BRG_DEFAULT_DATAPATH_PATTERN, BRG_DEFAULT_PKT_FILTER, BRG_DEFAULT_RX_CHANNEL_OR_FREQ, BRG_DEFAULT_DATAPATH_OUTPUT_POWER, BRG_DEFAULT_TX_REPETITION, BRG_DEFAULT_PACER_INTERVAL, BRG_DEFAULT_RSSI_THRESHOLD, BRG_DEFAULT_RX_CHANNEL, BRG_DEFAULT_ENERGY_PATTERN_2_4, BRG_DEFAULT_ENERGY_DUTY_CYCLE_2_4, BRG_DEFAULT_OUTPUT_POWER_2_4, BRG_DEFAULT_SIGNAL_INDICATOR_REP, BRG_DEFAULT_SIGNAL_INDICATOR_REP_PROFILE, BRG_DEFAULT_SIGNAL_INDICATOR_CYCLE, BRG_DEFAULT_SUB1G_DUTY_CYCLE, BRG_DEFAULT_OUTPUT_POWER_SUB1G, BRG_DEFAULT_OUTPUT_POWER_SUB1G_PROFILE, BRG_DEFAULT_SUB1G_ENERGY_PATTERN, BRG_DEFAULT_SIGNAL_INDICATOR_SUB1G_REP, BRG_DEFAULT_SIGNAL_INDICATOR_SUB1G_REP_PROFILE, BRG_DEFAULT_SIGNAL_INDICATOR_SUB1G_CYCLE, BRG_DEFAULT_EXTERNAL_SENSOR_CFG, BRG_DEFAULT_TX_PERIOD, BRG_DEFAULT_TRANSMIT_TIME_SUB1G, BRG_DEFAULT_SUB1G_FREQ, BRG_DEFAULT_SUB1G_FREQ_PROFILE, BRG_DEFAULT_ENERGY_PATTERN_IDX_OLD, BRG_DEFAULT_RXTX_PERIOD, BRG_DEFAULT_PKT_TYPES_MASK, BRG_MGMT_MSG_TYPE_CFG_INFO, BRG_MGMT_MSG_TYPE_OTA_UPDATE, BRG_MGMT_MSG_TYPE_HB, BRG_MGMT_MSG_TYPE_REBOOT, BRG_MGMT_MSG_TYPE_CFG_SET, BRG_MGMT_MSG_TYPE_ACTION, BRG_MGMT_MSG_TYPE_BRG2BRG, BRG_MGMT_MSG_TYPE_HB_SLEEP, PWR_MGMT_DEFAULTS_LEDS_ON, PWR_MGMT_DEFAULTS_KEEP_ALIVE_PERIOD, PWR_MGMT_DEFAULTS_KEEP_ALIVE_SCAN, PWR_MGMT_DEFAULTS_ON_DURATION, PWR_MGMT_DEFAULTS_SLEEP_DURATION, LIS2DW12_DEFAULTS_PACKET_VERSION, LIS2DW12_DEFAULTS_MOTION_SENSITIVITY_THRESHOLD, LIS2DW12_DEFAULTS_S2D_TRANSITION_TIME, LIS2DW12_DEFAULTS_D2S_TRANSITION_TIME
7
7
 
8
8
  # Board Overwritten defines
9
9
  BRG_DEFAULT_CALIBRATION_OUTPUT_POWER = OUTPUT_POWER_2_4_POS_3
10
10
  BRG_DEFAULT_DATAPATH_OUTPUT_POWER = OUTPUT_POWER_2_4_POS_3
11
11
  BRG_DEFAULT_OUTPUT_POWER_2_4 = OUTPUT_POWER_2_4_POS_3
12
12
 
13
- class ModuleIfV12():
14
- 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):
13
+ class ModuleIfV13():
14
+ 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):
15
15
  self.module_type = module_type
16
16
  self.msg_type = msg_type
17
17
  self.api_version = api_version
@@ -36,7 +36,7 @@ class ModuleIfV12():
36
36
  self.set(raw)
37
37
 
38
38
  def __repr__(self) -> str:
39
- return "\n==> Packet module_if_v12 <==\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")
39
+ 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")
40
40
 
41
41
  def __eq__(self, other):
42
42
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -89,8 +89,8 @@ class ModuleIfV12():
89
89
  self.cfg_hash = d[18]
90
90
  self.unused0 = d[19]
91
91
 
92
- class ModuleIfV11():
93
- def __init__(self, raw='', module_type=MODULE_IF, msg_type=BRG_MGMT_MSG_TYPE_CFG_INFO, api_version=API_VERSION_V11, 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):
92
+ class ModuleIfV12():
93
+ 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):
94
94
  self.module_type = module_type
95
95
  self.msg_type = msg_type
96
96
  self.api_version = api_version
@@ -115,7 +115,7 @@ class ModuleIfV11():
115
115
  self.set(raw)
116
116
 
117
117
  def __repr__(self) -> str:
118
- return "\n==> Packet module_if_v11 <==\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")
118
+ return "\n==> Packet module_if_v12 <==\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")
119
119
 
120
120
  def __eq__(self, other):
121
121
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -168,8 +168,8 @@ class ModuleIfV11():
168
168
  self.cfg_hash = d[18]
169
169
  self.unused0 = d[19]
170
170
 
171
- class ModuleCalibrationV12():
172
- 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):
171
+ class ModuleCalibrationV13():
172
+ 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):
173
173
  self.module_type = module_type
174
174
  self.msg_type = msg_type
175
175
  self.api_version = api_version
@@ -184,7 +184,7 @@ class ModuleCalibrationV12():
184
184
  self.set(raw)
185
185
 
186
186
  def __repr__(self) -> str:
187
- return "\n==> Packet module_calibration_v12 <==\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")
187
+ 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")
188
188
 
189
189
  def __eq__(self, other):
190
190
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -216,8 +216,8 @@ class ModuleCalibrationV12():
216
216
  self.unused0 = d[8]
217
217
  self.unused1 = d[9]
218
218
 
219
- class ModuleCalibrationV11():
220
- def __init__(self, raw='', module_type=MODULE_CALIBRATION, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V11, 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):
219
+ class ModuleCalibrationV12():
220
+ 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):
221
221
  self.module_type = module_type
222
222
  self.msg_type = msg_type
223
223
  self.api_version = api_version
@@ -232,7 +232,7 @@ class ModuleCalibrationV11():
232
232
  self.set(raw)
233
233
 
234
234
  def __repr__(self) -> str:
235
- return "\n==> Packet module_calibration_v11 <==\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")
235
+ return "\n==> Packet module_calibration_v12 <==\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")
236
236
 
237
237
  def __eq__(self, other):
238
238
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -264,8 +264,8 @@ class ModuleCalibrationV11():
264
264
  self.unused0 = d[8]
265
265
  self.unused1 = d[9]
266
266
 
267
- class ModuleDatapathV12():
268
- 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):
267
+ class ModuleDatapathV13():
268
+ 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):
269
269
  self.module_type = module_type
270
270
  self.msg_type = msg_type
271
271
  self.api_version = api_version
@@ -283,7 +283,7 @@ class ModuleDatapathV12():
283
283
  self.set(raw)
284
284
 
285
285
  def __repr__(self) -> str:
286
- return "\n==> Packet module_datapath_v12 <==\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")
286
+ 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")
287
287
 
288
288
  def __eq__(self, other):
289
289
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -322,29 +322,26 @@ class ModuleDatapathV12():
322
322
  self.rx_channel = d[11]
323
323
  self.unused0 = d[12]
324
324
 
325
- class ModuleDatapathV11():
326
- def __init__(self, raw='', module_type=MODULE_DATAPATH, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V11, seq_id=0, brg_mac=0, unused1=0, unused0=0, adaptive_pacer=0, unified_echo_pkt=1, 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, unused2=0):
325
+ class ModuleDatapathV12():
326
+ 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):
327
327
  self.module_type = module_type
328
328
  self.msg_type = msg_type
329
329
  self.api_version = api_version
330
330
  self.seq_id = seq_id
331
331
  self.brg_mac = brg_mac
332
- self.unused1 = unused1
333
- self.unused0 = unused0
334
- self.adaptive_pacer = adaptive_pacer
335
- self.unified_echo_pkt = unified_echo_pkt
332
+ self.rssi_threshold = rssi_threshold
336
333
  self.pacer_interval = pacer_interval
337
334
  self.pkt_filter = pkt_filter
338
335
  self.tx_repetition = tx_repetition
339
336
  self.output_power = output_power
340
337
  self.pattern = pattern
341
338
  self.rx_channel = rx_channel
342
- self.unused2 = unused2
339
+ self.unused0 = unused0
343
340
  if raw:
344
341
  self.set(raw)
345
342
 
346
343
  def __repr__(self) -> str:
347
- return "\n==> Packet module_datapath_v11 <==\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],['adaptive_pacer', f"0x{self.adaptive_pacer:X}", self.adaptive_pacer],['unified_echo_pkt', f"0x{self.unified_echo_pkt:X}", self.unified_echo_pkt],['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")
344
+ return "\n==> Packet module_datapath_v12 <==\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")
348
345
 
349
346
  def __eq__(self, other):
350
347
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -353,8 +350,7 @@ class ModuleDatapathV11():
353
350
  self.msg_type == other.msg_type and
354
351
  self.api_version == other.api_version and
355
352
  self.brg_mac == other.brg_mac and
356
- self.adaptive_pacer == other.adaptive_pacer and
357
- self.unified_echo_pkt == other.unified_echo_pkt and
353
+ self.rssi_threshold == other.rssi_threshold and
358
354
  self.pacer_interval == other.pacer_interval and
359
355
  self.pkt_filter == other.pkt_filter and
360
356
  self.tx_repetition == other.tx_repetition and
@@ -365,32 +361,29 @@ class ModuleDatapathV11():
365
361
  return False
366
362
 
367
363
  def dump(self):
368
- string = bitstruct.pack("u4u4u8u8u48u4u2u1u1u16u5u3s8u4u4u72", self.module_type, self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.unused1, self.unused0, self.adaptive_pacer, self.unified_echo_pkt, self.pacer_interval, self.pkt_filter, self.tx_repetition, self.output_power, self.pattern, self.rx_channel, self.unused2)
364
+ 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)
369
365
  return string.hex().upper()
370
366
 
371
367
  def set(self, string):
372
- d = bitstruct.unpack("u4u4u8u8u48u4u2u1u1u16u5u3s8u4u4u72", binascii.unhexlify(string))
368
+ d = bitstruct.unpack("u4u4u8u8u48s8u16u5u3s8u4u4u72", binascii.unhexlify(string))
373
369
  self.module_type = d[0]
374
370
  self.msg_type = d[1]
375
371
  self.api_version = d[2]
376
372
  self.seq_id = d[3]
377
373
  self.brg_mac = d[4]
378
- self.unused1 = d[5]
379
- self.unused0 = d[6]
380
- self.adaptive_pacer = d[7]
381
- self.unified_echo_pkt = d[8]
382
- self.pacer_interval = d[9]
383
- self.pkt_filter = d[10]
384
- self.tx_repetition = d[11]
385
- self.output_power = d[12]
386
- self.pattern = d[13]
387
- self.rx_channel = d[14]
388
- self.unused2 = d[15]
374
+ self.rssi_threshold = ((d[5]*-1)+0)
375
+ self.pacer_interval = d[6]
376
+ self.pkt_filter = d[7]
377
+ self.tx_repetition = d[8]
378
+ self.output_power = d[9]
379
+ self.pattern = d[10]
380
+ self.rx_channel = d[11]
381
+ self.unused0 = d[12]
389
382
 
390
- 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}
391
- 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}
392
- class ModuleEnergy2400V12():
393
- def __init__(self, raw='', module_type=MODULE_ENERGY_2400, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V12, 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):
383
+ 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}
384
+ 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}
385
+ class ModuleEnergy2400V13():
386
+ 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):
394
387
  self.module_type = module_type
395
388
  self.msg_type = msg_type
396
389
  self.api_version = api_version
@@ -406,7 +399,7 @@ class ModuleEnergy2400V12():
406
399
  self.set(raw)
407
400
 
408
401
  def __repr__(self) -> str:
409
- return "\n==> Packet module_energy_2400_v12 <==\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")
402
+ 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")
410
403
 
411
404
  def __eq__(self, other):
412
405
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -424,7 +417,7 @@ class ModuleEnergy2400V12():
424
417
  return False
425
418
 
426
419
  def dump(self):
427
- 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_V12_SIGNAL_INDICATOR_REP_ENC[self.signal_indicator_rep], self.unused0)
420
+ 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)
428
421
  return string.hex().upper()
429
422
 
430
423
  def set(self, string):
@@ -438,13 +431,13 @@ class ModuleEnergy2400V12():
438
431
  self.pattern = d[6]
439
432
  self.output_power = d[7]
440
433
  self.signal_indicator_cycle = d[8]
441
- self.signal_indicator_rep = MODULE_ENERGY_2400_V12_SIGNAL_INDICATOR_REP_DEC[d[9]]
434
+ self.signal_indicator_rep = MODULE_ENERGY_2400_V13_SIGNAL_INDICATOR_REP_DEC[d[9]]
442
435
  self.unused0 = d[10]
443
436
 
444
- MODULE_ENERGY_2400_V11_SIGNAL_INDICATOR_REP_ENC = {SIGNAL_INDICATOR_REP_1:0, SIGNAL_INDICATOR_REP_2:1, SIGNAL_INDICATOR_REP_3:2, SIGNAL_INDICATOR_REP_4:3}
445
- MODULE_ENERGY_2400_V11_SIGNAL_INDICATOR_REP_DEC = {0:SIGNAL_INDICATOR_REP_1, 1:SIGNAL_INDICATOR_REP_2, 2:SIGNAL_INDICATOR_REP_3, 3:SIGNAL_INDICATOR_REP_4}
446
- class ModuleEnergy2400V11():
447
- def __init__(self, raw='', module_type=MODULE_ENERGY_2400, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V11, 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):
437
+ 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}
438
+ 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}
439
+ class ModuleEnergy2400V12():
440
+ def __init__(self, raw='', module_type=MODULE_ENERGY_2400, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V12, 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):
448
441
  self.module_type = module_type
449
442
  self.msg_type = msg_type
450
443
  self.api_version = api_version
@@ -460,7 +453,7 @@ class ModuleEnergy2400V11():
460
453
  self.set(raw)
461
454
 
462
455
  def __repr__(self) -> str:
463
- return "\n==> Packet module_energy_2400_v11 <==\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")
456
+ return "\n==> Packet module_energy_2400_v12 <==\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")
464
457
 
465
458
  def __eq__(self, other):
466
459
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -478,7 +471,7 @@ class ModuleEnergy2400V11():
478
471
  return False
479
472
 
480
473
  def dump(self):
481
- 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_V11_SIGNAL_INDICATOR_REP_ENC[self.signal_indicator_rep], self.unused0)
474
+ 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_V12_SIGNAL_INDICATOR_REP_ENC[self.signal_indicator_rep], self.unused0)
482
475
  return string.hex().upper()
483
476
 
484
477
  def set(self, string):
@@ -492,13 +485,13 @@ class ModuleEnergy2400V11():
492
485
  self.pattern = d[6]
493
486
  self.output_power = d[7]
494
487
  self.signal_indicator_cycle = d[8]
495
- self.signal_indicator_rep = MODULE_ENERGY_2400_V11_SIGNAL_INDICATOR_REP_DEC[d[9]]
488
+ self.signal_indicator_rep = MODULE_ENERGY_2400_V12_SIGNAL_INDICATOR_REP_DEC[d[9]]
496
489
  self.unused0 = d[10]
497
490
 
498
- 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}
499
- 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}
500
- class ModuleEnergySub1GV12():
501
- def __init__(self, raw='', module_type=MODULE_ENERGY_SUB1G, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V12, 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):
491
+ 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}
492
+ 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}
493
+ class ModuleEnergySub1GV13():
494
+ 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):
502
495
  self.module_type = module_type
503
496
  self.msg_type = msg_type
504
497
  self.api_version = api_version
@@ -513,7 +506,7 @@ class ModuleEnergySub1GV12():
513
506
  self.set(raw)
514
507
 
515
508
  def __repr__(self) -> str:
516
- return "\n==> Packet module_energy_sub1g_v12 <==\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")
509
+ 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")
517
510
 
518
511
  def __eq__(self, other):
519
512
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -530,7 +523,7 @@ class ModuleEnergySub1GV12():
530
523
  return False
531
524
 
532
525
  def dump(self):
533
- 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_V12_SIGNAL_INDICATOR_REP_ENC[self.signal_indicator_rep], self.unused0)
526
+ 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)
534
527
  return string.hex().upper()
535
528
 
536
529
  def set(self, string):
@@ -543,23 +536,19 @@ class ModuleEnergySub1GV12():
543
536
  self.pattern = d[5]
544
537
  self.duty_cycle = d[6]
545
538
  self.signal_indicator_cycle = d[7]
546
- self.signal_indicator_rep = MODULE_ENERGY_SUB1G_V12_SIGNAL_INDICATOR_REP_DEC[d[8]]
539
+ self.signal_indicator_rep = MODULE_ENERGY_SUB1G_V13_SIGNAL_INDICATOR_REP_DEC[d[8]]
547
540
  self.unused0 = d[9]
548
541
 
549
- MODULE_ENERGY_SUB1G_V11_OUTPUT_POWER_ENC = {SUB1G_OUTPUT_POWER_14:SUB1G_OUTPUT_POWER_PROFILE_14, SUB1G_OUTPUT_POWER_17:SUB1G_OUTPUT_POWER_PROFILE_17, SUB1G_OUTPUT_POWER_20:SUB1G_OUTPUT_POWER_PROFILE_20, SUB1G_OUTPUT_POWER_23:SUB1G_OUTPUT_POWER_PROFILE_23, SUB1G_OUTPUT_POWER_26:SUB1G_OUTPUT_POWER_PROFILE_26, SUB1G_OUTPUT_POWER_29:SUB1G_OUTPUT_POWER_PROFILE_29, SUB1G_OUTPUT_POWER_32:SUB1G_OUTPUT_POWER_PROFILE_32}
550
- MODULE_ENERGY_SUB1G_V11_OUTPUT_POWER_DEC = {SUB1G_OUTPUT_POWER_PROFILE_14:SUB1G_OUTPUT_POWER_14, SUB1G_OUTPUT_POWER_PROFILE_17:SUB1G_OUTPUT_POWER_17, SUB1G_OUTPUT_POWER_PROFILE_20:SUB1G_OUTPUT_POWER_20, SUB1G_OUTPUT_POWER_PROFILE_23:SUB1G_OUTPUT_POWER_23, SUB1G_OUTPUT_POWER_PROFILE_26:SUB1G_OUTPUT_POWER_26, SUB1G_OUTPUT_POWER_PROFILE_29:SUB1G_OUTPUT_POWER_29, SUB1G_OUTPUT_POWER_PROFILE_32:SUB1G_OUTPUT_POWER_32}
551
- MODULE_ENERGY_SUB1G_V11_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}
552
- MODULE_ENERGY_SUB1G_V11_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}
553
- class ModuleEnergySub1GV11():
554
- def __init__(self, raw='', module_type=MODULE_ENERGY_SUB1G, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V11, seq_id=0, brg_mac=0, output_power=BRG_DEFAULT_OUTPUT_POWER_SUB1G, sub1g_energy_pattern=BRG_DEFAULT_SUB1G_ENERGY_PATTERN, cycle=15, 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):
542
+ 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}
543
+ 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}
544
+ class ModuleEnergySub1GV12():
545
+ def __init__(self, raw='', module_type=MODULE_ENERGY_SUB1G, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V12, 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):
555
546
  self.module_type = module_type
556
547
  self.msg_type = msg_type
557
548
  self.api_version = api_version
558
549
  self.seq_id = seq_id
559
550
  self.brg_mac = brg_mac
560
- self.output_power = output_power
561
- self.sub1g_energy_pattern = sub1g_energy_pattern
562
- self.cycle = cycle
551
+ self.pattern = pattern
563
552
  self.duty_cycle = duty_cycle
564
553
  self.signal_indicator_cycle = signal_indicator_cycle
565
554
  self.signal_indicator_rep = signal_indicator_rep
@@ -568,7 +557,7 @@ class ModuleEnergySub1GV11():
568
557
  self.set(raw)
569
558
 
570
559
  def __repr__(self) -> str:
571
- return "\n==> Packet module_energy_sub1g_v11 <==\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],['output_power', f"0x{self.output_power:X}", self.output_power],['sub1g_energy_pattern', f"0x{self.sub1g_energy_pattern:X}", self.sub1g_energy_pattern],['cycle', f"0x{self.cycle:X}", self.cycle],['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")
560
+ return "\n==> Packet module_energy_sub1g_v12 <==\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")
572
561
 
573
562
  def __eq__(self, other):
574
563
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -577,9 +566,7 @@ class ModuleEnergySub1GV11():
577
566
  self.msg_type == other.msg_type and
578
567
  self.api_version == other.api_version and
579
568
  self.brg_mac == other.brg_mac and
580
- self.output_power == other.output_power and
581
- self.sub1g_energy_pattern == other.sub1g_energy_pattern and
582
- self.cycle == other.cycle and
569
+ self.pattern == other.pattern and
583
570
  self.duty_cycle == other.duty_cycle and
584
571
  self.signal_indicator_cycle == other.signal_indicator_cycle and
585
572
  self.signal_indicator_rep == other.signal_indicator_rep
@@ -587,26 +574,24 @@ class ModuleEnergySub1GV11():
587
574
  return False
588
575
 
589
576
  def dump(self):
590
- string = bitstruct.pack("u4u4u8u8u48u8u8u8u8u14u2u72", self.module_type, self.msg_type, self.api_version, self.seq_id, self.brg_mac, MODULE_ENERGY_SUB1G_V11_OUTPUT_POWER_ENC[self.output_power], self.sub1g_energy_pattern, self.cycle, self.duty_cycle, self.signal_indicator_cycle, MODULE_ENERGY_SUB1G_V11_SIGNAL_INDICATOR_REP_ENC[self.signal_indicator_rep], self.unused0)
577
+ 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_V12_SIGNAL_INDICATOR_REP_ENC[self.signal_indicator_rep], self.unused0)
591
578
  return string.hex().upper()
592
579
 
593
580
  def set(self, string):
594
- d = bitstruct.unpack("u4u4u8u8u48u8u8u8u8u14u2u72", binascii.unhexlify(string))
581
+ d = bitstruct.unpack("u4u4u8u8u48u8u8u14u2u88", binascii.unhexlify(string))
595
582
  self.module_type = d[0]
596
583
  self.msg_type = d[1]
597
584
  self.api_version = d[2]
598
585
  self.seq_id = d[3]
599
586
  self.brg_mac = d[4]
600
- self.output_power = MODULE_ENERGY_SUB1G_V11_OUTPUT_POWER_DEC[d[5]]
601
- self.sub1g_energy_pattern = d[6]
602
- self.cycle = d[7]
603
- self.duty_cycle = d[8]
604
- self.signal_indicator_cycle = d[9]
605
- self.signal_indicator_rep = MODULE_ENERGY_SUB1G_V11_SIGNAL_INDICATOR_REP_DEC[d[10]]
606
- self.unused0 = d[11]
587
+ self.pattern = d[5]
588
+ self.duty_cycle = d[6]
589
+ self.signal_indicator_cycle = d[7]
590
+ self.signal_indicator_rep = MODULE_ENERGY_SUB1G_V12_SIGNAL_INDICATOR_REP_DEC[d[8]]
591
+ self.unused0 = d[9]
607
592
 
608
- class ModulePwrMgmtV12():
609
- 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):
593
+ class ModulePwrMgmtV13():
594
+ 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):
610
595
  self.module_type = module_type
611
596
  self.msg_type = msg_type
612
597
  self.api_version = api_version
@@ -627,7 +612,7 @@ class ModulePwrMgmtV12():
627
612
  self.set(raw)
628
613
 
629
614
  def __repr__(self) -> str:
630
- return "\n==> Packet module_pwr_mgmt_v12 <==\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")
615
+ 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")
631
616
 
632
617
  def __eq__(self, other):
633
618
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -672,8 +657,8 @@ class ModulePwrMgmtV12():
672
657
  self.dynamic_sleep_duration = ((d[14]*60)+0)
673
658
  self.unused0 = d[15]
674
659
 
675
- class ModulePwrMgmtV11():
676
- def __init__(self, raw='', module_type=MODULE_PWR_MGMT, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V11, 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):
660
+ class ModulePwrMgmtV12():
661
+ 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):
677
662
  self.module_type = module_type
678
663
  self.msg_type = msg_type
679
664
  self.api_version = api_version
@@ -694,7 +679,7 @@ class ModulePwrMgmtV11():
694
679
  self.set(raw)
695
680
 
696
681
  def __repr__(self) -> str:
697
- return "\n==> Packet module_pwr_mgmt_v11 <==\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")
682
+ return "\n==> Packet module_pwr_mgmt_v12 <==\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")
698
683
 
699
684
  def __eq__(self, other):
700
685
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -739,8 +724,8 @@ class ModulePwrMgmtV11():
739
724
  self.dynamic_sleep_duration = ((d[14]*60)+0)
740
725
  self.unused0 = d[15]
741
726
 
742
- class ModuleExtSensorsV12():
743
- 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):
727
+ class ModuleExtSensorsV13():
728
+ 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):
744
729
  self.module_type = module_type
745
730
  self.msg_type = msg_type
746
731
  self.api_version = api_version
@@ -755,7 +740,7 @@ class ModuleExtSensorsV12():
755
740
  self.set(raw)
756
741
 
757
742
  def __repr__(self) -> str:
758
- return "\n==> Packet module_ext_sensors_v12 <==\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")
743
+ 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")
759
744
 
760
745
  def __eq__(self, other):
761
746
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -788,8 +773,8 @@ class ModuleExtSensorsV12():
788
773
  self.sub1g_rssi_threshold = ((d[8]*-1)+0)
789
774
  self.unused = d[9]
790
775
 
791
- class ModuleExtSensorsV11():
792
- def __init__(self, raw='', module_type=MODULE_EXT_SENSORS, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V11, seq_id=0, brg_mac=0, sensor0=BRG_DEFAULT_EXTERNAL_SENSOR_CFG, sensor1=BRG_DEFAULT_EXTERNAL_SENSOR_CFG, unused=0):
776
+ class ModuleExtSensorsV12():
777
+ 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):
793
778
  self.module_type = module_type
794
779
  self.msg_type = msg_type
795
780
  self.api_version = api_version
@@ -797,12 +782,14 @@ class ModuleExtSensorsV11():
797
782
  self.brg_mac = brg_mac
798
783
  self.sensor0 = sensor0
799
784
  self.sensor1 = sensor1
785
+ self.rssi_threshold = rssi_threshold
786
+ self.sub1g_rssi_threshold = sub1g_rssi_threshold
800
787
  self.unused = unused
801
788
  if raw:
802
789
  self.set(raw)
803
790
 
804
791
  def __repr__(self) -> str:
805
- return "\n==> Packet module_ext_sensors_v11 <==\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]], tablefmt="texttable")
792
+ return "\n==> Packet module_ext_sensors_v12 <==\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")
806
793
 
807
794
  def __eq__(self, other):
808
795
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -812,16 +799,18 @@ class ModuleExtSensorsV11():
812
799
  self.api_version == other.api_version and
813
800
  self.brg_mac == other.brg_mac and
814
801
  self.sensor0 == other.sensor0 and
815
- self.sensor1 == other.sensor1
802
+ self.sensor1 == other.sensor1 and
803
+ self.rssi_threshold == other.rssi_threshold and
804
+ self.sub1g_rssi_threshold == other.sub1g_rssi_threshold
816
805
  )
817
806
  return False
818
807
 
819
808
  def dump(self):
820
- string = bitstruct.pack("u4u4u8u8u48u32u32u56", self.module_type, self.msg_type, self.api_version, self.seq_id, self.brg_mac, self.sensor0, self.sensor1, self.unused)
809
+ 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)
821
810
  return string.hex().upper()
822
811
 
823
812
  def set(self, string):
824
- d = bitstruct.unpack("u4u4u8u8u48u32u32u56", binascii.unhexlify(string))
813
+ d = bitstruct.unpack("u4u4u8u8u48u32u32s8s8u40", binascii.unhexlify(string))
825
814
  self.module_type = d[0]
826
815
  self.msg_type = d[1]
827
816
  self.api_version = d[2]
@@ -829,10 +818,12 @@ class ModuleExtSensorsV11():
829
818
  self.brg_mac = d[4]
830
819
  self.sensor0 = d[5]
831
820
  self.sensor1 = d[6]
832
- self.unused = d[7]
821
+ self.rssi_threshold = ((d[7]*-1)+0)
822
+ self.sub1g_rssi_threshold = ((d[8]*-1)+0)
823
+ self.unused = d[9]
833
824
 
834
- class ModuleCustomV12():
835
- 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_STATE_THRESHOLD, s2d_transition_time=LIS2DW12_DEFAULTS_WAKE_UP_DURATION, d2s_transition_time=LIS2DW12_DEFAULTS_SLEEP_DURATION, unused1=0):
825
+ class ModuleCustomV13():
826
+ 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):
836
827
  self.module_type = module_type
837
828
  self.msg_type = msg_type
838
829
  self.api_version = api_version
@@ -846,7 +837,7 @@ class ModuleCustomV12():
846
837
  self.set(raw)
847
838
 
848
839
  def __repr__(self) -> str:
849
- return "\n==> Packet module_custom_v12 <==\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")
840
+ 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")
850
841
 
851
842
  def __eq__(self, other):
852
843
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -877,22 +868,22 @@ class ModuleCustomV12():
877
868
  self.d2s_transition_time = ((d[7]*5)+0)
878
869
  self.unused1 = d[8]
879
870
 
880
- class ModuleCustomV11():
881
- def __init__(self, raw='', module_type=MODULE_CUSTOM, msg_type=BRG_MGMT_MSG_TYPE_CFG_SET, api_version=API_VERSION_V11, seq_id=0, brg_mac=0, state_threshold=LIS2DW12_DEFAULTS_STATE_THRESHOLD, wake_up_duration=LIS2DW12_DEFAULTS_WAKE_UP_DURATION, sleep_duration=LIS2DW12_DEFAULTS_SLEEP_DURATION, unused1=0):
871
+ class ModuleCustomV12():
872
+ 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):
882
873
  self.module_type = module_type
883
874
  self.msg_type = msg_type
884
875
  self.api_version = api_version
885
876
  self.seq_id = seq_id
886
877
  self.brg_mac = brg_mac
887
- self.state_threshold = state_threshold # 31 [mg] resolution
888
- self.wake_up_duration = wake_up_duration # 3 [sec] resolution
889
- self.sleep_duration = sleep_duration # 5 [sec] resolution
878
+ self.motion_sensitivity_threshold = motion_sensitivity_threshold # 31 [mg] resolution
879
+ self.s2d_transition_time = s2d_transition_time # 3 [sec] resolution
880
+ self.d2s_transition_time = d2s_transition_time # 5 [sec] resolution
890
881
  self.unused1 = unused1
891
882
  if raw:
892
883
  self.set(raw)
893
884
 
894
885
  def __repr__(self) -> str:
895
- return "\n==> Packet module_custom_v11 <==\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],['state_threshold', f"0x{self.state_threshold:X}", self.state_threshold],['wake_up_duration', f"0x{self.wake_up_duration:X}", self.wake_up_duration],['sleep_duration', f"0x{self.sleep_duration:X}", self.sleep_duration]], tablefmt="texttable")
886
+ return "\n==> Packet module_custom_v12 <==\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")
896
887
 
897
888
  def __eq__(self, other):
898
889
  if other and set(other.__dict__.keys()) == set(self.__dict__.keys()):
@@ -901,14 +892,14 @@ class ModuleCustomV11():
901
892
  self.msg_type == other.msg_type and
902
893
  self.api_version == other.api_version and
903
894
  self.brg_mac == other.brg_mac and
904
- self.state_threshold == other.state_threshold and
905
- self.wake_up_duration == other.wake_up_duration and
906
- self.sleep_duration == other.sleep_duration
895
+ self.motion_sensitivity_threshold == other.motion_sensitivity_threshold and
896
+ self.s2d_transition_time == other.s2d_transition_time and
897
+ self.d2s_transition_time == other.d2s_transition_time
907
898
  )
908
899
  return False
909
900
 
910
901
  def dump(self):
911
- string = bitstruct.pack("u4u4u8u8u48u8u8u8u96", self.module_type, self.msg_type, self.api_version, self.seq_id, self.brg_mac, ((self.state_threshold-0)//31), ((self.wake_up_duration-0)//3), ((self.sleep_duration-0)//5), self.unused1)
902
+ 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)
912
903
  return string.hex().upper()
913
904
 
914
905
  def set(self, string):
@@ -918,8 +909,8 @@ class ModuleCustomV11():
918
909
  self.api_version = d[2]
919
910
  self.seq_id = d[3]
920
911
  self.brg_mac = d[4]
921
- self.state_threshold = ((d[5]*31)+0)
922
- self.wake_up_duration = ((d[6]*3)+0)
923
- self.sleep_duration = ((d[7]*5)+0)
912
+ self.motion_sensitivity_threshold = ((d[5]*31)+0)
913
+ self.s2d_transition_time = ((d[6]*3)+0)
914
+ self.d2s_transition_time = ((d[7]*5)+0)
924
915
  self.unused1 = d[8]
925
916