wiliot-certificate 1.5.1a1__py3-none-any.whl → 1.5.2a1__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/wlt_cmd_if.html +3 -2
- brg_certificate/brg_certificate_cli.py +18 -3
- brg_certificate/cert_common.py +82 -26
- 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 +9 -4
- brg_certificate/certificate_bcc_sanity_test_list.txt +10 -5
- brg_certificate/certificate_bcc_test_list.txt +14 -9
- brg_certificate/certificate_sanity_test_list.txt +10 -4
- brg_certificate/certificate_test_list.txt +13 -9
- brg_certificate/tests/calibration/interval_test/interval_test.json +2 -2
- brg_certificate/tests/calibration/output_power_test/output_power_test.json +3 -2
- brg_certificate/tests/calibration/pattern_test/pattern_test.json +2 -2
- brg_certificate/tests/calibration/pattern_test/pattern_test.py +25 -26
- brg_certificate/tests/datapath/aging_test/aging_test.json +4 -5
- brg_certificate/tests/datapath/aging_test/aging_test.py +39 -32
- 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 +12 -11
- brg_certificate/tests/datapath/output_power_test/output_power_test.json +2 -2
- brg_certificate/tests/datapath/output_power_test/output_power_test.py +2 -1
- 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 +6 -3
- 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 +6 -3
- brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.json +2 -2
- brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.py +4 -2
- brg_certificate/tests/datapath/pattern_test/pattern_test.json +2 -2
- brg_certificate/tests/datapath/pattern_test/pattern_test.py +2 -1
- 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 +11 -6
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.json +2 -2
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.py +11 -7
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +3 -3
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +7 -5
- 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 +107 -73
- 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 +128 -118
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +8 -8
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +102 -101
- brg_certificate/tests/datapath/stress_test/stress_test.json +14 -15
- brg_certificate/tests/datapath/stress_test/stress_test.py +102 -101
- 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 +7 -2
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.json +2 -2
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.py +8 -6
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +2 -2
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +2 -18
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.json +14 -8
- 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 +22 -9
- 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 +2 -1
- brg_certificate/tests/energy2400/output_power_test/output_power_test.json +4 -3
- brg_certificate/tests/energy2400/output_power_test/output_power_test.py +2 -1
- brg_certificate/tests/energy2400/pattern_test/pattern_test.json +3 -3
- brg_certificate/tests/energy2400/pattern_test/pattern_test.py +2 -1
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.json +5 -5
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.py +109 -112
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.json +5 -5
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.py +111 -114
- 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 +158 -172
- 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 +2 -1
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.json +4 -3
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.py +2 -1
- 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 +117 -124
- 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 +2 -1
- 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
- {wiliot_certificate-1.5.1a1.dist-info → wiliot_certificate-1.5.2a1.dist-info}/METADATA +40 -40
- {wiliot_certificate-1.5.1a1.dist-info → wiliot_certificate-1.5.2a1.dist-info}/RECORD +98 -94
- {wiliot_certificate-1.5.1a1.dist-info → wiliot_certificate-1.5.2a1.dist-info}/WHEEL +1 -1
- {wiliot_certificate-1.5.1a1.dist-info → wiliot_certificate-1.5.2a1.dist-info}/entry_points.txt +0 -0
- {wiliot_certificate-1.5.1a1.dist-info → wiliot_certificate-1.5.2a1.dist-info}/licenses/LICENSE +0 -0
- {wiliot_certificate-1.5.1a1.dist-info → wiliot_certificate-1.5.2a1.dist-info}/top_level.txt +0 -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,82 +36,86 @@ 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
121
|
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
@@ -118,7 +125,7 @@ def run(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,10 +5,11 @@ 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
|
+
|
|
12
13
|
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
13
14
|
print(f"values: {[param.value for param in test.params]}")
|
|
14
15
|
|
|
@@ -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,6 +4,7 @@ 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]
|
|
@@ -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,6 +4,7 @@ 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]
|
|
@@ -14,16 +15,18 @@ def run(test):
|
|
|
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,6 +4,7 @@ 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
|
|
|
@@ -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,6 +4,7 @@ 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]
|
|
@@ -14,7 +15,8 @@ def run(test):
|
|
|
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,6 +4,7 @@ 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]
|
|
@@ -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,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
|
# We add the field BRG_RX_CHANNEL so internal BRGs will be configured to channel 37 (default is 39)
|
|
@@ -16,12 +17,13 @@ def run(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)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"module": "
|
|
2
|
+
"name": "Packet Filter Gen2 Pixels",
|
|
3
|
+
"module": "Datapath",
|
|
4
4
|
"purpose": "Test packet filter feature configuration and functionality in the bridge for different packet filters",
|
|
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,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
|
# We add the field BRG_RX_CHANNEL so internal BRGs will be configured to channel 37 (default is 39)
|
|
@@ -16,12 +17,13 @@ def run(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,17 +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,
|
|
37
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels,
|
|
38
|
+
duplicates=2, delay=0, pkt_types=[0, 1, 2])
|
|
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_{param.name}_", dir=test.dir)
|
|
44
|
-
test = cert_common.pacing_analysis(test, pacer_interval=PKT_FILTER_TEST_PACER_INTERVAL, df=df,
|
|
45
|
-
|
|
48
|
+
test = cert_common.pacing_analysis(test, pacer_interval=PKT_FILTER_TEST_PACER_INTERVAL, df=df,
|
|
49
|
+
pkt_filter_cfg=param.value, num_of_pixels=num_of_pixels)
|
|
46
50
|
generate_log_file(test, param.name)
|
|
47
51
|
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
48
52
|
test.set_phase_rc(param.name, test.rc)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"module": "
|
|
2
|
+
"name": "RSSI Threshold",
|
|
3
|
+
"module": "Datapath",
|
|
4
4
|
"purpose": "Test RSSI threshold configuration and functionality in the bridge",
|
|
5
|
-
"documentation": "
|
|
5
|
+
"documentation": "<TEST_DOCUMENTATION_LINK>",
|
|
6
6
|
"initialCondition": "Bridge configured to defaults",
|
|
7
7
|
"procedure": ["Test prolog",
|
|
8
8
|
"RSSI Threshold configuration",
|
|
@@ -4,27 +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 rssi_threshold_analysis(test, df, threshold):
|
|
8
9
|
tags_count = len(list(df[TAG_ID].unique()))
|
|
9
10
|
|
|
10
11
|
# Filter rows where RSSI is higher than threshold
|
|
11
|
-
low_rssi_df = df[df[RSSI] >= (-1)*threshold]
|
|
12
|
+
low_rssi_df = df[df[RSSI] >= (-1) * threshold]
|
|
12
13
|
|
|
13
14
|
# Extract all tag IDs from those filtered rows
|
|
14
15
|
low_rssi_tag_ids = low_rssi_df[TAG_ID].unique()
|
|
15
16
|
failed_tags = len(low_rssi_tag_ids)
|
|
16
17
|
|
|
17
18
|
if failed_tags:
|
|
18
|
-
test.rc =TEST_FAILED
|
|
19
|
-
print("Tag IDs with RSSI exceeding", (-1)*threshold, ":", low_rssi_tag_ids)
|
|
19
|
+
test.rc = TEST_FAILED
|
|
20
|
+
print("Tag IDs with RSSI exceeding", (-1) * threshold, ":", low_rssi_tag_ids)
|
|
20
21
|
|
|
21
22
|
if test.rc == TEST_FAILED:
|
|
22
|
-
test.add_reason(f"{failed_tags}/{tags_count} tags rssi violating threshold of {(-1)*threshold}")
|
|
23
|
+
test.add_reason(f"{failed_tags}/{tags_count} tags rssi violating threshold of {(-1) * threshold}")
|
|
23
24
|
print(test.reason)
|
|
24
25
|
else:
|
|
25
26
|
test.rc = TEST_PASSED
|
|
26
27
|
return test
|
|
27
28
|
|
|
29
|
+
|
|
28
30
|
def run(test):
|
|
29
31
|
|
|
30
32
|
fields = [BRG_RSSI_THRESHOLD]
|
|
@@ -33,7 +35,7 @@ def run(test):
|
|
|
33
35
|
test = cert_common.test_prolog(test)
|
|
34
36
|
if test.rc == TEST_FAILED:
|
|
35
37
|
return cert_common.test_epilog(test)
|
|
36
|
-
|
|
38
|
+
|
|
37
39
|
# Configure the BRG with RSSI threshold and check for packets violating the threshold
|
|
38
40
|
for param in test.params:
|
|
39
41
|
functionality_run_print(f"test for RSSI threshold of {param.value}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"module": "
|
|
2
|
+
"name": "Rx Channel",
|
|
3
|
+
"module": "Datapath",
|
|
4
4
|
"purpose": "Test configuration for all supported datapath rx channel values",
|
|
5
5
|
"documentation": "https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Configuration",
|
|
6
6
|
"initialCondition": "Bridge configured to defaults",
|