wiliot-certificate 1.5.1a1__py3-none-any.whl → 1.5.3a1__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.
- brg_certificate/ag/energous_v0_defines.py +3 -3
- brg_certificate/ag/energous_v1_defines.py +3 -3
- brg_certificate/ag/energous_v2_defines.py +3 -3
- brg_certificate/ag/energous_v3_defines.py +3 -3
- brg_certificate/ag/energous_v4_defines.py +3 -3
- brg_certificate/ag/fanstel_lan_v0_defines.py +3 -3
- brg_certificate/ag/fanstel_lte_v0_defines.py +3 -3
- brg_certificate/ag/fanstel_wifi_v0_defines.py +3 -3
- brg_certificate/ag/minew_lte_v0_defines.py +3 -3
- brg_certificate/ag/wlt_cmd_if.html +3 -2
- brg_certificate/ag/wlt_types.html +3 -3
- brg_certificate/ag/wlt_types_ag.py +8 -8
- brg_certificate/brg_certificate_cli.py +18 -3
- brg_certificate/cert_common.py +134 -28
- brg_certificate/cert_config.py +12 -7
- brg_certificate/cert_data_sim.py +22 -4
- brg_certificate/cert_defines.py +10 -5
- brg_certificate/cert_gw_sim.py +4 -2
- brg_certificate/cert_mqtt.py +7 -6
- brg_certificate/cert_prints.py +14 -1
- brg_certificate/cert_protobuf.py +7 -7
- brg_certificate/cert_results.py +91 -64
- brg_certificate/cert_utils.py +12 -5
- brg_certificate/certificate_bcc_sanity_test_list.txt +10 -5
- brg_certificate/certificate_bcc_test_list.txt +16 -11
- brg_certificate/certificate_sanity_test_list.txt +10 -4
- brg_certificate/certificate_test_list.txt +14 -10
- brg_certificate/tests/calibration/interval_test/interval_test.json +2 -2
- brg_certificate/tests/calibration/interval_test/interval_test.py +1 -1
- brg_certificate/tests/calibration/output_power_test/output_power_test.json +3 -2
- brg_certificate/tests/calibration/output_power_test/output_power_test.py +1 -1
- brg_certificate/tests/calibration/pattern_test/pattern_test.json +2 -2
- brg_certificate/tests/calibration/pattern_test/pattern_test.py +27 -28
- brg_certificate/tests/datapath/aging_test/aging_test.json +4 -5
- brg_certificate/tests/datapath/aging_test/aging_test.py +40 -33
- brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.json +2 -2
- brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.py +13 -12
- brg_certificate/tests/datapath/output_power_test/output_power_test.json +2 -2
- brg_certificate/tests/datapath/output_power_test/output_power_test.py +3 -2
- brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +3 -3
- brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +7 -4
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.json +2 -2
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +7 -4
- brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.json +2 -2
- brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.py +5 -3
- brg_certificate/tests/datapath/pattern_test/pattern_test.json +2 -2
- brg_certificate/tests/datapath/pattern_test/pattern_test.py +3 -2
- brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +3 -3
- brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +12 -5
- brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +2 -2
- brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +12 -7
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.json +2 -2
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.py +12 -8
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +3 -3
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +8 -6
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.json +2 -2
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.py +7 -3
- brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.json +3 -3
- brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +108 -74
- brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.json +3 -3
- brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +129 -119
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +8 -8
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +103 -102
- brg_certificate/tests/datapath/stress_test/stress_test.json +14 -15
- brg_certificate/tests/datapath/stress_test/stress_test.py +103 -102
- brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.json +2 -2
- brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +8 -3
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.json +2 -2
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.py +9 -7
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +2 -2
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +11 -27
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.json +14 -8
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +1 -1
- brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.json +13 -8
- brg_certificate/tests/edge_mgmt/leds_test/leds_test.json +2 -2
- brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +24 -11
- brg_certificate/tests/edge_mgmt/ota_test/ota_test.json +2 -2
- brg_certificate/tests/edge_mgmt/ota_test/ota_test.py +6 -5
- brg_certificate/tests/edge_mgmt/{stat_test/stat_test.json → periodic_msgs_test/periodic_msgs_test.json} +3 -3
- brg_certificate/tests/edge_mgmt/{stat_test/stat_test.py → periodic_msgs_test/periodic_msgs_test.py} +4 -4
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.json +3 -3
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.py +3 -2
- brg_certificate/tests/energy2400/output_power_test/output_power_test.json +4 -3
- brg_certificate/tests/energy2400/output_power_test/output_power_test.py +3 -2
- brg_certificate/tests/energy2400/pattern_test/pattern_test.json +3 -3
- brg_certificate/tests/energy2400/pattern_test/pattern_test.py +3 -2
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.json +7 -7
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.py +270 -295
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.json +7 -7
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.py +270 -295
- brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.json +12 -6
- brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +45 -57
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +4 -4
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +130 -207
- brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +2 -2
- brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +3 -2
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.json +4 -3
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.py +3 -2
- brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.json +13 -7
- brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +119 -126
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +2 -2
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +3 -2
- brg_certificate/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.json +18 -0
- brg_certificate/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.py +84 -0
- brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.json +21 -0
- brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +306 -0
- brg_certificate/wlt_types.py +2 -1
- gw_certificate/api_if/gw_capabilities.py +37 -1
- gw_certificate/common/serialization_formatter.py +80 -0
- gw_certificate/common/wltPb_pb2.py +50 -38
- gw_certificate/common/wltPb_pb2.pyi +40 -34
- gw_certificate/gw_certificate.py +4 -2
- gw_certificate/gw_certificate_cli.py +5 -4
- gw_certificate/interface/4.4.82_app.zip +0 -0
- gw_certificate/interface/{4.4.52_sd_bl_app.zip → 4.4.82_sd_bl_app.zip} +0 -0
- gw_certificate/interface/mqtt.py +39 -23
- gw_certificate/interface/pkt_generator.py +0 -44
- gw_certificate/interface/uart_if.py +20 -9
- gw_certificate/tests/actions.py +33 -5
- gw_certificate/tests/connection.py +3 -1
- gw_certificate/tests/generic.py +1 -1
- gw_certificate/tests/registration.py +4 -4
- gw_certificate/tests/static/generated_packet_table.py +47 -25
- gw_certificate/tests/static/packet_table.csv +10067 -10051
- gw_certificate/tests/static/uplink_defines.py +1 -0
- gw_certificate/tests/uplink.py +142 -22
- {wiliot_certificate-1.5.1a1.dist-info → wiliot_certificate-1.5.3a1.dist-info}/METADATA +40 -40
- {wiliot_certificate-1.5.1a1.dist-info → wiliot_certificate-1.5.3a1.dist-info}/RECORD +132 -127
- {wiliot_certificate-1.5.1a1.dist-info → wiliot_certificate-1.5.3a1.dist-info}/WHEEL +1 -1
- gw_certificate/interface/4.4.52_app.zip +0 -0
- {wiliot_certificate-1.5.1a1.dist-info → wiliot_certificate-1.5.3a1.dist-info}/entry_points.txt +0 -0
- {wiliot_certificate-1.5.1a1.dist-info → wiliot_certificate-1.5.3a1.dist-info}/licenses/LICENSE +0 -0
- {wiliot_certificate-1.5.1a1.dist-info → wiliot_certificate-1.5.3a1.dist-info}/top_level.txt +0 -0
|
@@ -8,44 +8,43 @@ import brg_certificate.cert_config as cert_config
|
|
|
8
8
|
def run(test):
|
|
9
9
|
|
|
10
10
|
fields = [BRG_PATTERN]
|
|
11
|
-
calib_module =
|
|
12
|
-
datapath_module =
|
|
11
|
+
calib_module = test.active_brg.calibration
|
|
12
|
+
datapath_module = test.active_brg.datapath
|
|
13
13
|
|
|
14
14
|
test = cert_common.test_prolog(test)
|
|
15
15
|
if test.rc == TEST_FAILED:
|
|
16
16
|
return cert_common.test_epilog(test)
|
|
17
17
|
|
|
18
18
|
for param in test.params:
|
|
19
|
-
|
|
19
|
+
# A special verification for 38_38_39, which is irrelevant for bridge with cloud connectivity
|
|
20
|
+
if param.value == ag.CALIBRATION_PATTERN_38_38_39 and not cert_common.is_bcc_running(test):
|
|
20
21
|
utPrint("\nCALIBRATION_PATTERN_38_38_39 was configured - checking the GW doesn't receive tag packets", "BLUE")
|
|
21
22
|
# Config internal_brg's rx_channel to CHANNEL_37
|
|
22
23
|
test = cert_config.internal_brg_configure(test, fields=[BRG_RX_CHANNEL], values=[ag.RX_CHANNEL_37], module=datapath_module)[0]
|
|
23
|
-
if test.rc
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
time.sleep(5)
|
|
24
|
+
if test.rc != TEST_FAILED:
|
|
25
|
+
# Configure the BRG, wait=False
|
|
26
|
+
test = cert_config.brg_configure(test, fields=[BRG_PATTERN, BRG_CALIB_INTERVAL],
|
|
27
|
+
values=[param.value, 1], module=calib_module, wait=False)[0]
|
|
28
|
+
cert_common.wait_time_n_print(CLEAR_DATA_PATH_TIMEOUT)
|
|
29
|
+
# MQTT scan
|
|
30
|
+
if test.data == DATA_SIMULATION:
|
|
31
|
+
# start generating pkts and send them using data simulator
|
|
32
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=10, duplicates=1, delay=100, pkt_types=[0])
|
|
33
|
+
pixel_sim_thread.start()
|
|
34
|
+
df = cert_common.data_scan(test, gw_data=True, brg_data=True, scan_time=(40))
|
|
35
|
+
if test.data == DATA_SIMULATION:
|
|
36
|
+
# stop generating pkts with data simulator and wait a few seconds for full flush
|
|
37
|
+
pixel_sim_thread.stop()
|
|
38
|
+
time.sleep(5)
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
break
|
|
40
|
+
# Analyze pass/fail
|
|
41
|
+
gw_tags_pkts = len(df.query('src_id == gw_id'))
|
|
42
|
+
brg_tags_pkts = len(df.query('src_id != gw_id'))
|
|
43
|
+
print(f"Found gw_tags_pkts={gw_tags_pkts}, brg_tags_pkts={brg_tags_pkts}")
|
|
44
|
+
if (gw_tags_pkts == 0 and test.data == DATA_REAL_TAGS) or brg_tags_pkts != 0:
|
|
45
|
+
test.rc = TEST_FAILED
|
|
46
|
+
test.add_reason(f"gw_tags_pkts={gw_tags_pkts} brg_tags_pkts={brg_tags_pkts} for BRG 38,38,39 calibration, "
|
|
47
|
+
"and GW scanning on ch 37")
|
|
49
48
|
# Revert internal_brg
|
|
50
49
|
test = cert_config.internal_brg_configure(test, module=datapath_module)[0]
|
|
51
50
|
generate_log_file(test, param.name)
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"module": "
|
|
4
|
-
"purpose":
|
|
5
|
-
"verify an edge case - pi = 300"],
|
|
2
|
+
"name": "Pixels Aging",
|
|
3
|
+
"module": "Datapath",
|
|
4
|
+
"purpose": "verify the functionality of the aging mechanism in the bridge for low and high pacer intervals",
|
|
6
5
|
"documentation": [],
|
|
7
6
|
"initialCondition": "Bridge configured to defaults",
|
|
8
7
|
"procedure": ["Test prolog",
|
|
@@ -10,7 +9,7 @@
|
|
|
10
9
|
"Low pacer - config pacer interval < 60, pi = 15, check ctr tags ,wait aging time, then expect to tags ctr = 0",
|
|
11
10
|
"High pacer - config pacer interval > 60, pi = 300, check ctr tags ,wait aging time, then expect to tags ctr = 0",
|
|
12
11
|
"Test epilog"],
|
|
13
|
-
"expectedOutcome": "",
|
|
12
|
+
"expectedOutcome": "Aging mechanism works as expected for low and high pacer intervals",
|
|
14
13
|
"mandatory": 1,
|
|
15
14
|
"multiBridgeTest": 0,
|
|
16
15
|
"gwOnlyTest": 0,
|
|
@@ -11,16 +11,19 @@ def send_get_HB(test):
|
|
|
11
11
|
test, HB_list = cert_common.scan_for_mgmt_pkts(test, [eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')])
|
|
12
12
|
return HB_list
|
|
13
13
|
|
|
14
|
+
|
|
14
15
|
def calculate_aging_time(pacer_interval):
|
|
15
16
|
return max(60, pacer_interval)
|
|
16
17
|
|
|
18
|
+
|
|
17
19
|
def calculate_sending_time(duplicates, delay, num_of_sim_tags):
|
|
18
20
|
if delay <= 0.02:
|
|
19
|
-
return duplicates*0.02*num_of_sim_tags
|
|
21
|
+
return duplicates * 0.02 * num_of_sim_tags
|
|
20
22
|
else:
|
|
21
|
-
actual_delay = max(delay, duplicates*
|
|
22
|
-
actual_delay = actual_delay/1000
|
|
23
|
-
return actual_delay*num_of_sim_tags
|
|
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
|
+
|
|
24
27
|
|
|
25
28
|
def combination_func(test, datapath_module, pacer_interval, num_of_sim_tags, aging_time):
|
|
26
29
|
|
|
@@ -33,92 +36,96 @@ def combination_func(test, datapath_module, pacer_interval, num_of_sim_tags, agi
|
|
|
33
36
|
test = test.add_reason("Didn't succeed to configure after two attempts - No pkt was found!")
|
|
34
37
|
return test
|
|
35
38
|
duplication = 1
|
|
36
|
-
delay = 0
|
|
37
|
-
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_sim_tags, duplicates=duplication, delay=delay,
|
|
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)
|
|
38
42
|
cycle_time = calculate_sending_time(duplication, delay, num_of_sim_tags)
|
|
39
|
-
sending_time = cycle_time*4
|
|
43
|
+
sending_time = cycle_time * 4
|
|
40
44
|
print(f"Simulator send pixels for {sending_time} sec")
|
|
41
45
|
pixel_sim_thread.start()
|
|
42
46
|
start_time = time.time()
|
|
43
|
-
# sending time
|
|
47
|
+
# sending time
|
|
44
48
|
ctr_tags_sending_time = []
|
|
45
49
|
while (time.time() - start_time) < sending_time:
|
|
46
50
|
HB_list = send_get_HB(test)
|
|
47
|
-
|
|
51
|
+
|
|
48
52
|
pixel_sim_thread.stop()
|
|
49
|
-
for p in HB_list:
|
|
53
|
+
for p in HB_list:
|
|
50
54
|
ctr_tags_sending_time.append(p[MGMT_PKT].pkt.tags_ctr)
|
|
51
|
-
print
|
|
52
|
-
#TODO: logging print(debug)
|
|
55
|
+
print("\nSimulator stop generating packets\n")
|
|
56
|
+
# TODO: logging print(debug)
|
|
53
57
|
# print(f"ctr_tags_list: {ctr_tags_sending_time}\n")
|
|
54
|
-
|
|
55
|
-
# waiting time - until the aging value
|
|
58
|
+
|
|
59
|
+
# waiting time - until the aging value
|
|
56
60
|
# during of the aging time we expect to get the ctr_tags equal to the number of pixels
|
|
57
61
|
ctr_tags_aging_time = []
|
|
58
62
|
print(f"waiting for aging time of {aging_time} sec")
|
|
59
|
-
while (time.time() - start_time) < (cycle_time*3+aging_time):
|
|
63
|
+
while (time.time() - start_time) < (cycle_time * 3 + aging_time):
|
|
60
64
|
HB_list = send_get_HB(test)
|
|
61
|
-
for p in HB_list:
|
|
65
|
+
for p in HB_list:
|
|
62
66
|
ctr_tags_aging_time.append(p[MGMT_PKT].pkt.tags_ctr)
|
|
63
67
|
print(f"\naging time: {aging_time} passed\n")
|
|
64
|
-
#TODO: logging print(debug)
|
|
68
|
+
# TODO: logging print(debug)
|
|
65
69
|
# print(f"ctr_tags_list: {ctr_tags_aging_time}\n")
|
|
66
70
|
start_aging_time = time.time()
|
|
67
71
|
ctr_tags_deleting_time = []
|
|
68
|
-
|
|
69
|
-
found_zero = 0
|
|
72
|
+
|
|
73
|
+
found_zero = 0
|
|
70
74
|
time_finding = 0
|
|
71
|
-
# stop after two HB packets, we expect to get the ctr_tags 0 in the second HB packet after the aging time
|
|
72
|
-
print(
|
|
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 ")
|
|
73
77
|
while (time.time() - start_aging_time) <= 120:
|
|
74
78
|
test, HB_list = cert_common.scan_for_mgmt_pkts(test, [eval_pkt(f'Brg2GwHbV{test.active_brg.api_version}')])
|
|
75
|
-
for p in HB_list:
|
|
79
|
+
for p in HB_list:
|
|
76
80
|
ctr_tags_deleting_time.append(p[MGMT_PKT].pkt.tags_ctr)
|
|
77
81
|
if p[MGMT_PKT].pkt.tags_ctr == 0:
|
|
78
82
|
found_zero = 1
|
|
79
|
-
time_finding =
|
|
83
|
+
time_finding = round(time.time() - start_aging_time, 2)
|
|
80
84
|
print(f"Finding time: {time_finding}")
|
|
81
85
|
print(f"Found zero value after {time_finding} sec")
|
|
82
|
-
break
|
|
86
|
+
break
|
|
83
87
|
if found_zero:
|
|
84
88
|
break
|
|
85
89
|
# sending time and the deleting time should be the same
|
|
86
90
|
print(f"Deleting time: {cycle_time} passed\n")
|
|
87
|
-
#TODO: logging print(debug)
|
|
91
|
+
# TODO: logging print(debug)
|
|
88
92
|
# print(f"Ctr_tags_deleting_time: {ctr_tags_deleting_time}\n")
|
|
89
|
-
|
|
93
|
+
|
|
90
94
|
# expected to get the ctr_tags 0 in the second HB packet after the aging time
|
|
91
95
|
if found_zero == 0 or time_finding > 60:
|
|
92
96
|
test.rc = TEST_FAILED
|
|
93
97
|
test.add_reason("The last counter value is not zero")
|
|
94
98
|
print("The last counter value is not zero\n")
|
|
95
99
|
else:
|
|
96
|
-
# NOTE: because sometimes when it didn't find HB pkt it failed the test.
|
|
100
|
+
# NOTE: because sometimes when it didn't find HB pkt it failed the test.
|
|
97
101
|
test.rc = TEST_PASSED
|
|
98
102
|
return test
|
|
99
103
|
|
|
104
|
+
|
|
100
105
|
def low_pacer(test, datapath_module, num_of_sim_tags):
|
|
101
106
|
pacer_interval = 15
|
|
102
|
-
aging_time = calculate_aging_time(pacer_interval)
|
|
103
|
-
test = combination_func(test, datapath_module, pacer_interval=
|
|
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)
|
|
104
109
|
return test
|
|
105
110
|
|
|
111
|
+
|
|
106
112
|
def high_pacer(test, datapath_module, num_of_sim_tags):
|
|
107
113
|
pacer_interval = 300
|
|
108
114
|
aging_time = calculate_aging_time(pacer_interval)
|
|
109
|
-
test = combination_func(test, datapath_module, 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)
|
|
110
116
|
return test
|
|
111
117
|
|
|
118
|
+
|
|
112
119
|
def run(test):
|
|
113
120
|
# Test prolog
|
|
114
|
-
datapath_module =
|
|
121
|
+
datapath_module = test.active_brg.datapath
|
|
115
122
|
test = cert_common.test_prolog(test)
|
|
116
123
|
if test.rc == TEST_FAILED:
|
|
117
124
|
return cert_common.test_epilog(test)
|
|
118
125
|
|
|
119
126
|
STRESS_TEST_MAP = {"low_pacer": low_pacer, "high_pacer": high_pacer}
|
|
120
127
|
num_of_pixels = 500
|
|
121
|
-
|
|
128
|
+
|
|
122
129
|
for param in test.params:
|
|
123
130
|
functionality_run_print(param.name)
|
|
124
131
|
test = STRESS_TEST_MAP[param.value](test, datapath_module, num_of_pixels)
|
|
@@ -132,4 +139,4 @@ def run(test):
|
|
|
132
139
|
test.reset_result()
|
|
133
140
|
time.sleep(5)
|
|
134
141
|
|
|
135
|
-
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=False, modules=[datapath_module])
|
|
142
|
+
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=False, modules=[datapath_module])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"module": "
|
|
2
|
+
"name": "Supported Pixels",
|
|
3
|
+
"module": "Datapath",
|
|
4
4
|
"purpose": "Test pixels handling in the bridge for different amount of pixels",
|
|
5
5
|
"documentation": "<TEST_DOCUMENTATION_LINK>",
|
|
6
6
|
"initialCondition": "Bridge & data simulator configured to defaults",
|
|
@@ -5,11 +5,12 @@ from brg_certificate.wlt_types import *
|
|
|
5
5
|
import brg_certificate.cert_common as cert_common
|
|
6
6
|
import brg_certificate.cert_config as cert_config
|
|
7
7
|
|
|
8
|
-
GW_CYCLE_TIME = 0.02
|
|
8
|
+
GW_CYCLE_TIME = 0.02 # GW sends BLE packet every 20 nsec
|
|
9
|
+
|
|
9
10
|
|
|
10
11
|
def run(test):
|
|
11
|
-
|
|
12
|
-
datapath_module =
|
|
12
|
+
|
|
13
|
+
datapath_module = test.active_brg.datapath
|
|
13
14
|
print(f"values: {[param.value for param in test.params]}")
|
|
14
15
|
|
|
15
16
|
test = cert_common.test_prolog(test)
|
|
@@ -26,15 +27,15 @@ def run(test):
|
|
|
26
27
|
test = cert_config.brg_configure(test, fields=[BRG_PACER_INTERVAL], values=[time_of_sending_pkts], module=datapath_module)[0]
|
|
27
28
|
if test.rc == TEST_FAILED:
|
|
28
29
|
return cert_common.test_epilog(test)
|
|
29
|
-
|
|
30
30
|
|
|
31
31
|
if test.data == DATA_SIMULATION:
|
|
32
32
|
# start generating pkts and send them using data simulator
|
|
33
|
-
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=param.value, duplicates=duplicates,
|
|
33
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=param.value, duplicates=duplicates,
|
|
34
|
+
delay=0, pkt_types=[0])
|
|
34
35
|
pixel_sim_thread.start()
|
|
35
36
|
|
|
36
|
-
df = cert_common.data_scan(test, scan_time=time_of_sending_pkts+5, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
|
|
37
|
-
|
|
37
|
+
df = cert_common.data_scan(test, scan_time=time_of_sending_pkts + 5, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
|
|
38
|
+
|
|
38
39
|
if test.data == DATA_SIMULATION:
|
|
39
40
|
# stop generating pkts with data simulator and wait a few seconds for full flush
|
|
40
41
|
pixel_sim_thread.stop()
|
|
@@ -57,14 +58,14 @@ def run(test):
|
|
|
57
58
|
|
|
58
59
|
cert_common.display_data(df, nfpkt=True, name_prefix=f"num_of_tags_{param.name}_", dir=test.dir)
|
|
59
60
|
|
|
60
|
-
# compare the numbers of tags that come from the brg, success in 95% from number of tags (value) or more.
|
|
61
|
-
if num_of_tags < (param.value*0.95):
|
|
61
|
+
# compare the numbers of tags that come from the brg, success in 95% from number of tags (value) or more.
|
|
62
|
+
if num_of_tags < (param.value * 0.95):
|
|
62
63
|
test.rc = TEST_FAILED
|
|
63
64
|
test.add_reason(f"Found {num_of_tags} pixels instead of {param.name} pixels!")
|
|
64
65
|
test.add_reason(f"Note - HB was {num_of_tags_HB}")
|
|
65
|
-
|
|
66
|
-
# compare the counter tags in the HB packet
|
|
67
|
-
if
|
|
66
|
+
|
|
67
|
+
# compare the counter tags in the HB packet
|
|
68
|
+
if num_of_tags_HB < param.value or num_of_tags_HB > (param.value + 100):
|
|
68
69
|
test.rc = TEST_FAILED
|
|
69
70
|
test.add_reason(f"pixels counter in HB packet is {num_of_tags_HB} instead of {param.name} pixels!")
|
|
70
71
|
test.add_reason(f"Note - tag counter field = {num_of_tags}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"module": "
|
|
2
|
+
"name": "Output Power",
|
|
3
|
+
"module": "Datapath",
|
|
4
4
|
"purpose": "Test configuration for all supported datapath output power values",
|
|
5
5
|
"documentation": "https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Configuration",
|
|
6
6
|
"initialCondition": "Bridge configured to defaults",
|
|
@@ -4,10 +4,11 @@ from brg_certificate.wlt_types import *
|
|
|
4
4
|
import brg_certificate.cert_common as cert_common
|
|
5
5
|
import brg_certificate.cert_config as cert_config
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
def run(test):
|
|
8
9
|
|
|
9
10
|
fields = [BRG_OUTPUT_POWER]
|
|
10
|
-
datapath_module =
|
|
11
|
+
datapath_module = test.active_brg.datapath
|
|
11
12
|
|
|
12
13
|
test = cert_common.test_prolog(test)
|
|
13
14
|
if test.rc == TEST_FAILED:
|
|
@@ -24,4 +25,4 @@ def run(test):
|
|
|
24
25
|
else:
|
|
25
26
|
test.reset_result()
|
|
26
27
|
|
|
27
|
-
return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
|
|
28
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"module": "
|
|
4
|
-
"purpose": "Test pacer interval feature configuration and functionality in the bridge with
|
|
2
|
+
"name": "Pacer Interval BLE5",
|
|
3
|
+
"module": "Datapath",
|
|
4
|
+
"purpose": "Test pacer interval feature configuration and functionality in the bridge with BLE_5.0 packets for different pacer interval values",
|
|
5
5
|
"documentation": ["https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Pacing"],
|
|
6
6
|
"initialCondition": "Bridge & data simulator configured to defaults",
|
|
7
7
|
"procedure": ["Test prolog",
|
|
@@ -4,26 +4,29 @@ from brg_certificate.wlt_types import *
|
|
|
4
4
|
import brg_certificate.cert_common as cert_common
|
|
5
5
|
import brg_certificate.cert_config as cert_config
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
def run(test):
|
|
8
9
|
|
|
9
10
|
fields = [BRG_PACER_INTERVAL, BRG_RX_CHANNEL, BRG_PKT_FILTER]
|
|
10
|
-
datapath_module =
|
|
11
|
+
datapath_module = test.active_brg.datapath
|
|
11
12
|
|
|
12
13
|
test = cert_common.test_prolog(test)
|
|
13
14
|
if test.rc == TEST_FAILED:
|
|
14
15
|
return cert_common.test_epilog(test)
|
|
15
16
|
|
|
16
17
|
for param in test.params:
|
|
17
|
-
test = cert_config.brg_configure_ble5(test, fields=fields, values=[param.value, ag.RX_CHANNEL_10_250K, ag.PKT_FILTER_TEMP_PKT],
|
|
18
|
+
test = cert_config.brg_configure_ble5(test, fields=fields, values=[param.value, ag.RX_CHANNEL_10_250K, ag.PKT_FILTER_TEMP_PKT],
|
|
19
|
+
module=datapath_module)[0]
|
|
18
20
|
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
19
21
|
break
|
|
20
22
|
num_of_pixels = 0
|
|
21
23
|
if test.data == DATA_SIMULATION:
|
|
22
24
|
# start generating pkts and send them using data simulator
|
|
23
25
|
num_of_pixels = 10
|
|
24
|
-
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=2, delay=0,
|
|
26
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=2, delay=0,
|
|
27
|
+
pkt_types=[2], pixels_type=GEN3_EXTENDED)
|
|
25
28
|
pixel_sim_thread.start()
|
|
26
|
-
df = cert_common.data_scan(test, scan_time=param.value*4, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
|
|
29
|
+
df = cert_common.data_scan(test, scan_time=param.value * 4, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
|
|
27
30
|
if test.data == DATA_SIMULATION:
|
|
28
31
|
# stop generating pkts with data simulator and wait a few seconds for full flush
|
|
29
32
|
pixel_sim_thread.stop()
|
brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"module": "
|
|
2
|
+
"name": "Pacer Interval Pixels Count",
|
|
3
|
+
"module": "Datapath",
|
|
4
4
|
"purpose": "Test pixels handling in the bridge for different pacer interval values",
|
|
5
5
|
"documentation": ["https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Pacing"],
|
|
6
6
|
"initialCondition": "Bridge configured to defaults",
|
brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py
CHANGED
|
@@ -4,11 +4,12 @@ from brg_certificate.wlt_types import *
|
|
|
4
4
|
import brg_certificate.cert_common as cert_common
|
|
5
5
|
import brg_certificate.cert_config as cert_config
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
def run(test):
|
|
8
9
|
pacer_threshold = PACER_INTERVAL_THRESHOLD_HIGH if test.private_setup else PACER_INTERVAL_THRESHOLD
|
|
9
10
|
|
|
10
11
|
fields = [BRG_PACER_INTERVAL, BRG_TX_REPETITION]
|
|
11
|
-
datapath_module =
|
|
12
|
+
datapath_module = test.active_brg.datapath
|
|
12
13
|
|
|
13
14
|
test = cert_common.test_prolog(test)
|
|
14
15
|
if test.rc == TEST_FAILED:
|
|
@@ -52,12 +53,14 @@ def run(test):
|
|
|
52
53
|
max_count = max([tags_count_per_pacer[pacer] for pacer in tags_count_per_pacer])
|
|
53
54
|
for param in test.params:
|
|
54
55
|
if test.data == DATA_SIMULATION:
|
|
55
|
-
if tags_count_per_pacer[param.value]
|
|
56
|
+
if tags_count_per_pacer[param.value] < num_of_pixels * 0.99 or tags_count_per_pacer[param.value] > num_of_pixels * 1.01:
|
|
56
57
|
test.set_phase_rc(param.name, TEST_FAILED)
|
|
57
58
|
test.add_phase_reason(param.name, f"received_tags={tags_count_per_pacer[param.value]} num_of_pixels={num_of_pixels}")
|
|
58
|
-
# make sure minimal received tags number is more than minimal threshold (precentile from max)
|
|
59
|
+
# make sure minimal received tags number is more than minimal threshold (precentile from max)
|
|
60
|
+
# diff of less than 3 tags will be accepted anyway
|
|
59
61
|
elif tags_count_per_pacer[param.value] < (pacer_threshold * max_count) and (max_count - tags_count_per_pacer[param.value]) > 3:
|
|
60
62
|
test.set_phase_rc(param.name, TEST_FAILED)
|
|
61
|
-
test.add_phase_reason(param.name, f"received_tags={tags_count_per_pacer[param.value]}
|
|
63
|
+
test.add_phase_reason(param.name, f"received_tags={tags_count_per_pacer[param.value]} "
|
|
64
|
+
f"max_tags={max_count} less than {int(pacer_threshold * 100)}%")
|
|
62
65
|
|
|
63
66
|
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"module": "
|
|
2
|
+
"name": "Pacer Interval",
|
|
3
|
+
"module": "Datapath",
|
|
4
4
|
"purpose": "Test pacer interval feature configuration and functionality in the bridge for different pacer interval values",
|
|
5
5
|
"documentation": ["https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Pacing"],
|
|
6
6
|
"initialCondition": "Bridge & data simulator configured to defaults",
|
|
@@ -4,17 +4,19 @@ from brg_certificate.wlt_types import *
|
|
|
4
4
|
import brg_certificate.cert_common as cert_common
|
|
5
5
|
import brg_certificate.cert_config as cert_config
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
def run(test):
|
|
8
9
|
|
|
9
10
|
fields = [BRG_PACER_INTERVAL, BRG_PKT_FILTER, BRG_RX_CHANNEL]
|
|
10
|
-
datapath_module =
|
|
11
|
+
datapath_module = test.active_brg.datapath
|
|
11
12
|
|
|
12
13
|
test = cert_common.test_prolog(test)
|
|
13
14
|
if test.rc == TEST_FAILED:
|
|
14
15
|
return cert_common.test_epilog(test)
|
|
15
16
|
|
|
16
17
|
for param in test.params:
|
|
17
|
-
test = cert_config.brg_configure(test, fields=fields, values=[param.value, ag.PKT_FILTER_TEMP_PKT, ag.RX_CHANNEL_37],
|
|
18
|
+
test = cert_config.brg_configure(test, fields=fields, values=[param.value, ag.PKT_FILTER_TEMP_PKT, ag.RX_CHANNEL_37],
|
|
19
|
+
module=datapath_module)[0]
|
|
18
20
|
test.set_phase_rc(param.name, test.rc)
|
|
19
21
|
test.add_phase_reason(param.name, test.reason)
|
|
20
22
|
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
@@ -28,7 +30,7 @@ def run(test):
|
|
|
28
30
|
num_of_pixels = 10
|
|
29
31
|
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=3, delay=100, pkt_types=[0])
|
|
30
32
|
pixel_sim_thread.start()
|
|
31
|
-
df = cert_common.data_scan(test, scan_time=param.value*4, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
|
|
33
|
+
df = cert_common.data_scan(test, scan_time=param.value * 4, brg_data=(not test.internal_brg), gw_data=test.internal_brg)
|
|
32
34
|
if test.data == DATA_SIMULATION:
|
|
33
35
|
# stop generating pkts with data simulator and wait a few seconds for full flush
|
|
34
36
|
pixel_sim_thread.stop()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"module": "
|
|
2
|
+
"name": "Pattern",
|
|
3
|
+
"module": "Datapath",
|
|
4
4
|
"purpose": "Test configuration for all supported communication pattern values",
|
|
5
5
|
"documentation": "https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Configuration",
|
|
6
6
|
"initialCondition": "Bridge configured to defaults",
|
|
@@ -4,10 +4,11 @@ from brg_certificate.wlt_types import *
|
|
|
4
4
|
import brg_certificate.cert_common as cert_common
|
|
5
5
|
import brg_certificate.cert_config as cert_config
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
def run(test):
|
|
8
9
|
|
|
9
10
|
fields = [BRG_PATTERN]
|
|
10
|
-
datapath_module =
|
|
11
|
+
datapath_module = test.active_brg.datapath
|
|
11
12
|
|
|
12
13
|
test = cert_common.test_prolog(test)
|
|
13
14
|
if test.rc == TEST_FAILED:
|
|
@@ -25,4 +26,4 @@ def run(test):
|
|
|
25
26
|
else:
|
|
26
27
|
test.reset_result()
|
|
27
28
|
|
|
28
|
-
return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
|
|
29
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"module": "
|
|
4
|
-
"purpose": "Test packet filter feature configuration and functionality in the bridge for different packet filters using
|
|
2
|
+
"name": "Packet Filter BLE5",
|
|
3
|
+
"module": "Datapath",
|
|
4
|
+
"purpose": "Test packet filter feature configuration and functionality in the bridge for different packet filters using BLE_5.0",
|
|
5
5
|
"documentation": "https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Pacing",
|
|
6
6
|
"initialCondition": "Bridge & data simulator configured to defaults",
|
|
7
7
|
"procedure": ["Test prolog",
|
|
@@ -6,6 +6,7 @@ import brg_certificate.cert_config as cert_config
|
|
|
6
6
|
|
|
7
7
|
PKT_FILTER_TEST_PACER_INTERVAL = 10
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
def run(test):
|
|
10
11
|
|
|
11
12
|
fields = [BRG_PKT_FILTER, BRG_RX_CHANNEL, BRG_PACER_INTERVAL]
|
|
@@ -15,12 +16,14 @@ def run(test):
|
|
|
15
16
|
if test.rc == TEST_FAILED:
|
|
16
17
|
return cert_common.test_epilog(test)
|
|
17
18
|
|
|
18
|
-
|
|
19
19
|
for param in test.params:
|
|
20
|
-
test = cert_config.brg_configure_ble5(test, fields=fields,
|
|
20
|
+
test = cert_config.brg_configure_ble5(test, fields=fields,
|
|
21
|
+
values=[param.value, RX_CHANNEL_10_250K, PKT_FILTER_TEST_PACER_INTERVAL],
|
|
22
|
+
module=datapath_module)[0]
|
|
21
23
|
test.set_phase_rc(param.name, test.rc)
|
|
22
24
|
test.add_phase_reason(param.name, test.reason)
|
|
23
25
|
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
26
|
+
test.add_reason(f"Failed to configure BRG with {param.name} filter")
|
|
24
27
|
break
|
|
25
28
|
else:
|
|
26
29
|
test.reset_result()
|
|
@@ -30,15 +33,19 @@ def run(test):
|
|
|
30
33
|
if test.data == DATA_SIMULATION:
|
|
31
34
|
# start generating pkts and send them using data simulator
|
|
32
35
|
num_of_pixels = 5
|
|
33
|
-
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=2,
|
|
36
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=2,
|
|
37
|
+
delay=0, pkt_types=[2], pixels_type=GEN3_EXTENDED)
|
|
34
38
|
pixel_sim_thread.start()
|
|
35
|
-
df = cert_common.data_scan(test, brg_data=(not test.internal_brg), gw_data=test.internal_brg,
|
|
39
|
+
df = cert_common.data_scan(test, brg_data=(not test.internal_brg), gw_data=test.internal_brg,
|
|
40
|
+
scan_time=PKT_FILTER_TEST_PACER_INTERVAL * 6, per_pkt_type=True,
|
|
41
|
+
pkt_filter_cfg=param.value, flush_pkts=True)
|
|
36
42
|
if test.data == DATA_SIMULATION:
|
|
37
43
|
# stop generating pkts with data simulator and wait a few seconds for full flush
|
|
38
44
|
pixel_sim_thread.stop()
|
|
39
45
|
time.sleep(5)
|
|
40
46
|
cert_common.display_data(df, nfpkt=True, tbc=True, name_prefix=f"{param.name}_", dir=test.dir)
|
|
41
|
-
test = cert_common.pacing_analysis(test, pacer_interval=PKT_FILTER_TEST_PACER_INTERVAL, df=df, pkt_filter_cfg=param.value,
|
|
47
|
+
test = cert_common.pacing_analysis(test, pacer_interval=PKT_FILTER_TEST_PACER_INTERVAL, df=df, pkt_filter_cfg=param.value,
|
|
48
|
+
num_of_pixels=num_of_pixels, is_ble5_test=True)
|
|
42
49
|
generate_log_file(test, param.name)
|
|
43
50
|
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
44
51
|
test.set_phase_rc(param.name, test.rc)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"module": "
|
|
2
|
+
"name": "Packet Filter Gen3 Pixels",
|
|
3
|
+
"module": "Datapath",
|
|
4
4
|
"purpose": "Test the packet filter feature configuration and functionality in the bridge for different packet filters with Gen3 data packets",
|
|
5
5
|
"documentation": "https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Pacing",
|
|
6
6
|
"initialCondition": "Bridge & data simulator configured to defaults",
|
|
@@ -6,22 +6,24 @@ import brg_certificate.cert_config as cert_config
|
|
|
6
6
|
|
|
7
7
|
PKT_FILTER_TEST_PACER_INTERVAL = 10
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
def run(test):
|
|
10
11
|
|
|
11
12
|
# We add the field BRG_RX_CHANNEL so internal BRGs will be configured to channel 37 (default is 39)
|
|
12
13
|
fields = [BRG_PKT_FILTER, BRG_RX_CHANNEL, BRG_PACER_INTERVAL]
|
|
13
|
-
datapath_module =
|
|
14
|
+
datapath_module = test.active_brg.datapath
|
|
14
15
|
|
|
15
16
|
test = cert_common.test_prolog(test)
|
|
16
17
|
if test.rc == TEST_FAILED:
|
|
17
18
|
return cert_common.test_epilog(test)
|
|
18
19
|
|
|
19
|
-
|
|
20
20
|
for param in test.params:
|
|
21
|
-
test = cert_config.brg_configure(test, fields=fields, values=[param.value, ag.RX_CHANNEL_37, PKT_FILTER_TEST_PACER_INTERVAL],
|
|
21
|
+
test = cert_config.brg_configure(test, fields=fields, values=[param.value, ag.RX_CHANNEL_37, PKT_FILTER_TEST_PACER_INTERVAL],
|
|
22
|
+
module=datapath_module)[0]
|
|
22
23
|
test.set_phase_rc(param.name, test.rc)
|
|
23
24
|
test.add_phase_reason(param.name, test.reason)
|
|
24
25
|
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
26
|
+
test.add_reason(f"Failed to configure BRG with {param.name} filter")
|
|
25
27
|
break
|
|
26
28
|
else:
|
|
27
29
|
test.reset_result()
|
|
@@ -32,16 +34,19 @@ def run(test):
|
|
|
32
34
|
if test.data == DATA_SIMULATION:
|
|
33
35
|
# start generating pkts and send them using data simulator
|
|
34
36
|
num_of_pixels = 5
|
|
35
|
-
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=2, delay=0,
|
|
37
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=2, delay=0,
|
|
38
|
+
pkt_types=[0, 1], pixels_type=GEN3)
|
|
36
39
|
pixel_sim_thread.start()
|
|
37
|
-
df = cert_common.data_scan(test, brg_data=(not test.internal_brg), gw_data=test.internal_brg,
|
|
38
|
-
|
|
40
|
+
df = cert_common.data_scan(test, brg_data=(not test.internal_brg), gw_data=test.internal_brg,
|
|
41
|
+
scan_time=PKT_FILTER_TEST_PACER_INTERVAL * 6, per_pkt_type=True,
|
|
42
|
+
pkt_filter_cfg=param.value, flush_pkts=True)
|
|
39
43
|
if test.data == DATA_SIMULATION:
|
|
40
44
|
# stop generating pkts with data simulator and wait a few seconds for full flush
|
|
41
45
|
pixel_sim_thread.stop()
|
|
42
46
|
time.sleep(5)
|
|
43
47
|
cert_common.display_data(df, nfpkt=True, tbc=True, name_prefix=f"pkt_filter_gen3_{param.name}_", dir=test.dir)
|
|
44
|
-
test = cert_common.pacing_analysis(test, pacer_interval=PKT_FILTER_TEST_PACER_INTERVAL, df=df, pkt_filter_cfg=param.value,
|
|
48
|
+
test = cert_common.pacing_analysis(test, pacer_interval=PKT_FILTER_TEST_PACER_INTERVAL, df=df, pkt_filter_cfg=param.value,
|
|
49
|
+
num_of_pixels=num_of_pixels)
|
|
45
50
|
generate_log_file(test, param.name)
|
|
46
51
|
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
47
52
|
test.set_phase_rc(param.name, test.rc)
|