wiliot-certificate 4.4.3__py3-none-any.whl → 4.5.0a1__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 (295) hide show
  1. {brg_certificate → certificate}/ag/wlt_cmd_if.html +10 -4
  2. {brg_certificate → certificate}/ag/wlt_types_ag.py +1878 -519
  3. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/brg2brg_ota.json +69 -0
  4. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/brg2gw_hb.json +109 -0
  5. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +45 -0
  6. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/calibration.json +96 -0
  7. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/custom.json +99 -0
  8. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/datapath.json +241 -13
  9. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/energy2400.json +120 -0
  10. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/energySub1g.json +96 -0
  11. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/externalSensor.json +135 -6
  12. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/interface.json +157 -0
  13. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/powerManagement.json +205 -0
  14. brg_certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json → certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +27 -11
  15. certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json +175 -0
  16. certificate/ag/wlt_types_ag_jsons/unified_sensor_pkt.json +65 -0
  17. certificate/cert_common.py +1459 -0
  18. certificate/cert_config.py +455 -0
  19. {brg_certificate → certificate}/cert_data_sim.py +131 -46
  20. {brg_certificate → certificate}/cert_defines.py +120 -128
  21. {brg_certificate → certificate}/cert_gw_sim.py +151 -49
  22. {brg_certificate → certificate}/cert_mqtt.py +164 -59
  23. {brg_certificate → certificate}/cert_prints.py +34 -33
  24. {brg_certificate → certificate}/cert_protobuf.py +15 -6
  25. {brg_certificate → certificate}/cert_results.py +205 -48
  26. certificate/cert_utils.py +622 -0
  27. certificate/certificate.py +198 -0
  28. certificate/certificate_cli.py +79 -0
  29. certificate/certificate_eth_test_list.txt +74 -0
  30. certificate/certificate_sanity_test_list.txt +65 -0
  31. certificate/certificate_test_list.txt +75 -0
  32. {brg_certificate → certificate}/tests/calibration/interval_test/interval_test.json +2 -2
  33. {brg_certificate → certificate}/tests/calibration/interval_test/interval_test.py +7 -6
  34. certificate/tests/calibration/output_power_test/output_power_test.json +22 -0
  35. certificate/tests/calibration/output_power_test/output_power_test.py +39 -0
  36. {brg_certificate → certificate}/tests/calibration/pattern_test/pattern_test.json +1 -1
  37. {brg_certificate → certificate}/tests/calibration/pattern_test/pattern_test.py +20 -15
  38. certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.json +14 -0
  39. certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.py +140 -0
  40. certificate/tests/cloud_connectivity/acl_test/acl_test.json +14 -0
  41. certificate/tests/cloud_connectivity/acl_test/acl_test.py +98 -0
  42. certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.json +18 -0
  43. certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.py +39 -0
  44. certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.json +18 -0
  45. certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.py +215 -0
  46. certificate/tests/cloud_connectivity/connection_test/connection_test.json +17 -0
  47. certificate/tests/cloud_connectivity/connection_test/connection_test.py +74 -0
  48. certificate/tests/cloud_connectivity/downlink_test/downlink_test.json +20 -0
  49. certificate/tests/cloud_connectivity/downlink_test/downlink_test.py +204 -0
  50. certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.json +16 -0
  51. certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.py +98 -0
  52. certificate/tests/cloud_connectivity/reboot_test/reboot_test.json +17 -0
  53. certificate/tests/cloud_connectivity/reboot_test/reboot_test.py +57 -0
  54. certificate/tests/cloud_connectivity/registration_test/registration_test.json +19 -0
  55. certificate/tests/cloud_connectivity/registration_test/registration_test.py +384 -0
  56. certificate/tests/cloud_connectivity/registration_test/registration_test_cli.py +90 -0
  57. certificate/tests/cloud_connectivity/stress_test/stress_test.json +16 -0
  58. certificate/tests/cloud_connectivity/stress_test/stress_test.py +97 -0
  59. certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.json +24 -0
  60. certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.py +93 -0
  61. certificate/tests/cloud_connectivity/uplink_test/uplink_test.json +19 -0
  62. certificate/tests/cloud_connectivity/uplink_test/uplink_test.py +161 -0
  63. {brg_certificate → certificate}/tests/datapath/aging_test/aging_test.json +1 -1
  64. certificate/tests/datapath/aging_test/aging_test.py +138 -0
  65. certificate/tests/datapath/event_ble5_test/event_ble5_test.json +16 -0
  66. certificate/tests/datapath/event_ble5_test/event_ble5_test.py +95 -0
  67. certificate/tests/datapath/event_test/event_test.json +16 -0
  68. certificate/tests/datapath/event_test/event_test.py +85 -0
  69. {brg_certificate → certificate}/tests/datapath/num_of_tags_test/num_of_tags_test.json +1 -1
  70. {brg_certificate → certificate}/tests/datapath/num_of_tags_test/num_of_tags_test.py +10 -8
  71. certificate/tests/datapath/output_power_test/output_power_test.json +22 -0
  72. {brg_certificate → certificate}/tests/datapath/output_power_test/output_power_test.py +17 -6
  73. {brg_certificate → certificate}/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +1 -1
  74. {brg_certificate → certificate}/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +10 -8
  75. {brg_certificate → certificate}/tests/datapath/pacer_interval_test/pacer_interval_test.json +1 -1
  76. {brg_certificate → certificate}/tests/datapath/pacer_interval_test/pacer_interval_test.py +9 -7
  77. {brg_certificate → certificate}/tests/datapath/pattern_test/pattern_test.json +2 -2
  78. {brg_certificate → certificate}/tests/datapath/pattern_test/pattern_test.py +18 -6
  79. certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.json +19 -0
  80. certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.py +61 -0
  81. {brg_certificate → certificate}/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +1 -1
  82. {brg_certificate → certificate}/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +11 -10
  83. certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.json +18 -0
  84. certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.py +83 -0
  85. {brg_certificate → certificate}/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +1 -1
  86. {brg_certificate → certificate}/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +10 -9
  87. {brg_certificate → certificate}/tests/datapath/pkt_filter_test/pkt_filter_test.json +1 -1
  88. {brg_certificate → certificate}/tests/datapath/pkt_filter_test/pkt_filter_test.py +10 -9
  89. {brg_certificate → certificate}/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +1 -1
  90. {brg_certificate → certificate}/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +9 -8
  91. brg_certificate/tests/datapath/output_power_test/output_power_test.json → certificate/tests/datapath/rx_channel_hopping_test/rx_channel_hopping_test.json +5 -4
  92. certificate/tests/datapath/rx_channel_hopping_test/rx_channel_hopping_test.py +77 -0
  93. {brg_certificate → certificate}/tests/datapath/rx_channel_test/rx_channel_test.json +2 -2
  94. {brg_certificate → certificate}/tests/datapath/rx_channel_test/rx_channel_test.py +7 -6
  95. {brg_certificate → certificate}/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.json +7 -7
  96. {brg_certificate → certificate}/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +112 -72
  97. {brg_certificate → certificate}/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.json +7 -7
  98. {brg_certificate → certificate}/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +112 -72
  99. {brg_certificate → certificate}/tests/datapath/stress_gen3_test/stress_gen3_test.json +3 -3
  100. {brg_certificate → certificate}/tests/datapath/stress_gen3_test/stress_gen3_test.py +12 -11
  101. {brg_certificate → certificate}/tests/datapath/stress_test/stress_test.json +3 -3
  102. {brg_certificate → certificate}/tests/datapath/stress_test/stress_test.py +12 -11
  103. {brg_certificate → certificate}/tests/datapath/tx_repetition_test/tx_repetition_test.json +2 -1
  104. {brg_certificate → certificate}/tests/datapath/tx_repetition_test/tx_repetition_test.py +14 -13
  105. certificate/tests/edge_mgmt/action_blink_test/action_blink_test.json +14 -0
  106. certificate/tests/edge_mgmt/action_blink_test/action_blink_test.py +24 -0
  107. certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.json +14 -0
  108. certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.py +43 -0
  109. certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.json +14 -0
  110. certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.py +42 -0
  111. certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.json +14 -0
  112. certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.py +44 -0
  113. certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.json +15 -0
  114. certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.py +42 -0
  115. certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.json +14 -0
  116. certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.py +49 -0
  117. certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.json +14 -0
  118. certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.py +102 -0
  119. certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.json +14 -0
  120. certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.py +41 -0
  121. {brg_certificate → certificate}/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.json +2 -2
  122. {brg_certificate → certificate}/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.py +22 -11
  123. {brg_certificate → certificate}/tests/energy2400/duty_cycle_test/duty_cycle_test.json +1 -1
  124. {brg_certificate → certificate}/tests/energy2400/duty_cycle_test/duty_cycle_test.py +7 -6
  125. certificate/tests/energy2400/output_power_test/output_power_test.json +22 -0
  126. {brg_certificate → certificate}/tests/energy2400/output_power_test/output_power_test.py +17 -6
  127. {brg_certificate → certificate}/tests/energy2400/pattern_test/pattern_test.json +1 -1
  128. {brg_certificate → certificate}/tests/energy2400/pattern_test/pattern_test.py +7 -6
  129. certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.json +25 -0
  130. certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.py +378 -0
  131. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.json → certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.json +3 -3
  132. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.py → certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.py +97 -87
  133. certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +23 -0
  134. certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +350 -0
  135. {brg_certificate → certificate}/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +1 -1
  136. {brg_certificate → certificate}/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +7 -6
  137. {brg_certificate → certificate}/tests/energy_sub1g/pattern_test/pattern_test.json +1 -1
  138. {brg_certificate → certificate}/tests/energy_sub1g/pattern_test/pattern_test.py +7 -6
  139. {brg_certificate → certificate}/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.json +1 -1
  140. {brg_certificate → certificate}/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.py +10 -10
  141. {brg_certificate → certificate}/tests/sensors/ext_sensor_test/ext_sensor_test.json +4 -4
  142. certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +455 -0
  143. certificate/wlt_types.py +122 -0
  144. {gw_certificate → common}/api_if/202/status.json +6 -0
  145. {gw_certificate → common}/api_if/203/status.json +6 -0
  146. {gw_certificate → common}/api_if/204/status.json +6 -0
  147. common/api_if/206/data.json +85 -0
  148. common/api_if/206/status.json +69 -0
  149. common/api_if/api_validation.py +85 -0
  150. common/web/templates/generator.html +148 -0
  151. common/web/templates/index.html +20 -0
  152. common/web/templates/menu.html +54 -0
  153. common/web/templates/parser.html +53 -0
  154. {brg_certificate/ag → common/web/templates}/wlt_types.html +1216 -191
  155. common/web/web_utils.py +377 -0
  156. {brg_certificate → common}/wltPb_pb2.py +14 -12
  157. {gw_certificate/common → common}/wltPb_pb2.pyi +16 -2
  158. gui_certificate/gui_certificate_cli.py +14 -0
  159. gui_certificate/server.py +1062 -0
  160. gui_certificate/templates/cert_run.html +1207 -0
  161. wiliot_certificate-4.5.0a1.dist-info/METADATA +110 -0
  162. wiliot_certificate-4.5.0a1.dist-info/RECORD +182 -0
  163. {wiliot_certificate-4.4.3.dist-info → wiliot_certificate-4.5.0a1.dist-info}/WHEEL +1 -1
  164. wiliot_certificate-4.5.0a1.dist-info/entry_points.txt +5 -0
  165. wiliot_certificate-4.5.0a1.dist-info/top_level.txt +3 -0
  166. brg_certificate/ag/energous_v0_defines.py +0 -925
  167. brg_certificate/ag/energous_v1_defines.py +0 -931
  168. brg_certificate/ag/energous_v2_defines.py +0 -925
  169. brg_certificate/ag/energous_v3_defines.py +0 -925
  170. brg_certificate/ag/energous_v4_defines.py +0 -925
  171. brg_certificate/ag/fanstel_lan_v0_defines.py +0 -925
  172. brg_certificate/ag/fanstel_lte_v0_defines.py +0 -925
  173. brg_certificate/ag/fanstel_wifi_v0_defines.py +0 -925
  174. brg_certificate/ag/minew_lte_v0_defines.py +0 -925
  175. brg_certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +0 -61
  176. brg_certificate/brg_certificate.py +0 -225
  177. brg_certificate/brg_certificate_cli.py +0 -63
  178. brg_certificate/cert_common.py +0 -923
  179. brg_certificate/cert_config.py +0 -402
  180. brg_certificate/cert_utils.py +0 -362
  181. brg_certificate/certificate_bcc_sanity_test_list.txt +0 -40
  182. brg_certificate/certificate_bcc_test_list.txt +0 -48
  183. brg_certificate/certificate_sanity_test_list.txt +0 -43
  184. brg_certificate/certificate_test_list.txt +0 -53
  185. brg_certificate/config/eclipse.json +0 -10
  186. brg_certificate/config/hivemq.json +0 -10
  187. brg_certificate/config/mosquitto.json +0 -10
  188. brg_certificate/config/mosquitto.md +0 -95
  189. brg_certificate/config/wiliot-dev.json +0 -10
  190. brg_certificate/restore_brg.py +0 -61
  191. brg_certificate/tests/calibration/output_power_test/output_power_test.json +0 -16
  192. brg_certificate/tests/calibration/output_power_test/output_power_test.py +0 -28
  193. brg_certificate/tests/datapath/aging_test/aging_test.py +0 -143
  194. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.json +0 -16
  195. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +0 -73
  196. brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.json +0 -17
  197. brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +0 -118
  198. brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +0 -14
  199. brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +0 -396
  200. brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.json +0 -20
  201. brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +0 -94
  202. brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.json +0 -19
  203. brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.py +0 -87
  204. brg_certificate/tests/edge_mgmt/leds_test/leds_test.json +0 -17
  205. brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +0 -223
  206. brg_certificate/tests/edge_mgmt/ota_test/ota_test.json +0 -17
  207. brg_certificate/tests/edge_mgmt/ota_test/ota_test.py +0 -128
  208. brg_certificate/tests/energy2400/output_power_test/output_power_test.json +0 -16
  209. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.json +0 -20
  210. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.py +0 -321
  211. brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.json +0 -20
  212. brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +0 -141
  213. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +0 -20
  214. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +0 -276
  215. brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.json +0 -20
  216. brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +0 -390
  217. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +0 -16
  218. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +0 -28
  219. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +0 -305
  220. brg_certificate/wltPb_pb2.pyi +0 -234
  221. brg_certificate/wlt_types.py +0 -113
  222. gw_certificate/ag/ut_defines.py +0 -364
  223. gw_certificate/ag/wlt_types.py +0 -85
  224. gw_certificate/ag/wlt_types_ag.py +0 -5310
  225. gw_certificate/ag/wlt_types_data.py +0 -64
  226. gw_certificate/api/extended_api.py +0 -23
  227. gw_certificate/api_if/200/data.json +0 -106
  228. gw_certificate/api_if/200/status.json +0 -47
  229. gw_certificate/api_if/201/data.json +0 -98
  230. gw_certificate/api_if/201/status.json +0 -53
  231. gw_certificate/api_if/205/logs.json +0 -12
  232. gw_certificate/api_if/api_validation.py +0 -38
  233. gw_certificate/api_if/gw_capabilities.py +0 -54
  234. gw_certificate/cert_results.py +0 -145
  235. gw_certificate/common/analysis_data_bricks.py +0 -60
  236. gw_certificate/common/debug.py +0 -42
  237. gw_certificate/common/serialization_formatter.py +0 -93
  238. gw_certificate/common/utils.py +0 -8
  239. gw_certificate/common/utils_defines.py +0 -15
  240. gw_certificate/common/wltPb_pb2.py +0 -84
  241. gw_certificate/gw_certificate.py +0 -154
  242. gw_certificate/gw_certificate_cli.py +0 -87
  243. gw_certificate/interface/4.4.93_app.zip +0 -0
  244. gw_certificate/interface/4.4.93_sd_bl_app.zip +0 -0
  245. gw_certificate/interface/ble_simulator.py +0 -61
  246. gw_certificate/interface/ble_sniffer.py +0 -189
  247. gw_certificate/interface/flash_fw.py +0 -90
  248. gw_certificate/interface/if_defines.py +0 -36
  249. gw_certificate/interface/mqtt.py +0 -563
  250. gw_certificate/interface/nrfutil-linux +0 -0
  251. gw_certificate/interface/nrfutil-mac +0 -0
  252. gw_certificate/interface/nrfutil.exe +0 -0
  253. gw_certificate/interface/pkt_generator.py +0 -594
  254. gw_certificate/interface/uart_if.py +0 -236
  255. gw_certificate/interface/uart_ports.py +0 -20
  256. gw_certificate/templates/results.html +0 -241
  257. gw_certificate/templates/stage.html +0 -22
  258. gw_certificate/templates/table.html +0 -6
  259. gw_certificate/templates/test.html +0 -38
  260. gw_certificate/tests/__init__.py +0 -10
  261. gw_certificate/tests/actions.py +0 -289
  262. gw_certificate/tests/bad_crc_to_PER_quantization.csv +0 -51
  263. gw_certificate/tests/connection.py +0 -188
  264. gw_certificate/tests/downlink.py +0 -172
  265. gw_certificate/tests/generic.py +0 -238
  266. gw_certificate/tests/registration.py +0 -340
  267. gw_certificate/tests/static/__init__.py +0 -0
  268. gw_certificate/tests/static/connection_defines.py +0 -9
  269. gw_certificate/tests/static/downlink_defines.py +0 -9
  270. gw_certificate/tests/static/generated_packet_table.py +0 -195
  271. gw_certificate/tests/static/packet_table.csv +0 -10067
  272. gw_certificate/tests/static/references.py +0 -5
  273. gw_certificate/tests/static/uplink_defines.py +0 -14
  274. gw_certificate/tests/throughput.py +0 -240
  275. gw_certificate/tests/uplink.py +0 -853
  276. wiliot_certificate-4.4.3.dist-info/METADATA +0 -211
  277. wiliot_certificate-4.4.3.dist-info/RECORD +0 -210
  278. wiliot_certificate-4.4.3.dist-info/entry_points.txt +0 -3
  279. wiliot_certificate-4.4.3.dist-info/top_level.txt +0 -3
  280. {brg_certificate → certificate}/__init__.py +0 -0
  281. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/side_info_sensor.json +0 -0
  282. {brg_certificate → certificate}/ag/wlt_types_ag_jsons/signal_indicator_data.json +0 -0
  283. {gw_certificate → common}/api_if/202/data.json +0 -0
  284. {gw_certificate/api_if/200 → common/api_if/202}/logs.json +0 -0
  285. {gw_certificate → common}/api_if/203/data.json +0 -0
  286. {gw_certificate/api_if/201 → common/api_if/203}/logs.json +0 -0
  287. {gw_certificate → common}/api_if/204/data.json +0 -0
  288. {gw_certificate/api_if/202 → common/api_if/204}/logs.json +0 -0
  289. {gw_certificate → common}/api_if/205/data.json +0 -0
  290. {gw_certificate/api_if/203 → common/api_if/205}/logs.json +0 -0
  291. {gw_certificate → common}/api_if/205/status.json +0 -0
  292. {gw_certificate/api_if/204 → common/api_if/206}/logs.json +0 -0
  293. {gw_certificate → common/api_if}/__init__.py +0 -0
  294. {gw_certificate/api_if → gui_certificate}/__init__.py +0 -0
  295. {wiliot_certificate-4.4.3.dist-info → wiliot_certificate-4.5.0a1.dist-info}/licenses/LICENSE +0 -0
@@ -1,95 +0,0 @@
1
-
2
- ## Downloading and Running a Mosquitto MQTT Broker Locally
3
-
4
- This guide will walk you through the process of downloading and running the Mosquitto MQTT broker on your local machine.
5
-
6
- __Step 1:__ Download Mosquitto
7
-
8
- For Windows:
9
- 1. Visit the Mosquitto website download page: https://mosquitto.org/download/
10
- 2. Download the latest Windows installer (mosquitto-{version}-install-windows-x64.exe).
11
- 3. Run the installer and follow the installation steps.
12
- - <strong style="color:red">IMPORTANT NOTE:</strong> Make sure to check the option to add Mosquitto to your system's PATH during installation!
13
- 4. The default installation path is C:\Program Files\mosquitto.
14
-
15
- For Linux (Ubuntu/Debian):
16
- 1. Open the terminal.
17
- 2. Run the following commands to install Mosquitto and the client utilities:
18
- ```bash
19
- sudo apt update
20
- sudo apt install mosquitto mosquitto-clients
21
- ```
22
-
23
- For macOS:
24
- 1. Install Homebrew if you don’t have it by running:
25
- ```bash
26
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
27
- ```
28
- 2. Run the following command to install Mosquitto:
29
- ```bash
30
- brew install mosquitto
31
- ```
32
-
33
- __Step 2:__ Start the Mosquitto Broker
34
-
35
- For Windows:
36
- 1. Open the Command Prompt or PowerShell.
37
- 2. Navigate to the Mosquitto installation folder, if it’s not added to your PATH:
38
- ```bash
39
- cd "C:\Program Files\mosquitto"
40
- ```
41
- 3. Run the Mosquitto broker:
42
- ```bash
43
- mosquitto
44
- ```
45
-
46
- For Linux (Ubuntu/Debian):
47
- 1. Start the Mosquitto service:
48
- ```bash
49
- sudo systemctl start mosquitto
50
- ```
51
- Or, to run it manually for testing:
52
- ```bash
53
- mosquitto -v
54
- ```
55
-
56
- For macOS:
57
- 1. Start Mosquitto using the terminal:
58
- ```bash
59
- mosquitto -v
60
- ```
61
-
62
- __Step 3:__ Test the Mosquitto Broker
63
-
64
- You can test the broker by publishing and subscribing to a topic.
65
-
66
- Open two terminal windows:
67
-
68
- 1. In the first window (Subscriber):
69
- ```bash
70
- mosquitto_sub -t test/topic
71
- ```
72
-
73
- 2. In the second window (Publisher):
74
- ```bash
75
- mosquitto_pub -t test/topic -m "Hello, MQTT!"
76
- ```
77
-
78
- If everything works correctly, you should see the message "Hello, MQTT!" in the subscriber window.
79
-
80
- __Step 4:__ Enable Mosquitto on Startup (Optional)
81
-
82
- For Linux (Ubuntu/Debian):
83
- To make Mosquitto start automatically on boot:
84
- ```bash
85
- sudo systemctl enable mosquitto
86
- ```
87
-
88
- __Step 5:__ Stop the Mosquitto Broker
89
-
90
- To stop the broker, use CTRL+C in the terminal where it’s running or stop the service:
91
-
92
- For Linux:
93
- ```bash
94
- sudo systemctl stop mosquitto
95
- ```
@@ -1,10 +0,0 @@
1
- {
2
- "customBroker" : true,
3
- "port" : 8883,
4
- "brokerUrl" : "mqtts://mqtt.us-east-2.dev.wiliot.cloud",
5
- "username" : "wiliot",
6
- "password" : "wiliot",
7
- "updateTopic" : "update-test/wiliot/",
8
- "statusTopic" : "status-test/wiliot/",
9
- "dataTopic" : "data-test/wiliot/"
10
- }
@@ -1,61 +0,0 @@
1
- import sys
2
- import os
3
- sys.path.insert(0, os.path.abspath(".."))
4
- import argparse
5
- import brg_certificate.cert_common as cert_common
6
- from brg_certificate.cert_utils import *
7
-
8
- os.system('')
9
-
10
- def main():
11
-
12
- parser = argparse.ArgumentParser(description='Process some integers.')
13
- parser.add_argument('--brg', '-b', required=True, help='Bridge id to restore')
14
- parser.add_argument('--gw', '-g', required=True, help='GW id to use')
15
- args = parser.parse_args()
16
- utPrint(str(args.__dict__))
17
-
18
- mqttc = cert_mqtt.mqttc_init(args.gw, data="sim")
19
- brg = Bridge(args.brg)
20
- test = WltTest("", args.gw, mqttc, brg0=brg, server="prod")
21
-
22
- utPrint(SEP)
23
- utPrint(f"Getting GW {args.gw} Information", "BLUE")
24
- response = cert_common.get_gw_info(test)
25
- if response == NO_RESPONSE:
26
- error = f"ERROR: Didn't get response from {args.gw} !"
27
- utPrint(error, "red")
28
- sys.exit(-1)
29
- else:
30
- if ENTRIES in response[GW_INFO]:
31
- test.protobuf = True
32
-
33
- utPrint(SEP)
34
- utPrint(f"Getting BRG {brg.id_str} interface pkt", "BLUE")
35
- test, _ = cert_common.get_module_if_pkt(test)
36
- if test.rc == TEST_PASSED:
37
- utPrint("Success! Done!", "green")
38
- sys.exit(0)
39
- else:
40
- error = f"ERROR: Didn't get ModuleIfV{test.active_brg.api_version} from BRG:{brg.id_str}!"
41
- utPrint(error, "red")
42
- # Send restore defaults for 16 seconds
43
- test.rc = TEST_PASSED
44
- print(f"\nSending {ag.ACTIONS_DICT[ag.ACTION_RESTORE_DEFAULTS]}{test.active_brg.api_version} for 16 seconds")
45
- action_pkt = cert_config.get_default_brg_pkt(test, pkt_type=eval_pkt(f'{ag.ACTIONS_DICT[ag.ACTION_RESTORE_DEFAULTS]}{test.active_brg.api_version}'))
46
- cert_config.gw_downlink(test, raw_tx_data=action_pkt.dump(), max_retries=cert_config.BLE5_MAX_RETRIES*2)
47
-
48
- print("Waiting for 16*2 seconds broadcast + 30 seconds reboot!")
49
- for _ in range(16*2 + 30):
50
- print_update_wait(1)
51
- test, _ = cert_common.get_module_if_pkt(test)
52
- if test.rc == TEST_PASSED:
53
- utPrint("Success! Done!", "green")
54
- sys.exit(0)
55
- else:
56
- error = f"ERROR: Still Didn't get ModuleIfV{test.active_brg.api_version} from BRG:{brg.id_str}!"
57
- utPrint(error, "red")
58
- sys.exit(-1)
59
-
60
- if __name__ == "__main__":
61
- main()
@@ -1,16 +0,0 @@
1
- {
2
- "name": "Output Power",
3
- "module": "Calibration",
4
- "purpose": "Test configuration for all supported calibration output power values",
5
- "documentation": "https://community.wiliot.com/customers/s/article/Wiliot-Network-Calibration-Module",
6
- "initialCondition": "Bridge configured to defaults",
7
- "procedure": ["Test prolog",
8
- "For each supported value - configure the BRG and verify the value",
9
- "Test epilog and revert to defaults"],
10
- "expectedOutcome": "All values configured successfully",
11
- "mandatory": 0,
12
- "multiBridgeTest": 0,
13
- "gwOnlyTest": 0,
14
- "internalBridge": 1,
15
- "allSupportedValues": [-12, -8, -4, 0, 2, 3]
16
- }
@@ -1,28 +0,0 @@
1
- from brg_certificate.cert_prints import *
2
- from brg_certificate.cert_defines import *
3
- from brg_certificate.wlt_types import *
4
- import brg_certificate.cert_common as cert_common
5
- import brg_certificate.cert_config as cert_config
6
-
7
-
8
- def run(test):
9
-
10
- fields = [BRG_OUTPUT_POWER]
11
- calib_module = test.active_brg.calibration
12
-
13
- test = cert_common.test_prolog(test)
14
- if test.rc == TEST_FAILED:
15
- return cert_common.test_epilog(test)
16
-
17
- for param in test.params:
18
- test = cert_config.brg_configure(test, fields=fields, values=[param.value], module=calib_module)[0]
19
- generate_log_file(test, param.name)
20
- field_functionality_pass_fail_print(test, fields[0], value=param.name)
21
- test.set_phase_rc(param.name, test.rc)
22
- test.add_phase_reason(param.name, test.reason)
23
- if test.rc == TEST_FAILED:
24
- if test.exit_on_param_failure:
25
- break # break the whole for loop and keep the test as failed
26
- test.reset_result() # reset result and continue to next param
27
-
28
- return cert_common.test_epilog(test, revert_brgs=True, modules=[calib_module])
@@ -1,143 +0,0 @@
1
- from brg_certificate.cert_prints import *
2
- from brg_certificate.cert_defines import *
3
- from brg_certificate.wlt_types import *
4
- import brg_certificate.cert_common as cert_common
5
- import brg_certificate.cert_config as cert_config
6
- import brg_certificate.cert_data_sim as cert_data_sim
7
-
8
-
9
- def send_get_HB(test):
10
- cert_config.send_brg_action(test, ag.ACTION_SEND_HB)
11
- test, HB_list = cert_common.scan_for_mgmt_pkts(test, [eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')])
12
- return HB_list
13
-
14
-
15
- def calculate_aging_time(pacer_interval):
16
- return max(60, pacer_interval)
17
-
18
-
19
- def calculate_sending_time(duplicates, delay, num_of_sim_tags):
20
- if delay <= 0.02:
21
- return duplicates * 0.02 * num_of_sim_tags
22
- else:
23
- actual_delay = max(delay, duplicates * ag.PIXEL_SIM_MIN_CYCLE)
24
- actual_delay = actual_delay / 1000
25
- return actual_delay * num_of_sim_tags
26
-
27
-
28
- def combination_func(test, datapath_module, pacer_interval, num_of_sim_tags, aging_time):
29
-
30
- test = cert_config.brg_configure(test, fields=[BRG_PACER_INTERVAL], values=[pacer_interval], module=datapath_module)[0]
31
- if test.rc == TEST_FAILED and test.reason != TEST_PASSED:
32
- for i in range(2):
33
- if test.rc == TEST_PASSED:
34
- break # exist the loop and continue, if succeeded
35
- test = cert_config.brg_configure(test, fields=[BRG_PACER_INTERVAL], values=[pacer_interval], module=datapath_module)[0]
36
- test = test.add_reason("Didn't succeed to configure after two attempts - No pkt was found!")
37
- return test
38
- duplication = 1
39
- delay = 0
40
- pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_sim_tags, duplicates=duplication, delay=delay,
41
- pkt_types=[0], pixels_type=GEN2)
42
- cycle_time = calculate_sending_time(duplication, delay, num_of_sim_tags)
43
- sending_time = cycle_time * 4
44
- print(f"Simulator send pixels for {sending_time} sec")
45
- pixel_sim_thread.start()
46
- start_time = time.time()
47
- # sending time
48
- ctr_tags_sending_time = []
49
- while (time.time() - start_time) < sending_time:
50
- HB_list = send_get_HB(test)
51
-
52
- pixel_sim_thread.stop()
53
- for p in HB_list:
54
- ctr_tags_sending_time.append(p[MGMT_PKT].pkt.tags_ctr)
55
- print("\nSimulator stop generating packets\n")
56
- # TODO: logging print(debug)
57
- # print(f"ctr_tags_list: {ctr_tags_sending_time}\n")
58
-
59
- # waiting time - until the aging value
60
- # during of the aging time we expect to get the ctr_tags equal to the number of pixels
61
- ctr_tags_aging_time = []
62
- print(f"waiting for aging time of {aging_time} sec")
63
- while (time.time() - start_time) < (cycle_time * 3 + aging_time):
64
- HB_list = send_get_HB(test)
65
- for p in HB_list:
66
- ctr_tags_aging_time.append(p[MGMT_PKT].pkt.tags_ctr)
67
- print(f"\naging time: {aging_time} passed\n")
68
- # TODO: logging print(debug)
69
- # print(f"ctr_tags_list: {ctr_tags_aging_time}\n")
70
- start_aging_time = time.time()
71
- ctr_tags_deleting_time = []
72
-
73
- found_zero = 0
74
- time_finding = 0
75
- # stop after two HB packets, we expect to get the ctr_tags 0 in the second HB packet after the aging time
76
- print("Start of deleting time, wait for zero value ")
77
- while (time.time() - start_aging_time) <= 120:
78
- test, HB_list = cert_common.scan_for_mgmt_pkts(test, [eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')])
79
- for p in HB_list:
80
- ctr_tags_deleting_time.append(p[MGMT_PKT].pkt.tags_ctr)
81
- if p[MGMT_PKT].pkt.tags_ctr == 0:
82
- found_zero = 1
83
- time_finding = round(time.time() - start_aging_time, 2)
84
- print(f"Finding time: {time_finding}")
85
- print(f"Found zero value after {time_finding} sec")
86
- break
87
- if found_zero:
88
- break
89
- # sending time and the deleting time should be the same
90
- print(f"Deleting time: {cycle_time} passed\n")
91
- # TODO: logging print(debug)
92
- # print(f"Ctr_tags_deleting_time: {ctr_tags_deleting_time}\n")
93
-
94
- # expected to get the ctr_tags 0 in the second HB packet after the aging time
95
- if found_zero == 0 or time_finding > 60:
96
- test.rc = TEST_FAILED
97
- test.add_reason("The last counter value is not zero")
98
- print("The last counter value is not zero\n")
99
- else:
100
- # NOTE: because sometimes when it didn't find HB pkt it failed the test.
101
- test.rc = TEST_PASSED
102
- return test
103
-
104
-
105
- def low_pacer(test, datapath_module, num_of_sim_tags):
106
- pacer_interval = 15
107
- aging_time = calculate_aging_time(pacer_interval)
108
- test = combination_func(test, datapath_module, pacer_interval=pacer_interval, num_of_sim_tags=num_of_sim_tags, aging_time=aging_time)
109
- return test
110
-
111
-
112
- def high_pacer(test, datapath_module, num_of_sim_tags):
113
- pacer_interval = 300
114
- aging_time = calculate_aging_time(pacer_interval)
115
- test = combination_func(test, datapath_module, pacer_interval=pacer_interval, num_of_sim_tags=num_of_sim_tags, aging_time=aging_time)
116
- return test
117
-
118
-
119
- def run(test):
120
- # Test prolog
121
- datapath_module = test.active_brg.datapath
122
- test = cert_common.test_prolog(test)
123
- if test.rc == TEST_FAILED:
124
- return cert_common.test_epilog(test)
125
-
126
- AGING_TEST_MAP = {"low_pacer": low_pacer, "high_pacer": high_pacer}
127
- num_of_pixels = 500
128
-
129
- for param in test.params:
130
- functionality_run_print(param.name)
131
- test = AGING_TEST_MAP[param.value](test, datapath_module, num_of_pixels)
132
- generate_log_file(test, param.name)
133
- field_functionality_pass_fail_print(test, param.name)
134
- test.set_phase_rc(param.name, test.rc)
135
- test.add_phase_reason(param.name, test.reason)
136
- if test.rc == TEST_FAILED:
137
- if test.exit_on_param_failure:
138
- break # break the whole for loop and keep the test as failed
139
- test.reset_result() # reset result and continue to next param
140
-
141
- time.sleep(5)
142
-
143
- return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
@@ -1,16 +0,0 @@
1
- {
2
- "name": "Pacer Interval Pixels Count",
3
- "module": "Datapath",
4
- "purpose": "Test pixels handling in the bridge for different pacer interval values",
5
- "documentation": ["https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Pacing"],
6
- "initialCondition": "Bridge configured to defaults",
7
- "procedure": ["Test prolog",
8
- "For each supported value - Pacer interval configuration, Scan for pixel packets in the bridge & Compare maximal amount of received pixels to the amount received with different pacer interval value",
9
- "Test epilog and revert to defaults"],
10
- "expectedOutcome": "All values configured successfully and no significant gaps between received amounts of pixels were found",
11
- "mandatory": 1,
12
- "multiBridgeTest": 0,
13
- "gwOnlyTest": 0,
14
- "internalBridge": 1,
15
- "allSupportedValues": [1, 10, 15, 30]
16
- }
@@ -1,73 +0,0 @@
1
- from brg_certificate.cert_prints import *
2
- from brg_certificate.cert_defines import *
3
- from brg_certificate.wlt_types import *
4
- import brg_certificate.cert_common as cert_common
5
- import brg_certificate.cert_config as cert_config
6
-
7
-
8
- def run(test):
9
- pacer_threshold = PACER_INTERVAL_THRESHOLD_HIGH if test.private_setup else PACER_INTERVAL_THRESHOLD
10
-
11
- fields = [BRG_PACER_INTERVAL, BRG_TX_REPETITION]
12
- datapath_module = test.active_brg.datapath
13
-
14
- test = cert_common.test_prolog(test)
15
- if test.rc == TEST_FAILED:
16
- return cert_common.test_epilog(test)
17
-
18
- # Configure the GW to receive tags pkt
19
- if test.internal_brg:
20
- test = cert_config.brg_configure(test, fields=[BRG_RX_CHANNEL], values=[ag.RX_CHANNEL_37], module=datapath_module, wait=True)[0]
21
- if test.rc == TEST_FAILED:
22
- return cert_common.test_epilog(test, revert_gws=True)
23
-
24
- num_of_pixels = 200
25
- if test.data == DATA_SIMULATION:
26
- # start generating pkts and send them using data simulator
27
- pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=3, delay=0, pkt_types=[0])
28
- pixel_sim_thread.start()
29
-
30
- tags_count_per_pacer = {}
31
- for param in test.params:
32
- test = cert_config.brg_configure(test, fields=fields, values=[param.value, 1], module=datapath_module)[0]
33
- if test.rc == TEST_FAILED:
34
- if test.exit_on_param_failure:
35
- break # break the whole for loop and keep the test as failed
36
- else:
37
- test.reset_result() # reset result and continue to next param
38
- continue
39
- df = cert_common.data_scan(test, scan_time=120, brg_data=True)
40
- cert_common.display_data(df, nfpkt=True, tbc=True, name_prefix=f"brg_pacer_tags_count_{param.name}_", dir=test.dir)
41
- tags_count_per_pacer[param.value] = df[TAG_ID].nunique()
42
- generate_log_file(test, param.name)
43
- test.set_phase_rc(param.name, test.rc)
44
- test.add_phase_reason(param.name, test.reason)
45
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
46
- return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module])
47
- else:
48
- test.reset_result()
49
-
50
- if test.data == DATA_SIMULATION:
51
- # stop generating pkts with data simulator and wait a few seconds for full flush
52
- pixel_sim_thread.stop()
53
- time.sleep(5)
54
-
55
- print("tags_count_per_pacer: ", tags_count_per_pacer)
56
- max_count = max([tags_count_per_pacer[pacer] for pacer in tags_count_per_pacer])
57
- for param in test.params:
58
- if param.value not in tags_count_per_pacer:
59
- test.set_phase_rc(param.name, TEST_FAILED)
60
- test.add_phase_reason(param.name, f"param value {param.value} not found in tags_count_per_pacer")
61
- continue # Skip this param because the scan wasn't performed
62
- if test.data == DATA_SIMULATION:
63
- if tags_count_per_pacer[param.value] < num_of_pixels * 0.99 or tags_count_per_pacer[param.value] > num_of_pixels * 1.01:
64
- test.set_phase_rc(param.name, TEST_FAILED)
65
- test.add_phase_reason(param.name, f"received_tags={tags_count_per_pacer[param.value]} num_of_pixels={num_of_pixels}")
66
- # make sure minimal received tags number is more than minimal threshold (precentile from max)
67
- # diff of less than 3 tags will be accepted anyway
68
- elif tags_count_per_pacer[param.value] < (pacer_threshold * max_count) and (max_count - tags_count_per_pacer[param.value]) > 3:
69
- test.set_phase_rc(param.name, TEST_FAILED)
70
- test.add_phase_reason(param.name, f"received_tags={tags_count_per_pacer[param.value]} "
71
- f"max_tags={max_count} less than {int(pacer_threshold * 100)}%")
72
-
73
- return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module])
@@ -1,17 +0,0 @@
1
- {
2
- "name": "Tx Repetition Algorithm",
3
- "module": "Datapath",
4
- "purpose": "Test the tx repetition adjustment algorithm",
5
- "documentation": "<TEST_DOCUMENTATION_LINK>",
6
- "initialCondition": "Bridge configured to defaults",
7
- "procedure": ["Test prolog",
8
- "Configure bridge tx repetition to 0 to activate tx repetition adjustment algorithm, and packets de-dupliction to 0 to enable analysis",
9
- "Scan for packets and examine tx repetitions auto adjustment over time",
10
- "Test epilog and revert to defaults"],
11
- "expectedOutcome": "All configurations completed successfully and tx repetition algorithm works as expected",
12
- "mandatory": 0,
13
- "multiBridgeTest": 0,
14
- "gwOnlyTest": 0,
15
- "internalBridge": 1,
16
- "allSupportedValues": []
17
- }
@@ -1,118 +0,0 @@
1
- # This test runs tx repetitions value = 0 to examine the algo
2
- # the BRG cfg is meant to stretch the BRG tx queue so the algo is actively changing the tx rep val
3
-
4
- from brg_certificate.cert_prints import *
5
- from brg_certificate.cert_defines import *
6
- from brg_certificate.wlt_types import *
7
- import brg_certificate.cert_common as cert_common
8
- import brg_certificate.cert_config as cert_config
9
- import os
10
- import statistics
11
- import math
12
- import matplotlib.pyplot as plt
13
- import plotly.graph_objects as go
14
- from brg_certificate.cert_gw_sim import DEDUPLICATION_PKTS
15
-
16
- SCAN_TIME = 60 * 30
17
-
18
-
19
- def track_tx_rep(test, sorted_database):
20
- tx_reps = []
21
- times = []
22
- for rep in sorted_database:
23
- val = sorted_database[rep]
24
- tx_reps.append(val[0])
25
- times.append(val[1])
26
-
27
- # Plotting the graph
28
- plt.plot(times, tx_reps)
29
- plt.xlabel(f'Time (total of {SCAN_TIME} seconds)')
30
- plt.ylabel('TX Repetitions')
31
- plt.title('TX Rep Algo - pkts rep over time')
32
- plt.grid(True)
33
-
34
- # Close the Matplotlib plot
35
- plt.close()
36
-
37
- # Create a line plot
38
- fig = go.Figure()
39
- fig.add_trace(go.Scatter(x=times, y=tx_reps, mode='lines'))
40
- # Add titles and labels
41
- fig.update_layout(
42
- title='TX Rep Algo - pkts rep over time',
43
- xaxis_title=f'Time (total of {SCAN_TIME} seconds)',
44
- yaxis_title='TX Repetitions',
45
- showlegend=False,
46
- template="plotly_white"
47
- )
48
-
49
- # Save the graph as an HTML file
50
- html_file_path = os.path.join(test.dir, "tx_rep_algo_graph.html")
51
- fig.write_html(html_file_path)
52
-
53
- return test, tx_reps
54
-
55
-
56
- def tx_rep_analysis(test):
57
- # Clear data path
58
- cert_common.wait_time_n_print(CLEAR_DATA_PATH_TIMEOUT)
59
- test.mqttc.flush_pkts()
60
-
61
- # Collect pkts
62
- mqtt_scan_wait(test, SCAN_TIME)
63
- pkts = cert_mqtt.get_unified_data_pkts(test)
64
- print("Found {} unified packets".format(len(pkts)))
65
-
66
- # Count payloads
67
- pkt_payload_counter = {} # idx 0 - payload, idx 1 - payload ts
68
- for p in pkts:
69
- cur_pkt = p[PAYLOAD]
70
- if cur_pkt in pkt_payload_counter:
71
- pkt_payload_counter[cur_pkt] = (pkt_payload_counter[cur_pkt][0] + 1, pkt_payload_counter[cur_pkt][1])
72
- else:
73
- pkt_payload_counter[cur_pkt] = (1, p[TIMESTAMP])
74
- generate_log_file(test, "0")
75
-
76
- # Sort the data according to the time value
77
- sorted_database = dict(sorted(pkt_payload_counter.items(), key=lambda item: item[1][1]))
78
- test, tx_reps = track_tx_rep(test, sorted_database)
79
-
80
- # Calculate total average, top val & min val
81
- avg = statistics.mean(tx_reps)
82
- ceil = math.ceil(avg)
83
- floor = math.floor(avg)
84
- print(f"Avraged {avg} repetitions. ceil[{ceil}] floor[{floor}]")
85
-
86
- not_in_range = 0
87
- for i in tx_reps:
88
- if i > ceil or i < floor:
89
- not_in_range += 1
90
- if not_in_range:
91
- test.rc = TEST_FAILED
92
- test.add_reason(f"There are a total of {not_in_range} payloads outside the average (out of {len(tx_reps)})")
93
- print(f"total counted tx_reps[{tx_reps}]")
94
- return test
95
-
96
-
97
- def run(test):
98
-
99
- test = cert_common.test_prolog(test)
100
- if test.rc == TEST_FAILED:
101
- return cert_common.test_epilog(test)
102
-
103
- datapath_module = test.active_brg.datapath
104
-
105
- print("Configuring GW")
106
- # Set packets deduplication off to count the number of pkts from the BRG
107
- cert_config.gw_action(test, f"{DEDUPLICATION_PKTS} 0")
108
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
109
- return cert_common.test_epilog(test, revert_gws=True)
110
-
111
- test = cert_config.brg_configure(test, fields=[BRG_TX_REPETITION, BRG_PACER_INTERVAL], values=[0, 1], module=datapath_module)[0]
112
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
113
- return cert_common.test_epilog(test, revert_brgs=True, revert_gws=True, modules=[datapath_module])
114
- test = tx_rep_analysis(test)
115
-
116
- # Re-enable unified packets deduplication
117
- cert_config.gw_action(test, f"{DEDUPLICATION_PKTS} 1")
118
- return cert_common.test_epilog(test, revert_brgs=True, revert_gws=True, modules=[datapath_module])
@@ -1,14 +0,0 @@
1
- {
2
- "name": "Bridge Actions",
3
- "module": "Edge Management",
4
- "purpose": "Test bridge actions functionality",
5
- "documentation": "<TEST_DOCUMENTATION_LINK>",
6
- "initialCondition": "Bridge configured to defaults",
7
- "procedure": ["Test prolog", "Run all actions and test bridge's response accordingly", "Test epilog"],
8
- "expectedOutcome": "Bridge responded as expected to all sent actions",
9
- "mandatory": 0,
10
- "multiBridgeTest": 0,
11
- "gwOnlyTest": 0,
12
- "internalBridge": 1,
13
- "allSupportedValues": ["ACTION_GW_HB", "ACTION_BLINK", "ACTION_SEND_HB", "ACTION_GET_BATTERY_SENSOR" , "ACTION_GET_POF_DATA", "ACTION_PL_STATUS", "ACTION_GET_MODULE", "ACTION_REBOOT", "ACTION_RESTORE_DEFAULTS"]
14
- }