wiliot-certificate 4.4.2__py3-none-any.whl → 4.5.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 (297) 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. certificate/cert_common.py +1488 -0
  4. certificate/cert_config.py +480 -0
  5. {brg_certificate → certificate}/cert_data_sim.py +134 -46
  6. {brg_certificate → certificate}/cert_defines.py +129 -128
  7. {brg_certificate → certificate}/cert_gw_sim.py +183 -53
  8. {brg_certificate → certificate}/cert_mqtt.py +179 -64
  9. {brg_certificate → certificate}/cert_prints.py +35 -33
  10. {brg_certificate → certificate}/cert_protobuf.py +15 -6
  11. {brg_certificate → certificate}/cert_results.py +240 -64
  12. certificate/cert_utils.py +634 -0
  13. certificate/certificate.py +205 -0
  14. certificate/certificate_cli.py +76 -0
  15. certificate/certificate_eth_test_list.txt +76 -0
  16. certificate/certificate_sanity_test_list.txt +66 -0
  17. certificate/certificate_test_list.txt +76 -0
  18. {brg_certificate → certificate}/tests/calibration/interval_test/interval_test.json +3 -2
  19. {brg_certificate → certificate}/tests/calibration/interval_test/interval_test.py +7 -6
  20. certificate/tests/calibration/output_power_test/output_power_test.json +23 -0
  21. certificate/tests/calibration/output_power_test/output_power_test.py +39 -0
  22. {brg_certificate → certificate}/tests/calibration/pattern_test/pattern_test.json +2 -1
  23. {brg_certificate → certificate}/tests/calibration/pattern_test/pattern_test.py +20 -15
  24. certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.json +15 -0
  25. certificate/tests/cloud_connectivity/acl_ext_adv_test/acl_ext_adv_test.py +140 -0
  26. certificate/tests/cloud_connectivity/acl_test/acl_test.json +15 -0
  27. certificate/tests/cloud_connectivity/acl_test/acl_test.py +96 -0
  28. certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.json +19 -0
  29. certificate/tests/cloud_connectivity/brg_ota_test/brg_ota_test.py +41 -0
  30. certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.json +19 -0
  31. certificate/tests/cloud_connectivity/channel_scan_behaviour_test/channel_scan_behaviour_test.py +215 -0
  32. certificate/tests/cloud_connectivity/connection_test/connection_test.json +18 -0
  33. certificate/tests/cloud_connectivity/connection_test/connection_test.py +67 -0
  34. certificate/tests/cloud_connectivity/deduplication_test/deduplication_test.json +15 -0
  35. certificate/tests/cloud_connectivity/deduplication_test/deduplication_test.py +80 -0
  36. certificate/tests/cloud_connectivity/downlink_test/downlink_test.json +21 -0
  37. certificate/tests/cloud_connectivity/downlink_test/downlink_test.py +201 -0
  38. certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.json +17 -0
  39. certificate/tests/cloud_connectivity/ext_adv_stress_test/ext_adv_stress_test.py +104 -0
  40. certificate/tests/cloud_connectivity/reboot_test/reboot_test.json +18 -0
  41. certificate/tests/cloud_connectivity/reboot_test/reboot_test.py +59 -0
  42. certificate/tests/cloud_connectivity/registration_test/registration_test.json +20 -0
  43. certificate/tests/cloud_connectivity/registration_test/registration_test.py +384 -0
  44. certificate/tests/cloud_connectivity/registration_test/registration_test_cli.py +90 -0
  45. certificate/tests/cloud_connectivity/stress_test/stress_test.json +17 -0
  46. certificate/tests/cloud_connectivity/stress_test/stress_test.py +101 -0
  47. certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.json +25 -0
  48. certificate/tests/cloud_connectivity/uplink_ext_adv_test/uplink_ext_adv_test.py +92 -0
  49. certificate/tests/cloud_connectivity/uplink_test/uplink_test.json +20 -0
  50. certificate/tests/cloud_connectivity/uplink_test/uplink_test.py +169 -0
  51. {brg_certificate → certificate}/tests/datapath/aging_test/aging_test.json +2 -1
  52. certificate/tests/datapath/aging_test/aging_test.py +142 -0
  53. certificate/tests/datapath/event_ble5_test/event_ble5_test.json +17 -0
  54. certificate/tests/datapath/event_ble5_test/event_ble5_test.py +89 -0
  55. certificate/tests/datapath/event_test/event_test.json +17 -0
  56. certificate/tests/datapath/event_test/event_test.py +80 -0
  57. {brg_certificate → certificate}/tests/datapath/num_of_tags_test/num_of_tags_test.json +4 -3
  58. {brg_certificate → certificate}/tests/datapath/num_of_tags_test/num_of_tags_test.py +19 -13
  59. certificate/tests/datapath/output_power_test/output_power_test.json +23 -0
  60. {brg_certificate → certificate}/tests/datapath/output_power_test/output_power_test.py +17 -6
  61. {brg_certificate → certificate}/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +2 -1
  62. {brg_certificate → certificate}/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +13 -11
  63. {brg_certificate → certificate}/tests/datapath/pacer_interval_test/pacer_interval_test.json +2 -1
  64. {brg_certificate → certificate}/tests/datapath/pacer_interval_test/pacer_interval_test.py +9 -7
  65. {brg_certificate → certificate}/tests/datapath/pattern_test/pattern_test.json +3 -2
  66. {brg_certificate → certificate}/tests/datapath/pattern_test/pattern_test.py +18 -6
  67. certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.json +20 -0
  68. certificate/tests/datapath/pkt_filter_ble5_chl21_test/pkt_filter_ble5_chl21_test.py +61 -0
  69. {brg_certificate → certificate}/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +2 -1
  70. {brg_certificate → certificate}/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +15 -14
  71. certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.json +19 -0
  72. certificate/tests/datapath/pkt_filter_brg2gw_ext_adv_test/pkt_filter_brg2gw_ext_adv_test.py +85 -0
  73. {brg_certificate → certificate}/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +2 -1
  74. {brg_certificate → certificate}/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +10 -9
  75. {brg_certificate → certificate}/tests/datapath/pkt_filter_test/pkt_filter_test.json +2 -1
  76. {brg_certificate → certificate}/tests/datapath/pkt_filter_test/pkt_filter_test.py +10 -9
  77. {brg_certificate → certificate}/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +3 -2
  78. {brg_certificate → certificate}/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +9 -8
  79. brg_certificate/tests/datapath/output_power_test/output_power_test.json → certificate/tests/datapath/rx_channel_hopping_test/rx_channel_hopping_test.json +6 -4
  80. certificate/tests/datapath/rx_channel_hopping_test/rx_channel_hopping_test.py +77 -0
  81. {brg_certificate → certificate}/tests/datapath/rx_channel_test/rx_channel_test.json +3 -2
  82. {brg_certificate → certificate}/tests/datapath/rx_channel_test/rx_channel_test.py +7 -6
  83. {brg_certificate → certificate}/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.json +8 -7
  84. {brg_certificate → certificate}/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +113 -73
  85. {brg_certificate → certificate}/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.json +8 -7
  86. {brg_certificate → certificate}/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +112 -72
  87. {brg_certificate → certificate}/tests/datapath/stress_gen3_test/stress_gen3_test.json +4 -3
  88. {brg_certificate → certificate}/tests/datapath/stress_gen3_test/stress_gen3_test.py +15 -11
  89. {brg_certificate → certificate}/tests/datapath/stress_test/stress_test.json +4 -3
  90. {brg_certificate → certificate}/tests/datapath/stress_test/stress_test.py +15 -11
  91. {brg_certificate → certificate}/tests/datapath/tx_repetition_test/tx_repetition_test.json +3 -1
  92. {brg_certificate → certificate}/tests/datapath/tx_repetition_test/tx_repetition_test.py +14 -13
  93. certificate/tests/edge_mgmt/action_blink_test/action_blink_test.json +15 -0
  94. certificate/tests/edge_mgmt/action_blink_test/action_blink_test.py +24 -0
  95. certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.json +15 -0
  96. certificate/tests/edge_mgmt/action_get_battery_sensor_test/action_get_battery_sensor_test.py +43 -0
  97. certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.json +15 -0
  98. certificate/tests/edge_mgmt/action_get_module_test/action_get_module_test.py +42 -0
  99. certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.json +15 -0
  100. certificate/tests/edge_mgmt/action_get_pof_data_test/action_get_pof_data_test.py +44 -0
  101. certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.json +16 -0
  102. certificate/tests/edge_mgmt/action_gw_hb_test/action_gw_hb_test.py +42 -0
  103. certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.json +15 -0
  104. certificate/tests/edge_mgmt/action_reboot_test/action_reboot_test.py +49 -0
  105. certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.json +15 -0
  106. certificate/tests/edge_mgmt/action_restore_defaults_test/action_restore_defaults_test.py +102 -0
  107. certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.json +15 -0
  108. certificate/tests/edge_mgmt/action_send_hb_test/action_send_hb_test.py +45 -0
  109. {brg_certificate → certificate}/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.json +3 -2
  110. {brg_certificate → certificate}/tests/edge_mgmt/periodic_msgs_test/periodic_msgs_test.py +22 -11
  111. {brg_certificate → certificate}/tests/energy2400/duty_cycle_test/duty_cycle_test.json +2 -1
  112. {brg_certificate → certificate}/tests/energy2400/duty_cycle_test/duty_cycle_test.py +7 -6
  113. certificate/tests/energy2400/output_power_test/output_power_test.json +23 -0
  114. {brg_certificate → certificate}/tests/energy2400/output_power_test/output_power_test.py +17 -6
  115. {brg_certificate → certificate}/tests/energy2400/pattern_test/pattern_test.json +2 -1
  116. {brg_certificate → certificate}/tests/energy2400/pattern_test/pattern_test.py +7 -6
  117. certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.json +26 -0
  118. certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.py +379 -0
  119. certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.json +20 -0
  120. certificate/tests/energy2400/signal_indicator_ext_adv_test/signal_indicator_ext_adv_test.py +173 -0
  121. certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +24 -0
  122. certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +350 -0
  123. {brg_certificate → certificate}/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +2 -1
  124. {brg_certificate → certificate}/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +7 -6
  125. {brg_certificate → certificate}/tests/energy_sub1g/pattern_test/pattern_test.json +2 -1
  126. {brg_certificate → certificate}/tests/energy_sub1g/pattern_test/pattern_test.py +7 -6
  127. {brg_certificate → certificate}/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.json +2 -1
  128. {brg_certificate → certificate}/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.py +10 -10
  129. {brg_certificate → certificate}/tests/sensors/ext_sensor_test/ext_sensor_test.json +5 -4
  130. certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +450 -0
  131. certificate/wlt_types.py +122 -0
  132. {gw_certificate → common}/api_if/202/status.json +6 -0
  133. {gw_certificate → common}/api_if/203/status.json +6 -0
  134. {gw_certificate → common}/api_if/204/status.json +6 -0
  135. common/api_if/206/data.json +85 -0
  136. common/api_if/206/status.json +69 -0
  137. common/api_if/api_validation.py +91 -0
  138. common/web/templates/generator.html +210 -0
  139. common/web/templates/index.html +20 -0
  140. common/web/templates/menu.html +54 -0
  141. common/web/templates/parser.html +53 -0
  142. {brg_certificate/ag → common/web/templates}/wlt_types.html +1216 -191
  143. common/web/web_utils.py +399 -0
  144. {brg_certificate → common}/wltPb_pb2.py +14 -12
  145. {gw_certificate/common → common}/wltPb_pb2.pyi +16 -2
  146. gui_certificate/gui_certificate_cli.py +14 -0
  147. gui_certificate/server.py +1267 -0
  148. gui_certificate/templates/cert_run.html +1273 -0
  149. wiliot_certificate-4.5.0.dist-info/METADATA +99 -0
  150. wiliot_certificate-4.5.0.dist-info/RECORD +168 -0
  151. {wiliot_certificate-4.4.2.dist-info → wiliot_certificate-4.5.0.dist-info}/WHEEL +1 -1
  152. wiliot_certificate-4.5.0.dist-info/entry_points.txt +5 -0
  153. wiliot_certificate-4.5.0.dist-info/top_level.txt +3 -0
  154. brg_certificate/ag/energous_v0_defines.py +0 -925
  155. brg_certificate/ag/energous_v1_defines.py +0 -931
  156. brg_certificate/ag/energous_v2_defines.py +0 -925
  157. brg_certificate/ag/energous_v3_defines.py +0 -925
  158. brg_certificate/ag/energous_v4_defines.py +0 -925
  159. brg_certificate/ag/fanstel_lan_v0_defines.py +0 -925
  160. brg_certificate/ag/fanstel_lte_v0_defines.py +0 -925
  161. brg_certificate/ag/fanstel_wifi_v0_defines.py +0 -925
  162. brg_certificate/ag/minew_lte_v0_defines.py +0 -925
  163. brg_certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +0 -142
  164. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +0 -785
  165. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +0 -139
  166. brg_certificate/ag/wlt_types_ag_jsons/calibration.json +0 -394
  167. brg_certificate/ag/wlt_types_ag_jsons/custom.json +0 -515
  168. brg_certificate/ag/wlt_types_ag_jsons/datapath.json +0 -672
  169. brg_certificate/ag/wlt_types_ag_jsons/energy2400.json +0 -550
  170. brg_certificate/ag/wlt_types_ag_jsons/energySub1g.json +0 -595
  171. brg_certificate/ag/wlt_types_ag_jsons/externalSensor.json +0 -598
  172. brg_certificate/ag/wlt_types_ag_jsons/interface.json +0 -938
  173. brg_certificate/ag/wlt_types_ag_jsons/powerManagement.json +0 -1234
  174. brg_certificate/ag/wlt_types_ag_jsons/side_info_sensor.json +0 -105
  175. brg_certificate/ag/wlt_types_ag_jsons/signal_indicator_data.json +0 -77
  176. brg_certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +0 -61
  177. brg_certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json +0 -110
  178. brg_certificate/brg_certificate.py +0 -225
  179. brg_certificate/brg_certificate_cli.py +0 -63
  180. brg_certificate/cert_common.py +0 -923
  181. brg_certificate/cert_config.py +0 -402
  182. brg_certificate/cert_utils.py +0 -362
  183. brg_certificate/certificate_bcc_sanity_test_list.txt +0 -40
  184. brg_certificate/certificate_bcc_test_list.txt +0 -48
  185. brg_certificate/certificate_sanity_test_list.txt +0 -43
  186. brg_certificate/certificate_test_list.txt +0 -53
  187. brg_certificate/config/eclipse.json +0 -10
  188. brg_certificate/config/hivemq.json +0 -10
  189. brg_certificate/config/mosquitto.json +0 -10
  190. brg_certificate/config/mosquitto.md +0 -95
  191. brg_certificate/config/wiliot-dev.json +0 -10
  192. brg_certificate/restore_brg.py +0 -61
  193. brg_certificate/tests/calibration/output_power_test/output_power_test.json +0 -16
  194. brg_certificate/tests/calibration/output_power_test/output_power_test.py +0 -28
  195. brg_certificate/tests/datapath/aging_test/aging_test.py +0 -143
  196. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.json +0 -16
  197. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +0 -73
  198. brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.json +0 -17
  199. brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +0 -118
  200. brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +0 -14
  201. brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +0 -396
  202. brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.json +0 -20
  203. brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +0 -94
  204. brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.json +0 -19
  205. brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.py +0 -87
  206. brg_certificate/tests/edge_mgmt/leds_test/leds_test.json +0 -17
  207. brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +0 -223
  208. brg_certificate/tests/edge_mgmt/ota_test/ota_test.json +0 -17
  209. brg_certificate/tests/edge_mgmt/ota_test/ota_test.py +0 -128
  210. brg_certificate/tests/energy2400/output_power_test/output_power_test.json +0 -16
  211. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.json +0 -20
  212. brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.py +0 -321
  213. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.json +0 -20
  214. brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.py +0 -321
  215. brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.json +0 -20
  216. brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +0 -141
  217. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +0 -20
  218. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +0 -276
  219. brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.json +0 -20
  220. brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +0 -390
  221. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +0 -16
  222. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +0 -28
  223. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +0 -305
  224. brg_certificate/wltPb_pb2.pyi +0 -234
  225. brg_certificate/wlt_types.py +0 -113
  226. gw_certificate/ag/ut_defines.py +0 -364
  227. gw_certificate/ag/wlt_types.py +0 -85
  228. gw_certificate/ag/wlt_types_ag.py +0 -5310
  229. gw_certificate/ag/wlt_types_data.py +0 -64
  230. gw_certificate/api/extended_api.py +0 -23
  231. gw_certificate/api_if/200/data.json +0 -106
  232. gw_certificate/api_if/200/status.json +0 -47
  233. gw_certificate/api_if/201/data.json +0 -98
  234. gw_certificate/api_if/201/status.json +0 -53
  235. gw_certificate/api_if/205/logs.json +0 -12
  236. gw_certificate/api_if/api_validation.py +0 -38
  237. gw_certificate/api_if/gw_capabilities.py +0 -54
  238. gw_certificate/cert_results.py +0 -145
  239. gw_certificate/common/analysis_data_bricks.py +0 -60
  240. gw_certificate/common/debug.py +0 -42
  241. gw_certificate/common/serialization_formatter.py +0 -93
  242. gw_certificate/common/utils.py +0 -8
  243. gw_certificate/common/utils_defines.py +0 -15
  244. gw_certificate/common/wltPb_pb2.py +0 -84
  245. gw_certificate/gw_certificate.py +0 -154
  246. gw_certificate/gw_certificate_cli.py +0 -87
  247. gw_certificate/interface/4.4.91_app.zip +0 -0
  248. gw_certificate/interface/4.4.91_sd_bl_app.zip +0 -0
  249. gw_certificate/interface/ble_simulator.py +0 -61
  250. gw_certificate/interface/ble_sniffer.py +0 -189
  251. gw_certificate/interface/flash_fw.py +0 -90
  252. gw_certificate/interface/if_defines.py +0 -36
  253. gw_certificate/interface/mqtt.py +0 -563
  254. gw_certificate/interface/nrfutil-linux +0 -0
  255. gw_certificate/interface/nrfutil-mac +0 -0
  256. gw_certificate/interface/nrfutil.exe +0 -0
  257. gw_certificate/interface/pkt_generator.py +0 -594
  258. gw_certificate/interface/uart_if.py +0 -236
  259. gw_certificate/interface/uart_ports.py +0 -20
  260. gw_certificate/templates/results.html +0 -241
  261. gw_certificate/templates/stage.html +0 -22
  262. gw_certificate/templates/table.html +0 -6
  263. gw_certificate/templates/test.html +0 -38
  264. gw_certificate/tests/__init__.py +0 -10
  265. gw_certificate/tests/actions.py +0 -289
  266. gw_certificate/tests/bad_crc_to_PER_quantization.csv +0 -51
  267. gw_certificate/tests/connection.py +0 -188
  268. gw_certificate/tests/downlink.py +0 -172
  269. gw_certificate/tests/generic.py +0 -238
  270. gw_certificate/tests/registration.py +0 -340
  271. gw_certificate/tests/static/__init__.py +0 -0
  272. gw_certificate/tests/static/connection_defines.py +0 -9
  273. gw_certificate/tests/static/downlink_defines.py +0 -9
  274. gw_certificate/tests/static/generated_packet_table.py +0 -195
  275. gw_certificate/tests/static/packet_table.csv +0 -10067
  276. gw_certificate/tests/static/references.py +0 -5
  277. gw_certificate/tests/static/uplink_defines.py +0 -14
  278. gw_certificate/tests/throughput.py +0 -240
  279. gw_certificate/tests/uplink.py +0 -853
  280. wiliot_certificate-4.4.2.dist-info/METADATA +0 -211
  281. wiliot_certificate-4.4.2.dist-info/RECORD +0 -210
  282. wiliot_certificate-4.4.2.dist-info/entry_points.txt +0 -3
  283. wiliot_certificate-4.4.2.dist-info/top_level.txt +0 -3
  284. {brg_certificate → certificate}/__init__.py +0 -0
  285. {gw_certificate → common}/api_if/202/data.json +0 -0
  286. {gw_certificate/api_if/200 → common/api_if/202}/logs.json +0 -0
  287. {gw_certificate → common}/api_if/203/data.json +0 -0
  288. {gw_certificate/api_if/201 → common/api_if/203}/logs.json +0 -0
  289. {gw_certificate → common}/api_if/204/data.json +0 -0
  290. {gw_certificate/api_if/202 → common/api_if/204}/logs.json +0 -0
  291. {gw_certificate → common}/api_if/205/data.json +0 -0
  292. {gw_certificate/api_if/203 → common/api_if/205}/logs.json +0 -0
  293. {gw_certificate → common}/api_if/205/status.json +0 -0
  294. {gw_certificate/api_if/204 → common/api_if/206}/logs.json +0 -0
  295. {gw_certificate → common/api_if}/__init__.py +0 -0
  296. {gw_certificate/api_if → gui_certificate}/__init__.py +0 -0
  297. {wiliot_certificate-4.4.2.dist-info → wiliot_certificate-4.5.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,31 +1,35 @@
1
1
 
2
- from brg_certificate.cert_prints import *
3
- from brg_certificate.cert_defines import *
4
- from brg_certificate.wlt_types import *
5
- import brg_certificate.cert_common as cert_common
6
- import brg_certificate.cert_config as cert_config
7
- import brg_certificate.cert_data_sim as cert_data_sim
2
+ from certificate.cert_prints import *
3
+ from certificate.cert_defines import *
4
+ from certificate.wlt_types import *
5
+ import certificate.cert_mqtt as cert_mqtt
6
+ import certificate.cert_common as cert_common
7
+ import certificate.cert_config as cert_config
8
+ import certificate.cert_data_sim as cert_data_sim
8
9
  import time
9
10
 
10
11
 
12
+ # input address value and return the TBC value in s
13
+ def address2tbc(address):
14
+ if address == 0:
15
+ return 0
16
+ result = 64 / (256 - address)
17
+ return result
18
+
19
+
11
20
  def cal_scan_time(test, delay, pacer_interval):
12
- # Calculate the scan time to ensure at least 5 packets are captured in data scan
21
+ # Calculate the scan time to ensure enough packets are captured in data scan
13
22
  # define the num of packet that you want to get
14
- num_of_sending_pkt = 2 # actually it will be 3 because the first one always send
23
+ num_of_cycles = 5
15
24
  delay = delay / 1000
16
25
  if delay < pacer_interval:
17
- scan_time = (pacer_interval * num_of_sending_pkt) + 10
18
- elif pacer_interval <= delay:
19
- scan_time = (delay * num_of_sending_pkt) + 10
20
- # verify scan time value
21
- if scan_time < (2 * pacer_interval):
22
- print("scan time is too low in related to pacer interval")
23
- test.rc == TEST_FAILED
24
- test.add_reason("scan time is too low in related to pacer interval value")
26
+ scan_time = (pacer_interval * num_of_cycles) + 10
27
+ else: # pacer_interval <= delay
28
+ scan_time = (delay * num_of_cycles) + 10
25
29
  return test, scan_time
26
30
 
27
31
 
28
- def scan_and_compare(test, pacer_interval, delay, expected_address_value):
32
+ def scan_and_compare(test, pacer_interval, delay, expected_TBC_value):
29
33
 
30
34
  pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=1, duplicates=3, delay=delay, pkt_types=[0], pixels_type=GEN3)
31
35
  pixel_sim_thread.start()
@@ -33,7 +37,7 @@ def scan_and_compare(test, pacer_interval, delay, expected_address_value):
33
37
  df = cert_common.data_scan(test, scan_time=scan_time, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
34
38
  pixel_sim_thread.stop()
35
39
  cert_mqtt.dump_pkts(test, log="rx_rate")
36
- cert_common.display_data(df, tbc=True, nfpkt=True, rssi=True, dir=test.dir)
40
+ cert_common.display_data(df, tbc=True, rssi=True, dir=test.dir)
37
41
  # check if the dataframe is empty or not
38
42
  if len(df) <= 1:
39
43
  print("Df is empty")
@@ -53,19 +57,26 @@ def scan_and_compare(test, pacer_interval, delay, expected_address_value):
53
57
  if mid_index == 0:
54
58
  mid_index = 1
55
59
  print(f"Length of df: {length}, mid index: {mid_index}")
56
- print(f"df:\n {df}")
57
-
60
+ # TODO: Logging print
61
+ # print(f"Df:\n {df}")
62
+ df[TBC] = df[TBC].apply(address2tbc)
63
+ print(f"Df after invert tbc:\n {df}")
58
64
  tag = df.iloc[0][TAG_ID]
59
- # iloc [1:] to skip the first value of tbc_values which could be 0 sometimes.
60
- actual_address_value = round(df.iloc[mid_index:][TBC].mean(), 2) # extract the tbc value from df
61
- print(f"\nactual address value: {actual_address_value}\nexpected address value: {expected_address_value}")
62
- THRESHOLD_ADDRESS_VALUE = 5
63
- # check if the actual address value is in the range of -+5 of the expected address value
64
- if (actual_address_value < (expected_address_value - THRESHOLD_ADDRESS_VALUE) or
65
- actual_address_value > (expected_address_value + THRESHOLD_ADDRESS_VALUE)):
66
- print(f"\nAddress value for tag {tag} is {actual_address_value}, expected value: {expected_address_value}!\n")
65
+
66
+ actual_tbc_value = round(df.iloc[mid_index:][TBC].mean(), 3)
67
+ expected_tbc_value = round(expected_TBC_value, 3)
68
+ threshold = 0.1 * expected_tbc_value
69
+ print(f"Actual TBC value: {actual_tbc_value}")
70
+ print(f"Expected TBC value: {expected_tbc_value} range: [{expected_tbc_value - threshold}, {expected_tbc_value + threshold}]")
71
+
72
+ # Validate the received value is in 10% of the expected value
73
+ if not ((expected_tbc_value - threshold) <= actual_tbc_value <= (expected_tbc_value + threshold)):
67
74
  test.rc = TEST_FAILED
68
- test.add_reason(f"Address value for tag {tag} is {actual_address_value} expected: {expected_address_value}!\n")
75
+ test.add_reason(f"TBC value for tag {tag}: got: {actual_tbc_value}, expected: {expected_tbc_value}!\n")
76
+ if actual_tbc_value < expected_tbc_value:
77
+ print(f" Actual TBC value: {actual_tbc_value} is less than expected TBC value: {expected_tbc_value}!\n")
78
+ if actual_tbc_value > (expected_tbc_value + threshold):
79
+ print(f" TBC value is higher than expected TBC value: {expected_tbc_value}!\n")
69
80
  if test.params == [mid_values] and delay == 1000:
70
81
  # checking 0 value in the first packet.
71
82
  first_row = df.iloc[0][TBC]
@@ -76,20 +87,22 @@ def scan_and_compare(test, pacer_interval, delay, expected_address_value):
76
87
  return test
77
88
 
78
89
 
79
- def mid_values(test, datapath_module):
80
- # mid values - Sanity check: Generate packets with delays of 1, 5, and 0.5 seconds.
81
- # Check address values 192, 243, and 128. Verify that the address value is 0 for the first packet.
82
- SANITY_DELAY_ADDRESS_VALUES = {1000: 192, 5000: 243, 500: 128}
83
- for delay, expected_address_value in SANITY_DELAY_ADDRESS_VALUES.items():
90
+ def mid_values(test, _):
91
+ # Mid_values - Sanity check: Generate packets with delays of 1, 5, and 0.5 seconds.
92
+ # Verify that the correct TBC values are received and that the first packet's TBC is zero.
93
+
94
+ SANITY_DELAY_VALUES = [1000, 5000, 500]
95
+ for delay in SANITY_DELAY_VALUES:
84
96
  pacer_interval = 1
85
- test = scan_and_compare(test, pacer_interval=pacer_interval, delay=delay, expected_address_value=expected_address_value)
86
- time.sleep(2)
97
+ test = scan_and_compare(test, pacer_interval=pacer_interval, delay=delay, expected_TBC_value=(delay / 1000))
98
+ time.sleep(10)
87
99
  return test
88
100
 
89
101
 
90
102
  def diff_pacer(test, datapath_module):
91
- # diff pacer - Generate packets with a 1-second delay and pacer intervals of 30 and 60. Ensure the address value remains 192.
92
- SANITY_ADDRESS_VALUE = 192
103
+ # Diff_pacer - Generate packets with a 1-second delay and pacer intervals of 30 and 60.
104
+ # Ensure that the TBC value remains unchanged.
105
+
93
106
  PACER_INTERVAL_LIST = [30, 60]
94
107
  delay = 1000 # 1 sec
95
108
  for pacer_interval in PACER_INTERVAL_LIST:
@@ -97,41 +110,46 @@ def diff_pacer(test, datapath_module):
97
110
  if test.rc == TEST_FAILED:
98
111
  test.add_reason(f"Didn't succeed to config pacer interval {pacer_interval}")
99
112
  return test
100
- test = scan_and_compare(test, pacer_interval=pacer_interval, delay=delay, expected_address_value=SANITY_ADDRESS_VALUE)
101
- time.sleep(2)
113
+ test = scan_and_compare(test, pacer_interval=pacer_interval, delay=delay, expected_TBC_value=(delay / 1000))
114
+ time.sleep(10)
102
115
  return test
103
116
 
104
117
 
105
118
  def min_value(test, datapath_module):
106
- # min_value - Minimum value: Generate packets with a 0.1-second delay. Verify that the address value is 1.
107
- MIN_ADDRESS_VALUE = 1
119
+ # Min_value - Minimum value: Generate packets with a 0.1-second delay.
120
+ # Verify the correct TBC value is received.
121
+ # NOTE: The min TBC value is 0.25 seconds.
122
+ MIN_ADDRESS_VALUE = 0.25
108
123
  pacer_interval = 1
109
124
  test = cert_config.brg_configure(test, fields=[BRG_PACER_INTERVAL], values=[pacer_interval], module=datapath_module)[0]
110
125
  if test.rc == TEST_FAILED:
111
126
  test.add_reason(f"Didn't succeed to config pacer interval {pacer_interval}")
112
127
  return test
113
128
  delay = 100
114
- test = scan_and_compare(test, pacer_interval=pacer_interval, delay=delay, expected_address_value=MIN_ADDRESS_VALUE)
115
- time.sleep(2)
129
+ test = scan_and_compare(test, pacer_interval=pacer_interval, delay=delay, expected_TBC_value=MIN_ADDRESS_VALUE)
130
+ time.sleep(10)
116
131
  return test
117
132
 
118
133
 
119
134
  def max_value(test, datapath_module):
120
- # max value - Maximum value: Generate packets with a 70-second delay and a pacer interval of 80. Verify that the address value is 255.
121
- MAX_ADDRESS_VALUE = 255
135
+ # Max_value - Maximum value: Generate packets with a 70-second delay and a pacer interval of 80.
136
+ # Verify the correct TBC value is received.
137
+ # NOTE: The max TBC value is 64 seconds.
138
+ MAX_TBC_VALUE = 64
122
139
  pacer_interval = 80
123
140
  test = cert_config.brg_configure(test, fields=[BRG_PACER_INTERVAL], values=[pacer_interval], module=datapath_module)[0]
124
141
  if test.rc == TEST_FAILED:
125
142
  test.add_reason(f"Didn't succeed to config pacer interval {pacer_interval}")
126
143
  return test
127
144
  delay = 70000
128
- test = scan_and_compare(test, pacer_interval=pacer_interval, delay=delay, expected_address_value=MAX_ADDRESS_VALUE)
129
- time.sleep(2)
145
+ test = scan_and_compare(test, pacer_interval=pacer_interval, delay=delay, expected_TBC_value=MAX_TBC_VALUE)
146
+ time.sleep(10)
130
147
  return test
131
148
 
132
149
 
133
150
  def diff_rate(test, datapath_module):
134
- # diff rate - a filter: Generate packets with delay 1 and change to 5, according the delay change test the tolerance address value
151
+ # Diff_rate - alpha filter: Generate packets with delay 0.5 second and change to 3 seconds.
152
+ # Verify that the TBC value changes according to the delay, within the expected tolerance.
135
153
  pacer_interval = 1
136
154
  delay_duration = [[500, 5], [3000, 3]]
137
155
  first_delay = delay_duration[0][0]
@@ -148,41 +166,63 @@ def diff_rate(test, datapath_module):
148
166
  print(f"sleep for {time_sleep} sec\n")
149
167
  time.sleep(time_sleep)
150
168
  pixel_sim_thread.delay = second_delay
151
- scan_time = sum(duration for _, duration in delay_duration) + 20
169
+ scan_time = sum(duration for _, duration in delay_duration) + 40
152
170
  df = cert_common.data_scan(test, scan_time=scan_time, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
153
171
  pixel_sim_thread.stop()
154
172
  df = df[[TAG_ID, TBC]]
155
- lenght = len(df)
156
-
173
+ # TODO: logging print
174
+ # print(f"df:\n {df}")
175
+ df[TBC] = df[TBC].apply(address2tbc)
157
176
  if len(df) <= 1:
158
177
  test.add_reason("Df is empty")
159
178
  test.rc = TEST_FAILED
160
179
  return test
161
180
  else:
162
181
  print(f"Df:\n {df}")
163
- # NOTE: all next rows are specific for the values: delay 0.5 and 3, and in relation address values 128 and 235
164
- # check if the last tbc value is as we expected for delay 3 sec we need to get 235 according to LUT table
182
+ # NOTE: all next rows are specific for the values: delay 0.5 and 3 sec.
183
+ # check if the last tbc value is as we expected for delay 3 sec we need to get 235 according to LUT table
165
184
  # we define tolerance of +-10 units for address value
166
-
185
+ expected_second_tbc_value = second_delay / 1000
186
+ print(f"expected second tbc value: {expected_second_tbc_value}")
167
187
  # Most important check, verify it converges to the correct value
168
- if df.iloc[-1][TBC] not in range(232, 237):
188
+ average_of_last_5_tbc_value = round(df.iloc[-5:][TBC].mean(), 3)
189
+ print(f"last tbc value: {average_of_last_5_tbc_value}")
190
+ THRESHOLD_MIN = 0.95
191
+ # NOTE: assume that there is time difference between SIM and GW
192
+ if test.tester.is_simulated():
193
+ THRESHOLD_MAX = 1.1
194
+ else:
195
+ THRESHOLD_MAX = 1.15
196
+ min_expected_tbc_value = round(expected_second_tbc_value * THRESHOLD_MIN, 3)
197
+ max_expected_tbc_value = round(expected_second_tbc_value * THRESHOLD_MAX, 3)
198
+
199
+ print(f"TBC value: {average_of_last_5_tbc_value}")
200
+ print(f"expected value [{min_expected_tbc_value},{max_expected_tbc_value}] according to delay:{second_delay / 1000} sec")
201
+ if not (min_expected_tbc_value <= average_of_last_5_tbc_value <= max_expected_tbc_value):
169
202
  test.rc = TEST_FAILED
170
- test.add_reason(f"TBC value: {df.iloc[-1][TBC]}, expected value [232,236]")
171
- print(f"TBC value: {df.iloc[-1][TBC]}, expected value [232,236] according to delay:{second_delay / 1000} sec")
203
+ test.add_reason(f"TBC value: {average_of_last_5_tbc_value}, expected value {expected_second_tbc_value}")
172
204
  return test
173
- # for loop that skip the first row and check if somewhere there is the expected gap 130 to 200
174
- result = False
175
- for i in range(0, lenght - 1):
176
- prev = df.iloc[i][TBC]
177
- current = df.iloc[i + 1][TBC]
178
- if prev in range(120, 140) and current in range(190, 210):
179
- print(f"Found the gap between {prev} and {current}")
180
- print(f"row {i}: {df.iloc[i][TBC]}")
181
- print(f"row {i + 1}: {df.iloc[i + 1][TBC]}")
182
- result = True
183
- if not result:
184
- test.rc = TEST_FAILED
185
- test.add_reason("Didn't find the correct gap according to alpha filter calculation")
205
+
206
+ # # TODO: we skip that part until we decide if there is a need to check the gap between the first and second tbc values
207
+ # # for loop that skip the first row and check if somewhere there is the expected gap 0.5 to 3 sec
208
+ # result = False
209
+ # expected_first_tbc_value = first_delay / 1000
210
+ # print(f"expected first tbc value: {expected_first_tbc_value}")
211
+ # expected_first_gap_tbc_value = round(address_2_tbc(200), 3)
212
+ # print(f"expected second tbc value: {expected_first_gap_tbc_value}")
213
+ # for i in range(0, length - 1):
214
+ # prev = round(df.iloc[i][TBC],3)
215
+ # current = round(df.iloc[i + 1][TBC],3)
216
+ # print(f"prev: {prev}, current: {current}")
217
+ # if expected_first_tbc_value*0.9 <= prev <= expected_first_tbc_value*1.1:
218
+ # if expected_first_gap_tbc_value*0.9 <= current <= expected_first_gap_tbc_value*1.1:
219
+ # print(f"Found the gap between {prev} and {current}")
220
+ # print(f"row {i}: {df.iloc[i][TBC]}")
221
+ # print(f"row {i + 1}: {df.iloc[i + 1][TBC]}")
222
+ # result = True
223
+ # if not result:
224
+ # test.rc = TEST_FAILED
225
+ # test.add_reason("Didn't find the correct gap according to alpha filter calculation")
186
226
  return test
187
227
 
188
228
 
@@ -208,7 +248,7 @@ def run(test):
208
248
  for param in test.params:
209
249
  functionality_run_print(param.name)
210
250
  test = RX_RATE_TEST_MAP[param.value](test, datapath_module)
211
- generate_log_file(test, param.name)
251
+ cert_mqtt.generate_log_file(test, param.name)
212
252
  field_functionality_pass_fail_print(test, param.name)
213
253
  test.set_phase_rc(param.name, test.rc)
214
254
  test.add_phase_reason(param.name, test.reason)
@@ -2,8 +2,7 @@
2
2
  "name": "Stress Test Gen3 Pixels",
3
3
  "module": "Datapath",
4
4
  "purpose": "verify that the algorithms 'adaptive repetition' and 'adaptive pacer' are working correctly under stress conditions with Gen3 pixels",
5
- "documentation": ["https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Relaying-data",
6
- "add more links here - about adaptive repetition, adaptive pacer"],
5
+ "documentation": ["https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Relaying-data"],
7
6
  "initialCondition": "Bridge configured to defaults",
8
7
  "procedure": ["Test prolog",
9
8
  "Configure GW to allow packets duplications",
@@ -16,6 +15,8 @@
16
15
  "mandatory": 0,
17
16
  "multiBridgeTest": 0,
18
17
  "gwOnlyTest": 0,
19
- "internalBridge": 0,
18
+ "bridgeOnlyTest": 1,
19
+ "dataSimOnlyTest": 1,
20
+ "SupportedFromApiVersion": 12,
20
21
  "allSupportedValues": ["rep3", "rep2", "rep1"]
21
22
  }
@@ -1,10 +1,11 @@
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
- from brg_certificate.cert_gw_sim import DEDUPLICATION_PKTS
1
+ from certificate.cert_prints import *
2
+ from certificate.cert_defines import *
3
+ from certificate.wlt_types import *
4
+ import certificate.cert_mqtt as cert_mqtt
5
+ import certificate.cert_common as cert_common
6
+ import certificate.cert_config as cert_config
7
+ import certificate.cert_data_sim as cert_data_sim
8
+ from certificate.cert_gw_sim import DEDUPLICATION_PKTS
8
9
  import statistics
9
10
  import time
10
11
 
@@ -91,7 +92,7 @@ def combination_func(test, param, datapath_module, pacer_interval, num_of_sim_ta
91
92
  if param.name == "rep1_adaptive_pacer":
92
93
  print(f"run phase: {param.name}")
93
94
  df = cert_common.data_scan(test, scan_time=30, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
94
- cert_common.display_data(df, nfpkt=True, tbc=True, name_prefix=f"stress_{pacer_interval}_", dir=test.dir)
95
+ cert_common.display_data(df, tbc=True, name_prefix=f"stress_{pacer_interval}_", dir=test.dir)
95
96
  test, hbs = cert_common.scan_for_mgmt_pkts(test, [eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')])
96
97
  hbs = [p[MGMT_PKT].pkt for p in hbs]
97
98
 
@@ -107,7 +108,7 @@ def combination_func(test, param, datapath_module, pacer_interval, num_of_sim_ta
107
108
  time.sleep(30)
108
109
  # first df
109
110
  df = cert_common.data_scan(test, scan_time=30, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
110
- cert_common.display_data(df, nfpkt=True, tbc=True, name_prefix=f"stress_{pacer_interval}_", dir=test.dir)
111
+ cert_common.display_data(df, tbc=True, name_prefix=f"stress_{pacer_interval}_", dir=test.dir)
111
112
  test, hbs = cert_common.scan_for_mgmt_pkts(test, [eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')])
112
113
  hbs = [p[MGMT_PKT].pkt for p in hbs]
113
114
  print("result of first df\n")
@@ -117,7 +118,7 @@ def combination_func(test, param, datapath_module, pacer_interval, num_of_sim_ta
117
118
  time.sleep(30)
118
119
  # second df
119
120
  df = cert_common.data_scan(test, scan_time=60, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
120
- cert_common.display_data(df, nfpkt=True, tbc=True, name_prefix=f"stress_{pacer_interval}_", dir=test.dir)
121
+ cert_common.display_data(df, tbc=True, name_prefix=f"stress_{pacer_interval}_", dir=test.dir)
121
122
  test, hbs = cert_common.scan_for_mgmt_pkts(test, [eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')])
122
123
  hbs = [p[MGMT_PKT].pkt for p in hbs]
123
124
  print("result of second df\n")
@@ -192,7 +193,7 @@ def run(test):
192
193
  for param in test.params:
193
194
  functionality_run_print(param.name)
194
195
  test = STRESS_TEST_MAP[param.value](test, param, datapath_module, num_of_pixels)
195
- generate_log_file(test, param.name)
196
+ cert_mqtt.generate_log_file(test, param.name)
196
197
  field_functionality_pass_fail_print(test, param.name)
197
198
  test.set_phase_rc(param.name, test.rc)
198
199
  test.add_phase_reason(param.name, test.reason)
@@ -205,4 +206,7 @@ def run(test):
205
206
  # Re-enable unified packets deduplication
206
207
  cert_config.gw_action(test, f"{DEDUPLICATION_PKTS} 1")
207
208
 
209
+ # wait a few seconds to ensure bridge relaxed before next test
210
+ wait_time_n_print(60)
211
+
208
212
  return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
@@ -2,8 +2,7 @@
2
2
  "name": "Stress Test Gen2 Pixels",
3
3
  "module": "Datapath",
4
4
  "purpose": "verify that the algorithms 'adaptive repetition' and 'adaptive pacer' are working correctly under stress conditions with Gen3 pixels",
5
- "documentation": ["https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Relaying-data",
6
- "add more links here - about adaptive repetition, adaptive pacer"],
5
+ "documentation": ["https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Relaying-data"],
7
6
  "initialCondition": "Bridge configured to defaults",
8
7
  "procedure": ["Test prolog",
9
8
  "Configure GW to allow packets duplications",
@@ -16,6 +15,8 @@
16
15
  "mandatory": 0,
17
16
  "multiBridgeTest": 0,
18
17
  "gwOnlyTest": 0,
19
- "internalBridge": 0,
18
+ "bridgeOnlyTest": 1,
19
+ "dataSimOnlyTest": 1,
20
+ "SupportedFromApiVersion": 12,
20
21
  "allSupportedValues": ["rep3", "rep2", "rep1"]
21
22
  }
@@ -1,10 +1,11 @@
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
- from brg_certificate.cert_gw_sim import DEDUPLICATION_PKTS
1
+ from certificate.cert_prints import *
2
+ from certificate.cert_defines import *
3
+ from certificate.wlt_types import *
4
+ import certificate.cert_mqtt as cert_mqtt
5
+ import certificate.cert_common as cert_common
6
+ import certificate.cert_config as cert_config
7
+ import certificate.cert_data_sim as cert_data_sim
8
+ from certificate.cert_gw_sim import DEDUPLICATION_PKTS
8
9
  import statistics
9
10
  import time
10
11
 
@@ -90,7 +91,7 @@ def combination_func(test, param, datapath_module, pacer_interval, num_of_sim_ta
90
91
  if param.name == "rep1_adaptive_pacer":
91
92
  print(f"run phase: {param.name}")
92
93
  df = cert_common.data_scan(test, scan_time=30, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
93
- cert_common.display_data(df, nfpkt=True, tbc=True, name_prefix=f"stress_{pacer_interval}_", dir=test.dir)
94
+ cert_common.display_data(df, tbc=True, name_prefix=f"stress_{pacer_interval}_", dir=test.dir)
94
95
  test, hbs = cert_common.scan_for_mgmt_pkts(test, [eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')])
95
96
  hbs = [p[MGMT_PKT].pkt for p in hbs]
96
97
 
@@ -106,7 +107,7 @@ def combination_func(test, param, datapath_module, pacer_interval, num_of_sim_ta
106
107
  time.sleep(30)
107
108
  # first df
108
109
  df = cert_common.data_scan(test, scan_time=30, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
109
- cert_common.display_data(df, nfpkt=True, tbc=True, name_prefix=f"stress_{pacer_interval}_", dir=test.dir)
110
+ cert_common.display_data(df, tbc=True, name_prefix=f"stress_{pacer_interval}_", dir=test.dir)
110
111
  test, hbs = cert_common.scan_for_mgmt_pkts(test, [eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')])
111
112
  hbs = [p[MGMT_PKT].pkt for p in hbs]
112
113
  print("result of first df\n")
@@ -116,7 +117,7 @@ def combination_func(test, param, datapath_module, pacer_interval, num_of_sim_ta
116
117
  time.sleep(30)
117
118
  # second df
118
119
  df = cert_common.data_scan(test, scan_time=60, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
119
- cert_common.display_data(df, nfpkt=True, tbc=True, name_prefix=f"stress_{pacer_interval}_", dir=test.dir)
120
+ cert_common.display_data(df, tbc=True, name_prefix=f"stress_{pacer_interval}_", dir=test.dir)
120
121
  test, hbs = cert_common.scan_for_mgmt_pkts(test, [eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')])
121
122
  hbs = [p[MGMT_PKT].pkt for p in hbs]
122
123
  print("result of second df\n")
@@ -191,7 +192,7 @@ def run(test):
191
192
  for param in test.params:
192
193
  functionality_run_print(param.name)
193
194
  test = STRESS_TEST_MAP[param.value](test, param, datapath_module, num_of_pixels)
194
- generate_log_file(test, param.name)
195
+ cert_mqtt.generate_log_file(test, param.name)
195
196
  field_functionality_pass_fail_print(test, param.name)
196
197
  test.set_phase_rc(param.name, test.rc)
197
198
  test.add_phase_reason(param.name, test.reason)
@@ -204,4 +205,7 @@ def run(test):
204
205
  # Re-enable unified packets deduplication
205
206
  cert_config.gw_action(test, f"{DEDUPLICATION_PKTS} 1")
206
207
 
208
+ # wait a few seconds to ensure bridge relaxed before next test
209
+ wait_time_n_print(60)
210
+
207
211
  return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
@@ -12,6 +12,8 @@
12
12
  "mandatory": 0,
13
13
  "multiBridgeTest": 0,
14
14
  "gwOnlyTest": 0,
15
- "internalBridge": 0,
15
+ "bridgeOnlyTest": 1,
16
+ "dataSimOnlyTest": 0,
17
+ "SupportedFromApiVersion": 12,
16
18
  "allSupportedValues": [1, 2, 3, 4, 5, 6]
17
19
  }
@@ -1,34 +1,35 @@
1
1
  # This test will run on "params" mode when it gets parameters in its call - check config only
2
- # Otherwise it will run on "auto" mode - collect packets and analyse packets actual repetitions
2
+ # Otherwise it will run on "auto" mode - collect packets and analyze packets actual repetitions
3
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 brg_certificate.cert_data_sim as cert_data_sim
10
- from brg_certificate.cert_gw_sim import DEDUPLICATION_PKTS
4
+ from certificate.cert_prints import *
5
+ from certificate.cert_defines import *
6
+ from certificate.wlt_types import *
7
+ import certificate.cert_mqtt as cert_mqtt
8
+ import certificate.cert_common as cert_common
9
+ import certificate.cert_config as cert_config
10
+ import certificate.cert_data_sim as cert_data_sim
11
+ from certificate.cert_gw_sim import DEDUPLICATION_PKTS
11
12
  import statistics
12
13
 
13
14
  TX_REPETITION_THRESHOLD = 0.5
14
15
 
15
16
 
16
17
  def tx_repetitions_analysis(test, repetitions):
17
- cert_common.wait_time_n_print(CLEAR_DATA_PATH_TIMEOUT)
18
- test.mqttc.flush_pkts()
18
+ wait_time_n_print(CLEAR_DATA_PATH_TIMEOUT)
19
+ test.get_mqttc_by_target(DUT).flush_pkts()
19
20
  if test.data == DATA_SIMULATION:
20
21
  pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=15, duplicates=1, delay=100, pkt_types=[0])
21
22
  pixel_sim_thread.start()
22
23
  mqtt_scan_wait(test, 60)
23
24
  if test.data == DATA_SIMULATION:
24
25
  pixel_sim_thread.stop() # stop generating pkts on data simulator
25
- cert_common.wait_time_n_print(CLEAR_DATA_PATH_TIMEOUT) # Wait for sim queue to free
26
+ wait_time_n_print(CLEAR_DATA_PATH_TIMEOUT) # Wait for sim queue to free
26
27
  pkts = cert_mqtt.get_unified_data_pkts(test)
27
28
  print(f"Found {len(pkts)} packets")
28
29
  if len(pkts) == 0:
29
30
  test.rc = TEST_FAILED
30
31
  test.add_reason(f"For repetitions {repetitions} found 0 pkts!")
31
- generate_log_file(test, repetitions)
32
+ cert_mqtt.generate_log_file(test, repetitions)
32
33
  return test
33
34
  pkt_payload_counter = {}
34
35
  for p in pkts:
@@ -37,7 +38,7 @@ def tx_repetitions_analysis(test, repetitions):
37
38
  pkt_payload_counter[cur_pkt] += 1
38
39
  else:
39
40
  pkt_payload_counter[cur_pkt] = 1
40
- generate_log_file(test, repetitions)
41
+ cert_mqtt.generate_log_file(test, repetitions)
41
42
  avg = statistics.mean([pkt_payload_counter[p] for p in pkt_payload_counter])
42
43
  txt = f"For TX repetition = {repetitions}, average {round(avg, 3)} repetitions"
43
44
  print(txt)
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "Blink Action",
3
+ "module": "Edge Management",
4
+ "purpose": "Test led blink action functionality",
5
+ "documentation": "https://community.wiliot.com/customers/s/article/Wiliot-Network-Bridge-Modular-Architecture",
6
+ "initialCondition": "Bridge configured to defaults",
7
+ "procedure": ["Test prolog", "Send blink action and test bridge's response accordingly", "Test epilog"],
8
+ "expectedOutcome": "Bridge returned an ack for the action.",
9
+ "mandatory": 1,
10
+ "multiBridgeTest": 0,
11
+ "gwOnlyTest": 0,
12
+ "dataSimOnlyTest": 0,
13
+ "SupportedFromApiVersion": 12,
14
+ "allSupportedValues": []
15
+ }
@@ -0,0 +1,24 @@
1
+ from certificate.cert_prints import *
2
+ from certificate.cert_defines import *
3
+ from certificate.wlt_types import *
4
+ import certificate.cert_mqtt as cert_mqtt
5
+ import certificate.cert_common as cert_common
6
+ import certificate.cert_config as cert_config
7
+
8
+
9
+ def run(test):
10
+ test = cert_common.test_prolog(test)
11
+ if test.rc == TEST_FAILED:
12
+ return cert_common.test_epilog(test)
13
+
14
+ functionality_run_print("action_blink")
15
+
16
+ # send action
17
+ cert_config.send_brg_action(test, ag.ACTION_BLINK)
18
+ # analysis
19
+ test = cert_common.search_action_ack(test, ag.ACTION_BLINK)
20
+
21
+ cert_mqtt.generate_log_file(test, "action_blink")
22
+ field_functionality_pass_fail_print(test, "action_blink")
23
+
24
+ return cert_common.test_epilog(test)
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "Get Battery Sensor Action",
3
+ "module": "Edge Management",
4
+ "purpose": "Test get battery sensor action functionality",
5
+ "documentation": "https://community.wiliot.com/customers/s/article/Wiliot-Network-Bridge-Modular-Architecture",
6
+ "initialCondition": "Bridge configured to defaults",
7
+ "procedure": ["Test prolog", "Send get battery sensor action and test bridge's response accordingly", "Test epilog"],
8
+ "expectedOutcome": "Bridge returned an ack for the action, and sent a battery sensor data packet.",
9
+ "mandatory": 0,
10
+ "multiBridgeTest": 0,
11
+ "gwOnlyTest": 0,
12
+ "dataSimOnlyTest": 0,
13
+ "SupportedFromApiVersion": 12,
14
+ "allSupportedValues": []
15
+ }
@@ -0,0 +1,43 @@
1
+ from certificate.cert_prints import *
2
+ from certificate.cert_defines import *
3
+ from certificate.wlt_types import *
4
+ import certificate.cert_mqtt as cert_mqtt
5
+ import certificate.cert_common as cert_common
6
+ import certificate.cert_config as cert_config
7
+
8
+
9
+ def run(test):
10
+ test = cert_common.test_prolog(test)
11
+ if test.rc == TEST_FAILED:
12
+ return cert_common.test_epilog(test)
13
+
14
+ if test.active_brg.board_type not in BATTERY_SENSOR_SUPPORTING_BOARD_TYPES:
15
+ test.rc = TEST_SKIPPED
16
+ return cert_common.test_epilog(test)
17
+ # prolog
18
+ functionality_run_print("action_get_battery_sensor")
19
+ # send action
20
+ cert_config.send_brg_action(test, ag.ACTION_GET_BATTERY_SENSOR)
21
+ # analysis
22
+ test = cert_common.search_action_ack(test, ag.ACTION_GET_BATTERY_SENSOR)
23
+ if test.rc == TEST_FAILED:
24
+ return cert_common.test_epilog(test)
25
+
26
+ found_packet = False
27
+ custom_pkts = cert_mqtt.get_all_custom_pkts(test)
28
+ for p in custom_pkts:
29
+ if ("{:02X}{:02X}{:02X}".format(p[UNIFIED_SENSOR_PKT].pkt.sensor_ad_type,
30
+ p[UNIFIED_SENSOR_PKT].pkt.sensor_uuid_msb,
31
+ p[UNIFIED_SENSOR_PKT].pkt.sensor_uuid_lsb) ==
32
+ f"{ag.SENSOR_SERVICE_ID_BATTERY_SENSOR:06X}"):
33
+ print_pkt(p)
34
+ found_packet = True
35
+ break
36
+ if found_packet is False:
37
+ test.rc = TEST_FAILED
38
+ test.add_reason("Didn't find battery sensor data packet")
39
+
40
+ cert_mqtt.generate_log_file(test, "action_get_battery_sensor")
41
+ field_functionality_pass_fail_print(test, "action_get_battery_sensor")
42
+
43
+ return cert_common.test_epilog(test)
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "Get Module Action",
3
+ "module": "Edge Management",
4
+ "purpose": "Test get module action functionality",
5
+ "documentation": "https://community.wiliot.com/customers/s/article/Wiliot-Network-Bridge-Modular-Architecture",
6
+ "initialCondition": "Bridge configured to defaults",
7
+ "procedure": ["Test prolog", "Send get module action - first for datapath, then for all modules, and test bridge's response accordingly", "Test epilog"],
8
+ "expectedOutcome": "Bridge returned an ack for the action, and sent all module packets",
9
+ "mandatory": 1,
10
+ "multiBridgeTest": 0,
11
+ "gwOnlyTest": 0,
12
+ "dataSimOnlyTest": 0,
13
+ "SupportedFromApiVersion": 12,
14
+ "allSupportedValues": []
15
+ }