wiliot-certificate 1.3.0a1__py3-none-any.whl → 1.4.0a2__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.0a2.dist-info}/METADATA +59 -8
- wiliot_certificate-1.4.0a2.dist-info/RECORD +198 -0
- {wiliot_certificate-1.3.0a1.dist-info → wiliot_certificate-1.4.0a2.dist-info}/WHEEL +1 -1
- wiliot_certificate-1.4.0a2.dist-info/entry_points.txt +3 -0
- wiliot_certificate-1.4.0a2.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.0a2.dist-info}/LICENSE +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"versions": [
|
|
3
|
+
{
|
|
4
|
+
"version": "0",
|
|
5
|
+
"packetFields": [
|
|
6
|
+
{
|
|
7
|
+
"name": "bridgeId",
|
|
8
|
+
"byteOffset": 5,
|
|
9
|
+
"byteLength": 6,
|
|
10
|
+
"bitOffset": 0,
|
|
11
|
+
"bitLength": 48,
|
|
12
|
+
"outType": "string"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "nfpkt",
|
|
16
|
+
"byteOffset": 11,
|
|
17
|
+
"byteLength": 2,
|
|
18
|
+
"bitOffset": 0,
|
|
19
|
+
"bitLength": 16,
|
|
20
|
+
"outType": "uint"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "rssi",
|
|
24
|
+
"byteOffset": 13,
|
|
25
|
+
"byteLength": 1,
|
|
26
|
+
"bitOffset": 0,
|
|
27
|
+
"bitLength": 8,
|
|
28
|
+
"outType": "uint"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "sensorId",
|
|
32
|
+
"byteOffset": 15,
|
|
33
|
+
"byteLength": 6,
|
|
34
|
+
"bitOffset": 0,
|
|
35
|
+
"bitLength": 48,
|
|
36
|
+
"outType": "string"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "sensorServiceId",
|
|
40
|
+
"byteOffset": 21,
|
|
41
|
+
"byteLength": 1,
|
|
42
|
+
"bitOffset": 0,
|
|
43
|
+
"bitLength": 8,
|
|
44
|
+
"outType": "uint"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "sensorUuidMsb",
|
|
48
|
+
"byteOffset": 22,
|
|
49
|
+
"byteLength": 1,
|
|
50
|
+
"bitOffset": 0,
|
|
51
|
+
"bitLength": 8,
|
|
52
|
+
"outType": "uint"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "sensorUuidLsb",
|
|
56
|
+
"byteOffset": 23,
|
|
57
|
+
"byteLength": 1,
|
|
58
|
+
"bitOffset": 0,
|
|
59
|
+
"bitLength": 8,
|
|
60
|
+
"outType": "uint"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "apiVersion",
|
|
64
|
+
"byteOffset": 24,
|
|
65
|
+
"byteLength": 1,
|
|
66
|
+
"bitOffset": 4,
|
|
67
|
+
"bitLength": 4,
|
|
68
|
+
"outType": "uint"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "scrambled",
|
|
72
|
+
"byteOffset": 24,
|
|
73
|
+
"byteLength": 1,
|
|
74
|
+
"bitOffset": 2,
|
|
75
|
+
"bitLength": 1,
|
|
76
|
+
"outType": "boolean"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "embedded",
|
|
80
|
+
"byteOffset": 24,
|
|
81
|
+
"byteLength": 1,
|
|
82
|
+
"bitOffset": 1,
|
|
83
|
+
"bitLength": 1,
|
|
84
|
+
"outType": "boolean"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "isSensor",
|
|
88
|
+
"byteOffset": 24,
|
|
89
|
+
"byteLength": 1,
|
|
90
|
+
"bitOffset": 0,
|
|
91
|
+
"bitLength": 1,
|
|
92
|
+
"outType": "boolean"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "pktId",
|
|
96
|
+
"byteOffset": 25,
|
|
97
|
+
"byteLength": 4,
|
|
98
|
+
"bitOffset": 0,
|
|
99
|
+
"bitLength": 32,
|
|
100
|
+
"outType": "string"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"versions": [
|
|
3
|
+
{
|
|
4
|
+
"version": "1",
|
|
5
|
+
"packetFields": [
|
|
6
|
+
{
|
|
7
|
+
"name": "groupId",
|
|
8
|
+
"byteOffset": 2,
|
|
9
|
+
"byteLength": 3,
|
|
10
|
+
"bitOffset": 0,
|
|
11
|
+
"bitLength": 24,
|
|
12
|
+
"outType": "uint"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "version",
|
|
16
|
+
"byteOffset": 5,
|
|
17
|
+
"byteLength": 1,
|
|
18
|
+
"bitOffset": 0,
|
|
19
|
+
"bitLength": 8,
|
|
20
|
+
"outType": "uint"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "msgType",
|
|
24
|
+
"byteOffset": 6,
|
|
25
|
+
"byteLength": 1,
|
|
26
|
+
"bitOffset": 0,
|
|
27
|
+
"bitLength": 8,
|
|
28
|
+
"outType": "uint"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "outputPower",
|
|
32
|
+
"byteOffset": 7,
|
|
33
|
+
"byteLength": 1,
|
|
34
|
+
"bitOffset": 0,
|
|
35
|
+
"bitLength": 8,
|
|
36
|
+
"outType": "int"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "antennaType",
|
|
40
|
+
"byteOffset": 8,
|
|
41
|
+
"byteLength": 1,
|
|
42
|
+
"bitOffset": 0,
|
|
43
|
+
"bitLength": 8,
|
|
44
|
+
"outType": "uint",
|
|
45
|
+
"map": {
|
|
46
|
+
"0":"2_4 Antenna",
|
|
47
|
+
"1":"Sub1g Antenna"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "txAntenna",
|
|
52
|
+
"byteOffset": 9,
|
|
53
|
+
"byteLength": 1,
|
|
54
|
+
"bitOffset": 0,
|
|
55
|
+
"bitLength": 8,
|
|
56
|
+
"outType": "uint"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "rxAntenna",
|
|
60
|
+
"byteOffset": 10,
|
|
61
|
+
"byteLength": 1,
|
|
62
|
+
"bitOffset": 0,
|
|
63
|
+
"bitLength": 8,
|
|
64
|
+
"outType": "uint"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "seqId",
|
|
68
|
+
"byteOffset": 11,
|
|
69
|
+
"byteLength": 1,
|
|
70
|
+
"bitOffset": 0,
|
|
71
|
+
"bitLength": 8,
|
|
72
|
+
"outType": "uint"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"versions": [
|
|
3
|
+
{
|
|
4
|
+
"version": "0",
|
|
5
|
+
"packetFields": [
|
|
6
|
+
{
|
|
7
|
+
"name": "tbc",
|
|
8
|
+
"byteOffset": 37,
|
|
9
|
+
"byteLength": 1,
|
|
10
|
+
"bitOffset": 0,
|
|
11
|
+
"bitLength": 8,
|
|
12
|
+
"outType": "uint"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "rssi",
|
|
16
|
+
"byteOffset": 38,
|
|
17
|
+
"byteLength": 1,
|
|
18
|
+
"bitOffset": 2,
|
|
19
|
+
"bitLength": 6,
|
|
20
|
+
"outType": "uint",
|
|
21
|
+
"calculations": [
|
|
22
|
+
{
|
|
23
|
+
"operator": "*",
|
|
24
|
+
"operand": 1
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"operator": "+",
|
|
28
|
+
"operand": 40
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "brgLatency",
|
|
34
|
+
"byteOffset": 38,
|
|
35
|
+
"byteLength": 1,
|
|
36
|
+
"bitOffset": 4,
|
|
37
|
+
"bitLength": 6,
|
|
38
|
+
"outType": "uint",
|
|
39
|
+
"calculations": [
|
|
40
|
+
{
|
|
41
|
+
"operator": "*",
|
|
42
|
+
"operand": 200
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"operator": "+",
|
|
46
|
+
"operand": 0
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "nfpkt",
|
|
52
|
+
"byteOffset": 39,
|
|
53
|
+
"byteLength": 1,
|
|
54
|
+
"bitOffset": 0,
|
|
55
|
+
"bitLength": 4,
|
|
56
|
+
"outType": "uint"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"versions": [
|
|
3
|
+
{
|
|
4
|
+
"version": "1",
|
|
5
|
+
"packetFields": [
|
|
6
|
+
{
|
|
7
|
+
"name": "tbc",
|
|
8
|
+
"byteOffset": 15,
|
|
9
|
+
"byteLength": 1,
|
|
10
|
+
"bitOffset": 0,
|
|
11
|
+
"bitLength": 8,
|
|
12
|
+
"outType": "uint"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "rssi",
|
|
16
|
+
"byteOffset": 16,
|
|
17
|
+
"byteLength": 1,
|
|
18
|
+
"bitOffset": 2,
|
|
19
|
+
"bitLength": 6,
|
|
20
|
+
"outType": "uint",
|
|
21
|
+
"calculations": [
|
|
22
|
+
{
|
|
23
|
+
"operator": "*",
|
|
24
|
+
"operand": 1
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"operator": "+",
|
|
28
|
+
"operand": 40
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "brgLatency",
|
|
34
|
+
"byteOffset": 16,
|
|
35
|
+
"byteLength": 1,
|
|
36
|
+
"bitOffset": 4,
|
|
37
|
+
"bitLength": 6,
|
|
38
|
+
"outType": "uint",
|
|
39
|
+
"calculations": [
|
|
40
|
+
{
|
|
41
|
+
"operator": "*",
|
|
42
|
+
"operand": 200
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"operator": "+",
|
|
46
|
+
"operand": 0
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "nfpkt",
|
|
52
|
+
"byteOffset": 17,
|
|
53
|
+
"byteLength": 1,
|
|
54
|
+
"bitOffset": 0,
|
|
55
|
+
"bitLength": 4,
|
|
56
|
+
"outType": "uint"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"version": "0",
|
|
62
|
+
"packetFields": [
|
|
63
|
+
{
|
|
64
|
+
"name": "nfpkt",
|
|
65
|
+
"byteOffset": 15,
|
|
66
|
+
"byteLength": 1,
|
|
67
|
+
"bitOffset": 0,
|
|
68
|
+
"bitLength": 8,
|
|
69
|
+
"outType": "uint"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "rssi",
|
|
73
|
+
"byteOffset": 16,
|
|
74
|
+
"byteLength": 1,
|
|
75
|
+
"bitOffset": 2,
|
|
76
|
+
"bitLength": 6,
|
|
77
|
+
"outType": "uint",
|
|
78
|
+
"calculations": [
|
|
79
|
+
{
|
|
80
|
+
"operator": "*",
|
|
81
|
+
"operand": 1
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"operator": "+",
|
|
85
|
+
"operand": 40
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "brgLatency",
|
|
91
|
+
"byteOffset": 16,
|
|
92
|
+
"byteLength": 1,
|
|
93
|
+
"bitOffset": 4,
|
|
94
|
+
"bitLength": 6,
|
|
95
|
+
"outType": "uint",
|
|
96
|
+
"calculations": [
|
|
97
|
+
{
|
|
98
|
+
"operator": "*",
|
|
99
|
+
"operand": 200
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"operator": "+",
|
|
103
|
+
"operand": 0
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
|
|
2
|
+
# generic
|
|
3
|
+
import sys
|
|
4
|
+
import os
|
|
5
|
+
sys.path.insert(0, os.path.abspath(".."))
|
|
6
|
+
import argparse
|
|
7
|
+
import glob
|
|
8
|
+
import datetime
|
|
9
|
+
import tabulate
|
|
10
|
+
import threading
|
|
11
|
+
# Local imports
|
|
12
|
+
from brg_certificate.cert_defines import *
|
|
13
|
+
from brg_certificate.cert_prints import *
|
|
14
|
+
from brg_certificate.wlt_types import *
|
|
15
|
+
from brg_certificate.cert_utils import *
|
|
16
|
+
import brg_certificate.cert_results as cert_results
|
|
17
|
+
import brg_certificate.cert_gw_sim as cert_gw_sim
|
|
18
|
+
import brg_certificate.cert_mqtt as cert_mqtt
|
|
19
|
+
import brg_certificate.cert_common as cert_common
|
|
20
|
+
|
|
21
|
+
TEST_LIST_FW_UPDATE_FILE = "ut/fw_update_test_list.txt"
|
|
22
|
+
CLEAN_PATTERNS = ['./tests/**/*.html', './tests/**/mqtt_log_*', './tests/**/*.pyc', './tests/**/*.csv']
|
|
23
|
+
|
|
24
|
+
os.system('')
|
|
25
|
+
|
|
26
|
+
def filter_tests(tests, run, drun):
|
|
27
|
+
if run:
|
|
28
|
+
tests = [t for t in tests if re.search(run, t.name)]
|
|
29
|
+
if drun:
|
|
30
|
+
tests = [t for t in tests if not re.search(drun, t.name)]
|
|
31
|
+
return tests
|
|
32
|
+
|
|
33
|
+
def get_important_tests_info():
|
|
34
|
+
patterns = ["DISCONNECTED", "WLT_ERROR", "free heap size", "python_mqtt_disconnect"]
|
|
35
|
+
return "".join([l.strip(' "') for l in open(os.path.join(BASE_DIR, CERT_MQTT_LOG_FILE)).readlines() if any([p in l for p in patterns])])
|
|
36
|
+
|
|
37
|
+
def skip_test_check(test, args):
|
|
38
|
+
skip_string = ""
|
|
39
|
+
if test.multi_brg and not test.brg1:
|
|
40
|
+
skip_string = f"Skipped {test.module_name} multi brg test because brg1 wasn't given"
|
|
41
|
+
elif args.skip_internal and test.internal_brg:
|
|
42
|
+
skip_string = f"Skipped {test.module_name} for internal brg because skip_internal flag is set"
|
|
43
|
+
elif test.active_brg and not test.active_brg.is_sup_cap(test):
|
|
44
|
+
skip_string = f"Skipped {test.module_name} because {module2name(test.test_module)} module is not supported"
|
|
45
|
+
if skip_string:
|
|
46
|
+
utPrint(f"{SEP}{skip_string}{SEP}", "WARNING")
|
|
47
|
+
test.reason = skip_string
|
|
48
|
+
test.rc = TEST_SKIPPED
|
|
49
|
+
return test
|
|
50
|
+
|
|
51
|
+
def tests_rtsa_update(tests):
|
|
52
|
+
# Init spectrum analyzer
|
|
53
|
+
rtsa_flag = False
|
|
54
|
+
for t in tests:
|
|
55
|
+
if "rtsa" in t.module_name:
|
|
56
|
+
if not rtsa_flag:
|
|
57
|
+
try:
|
|
58
|
+
ut_te = load_module('ut_te.py', 'ut/ut_te/ut_te.py')
|
|
59
|
+
except:
|
|
60
|
+
print("Unable to import UT's test equipment API (ut_te.py), check exceptions for necessary installations!")
|
|
61
|
+
try:
|
|
62
|
+
myObjTE = ut_te.StationEquipment().GetTEObject()
|
|
63
|
+
myRTSA = myObjTE['RTSA']
|
|
64
|
+
except:
|
|
65
|
+
print("No test equipment available!")
|
|
66
|
+
rtsa_flag = True
|
|
67
|
+
t.rtsa = myRTSA
|
|
68
|
+
|
|
69
|
+
def main(args):
|
|
70
|
+
args.gw = get_gw_id(args.gw)
|
|
71
|
+
|
|
72
|
+
utPrint(str(args.__dict__))
|
|
73
|
+
start_time = datetime.datetime.now()
|
|
74
|
+
|
|
75
|
+
# Clean
|
|
76
|
+
if os.path.exists(CERT_MQTT_LOG_FILE):
|
|
77
|
+
os.remove(CERT_MQTT_LOG_FILE)
|
|
78
|
+
if os.path.exists(DATA_SIM_LOG_FILE):
|
|
79
|
+
os.remove(DATA_SIM_LOG_FILE)
|
|
80
|
+
if args.clean:
|
|
81
|
+
for clean_pattern in CLEAN_PATTERNS:
|
|
82
|
+
for f in glob.glob(clean_pattern, recursive=True):
|
|
83
|
+
os.remove(f)
|
|
84
|
+
if not args.gw and not args.brg:
|
|
85
|
+
utPrint("Clean only - Done!")
|
|
86
|
+
sys.exit(0)
|
|
87
|
+
|
|
88
|
+
# Init mqtt client
|
|
89
|
+
mqttc = cert_mqtt.mqttc_init(args.gw, data=args.data)
|
|
90
|
+
|
|
91
|
+
# Run Gateway Simulator in separated thread if exists
|
|
92
|
+
gw_sim_thread = None
|
|
93
|
+
if GW_SIM_PREFIX in args.gw:
|
|
94
|
+
gw_sim_thread = threading.Thread(target=cert_gw_sim.gw_sim_run, daemon = True, kwargs={'port':args.port, 'gw_id': args.gw,
|
|
95
|
+
'analyze_interference':args.analyze_interference})
|
|
96
|
+
gw_sim_thread.start()
|
|
97
|
+
sleep_time = (len(cert_gw_sim.CHANNELS_TO_ANALYZE) * 30) + 15 if args.analyze_interference else 10
|
|
98
|
+
time.sleep(sleep_time)
|
|
99
|
+
|
|
100
|
+
# Collecting the tests
|
|
101
|
+
if args.latest or args.rc:
|
|
102
|
+
test_list = TEST_LIST_FW_UPDATE_FILE
|
|
103
|
+
else:
|
|
104
|
+
test_list = args.tl
|
|
105
|
+
|
|
106
|
+
# Prepare GW
|
|
107
|
+
if gw_sim_thread:
|
|
108
|
+
gw, internal_brg, gw_server, gw_version, protobuf = cert_gw_sim.prep_gw(args, mqttc, start_time)
|
|
109
|
+
else:
|
|
110
|
+
gw, internal_brg, gw_server, gw_version, protobuf = ut_prep_gw(args, mqttc, start_time)
|
|
111
|
+
|
|
112
|
+
brg0, brg1 = None, None
|
|
113
|
+
if args.brg:
|
|
114
|
+
brg0 = ut_prep_brg(args, mqttc, start_time, gw, args.brg, gw_server, protobuf)
|
|
115
|
+
if args.brg1:
|
|
116
|
+
brg1 = ut_prep_brg(args, mqttc, start_time, gw, args.brg1, gw_server, protobuf)
|
|
117
|
+
|
|
118
|
+
# Collecting the tests
|
|
119
|
+
tests = []
|
|
120
|
+
for l in open(os.path.join(BASE_DIR, test_list)).readlines():
|
|
121
|
+
if l.strip() and not l.strip().startswith("#"):
|
|
122
|
+
test = (WltTest(l.strip(), gw, mqttc, exit_on_param_failure=args.exit_on_param_failure, gw_lan=args.lan,
|
|
123
|
+
gw_orig_versions={BLE_VERSION:gw_version[BLE_VERSION], WIFI_VERSION:gw_version[WIFI_VERSION]},
|
|
124
|
+
server=gw_server, latest=args.latest, release_candidate=args.rc, private_setup=args.private_setup, internal_brg_obj=internal_brg,
|
|
125
|
+
gw_sim=gw_sim_thread, data=args.data, port=args.port, protobuf=protobuf))
|
|
126
|
+
test.brg0 = brg0
|
|
127
|
+
test.brg1 = brg1
|
|
128
|
+
if test.internal_brg and test.multi_brg:
|
|
129
|
+
test.brg1 = internal_brg
|
|
130
|
+
elif test.internal_brg and not test.multi_brg:
|
|
131
|
+
test.brg0 = internal_brg
|
|
132
|
+
elif not test.internal_brg and not test.gw_only and not test.brg0:
|
|
133
|
+
continue
|
|
134
|
+
test.active_brg = test.brg0
|
|
135
|
+
tests += [test]
|
|
136
|
+
tests = filter_tests(tests=tests, run=args.run, drun=args.drun)
|
|
137
|
+
|
|
138
|
+
# Init spectrum analyzer
|
|
139
|
+
tests_rtsa_update(tests)
|
|
140
|
+
|
|
141
|
+
# Running the tests
|
|
142
|
+
utPrint(SEP)
|
|
143
|
+
utPrint("\n - ".join([f"\nRunning {len(tests)} tests:"] + [t.name if not t.internal_brg else f"{t.name} (internal brg)" for t in tests]))
|
|
144
|
+
|
|
145
|
+
failures, skipped = 0, 0
|
|
146
|
+
exit_on_test_failure = args.exit_on_test_failure
|
|
147
|
+
i = 0
|
|
148
|
+
|
|
149
|
+
for i, test in enumerate(tests):
|
|
150
|
+
test_module_name = load_module(f'{test.module_name}.py', f'{test.dir}/{test.module_name}.py')
|
|
151
|
+
test = skip_test_check(test, args)
|
|
152
|
+
if test.rc == TEST_SKIPPED:
|
|
153
|
+
skipped += 1
|
|
154
|
+
else:
|
|
155
|
+
test = test_module_name.run(test)
|
|
156
|
+
test.update_overall_rc()
|
|
157
|
+
if test.rc == TEST_FAILED:
|
|
158
|
+
failures += 1
|
|
159
|
+
if "versions_test" in test.module_name and "EXITING UT" in test.reason:
|
|
160
|
+
exit_on_test_failure = True
|
|
161
|
+
print(f"Test Duration: {test.duration}")
|
|
162
|
+
print(tabulate.tabulate([[i+1, i+1-(failures+skipped), skipped, failures, len(tests)]],
|
|
163
|
+
headers=["FINISHED", "PASSED", "SKIPPED", "FAILED", "TOTAL"], tablefmt="pretty"))
|
|
164
|
+
cert_common.wait_time_n_print(2)
|
|
165
|
+
if exit_on_test_failure and test.rc == TEST_FAILED:
|
|
166
|
+
break
|
|
167
|
+
|
|
168
|
+
# Print results
|
|
169
|
+
print(SEP)
|
|
170
|
+
duration = (datetime.datetime.now()-start_time)
|
|
171
|
+
print("Tests duration: {}".format(str(duration).split(".")[0]))
|
|
172
|
+
brg_version = ''
|
|
173
|
+
if test.active_brg:
|
|
174
|
+
brg_version = test.active_brg.version
|
|
175
|
+
print("Bridge version: {}".format(brg_version))
|
|
176
|
+
print(cert_results.generate_tests_table(tests))
|
|
177
|
+
print(tabulate.tabulate([[i+1, i+1-(failures+skipped), skipped, failures, len(tests)]],
|
|
178
|
+
headers=["FINISHED", "PASSED", "SKIPPED", "FAILED", "TOTAL"], tablefmt="pretty"))
|
|
179
|
+
|
|
180
|
+
print(WIL_UT_TEXT)
|
|
181
|
+
print_warn(get_important_tests_info())
|
|
182
|
+
print_pass_or_fail(not failures, "Wiliot UT")
|
|
183
|
+
|
|
184
|
+
cert_results.generate_results_files(html=True, pdf=True, failures=failures, skipped=skipped, duration=duration, brg_version=brg_version,
|
|
185
|
+
tests=tests, pipeline=cert_common.pipeline_running())
|
|
186
|
+
|
|
187
|
+
if failures:
|
|
188
|
+
sys.exit(-1)
|
|
189
|
+
|
|
190
|
+
if __name__ == '__main__':
|
|
191
|
+
main()
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import os
|
|
3
|
+
sys.path.insert(0, os.path.abspath(".."))
|
|
4
|
+
from argparse import ArgumentParser
|
|
5
|
+
from brg_certificate.cert_defines import DATA_REAL_TAGS, DATA_SIMULATION
|
|
6
|
+
import brg_certificate.brg_certificate as brg_certificate
|
|
7
|
+
TEST_LIST_DEFAULT_FILE = "certificate_sanity_test_list.txt"
|
|
8
|
+
|
|
9
|
+
class BrgCertificateCLI:
|
|
10
|
+
"""Bridge Certificate CLI."""
|
|
11
|
+
def __init__(self):
|
|
12
|
+
self.parser = ArgumentParser(
|
|
13
|
+
description="Bridge Certificate CLI",
|
|
14
|
+
)
|
|
15
|
+
self.parser.add_argument('--brg', '-b', default="", help='Bridge id to run on the tests')
|
|
16
|
+
self.parser.add_argument('--brg1', '-b1', default="", help='Second bridge id to run on tests two bridges needed')
|
|
17
|
+
self.parser.add_argument('--gw', '-g', type=str, required=True, help='GW id to run on the test, SIM prefix is used for Gateway simulation')
|
|
18
|
+
self.parser.add_argument('--data', '-d', choices=[DATA_REAL_TAGS, DATA_SIMULATION], default=DATA_REAL_TAGS, help='Choose if data generated from real tags or by simulation')
|
|
19
|
+
self.parser.add_argument('--port', '-p', default='', help='Enable UT using UART connection for Gateway Simulation or Data Simulation')
|
|
20
|
+
self.parser.add_argument('--clean', default=False, action='store_true', help='Clean all logs')
|
|
21
|
+
self.parser.add_argument('--tl', type=str, help='Test list file to use', default=TEST_LIST_DEFAULT_FILE)
|
|
22
|
+
self.parser.add_argument('--run', type=str, help='String to filter tests to run')
|
|
23
|
+
self.parser.add_argument('--drun', type=str, help='String to filter tests not to run')
|
|
24
|
+
self.parser.add_argument('--exit_on_test_failure', default=False, action='store_true', help='Stop running the tests if a test failed')
|
|
25
|
+
self.parser.add_argument('--exit_on_param_failure', default=False, action='store_true', help='Sets exit_on_param_failure mode to true in order to prevent \
|
|
26
|
+
tests from continuing iteration over all possibilities in case of failure')
|
|
27
|
+
self.parser.add_argument('--analyze_interference', '-ai', default=False, action='store_true', help='Analyze interference before tests start \
|
|
28
|
+
(relevant only for Gateway Simulator)')
|
|
29
|
+
|
|
30
|
+
def parse_args(self, args=None):
|
|
31
|
+
"""Parse arguments and return them."""
|
|
32
|
+
return self.parser.parse_args(args)
|
|
33
|
+
|
|
34
|
+
def main():
|
|
35
|
+
cli = BrgCertificateCLI()
|
|
36
|
+
args = cli.parse_args()
|
|
37
|
+
# Set extra args to defaults
|
|
38
|
+
args.server = "prod"
|
|
39
|
+
args.lan = False
|
|
40
|
+
args.latest = False
|
|
41
|
+
args.rc = False
|
|
42
|
+
args.private_setup = False
|
|
43
|
+
args.skip_internal = False
|
|
44
|
+
brg_certificate.main(args)
|
|
45
|
+
|
|
46
|
+
if __name__ == '__main__':
|
|
47
|
+
main()
|