wiliot-certificate 1.3.0a1__py3-none-any.whl → 1.4.0a1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- brg_certificate/__init__.py +0 -0
- brg_certificate/ag/energous_v0_defines.py +925 -0
- brg_certificate/ag/energous_v1_defines.py +931 -0
- brg_certificate/ag/energous_v2_defines.py +925 -0
- brg_certificate/ag/energous_v3_defines.py +925 -0
- brg_certificate/ag/energous_v4_defines.py +925 -0
- brg_certificate/ag/fanstel_lan_v0_defines.py +925 -0
- brg_certificate/ag/fanstel_lte_v0_defines.py +925 -0
- brg_certificate/ag/fanstel_wifi_v0_defines.py +925 -0
- brg_certificate/ag/minew_lte_v0_defines.py +925 -0
- brg_certificate/ag/wlt_cmd_if.html +102 -0
- brg_certificate/ag/wlt_types.html +6114 -0
- brg_certificate/ag/wlt_types_ag.py +7840 -0
- brg_certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +142 -0
- brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +785 -0
- brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +139 -0
- brg_certificate/ag/wlt_types_ag_jsons/calibration.json +394 -0
- brg_certificate/ag/wlt_types_ag_jsons/custom.json +515 -0
- brg_certificate/ag/wlt_types_ag_jsons/datapath.json +672 -0
- brg_certificate/ag/wlt_types_ag_jsons/energy2400.json +550 -0
- brg_certificate/ag/wlt_types_ag_jsons/energySub1g.json +595 -0
- brg_certificate/ag/wlt_types_ag_jsons/externalSensor.json +598 -0
- brg_certificate/ag/wlt_types_ag_jsons/interface.json +938 -0
- brg_certificate/ag/wlt_types_ag_jsons/powerManagement.json +1234 -0
- brg_certificate/ag/wlt_types_ag_jsons/side_info_sensor.json +105 -0
- brg_certificate/ag/wlt_types_ag_jsons/signal_indicator_data.json +77 -0
- brg_certificate/ag/wlt_types_ag_jsons/unified_echo_ext_pkt.json +61 -0
- brg_certificate/ag/wlt_types_ag_jsons/unified_echo_pkt.json +110 -0
- brg_certificate/brg_certificate.py +191 -0
- brg_certificate/brg_certificate_cli.py +47 -0
- brg_certificate/cert_common.py +828 -0
- brg_certificate/cert_config.py +395 -0
- brg_certificate/cert_data_sim.py +188 -0
- brg_certificate/cert_defines.py +337 -0
- brg_certificate/cert_gw_sim.py +285 -0
- brg_certificate/cert_mqtt.py +373 -0
- brg_certificate/cert_prints.py +181 -0
- brg_certificate/cert_protobuf.py +88 -0
- brg_certificate/cert_results.py +300 -0
- brg_certificate/cert_utils.py +358 -0
- brg_certificate/certificate_sanity_test_list.txt +36 -0
- brg_certificate/certificate_test_list.txt +43 -0
- brg_certificate/config/eclipse.json +10 -0
- brg_certificate/config/hivemq.json +10 -0
- brg_certificate/config/mosquitto.json +10 -0
- brg_certificate/config/mosquitto.md +95 -0
- brg_certificate/config/wiliot-dev.json +10 -0
- brg_certificate/restore_brg.py +59 -0
- brg_certificate/tests/calibration/interval_test/interval_test.json +13 -0
- brg_certificate/tests/calibration/interval_test/interval_test.py +28 -0
- brg_certificate/tests/calibration/output_power_test/output_power_test.json +13 -0
- brg_certificate/tests/calibration/output_power_test/output_power_test.py +28 -0
- brg_certificate/tests/calibration/pattern_test/pattern_test.json +13 -0
- brg_certificate/tests/calibration/pattern_test/pattern_test.py +70 -0
- brg_certificate/tests/datapath/adaptive_pacer_algo_test/adaptive_pacer_algo_test.json +13 -0
- brg_certificate/tests/datapath/adaptive_pacer_algo_test/adaptive_pacer_algo_test.py +76 -0
- brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.json +13 -0
- brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.py +83 -0
- brg_certificate/tests/datapath/output_power_test/output_power_test.json +13 -0
- brg_certificate/tests/datapath/output_power_test/output_power_test.py +27 -0
- brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +13 -0
- brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +43 -0
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.json +13 -0
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +63 -0
- brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.json +13 -0
- brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.py +50 -0
- brg_certificate/tests/datapath/pattern_test/pattern_test.json +13 -0
- brg_certificate/tests/datapath/pattern_test/pattern_test.py +28 -0
- brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +13 -0
- brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +51 -0
- brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +13 -0
- brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +54 -0
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.json +13 -0
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.py +55 -0
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +13 -0
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +73 -0
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.json +13 -0
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.py +41 -0
- brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.json +21 -0
- brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +184 -0
- brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.json +21 -0
- brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +210 -0
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +30 -0
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +203 -0
- brg_certificate/tests/datapath/stress_test/stress_test.json +30 -0
- brg_certificate/tests/datapath/stress_test/stress_test.py +210 -0
- brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.json +13 -0
- brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +113 -0
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.json +13 -0
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.py +79 -0
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +13 -0
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +432 -0
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.json +13 -0
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +94 -0
- brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.json +13 -0
- brg_certificate/tests/edge_mgmt/brg2brg_ota_test/brg2brg_ota_test.py +87 -0
- brg_certificate/tests/edge_mgmt/leds_test/leds_test.json +13 -0
- brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +210 -0
- brg_certificate/tests/edge_mgmt/ota_test/ota_test.json +13 -0
- brg_certificate/tests/edge_mgmt/ota_test/ota_test.py +83 -0
- brg_certificate/tests/edge_mgmt/stat_test/stat_test.json +13 -0
- brg_certificate/tests/edge_mgmt/stat_test/stat_test.py +48 -0
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.json +13 -0
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.py +26 -0
- brg_certificate/tests/energy2400/output_power_test/output_power_test.json +13 -0
- brg_certificate/tests/energy2400/output_power_test/output_power_test.py +27 -0
- brg_certificate/tests/energy2400/pattern_test/pattern_test.json +13 -0
- brg_certificate/tests/energy2400/pattern_test/pattern_test.py +28 -0
- brg_certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.json +13 -0
- brg_certificate/tests/energy2400/signal_indicator_ble5_test/signal_indicator_ble5_test.py +398 -0
- brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.json +13 -0
- brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +153 -0
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.json +13 -0
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +264 -0
- brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +13 -0
- brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +27 -0
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.json +13 -0
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.py +26 -0
- brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.json +13 -0
- brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +397 -0
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +13 -0
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +27 -0
- brg_certificate/wltPb_pb2.py +72 -0
- brg_certificate/wltPb_pb2.pyi +227 -0
- brg_certificate/wlt_types.py +114 -0
- gw_certificate/api/extended_api.py +7 -1531
- gw_certificate/api_if/200/data.json +106 -0
- gw_certificate/api_if/200/logs.json +12 -0
- gw_certificate/api_if/200/status.json +47 -0
- gw_certificate/api_if/201/data.json +98 -0
- gw_certificate/api_if/201/logs.json +12 -0
- gw_certificate/api_if/201/status.json +53 -0
- gw_certificate/api_if/202/data.json +83 -0
- gw_certificate/api_if/202/logs.json +12 -0
- gw_certificate/api_if/202/status.json +60 -0
- gw_certificate/api_if/203/data.json +85 -0
- gw_certificate/api_if/203/logs.json +12 -0
- gw_certificate/api_if/203/status.json +63 -0
- gw_certificate/api_if/204/data.json +85 -0
- gw_certificate/api_if/204/logs.json +12 -0
- gw_certificate/api_if/204/status.json +63 -0
- gw_certificate/api_if/205/data.json +85 -0
- gw_certificate/api_if/205/logs.json +12 -0
- gw_certificate/api_if/205/status.json +63 -0
- gw_certificate/api_if/api_validation.py +0 -2
- gw_certificate/common/analysis_data_bricks.py +18 -1413
- gw_certificate/common/debug.py +0 -21
- gw_certificate/common/utils.py +1 -212
- gw_certificate/common/utils_defines.py +0 -87
- gw_certificate/gw_certificate.py +9 -7
- gw_certificate/gw_certificate_cli.py +39 -23
- gw_certificate/interface/4.4.52_app.zip +0 -0
- gw_certificate/interface/4.4.52_sd_bl_app.zip +0 -0
- gw_certificate/interface/ble_simulator.py +0 -32
- gw_certificate/interface/if_defines.py +1 -0
- gw_certificate/interface/mqtt.py +96 -19
- gw_certificate/interface/nrfutil-linux +0 -0
- gw_certificate/interface/nrfutil-mac +0 -0
- gw_certificate/interface/nrfutil.exe +0 -0
- gw_certificate/interface/pkt_generator.py +0 -82
- gw_certificate/interface/uart_if.py +73 -43
- gw_certificate/templates/results.html +1 -1
- gw_certificate/tests/__init__.py +1 -2
- gw_certificate/tests/actions.py +134 -9
- gw_certificate/tests/connection.py +10 -5
- gw_certificate/tests/downlink.py +2 -4
- gw_certificate/tests/generic.py +62 -12
- gw_certificate/tests/registration.py +78 -27
- gw_certificate/tests/static/generated_packet_table.py +12 -48
- gw_certificate/tests/static/packet_table.csv +10048 -10048
- gw_certificate/tests/static/references.py +2 -1
- gw_certificate/tests/static/uplink_defines.py +0 -7
- gw_certificate/tests/throughput.py +7 -12
- gw_certificate/tests/uplink.py +83 -43
- {wiliot_certificate-1.3.0a1.dist-info → wiliot_certificate-1.4.0a1.dist-info}/METADATA +59 -8
- wiliot_certificate-1.4.0a1.dist-info/RECORD +198 -0
- {wiliot_certificate-1.3.0a1.dist-info → wiliot_certificate-1.4.0a1.dist-info}/WHEEL +1 -1
- wiliot_certificate-1.4.0a1.dist-info/entry_points.txt +3 -0
- wiliot_certificate-1.4.0a1.dist-info/top_level.txt +2 -0
- gw_certificate/interface/packet_error.py +0 -22
- wiliot_certificate-1.3.0a1.dist-info/RECORD +0 -51
- wiliot_certificate-1.3.0a1.dist-info/entry_points.txt +0 -2
- wiliot_certificate-1.3.0a1.dist-info/top_level.txt +0 -1
- {wiliot_certificate-1.3.0a1.dist-info → wiliot_certificate-1.4.0a1.dist-info}/LICENSE +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from brg_certificate.cert_prints import *
|
|
2
|
+
from brg_certificate.cert_defines import *
|
|
3
|
+
from brg_certificate.wlt_types import *
|
|
4
|
+
import brg_certificate.cert_common as cert_common
|
|
5
|
+
import brg_certificate.cert_config as cert_config
|
|
6
|
+
|
|
7
|
+
def run(test):
|
|
8
|
+
|
|
9
|
+
fields = [BRG_OUTPUT_POWER]
|
|
10
|
+
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
11
|
+
|
|
12
|
+
test = cert_common.test_prolog(test)
|
|
13
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
14
|
+
return cert_common.test_epilog(test)
|
|
15
|
+
|
|
16
|
+
for param in test.params:
|
|
17
|
+
test = cert_config.brg_configure(test, fields=fields, values=[param.value], module=datapath_module)[0]
|
|
18
|
+
generate_log_file(test, param.name)
|
|
19
|
+
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
20
|
+
test.set_phase_rc(param.name, test.rc)
|
|
21
|
+
test.add_phase_reason(param.name, test.reason)
|
|
22
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
23
|
+
break
|
|
24
|
+
else:
|
|
25
|
+
test.reset_result()
|
|
26
|
+
|
|
27
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pacer_interval_ble5_test",
|
|
3
|
+
"module": "datapath",
|
|
4
|
+
"purpose": "Test pacer interval feature configuration and functionality in the bridge with BLE5 packets for different pacer interval values",
|
|
5
|
+
"documentaion": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "Bridge & data simulator configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Pacer interval configuration", "Generate GEN3 pixels packets & scan for packets in the bridge", "Compare pacer interval mean per pixel to the configured value", "Repeat for all given pacer interval values", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All values configured successfully and actual pacing found matching to the configured values",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": [5, 15, 30, 60]
|
|
13
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from brg_certificate.cert_prints import *
|
|
2
|
+
from brg_certificate.cert_defines import *
|
|
3
|
+
from brg_certificate.wlt_types import *
|
|
4
|
+
import brg_certificate.cert_common as cert_common
|
|
5
|
+
import brg_certificate.cert_config as cert_config
|
|
6
|
+
|
|
7
|
+
def run(test):
|
|
8
|
+
|
|
9
|
+
fields = [BRG_PACER_INTERVAL, BRG_RX_CHANNEL, BRG_PKT_FILTER]
|
|
10
|
+
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
11
|
+
|
|
12
|
+
test = cert_common.test_prolog(test)
|
|
13
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
14
|
+
return cert_common.test_epilog(test)
|
|
15
|
+
|
|
16
|
+
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], module=datapath_module)[0]
|
|
18
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
19
|
+
break
|
|
20
|
+
num_of_pixels = 0
|
|
21
|
+
if test.data == DATA_SIMULATION:
|
|
22
|
+
# start generating pkts and send them using data simulator
|
|
23
|
+
num_of_pixels = 10
|
|
24
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=2, delay=0, pkt_types=[2], pixels_type=GEN3_EXTENDED)
|
|
25
|
+
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)
|
|
27
|
+
if test.data == DATA_SIMULATION:
|
|
28
|
+
# stop generating pkts with data simulator and wait a few seconds for full flush
|
|
29
|
+
pixel_sim_thread.stop()
|
|
30
|
+
time.sleep(5)
|
|
31
|
+
cert_mqtt.dump_pkts(test, log=param.name)
|
|
32
|
+
cert_common.display_data(df, nfpkt=True, tbc=True, name_prefix=f"brg_pacer_{param.name}_", dir=test.dir)
|
|
33
|
+
test = cert_common.pacing_analysis(test, df=df, pacer_interval=param.value, num_of_pixels=num_of_pixels)
|
|
34
|
+
generate_log_file(test, param.name)
|
|
35
|
+
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
36
|
+
test.set_phase_rc(param.name, test.rc)
|
|
37
|
+
test.add_phase_reason(param.name, test.reason)
|
|
38
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
39
|
+
break
|
|
40
|
+
else:
|
|
41
|
+
test.reset_result()
|
|
42
|
+
|
|
43
|
+
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module], ble5=True)
|
brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pacer_interval_test",
|
|
3
|
+
"module": "datapath",
|
|
4
|
+
"purpose": "Test pixels handling in the bridge for different pacer interval values",
|
|
5
|
+
"documentaion": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "Bridge configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Pacer interval configuration", "Scan for pixel packets in the bridge", "Compare maximal amount of received pixels to the amount received with different pacer interval value", "Repeat for all given pacer interval values", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All values configured successfully and no significant gaps between received amounts of pixels were found",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": [1, 10, 15, 30]
|
|
13
|
+
}
|
brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
from brg_certificate.cert_prints import *
|
|
2
|
+
from brg_certificate.cert_defines import *
|
|
3
|
+
from brg_certificate.wlt_types import *
|
|
4
|
+
import brg_certificate.cert_common as cert_common
|
|
5
|
+
import brg_certificate.cert_config as cert_config
|
|
6
|
+
|
|
7
|
+
def run(test):
|
|
8
|
+
pacer_threshold = PACER_INTERVAL_THRESHOLD_HIGH if test.private_setup else PACER_INTERVAL_THRESHOLD
|
|
9
|
+
|
|
10
|
+
fields = [BRG_PACER_INTERVAL, BRG_TX_REPETITION]
|
|
11
|
+
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
12
|
+
|
|
13
|
+
test = cert_common.test_prolog(test)
|
|
14
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
15
|
+
return cert_common.test_epilog(test)
|
|
16
|
+
|
|
17
|
+
# Configure the GW to receive tags pkt
|
|
18
|
+
if test.internal_brg:
|
|
19
|
+
test = cert_config.brg_configure(test, fields=[BRG_RX_CHANNEL], values=[ag.RX_CHANNEL_37], module=datapath_module, wait=True)[0]
|
|
20
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
21
|
+
return cert_common.test_epilog(test, revert_gws=True)
|
|
22
|
+
|
|
23
|
+
num_of_pixels = 200
|
|
24
|
+
if test.data == DATA_SIMULATION:
|
|
25
|
+
# start generating pkts and send them using data simulator
|
|
26
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=3, delay=0, pkt_types=[0])
|
|
27
|
+
pixel_sim_thread.start()
|
|
28
|
+
|
|
29
|
+
tags_count_per_pacer = {}
|
|
30
|
+
for param in test.params:
|
|
31
|
+
test = cert_config.brg_configure(test, fields=fields, values=[param.value, 1], module=datapath_module)[0]
|
|
32
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
33
|
+
generate_log_file(test, param.name)
|
|
34
|
+
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module])
|
|
35
|
+
df = cert_common.data_scan(test, scan_time=120, brg_data=True)
|
|
36
|
+
cert_common.display_data(df, nfpkt=True, tbc=True, name_prefix=f"brg_pacer_tags_count_{param.name}_", dir=test.dir)
|
|
37
|
+
tags_count_per_pacer[param.value] = df[TAG_ID].nunique()
|
|
38
|
+
generate_log_file(test, param.name)
|
|
39
|
+
test.set_phase_rc(param.name, test.rc)
|
|
40
|
+
test.add_phase_reason(param.name, test.reason)
|
|
41
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
42
|
+
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module])
|
|
43
|
+
else:
|
|
44
|
+
test.reset_result()
|
|
45
|
+
|
|
46
|
+
if test.data == DATA_SIMULATION:
|
|
47
|
+
# stop generating pkts with data simulator and wait a few seconds for full flush
|
|
48
|
+
pixel_sim_thread.stop()
|
|
49
|
+
time.sleep(5)
|
|
50
|
+
|
|
51
|
+
print("tags_count_per_pacer: ", tags_count_per_pacer)
|
|
52
|
+
max_count = max([tags_count_per_pacer[pacer] for pacer in tags_count_per_pacer])
|
|
53
|
+
for param in test.params:
|
|
54
|
+
if test.data == DATA_SIMULATION:
|
|
55
|
+
if tags_count_per_pacer[param.value] != num_of_pixels:
|
|
56
|
+
test.set_phase_rc(param.name, TEST_FAILED)
|
|
57
|
+
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) (diff of less than 3 tags will be accepted anyway)
|
|
59
|
+
elif tags_count_per_pacer[param.value] < (pacer_threshold * max_count) and (max_count - tags_count_per_pacer[param.value]) > 3:
|
|
60
|
+
test.set_phase_rc(param.name, TEST_FAILED)
|
|
61
|
+
test.add_phase_reason(param.name, f"received_tags={tags_count_per_pacer[param.value]} max_tags={max_count} less than {int(pacer_threshold * 100)}%")
|
|
62
|
+
|
|
63
|
+
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pacer_interval_test",
|
|
3
|
+
"module": "datapath",
|
|
4
|
+
"purpose": "Test pacer interval feature configuration and functionality in the bridge for different pacer interval values",
|
|
5
|
+
"documentaion": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "Bridge & data simulator configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Pacer interval configuration", "Generate pixels packets & scan for packets in the bridge", "Compare pacer interval mean per pixel to the configured value", "Repeat for all given pacer interval values", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All values configured successfully and actual pacing found matching to the configured values",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": [5, 10, 15, 30, 60]
|
|
13
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
from brg_certificate.cert_prints import *
|
|
2
|
+
from brg_certificate.cert_defines import *
|
|
3
|
+
from brg_certificate.wlt_types import *
|
|
4
|
+
import brg_certificate.cert_common as cert_common
|
|
5
|
+
import brg_certificate.cert_config as cert_config
|
|
6
|
+
|
|
7
|
+
def run(test):
|
|
8
|
+
|
|
9
|
+
fields = [BRG_PACER_INTERVAL, BRG_PKT_FILTER, BRG_RX_CHANNEL]
|
|
10
|
+
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
11
|
+
|
|
12
|
+
test = cert_common.test_prolog(test)
|
|
13
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
14
|
+
return cert_common.test_epilog(test)
|
|
15
|
+
|
|
16
|
+
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], module=datapath_module)[0]
|
|
18
|
+
test.set_phase_rc(param.name, test.rc)
|
|
19
|
+
test.add_phase_reason(param.name, test.reason)
|
|
20
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
21
|
+
break
|
|
22
|
+
else:
|
|
23
|
+
test.reset_result()
|
|
24
|
+
|
|
25
|
+
num_of_pixels = 0
|
|
26
|
+
if test.data == DATA_SIMULATION:
|
|
27
|
+
# start generating pkts and send them using data simulator
|
|
28
|
+
num_of_pixels = 10
|
|
29
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=3, delay=100, pkt_types=[0])
|
|
30
|
+
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)
|
|
32
|
+
if test.data == DATA_SIMULATION:
|
|
33
|
+
# stop generating pkts with data simulator and wait a few seconds for full flush
|
|
34
|
+
pixel_sim_thread.stop()
|
|
35
|
+
time.sleep(5)
|
|
36
|
+
cert_mqtt.dump_pkts(test, log=param.name)
|
|
37
|
+
cert_common.display_data(df, nfpkt=True, tbc=True, name_prefix=f"brg_pacer_{param.name}_", dir=test.dir)
|
|
38
|
+
test = cert_common.pacing_analysis(test, df=df, pacer_interval=param.value, num_of_pixels=num_of_pixels)
|
|
39
|
+
generate_log_file(test, param.name)
|
|
40
|
+
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
41
|
+
test.set_phase_rc(param.name, test.rc)
|
|
42
|
+
test.add_phase_reason(param.name, test.reason)
|
|
43
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
44
|
+
break
|
|
45
|
+
else:
|
|
46
|
+
test.reset_result()
|
|
47
|
+
if test.rc == TEST_FAILED:
|
|
48
|
+
break
|
|
49
|
+
|
|
50
|
+
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pattern_test",
|
|
3
|
+
"module": "datapath",
|
|
4
|
+
"purpose": "Test configuration for all supported calibration pattern values",
|
|
5
|
+
"documentaion": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "Bridge configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Configurations", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All values configured successfully",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": ["DATAPATH_PATTERN_STANDARD", "DATAPATH_PATTERN_38_38_39", "DATAPATH_PATTERN_EU_PATTERN"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from brg_certificate.cert_prints import *
|
|
2
|
+
from brg_certificate.cert_defines import *
|
|
3
|
+
from brg_certificate.wlt_types import *
|
|
4
|
+
import brg_certificate.cert_common as cert_common
|
|
5
|
+
import brg_certificate.cert_config as cert_config
|
|
6
|
+
|
|
7
|
+
def run(test):
|
|
8
|
+
|
|
9
|
+
fields = [BRG_PATTERN]
|
|
10
|
+
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
11
|
+
|
|
12
|
+
test = cert_common.test_prolog(test)
|
|
13
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
14
|
+
return cert_common.test_epilog(test)
|
|
15
|
+
|
|
16
|
+
for param in test.params:
|
|
17
|
+
# Set brg cfg
|
|
18
|
+
test = cert_config.brg_configure(test, fields=fields, values=[param.value], module=datapath_module)[0]
|
|
19
|
+
generate_log_file(test, param.name)
|
|
20
|
+
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
21
|
+
test.set_phase_rc(param.name, test.rc)
|
|
22
|
+
test.add_phase_reason(param.name, test.reason)
|
|
23
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
24
|
+
break
|
|
25
|
+
else:
|
|
26
|
+
test.reset_result()
|
|
27
|
+
|
|
28
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pkt_filter_test",
|
|
3
|
+
"module": "datapath",
|
|
4
|
+
"purpose": "Test packet filter feature configuration and functionality in the bridge for different packet filters using BLE5",
|
|
5
|
+
"documentaion": "https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Pacing",
|
|
6
|
+
"initialCondition": "Bridge & data simulator configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Packet filter & secondary BLE5 rx channel configuration", "Generate pixels packets & scan for packets in the bridge", "Compare pacer interval mean per pixel & packet type to the configured value", "Repeat for all given packet filter values", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All values configured successfully and actual pacing found matching to the configured values",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": ["PKT_FILTER_RANDOM_FIRST_ARRIVING_PKT", "PKT_FILTER_DISABLE_FORWARDING", "PKT_FILTER_TEMP_PKT", "PKT_FILTER_TEMP_AND_ADVANCED_PKTS", "PKT_FILTER_TEMP_ADVANCED_AND_DEBUG_PKTS"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from brg_certificate.cert_prints import *
|
|
2
|
+
from brg_certificate.cert_defines import *
|
|
3
|
+
from brg_certificate.ag.wlt_types_ag import *
|
|
4
|
+
import brg_certificate.cert_common as cert_common
|
|
5
|
+
import brg_certificate.cert_config as cert_config
|
|
6
|
+
|
|
7
|
+
PKT_FILTER_TEST_PACER_INTERVAL = 10
|
|
8
|
+
|
|
9
|
+
def run(test):
|
|
10
|
+
|
|
11
|
+
fields = [BRG_PKT_FILTER, BRG_RX_CHANNEL, BRG_PACER_INTERVAL]
|
|
12
|
+
datapath_module = eval(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
13
|
+
|
|
14
|
+
test = cert_common.test_prolog(test)
|
|
15
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
16
|
+
return cert_common.test_epilog(test)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
for param in test.params:
|
|
20
|
+
test = cert_config.brg_configure_ble5(test, fields=fields, values=[param.value, RX_CHANNEL_10_250K, PKT_FILTER_TEST_PACER_INTERVAL], module=datapath_module)[0]
|
|
21
|
+
test.set_phase_rc(param.name, test.rc)
|
|
22
|
+
test.add_phase_reason(param.name, test.reason)
|
|
23
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
24
|
+
break
|
|
25
|
+
else:
|
|
26
|
+
test.reset_result()
|
|
27
|
+
print("waiting 5 seconds for datapath to clear")
|
|
28
|
+
print_update_wait(5)
|
|
29
|
+
num_of_pixels = 0
|
|
30
|
+
if test.data == DATA_SIMULATION:
|
|
31
|
+
# start generating pkts and send them using data simulator
|
|
32
|
+
num_of_pixels = 5
|
|
33
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=2, delay=0, pkt_types=[2], pixels_type=GEN3_EXTENDED)
|
|
34
|
+
pixel_sim_thread.start()
|
|
35
|
+
df = cert_common.data_scan(test, brg_data=(not test.internal_brg), gw_data=test.internal_brg, scan_time=PKT_FILTER_TEST_PACER_INTERVAL*6, per_pkt_type=True, pkt_filter_cfg=param.value, flush_pkts=True)
|
|
36
|
+
if test.data == DATA_SIMULATION:
|
|
37
|
+
# stop generating pkts with data simulator and wait a few seconds for full flush
|
|
38
|
+
pixel_sim_thread.stop()
|
|
39
|
+
time.sleep(5)
|
|
40
|
+
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, num_of_pixels=num_of_pixels, is_ble5_test=True)
|
|
42
|
+
generate_log_file(test, param.name)
|
|
43
|
+
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
44
|
+
test.set_phase_rc(param.name, test.rc)
|
|
45
|
+
test.add_phase_reason(param.name, test.reason)
|
|
46
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
47
|
+
break
|
|
48
|
+
else:
|
|
49
|
+
test.reset_result()
|
|
50
|
+
|
|
51
|
+
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module], ble5=True)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pkt_filter_gen3_test",
|
|
3
|
+
"module": "datapath",
|
|
4
|
+
"purpose": "Test the packet filter feature configuration and functionality in the bridge for different packet filters with Gen3 data packets",
|
|
5
|
+
"documentaion": "https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Pacing",
|
|
6
|
+
"initialCondition": "Bridge & data simulator configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Packet filter configuration", "Generate Gen3 pixels packets & scan for packets in the bridge", "Compare pacer interval mean per pixel & packet type to the configured value", "Repeat for all given packet filter values", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All values configured successfully and actual pacing found matching to the configured values",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": ["PKT_FILTER_RANDOM_FIRST_ARRIVING_PKT", "PKT_FILTER_DISABLE_FORWARDING", "PKT_FILTER_TEMP_PKT", "PKT_FILTER_TEMP_AND_ADVANCED_PKTS"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
from brg_certificate.cert_prints import *
|
|
2
|
+
from brg_certificate.cert_defines import *
|
|
3
|
+
from brg_certificate.wlt_types import *
|
|
4
|
+
import brg_certificate.cert_common as cert_common
|
|
5
|
+
import brg_certificate.cert_config as cert_config
|
|
6
|
+
|
|
7
|
+
PKT_FILTER_TEST_PACER_INTERVAL = 10
|
|
8
|
+
|
|
9
|
+
def run(test):
|
|
10
|
+
|
|
11
|
+
# We add the field BRG_RX_CHANNEL so internal BRGs will be configured to channel 37 (default is 39)
|
|
12
|
+
fields = [BRG_PKT_FILTER, BRG_RX_CHANNEL, BRG_PACER_INTERVAL]
|
|
13
|
+
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
14
|
+
|
|
15
|
+
test = cert_common.test_prolog(test)
|
|
16
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
17
|
+
return cert_common.test_epilog(test)
|
|
18
|
+
|
|
19
|
+
|
|
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], module=datapath_module)[0]
|
|
22
|
+
test.set_phase_rc(param.name, test.rc)
|
|
23
|
+
test.add_phase_reason(param.name, test.reason)
|
|
24
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
25
|
+
break
|
|
26
|
+
else:
|
|
27
|
+
test.reset_result()
|
|
28
|
+
print("waiting 5 seconds for datapath to clear")
|
|
29
|
+
print_update_wait(5)
|
|
30
|
+
|
|
31
|
+
num_of_pixels = 0
|
|
32
|
+
if test.data == DATA_SIMULATION:
|
|
33
|
+
# start generating pkts and send them using data simulator
|
|
34
|
+
num_of_pixels = 5
|
|
35
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=2, delay=0, pkt_types=[0,1], pixels_type=GEN3)
|
|
36
|
+
pixel_sim_thread.start()
|
|
37
|
+
df = cert_common.data_scan(test, brg_data=(not test.internal_brg), gw_data=test.internal_brg, scan_time=PKT_FILTER_TEST_PACER_INTERVAL*6, per_pkt_type=True,
|
|
38
|
+
pkt_filter_cfg=param.value, flush_pkts=True)
|
|
39
|
+
if test.data == DATA_SIMULATION:
|
|
40
|
+
# stop generating pkts with data simulator and wait a few seconds for full flush
|
|
41
|
+
pixel_sim_thread.stop()
|
|
42
|
+
time.sleep(5)
|
|
43
|
+
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, num_of_pixels=num_of_pixels)
|
|
45
|
+
generate_log_file(test, param.name)
|
|
46
|
+
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
47
|
+
test.set_phase_rc(param.name, test.rc)
|
|
48
|
+
test.add_phase_reason(param.name, test.reason)
|
|
49
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
50
|
+
break
|
|
51
|
+
else:
|
|
52
|
+
test.reset_result()
|
|
53
|
+
|
|
54
|
+
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pkt_filter_test",
|
|
3
|
+
"module": "datapath",
|
|
4
|
+
"purpose": "Test packet filter feature configuration and functionality in the bridge for different packet filters",
|
|
5
|
+
"documentaion": "https://community.wiliot.com/customers/s/article/Wiliot-Network-Data-Path-Module-Pacing",
|
|
6
|
+
"initialCondition": "Bridge & data simulator configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Packet filter configuration", "Generate pixels packets & scan for packets in the bridge", "Compare pacer interval mean per pixel & packet type to the configured value", "Repeat for all given packet filter values", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All values configured successfully and actual pacing found matching to the configured values",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": ["PKT_FILTER_RANDOM_FIRST_ARRIVING_PKT", "PKT_FILTER_DISABLE_FORWARDING", "PKT_FILTER_TEMP_PKT", "PKT_FILTER_TEMP_AND_ADVANCED_PKTS", "PKT_FILTER_TEMP_ADVANCED_AND_DEBUG_PKTS"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
from brg_certificate.cert_prints import *
|
|
2
|
+
from brg_certificate.cert_defines import *
|
|
3
|
+
from brg_certificate.wlt_types import *
|
|
4
|
+
import brg_certificate.cert_common as cert_common
|
|
5
|
+
import brg_certificate.cert_config as cert_config
|
|
6
|
+
|
|
7
|
+
PKT_FILTER_TEST_PACER_INTERVAL = 10
|
|
8
|
+
|
|
9
|
+
def run(test):
|
|
10
|
+
|
|
11
|
+
# We add the field BRG_RX_CHANNEL so internal BRGs will be configured to channel 37 (default is 39)
|
|
12
|
+
fields = [BRG_PKT_FILTER, BRG_RX_CHANNEL, BRG_PACER_INTERVAL]
|
|
13
|
+
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
14
|
+
|
|
15
|
+
test = cert_common.test_prolog(test)
|
|
16
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
17
|
+
return cert_common.test_epilog(test)
|
|
18
|
+
|
|
19
|
+
|
|
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], module=datapath_module)[0]
|
|
22
|
+
test.set_phase_rc(param.name, test.rc)
|
|
23
|
+
test.add_phase_reason(param.name, test.reason)
|
|
24
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
25
|
+
break
|
|
26
|
+
else:
|
|
27
|
+
test.reset_result()
|
|
28
|
+
print("waiting 5 seconds for datapath to clear")
|
|
29
|
+
print_update_wait(5)
|
|
30
|
+
|
|
31
|
+
num_of_pixels = 0
|
|
32
|
+
if test.data == DATA_SIMULATION:
|
|
33
|
+
# start generating pkts and send them using data simulator
|
|
34
|
+
num_of_pixels = 5
|
|
35
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=2, delay=0, pkt_types=[0,1,2])
|
|
36
|
+
pixel_sim_thread.start()
|
|
37
|
+
df = cert_common.data_scan(test, brg_data=(not test.internal_brg), gw_data=test.internal_brg, scan_time=PKT_FILTER_TEST_PACER_INTERVAL*6, per_pkt_type=True,
|
|
38
|
+
pkt_filter_cfg=param.value, flush_pkts=True)
|
|
39
|
+
if test.data == DATA_SIMULATION:
|
|
40
|
+
# stop generating pkts with data simulator and wait a few seconds for full flush
|
|
41
|
+
pixel_sim_thread.stop()
|
|
42
|
+
time.sleep(5)
|
|
43
|
+
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, pkt_filter_cfg=param.value, num_of_pixels=num_of_pixels)
|
|
45
|
+
# param epilog
|
|
46
|
+
generate_log_file(test, param.name)
|
|
47
|
+
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
48
|
+
test.set_phase_rc(param.name, test.rc)
|
|
49
|
+
test.add_phase_reason(param.name, test.reason)
|
|
50
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
51
|
+
break
|
|
52
|
+
else:
|
|
53
|
+
test.reset_result()
|
|
54
|
+
|
|
55
|
+
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rssi_threshold_test",
|
|
3
|
+
"module": "datapath",
|
|
4
|
+
"purpose": "Test RSSI threshold configuration and functionality in the bridge",
|
|
5
|
+
"documentaion": "TODO",
|
|
6
|
+
"initialCondition": "Bridge configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "RSSI Threshold configuration", "Checking for packets violating RSSI threshold", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "RSSI Threshold configured successfully and no pixel packets with RSSI weaker than the threshold have been echoed.",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": ["-80", "-65", "-10"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
from brg_certificate.cert_prints import *
|
|
2
|
+
from brg_certificate.cert_defines import *
|
|
3
|
+
from brg_certificate.wlt_types import *
|
|
4
|
+
import brg_certificate.cert_common as cert_common
|
|
5
|
+
import brg_certificate.cert_config as cert_config
|
|
6
|
+
|
|
7
|
+
def rssi_threshold_analysis(test, df, threshold):
|
|
8
|
+
tags_count = len(list(df[TAG_ID].unique()))
|
|
9
|
+
|
|
10
|
+
# Filter rows where RSSI is higher than threshold
|
|
11
|
+
low_rssi_df = df[df[RSSI] >= (-1)*threshold]
|
|
12
|
+
|
|
13
|
+
# Extract all tag IDs from those filtered rows
|
|
14
|
+
low_rssi_tag_ids = low_rssi_df[TAG_ID].unique()
|
|
15
|
+
failed_tags = len(low_rssi_tag_ids)
|
|
16
|
+
|
|
17
|
+
if failed_tags:
|
|
18
|
+
test.rc =TEST_FAILED
|
|
19
|
+
print("Tag IDs with RSSI exceeding", (-1)*threshold, ":", low_rssi_tag_ids)
|
|
20
|
+
|
|
21
|
+
if test.rc == TEST_FAILED:
|
|
22
|
+
test.add_reason(f"{failed_tags}/{tags_count} tags rssi violating threshold of {(-1)*threshold}")
|
|
23
|
+
print(test.reason)
|
|
24
|
+
else:
|
|
25
|
+
test.rc = TEST_PASSED
|
|
26
|
+
return test
|
|
27
|
+
|
|
28
|
+
def run(test):
|
|
29
|
+
|
|
30
|
+
fields = [BRG_RSSI_THRESHOLD]
|
|
31
|
+
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
32
|
+
|
|
33
|
+
test = cert_common.test_prolog(test)
|
|
34
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
35
|
+
return cert_common.test_epilog(test)
|
|
36
|
+
|
|
37
|
+
# Configure the BRG with RSSI threshold and check for packets violating the threshold
|
|
38
|
+
for param in test.params:
|
|
39
|
+
functionality_run_print(f"test for RSSI threshold of {param.value}")
|
|
40
|
+
|
|
41
|
+
test = cert_config.brg_configure(test, fields=fields, values=[param.value], module=datapath_module)[0]
|
|
42
|
+
test.set_phase_rc(param.name, test.rc)
|
|
43
|
+
test.add_phase_reason(param.name, test.reason)
|
|
44
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
45
|
+
break
|
|
46
|
+
else:
|
|
47
|
+
test.reset_result()
|
|
48
|
+
print("waiting 5 seconds for datapath to clear")
|
|
49
|
+
print_update_wait(5)
|
|
50
|
+
|
|
51
|
+
if test.data == DATA_SIMULATION:
|
|
52
|
+
# start generating pkts and send them using data simulator
|
|
53
|
+
num_of_pixels = 10
|
|
54
|
+
pixel_sim_thread = cert_data_sim.DataSimThread(test=test, num_of_pixels=num_of_pixels, duplicates=3, delay=100, pkt_types=[0])
|
|
55
|
+
pixel_sim_thread.start()
|
|
56
|
+
df = cert_common.data_scan(test, brg_data=(not test.internal_brg), gw_data=test.internal_brg, scan_time=60)
|
|
57
|
+
if test.data == DATA_SIMULATION:
|
|
58
|
+
# stop generating pkts with data simulator and wait a few seconds for full flush
|
|
59
|
+
pixel_sim_thread.stop()
|
|
60
|
+
time.sleep(5)
|
|
61
|
+
test = rssi_threshold_analysis(test, df, param.value)
|
|
62
|
+
|
|
63
|
+
# param epilog
|
|
64
|
+
generate_log_file(test, param.name)
|
|
65
|
+
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
66
|
+
test.set_phase_rc(param.name, test.rc)
|
|
67
|
+
test.add_phase_reason(param.name, test.reason)
|
|
68
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
69
|
+
break
|
|
70
|
+
else:
|
|
71
|
+
test.reset_result()
|
|
72
|
+
|
|
73
|
+
return cert_common.test_epilog(test, revert_brgs=True, revert_gws=test.internal_brg, modules=[datapath_module])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rx_channel_test",
|
|
3
|
+
"module": "datapath",
|
|
4
|
+
"purpose": "Test configuration for all supported datapath rx channel values",
|
|
5
|
+
"documentaion": "<TEST_DOCUMENTATION_LINK>",
|
|
6
|
+
"initialCondition": "Bridge configured to defaults",
|
|
7
|
+
"procedure": ["Test prolog", "Configurations", "Test epilog and revert to defaults"],
|
|
8
|
+
"expectedOutcome": "All values configured successfully",
|
|
9
|
+
"mandatory": 1,
|
|
10
|
+
"multiBridgeTest": 0,
|
|
11
|
+
"gwOnlyTest": 0,
|
|
12
|
+
"allSupportedValues": ["RX_CHANNEL_37", "RX_CHANNEL_38", "RX_CHANNEL_39", "RX_CHANNEL_10_250K", "RX_CHANNEL_10_500K"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from brg_certificate.cert_prints import *
|
|
2
|
+
from brg_certificate.cert_defines import *
|
|
3
|
+
from brg_certificate.wlt_types import *
|
|
4
|
+
import brg_certificate.cert_common as cert_common
|
|
5
|
+
import brg_certificate.cert_config as cert_config
|
|
6
|
+
|
|
7
|
+
def is_primary_channel(channel):
|
|
8
|
+
if channel == ag.RX_CHANNEL_37 or channel == ag.RX_CHANNEL_38 or channel == ag.RX_CHANNEL_39:
|
|
9
|
+
return True
|
|
10
|
+
else:
|
|
11
|
+
return False
|
|
12
|
+
|
|
13
|
+
def run(test):
|
|
14
|
+
|
|
15
|
+
fields = [BRG_RX_CHANNEL]
|
|
16
|
+
print(test.params)
|
|
17
|
+
datapath_module = eval_pkt(f'ModuleDatapathV{test.active_brg.api_version}')
|
|
18
|
+
ble5_state = False # We use this flag to know whether the BRG is currently in BLE5 mode and needs special configuration next time it is configured
|
|
19
|
+
|
|
20
|
+
test = cert_common.test_prolog(test)
|
|
21
|
+
if test.rc == TEST_FAILED or test.reason != TEST_SUCCESS:
|
|
22
|
+
return cert_common.test_epilog(test)
|
|
23
|
+
|
|
24
|
+
for param in test.params:
|
|
25
|
+
if ble5_state:
|
|
26
|
+
test = cert_config.brg_configure_ble5(test, fields=fields, values=[param.value], module=datapath_module)[0]
|
|
27
|
+
else:
|
|
28
|
+
test = cert_config.brg_configure(test, fields=fields, values=[param.value], module=datapath_module)[0]
|
|
29
|
+
|
|
30
|
+
# param epilog
|
|
31
|
+
ble5_state = not is_primary_channel(param.value)
|
|
32
|
+
generate_log_file(test, param.name)
|
|
33
|
+
field_functionality_pass_fail_print(test, fields[0], value=param.name)
|
|
34
|
+
test.set_phase_rc(param.name, test.rc)
|
|
35
|
+
test.add_phase_reason(param.name, test.reason)
|
|
36
|
+
if test.rc == TEST_FAILED and test.exit_on_param_failure:
|
|
37
|
+
break
|
|
38
|
+
else:
|
|
39
|
+
test.reset_result()
|
|
40
|
+
|
|
41
|
+
return cert_common.test_epilog(test, revert_brgs=True, modules=[datapath_module], ble5=ble5_state)
|