wiliot-certificate 4.4.0a1__py3-none-any.whl → 4.4.1__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/certificate_bcc_test_list.txt +0 -2
- brg_certificate/tests/calibration/interval_test/interval_test.json +1 -1
- brg_certificate/tests/calibration/interval_test/interval_test.py +2 -3
- brg_certificate/tests/calibration/output_power_test/output_power_test.json +1 -1
- brg_certificate/tests/calibration/output_power_test/output_power_test.py +2 -3
- brg_certificate/tests/calibration/pattern_test/pattern_test.json +1 -1
- brg_certificate/tests/calibration/pattern_test/pattern_test.py +4 -8
- brg_certificate/tests/datapath/aging_test/aging_test.py +3 -4
- brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.py +4 -7
- brg_certificate/tests/datapath/output_power_test/output_power_test.json +1 -1
- brg_certificate/tests/datapath/output_power_test/output_power_test.py +1 -3
- brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +1 -1
- brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +2 -3
- brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.py +1 -3
- brg_certificate/tests/datapath/pattern_test/pattern_test.json +1 -1
- brg_certificate/tests/datapath/pattern_test/pattern_test.py +1 -3
- brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +1 -1
- brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +1 -3
- brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +1 -1
- brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +1 -3
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.json +1 -1
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.py +2 -3
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +1 -1
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +2 -3
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.json +1 -1
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.py +2 -3
- brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +9 -6
- brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +9 -6
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +1 -1
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +17 -11
- brg_certificate/tests/datapath/stress_test/stress_test.json +1 -1
- brg_certificate/tests/datapath/stress_test/stress_test.py +15 -10
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.json +1 -1
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.py +2 -3
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +1 -1
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +1 -3
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.json +1 -1
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.py +1 -3
- brg_certificate/tests/energy2400/output_power_test/output_power_test.json +1 -1
- brg_certificate/tests/energy2400/output_power_test/output_power_test.py +1 -3
- brg_certificate/tests/energy2400/pattern_test/pattern_test.json +1 -1
- brg_certificate/tests/energy2400/pattern_test/pattern_test.py +1 -3
- brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +1 -1
- brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +2 -3
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.json +1 -1
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.py +1 -3
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +1 -1
- brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +2 -3
- brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.json +1 -1
- brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +1 -3
- brg_certificate/wltPb_pb2.py +4 -4
- brg_certificate/wltPb_pb2.pyi +2 -1
- gw_certificate/common/serialization_formatter.py +14 -1
- gw_certificate/interface/4.4.91_app.zip +0 -0
- gw_certificate/interface/{4.4.88_sd_bl_app.zip → 4.4.91_sd_bl_app.zip} +0 -0
- gw_certificate/interface/flash_fw.py +90 -0
- gw_certificate/interface/uart_if.py +1 -1
- gw_certificate/tests/actions.py +1 -1
- gw_certificate/tests/downlink.py +2 -2
- gw_certificate/tests/generic.py +4 -3
- gw_certificate/tests/static/generated_packet_table.py +16 -16
- gw_certificate/tests/static/packet_table.csv +10052 -10052
- gw_certificate/tests/static/uplink_defines.py +1 -1
- gw_certificate/tests/throughput.py +1 -1
- gw_certificate/tests/uplink.py +38 -19
- {wiliot_certificate-4.4.0a1.dist-info → wiliot_certificate-4.4.1.dist-info}/METADATA +71 -30
- {wiliot_certificate-4.4.0a1.dist-info → wiliot_certificate-4.4.1.dist-info}/RECORD +71 -70
- {wiliot_certificate-4.4.0a1.dist-info → wiliot_certificate-4.4.1.dist-info}/WHEEL +1 -1
- gw_certificate/interface/4.4.88_app.zip +0 -0
- {wiliot_certificate-4.4.0a1.dist-info → wiliot_certificate-4.4.1.dist-info}/entry_points.txt +0 -0
- {wiliot_certificate-4.4.0a1.dist-info → wiliot_certificate-4.4.1.dist-info}/licenses/LICENSE +0 -0
- {wiliot_certificate-4.4.0a1.dist-info → wiliot_certificate-4.4.1.dist-info}/top_level.txt +0 -0
|
@@ -23,8 +23,6 @@ def run(test):
|
|
|
23
23
|
if test.rc == TEST_FAILED:
|
|
24
24
|
if test.exit_on_param_failure:
|
|
25
25
|
break # break the whole for loop and keep the test as failed
|
|
26
|
-
|
|
27
|
-
test.reset_result() # reset result and continue to next param
|
|
28
|
-
continue
|
|
26
|
+
test.reset_result() # reset result and continue to next param
|
|
29
27
|
|
|
30
28
|
return cert_common.test_epilog(test, revert_brgs=True, modules=[energy2400_module])
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"For each supported value - configure the BRG and verify the value",
|
|
9
9
|
"Test epilog and revert to defaults"],
|
|
10
10
|
"expectedOutcome": "All values configured successfully",
|
|
11
|
-
"mandatory":
|
|
11
|
+
"mandatory": 0,
|
|
12
12
|
"multiBridgeTest": 0,
|
|
13
13
|
"gwOnlyTest": 0,
|
|
14
14
|
"internalBridge": 1,
|
|
@@ -24,8 +24,6 @@ def run(test):
|
|
|
24
24
|
if test.rc == TEST_FAILED:
|
|
25
25
|
if test.exit_on_param_failure:
|
|
26
26
|
break # break the whole for loop and keep the test as failed
|
|
27
|
-
|
|
28
|
-
test.reset_result() # reset result and continue to next param
|
|
29
|
-
continue
|
|
27
|
+
test.reset_result() # reset result and continue to next param
|
|
30
28
|
|
|
31
29
|
return cert_common.test_epilog(test, revert_brgs=True, modules=[energy2400_module])
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"For each supported value - configure the BRG and verify the value",
|
|
9
9
|
"Test epilog and revert to defaults"],
|
|
10
10
|
"expectedOutcome": "All values configured successfully",
|
|
11
|
-
"mandatory":
|
|
11
|
+
"mandatory": 0,
|
|
12
12
|
"multiBridgeTest": 0,
|
|
13
13
|
"gwOnlyTest": 0,
|
|
14
14
|
"internalBridge": 1,
|
|
@@ -23,7 +23,6 @@ def run(test):
|
|
|
23
23
|
if test.rc == TEST_FAILED:
|
|
24
24
|
if test.exit_on_param_failure:
|
|
25
25
|
break # break the whole for loop and keep the test as failed
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
continue
|
|
26
|
+
test.reset_result() # reset result and continue to next param
|
|
27
|
+
|
|
29
28
|
return cert_common.test_epilog(test, revert_brgs=True, modules=[sub1g_module])
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"For each supported value - configure the BRG and verify the value",
|
|
9
9
|
"Test epilog and revert to defaults"],
|
|
10
10
|
"expectedOutcome": "All values configured successfully",
|
|
11
|
-
"mandatory":
|
|
11
|
+
"mandatory": 0,
|
|
12
12
|
"multiBridgeTest": 0,
|
|
13
13
|
"gwOnlyTest": 0,
|
|
14
14
|
"internalBridge": 1,
|
|
@@ -22,8 +22,6 @@ def run(test):
|
|
|
22
22
|
if test.rc == TEST_FAILED:
|
|
23
23
|
if test.exit_on_param_failure:
|
|
24
24
|
break # break the whole for loop and keep the test as failed
|
|
25
|
-
|
|
26
|
-
test.reset_result() # reset result and continue to next param
|
|
27
|
-
continue
|
|
25
|
+
test.reset_result() # reset result and continue to next param
|
|
28
26
|
|
|
29
27
|
return cert_common.test_epilog(test, revert_brgs=True, modules=[sub1g_module])
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"For each supported value - configure the BRG and verify the value",
|
|
9
9
|
"Test epilog and revert to defaults"],
|
|
10
10
|
"expectedOutcome": "All values configured successfully",
|
|
11
|
-
"mandatory":
|
|
11
|
+
"mandatory": 0,
|
|
12
12
|
"multiBridgeTest": 0,
|
|
13
13
|
"gwOnlyTest": 0,
|
|
14
14
|
"internalBridge": 1,
|
|
@@ -23,7 +23,6 @@ def run(test):
|
|
|
23
23
|
if test.rc == TEST_FAILED:
|
|
24
24
|
if test.exit_on_param_failure:
|
|
25
25
|
break # break the whole for loop and keep the test as failed
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
continue
|
|
26
|
+
test.reset_result() # reset result and continue to next param
|
|
27
|
+
|
|
29
28
|
return cert_common.test_epilog(test, revert_brgs=True, modules=[sub1g_module])
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "External Sensors",
|
|
3
3
|
"module": "BLE Sensor",
|
|
4
4
|
"purpose": "Verify the external_sensor module functionality - configuration, data collection and data transmission.",
|
|
5
|
-
"documentation": "<
|
|
5
|
+
"documentation": "<https://community.wiliot.com/customers/s/article/Wiliot-Network-Bridge-Modular-Architecture>",
|
|
6
6
|
"initialCondition": "Bridge configured to defaults",
|
|
7
7
|
"procedure": ["Test prolog",
|
|
8
8
|
"tag_data_only - No external sensor configured, only tag data is expected.",
|
|
@@ -296,9 +296,7 @@ def run(test):
|
|
|
296
296
|
if test.rc == TEST_FAILED:
|
|
297
297
|
if test.exit_on_param_failure:
|
|
298
298
|
break # break the whole for loop and keep the test as failed
|
|
299
|
-
|
|
300
|
-
test.reset_result() # reset result and continue to next param
|
|
301
|
-
continue
|
|
299
|
+
test.reset_result() # reset result and continue to next param
|
|
302
300
|
|
|
303
301
|
# Kill the ble simulator
|
|
304
302
|
if test.data == DATA_SIMULATION:
|
brg_certificate/wltPb_pb2.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
4
|
# source: wltPb.proto
|
|
5
|
-
# Protobuf Python Version:
|
|
5
|
+
# Protobuf Python Version: 6.30.2
|
|
6
6
|
"""Generated protocol buffer code."""
|
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
|
8
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
@@ -11,9 +11,9 @@ from google.protobuf import symbol_database as _symbol_database
|
|
|
11
11
|
from google.protobuf.internal import builder as _builder
|
|
12
12
|
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
13
|
_runtime_version.Domain.PUBLIC,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
6,
|
|
15
|
+
30,
|
|
16
|
+
2,
|
|
17
17
|
'',
|
|
18
18
|
'wltPb.proto'
|
|
19
19
|
)
|
brg_certificate/wltPb_pb2.pyi
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
from google.protobuf.internal import containers as _containers
|
|
2
2
|
from google.protobuf import descriptor as _descriptor
|
|
3
3
|
from google.protobuf import message as _message
|
|
4
|
-
from
|
|
4
|
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
|
5
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
5
6
|
|
|
6
7
|
DESCRIPTOR: _descriptor.FileDescriptor
|
|
7
8
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
from enum import Enum
|
|
3
3
|
from google.protobuf.json_format import MessageToDict, Parse, ParseError, ParseDict
|
|
4
|
+
import base64
|
|
4
5
|
|
|
5
6
|
from gw_certificate.interface.mqtt import Serialization
|
|
6
7
|
from gw_certificate.interface.if_defines import LOCATION
|
|
@@ -24,6 +25,9 @@ class SerializationFormatter():
|
|
|
24
25
|
def __init__(self, serialization:Serialization):
|
|
25
26
|
self.serialization = serialization
|
|
26
27
|
|
|
28
|
+
def is_pb(self):
|
|
29
|
+
return self.serialization == Serialization.PB
|
|
30
|
+
|
|
27
31
|
def cfg_param_set(self, received_status_msg: dict, param: Configurable, value):
|
|
28
32
|
'''
|
|
29
33
|
Since configuration paramters change between partners, we must use a received_status_msg to keep every parameter as is.
|
|
@@ -77,4 +81,13 @@ class SerializationFormatter():
|
|
|
77
81
|
# JSON
|
|
78
82
|
cfg_msg.setdefault(GW_CONF, {}).setdefault(ADDITIONAL, {})[param] = value
|
|
79
83
|
debug_print(cfg_msg)
|
|
80
|
-
return cfg_msg
|
|
84
|
+
return cfg_msg
|
|
85
|
+
|
|
86
|
+
def pb_status_acl_bytes_to_hex_string(self, msg: dict) -> dict:
|
|
87
|
+
brg_ids_bytes = msg.get('config', {}).get('accessControlList', {}).get('aclValue', {}).get('ids', {})
|
|
88
|
+
brg_ids_ascii = []
|
|
89
|
+
for brg_id in brg_ids_bytes:
|
|
90
|
+
brg_ids_ascii.append(base64.b64decode(brg_id).hex().upper())
|
|
91
|
+
if len(brg_ids_ascii) > 0:
|
|
92
|
+
msg['config']['accessControlList']['aclValue']['ids'] = brg_ids_ascii
|
|
93
|
+
return msg
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import serial
|
|
3
|
+
import time
|
|
4
|
+
import argparse
|
|
5
|
+
import subprocess
|
|
6
|
+
import serial.tools.list_ports
|
|
7
|
+
import datetime
|
|
8
|
+
import tkinter as tk
|
|
9
|
+
from tkinter import filedialog
|
|
10
|
+
SEP = "#"*100
|
|
11
|
+
|
|
12
|
+
NRFUTIL_MAP = {"linux": "nrfutil-linux", "linux2": "nrfutil-linux", "darwin": "nrfutil-mac", "win32": ".\\nrfutil.exe"}
|
|
13
|
+
|
|
14
|
+
def read_from_ble(ble_ser):
|
|
15
|
+
ble_ser_bytes = ble_ser.readline()
|
|
16
|
+
input = ble_ser_bytes.decode("utf-8", "ignore").strip()
|
|
17
|
+
if input:
|
|
18
|
+
print(input)
|
|
19
|
+
return input
|
|
20
|
+
|
|
21
|
+
class Command:
|
|
22
|
+
def __init__(self, cmd, expected, delay=0):
|
|
23
|
+
self.cmd = cmd
|
|
24
|
+
self.cmd_exec = b'\r\n!'+bytes(cmd, encoding='utf-8')+b'\r\n'
|
|
25
|
+
self.expected = expected
|
|
26
|
+
self.delay = delay
|
|
27
|
+
def exec_cmd(self, ble_ser):
|
|
28
|
+
print("==>> !{}".format(self.cmd))
|
|
29
|
+
ble_ser.write(self.cmd_exec)
|
|
30
|
+
start_time = datetime.datetime.now()
|
|
31
|
+
while (datetime.datetime.now() - start_time).seconds < 2:
|
|
32
|
+
if self.expected in read_from_ble(ble_ser):
|
|
33
|
+
print("success!\n{}".format(SEP))
|
|
34
|
+
return 0
|
|
35
|
+
print("failure!\n{}".format(SEP))
|
|
36
|
+
return 1
|
|
37
|
+
|
|
38
|
+
GW_COMMANDS = [
|
|
39
|
+
Command(cmd="version", expected="WILIOT_GW_BLE_CHIP_SW_VER"),
|
|
40
|
+
Command(cmd="move_to_bootloader", expected='')
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
def run_cmd(cmd):
|
|
44
|
+
print("Running: " + cmd)
|
|
45
|
+
p = subprocess.Popen(cmd, shell=True)
|
|
46
|
+
p.wait()
|
|
47
|
+
if p.returncode:
|
|
48
|
+
print(f"\nFailed running : {cmd}\n")
|
|
49
|
+
sys.exit(-1)
|
|
50
|
+
else:
|
|
51
|
+
print(f"\nSuccess running : {cmd}\n")
|
|
52
|
+
|
|
53
|
+
def main():
|
|
54
|
+
|
|
55
|
+
ports = serial.tools.list_ports.comports()
|
|
56
|
+
print(SEP + "\nAvailable ports:")
|
|
57
|
+
for port, desc, hwid in sorted(ports):
|
|
58
|
+
print("{}: {} [{}]".format(port, desc, hwid))
|
|
59
|
+
print(SEP + "\n")
|
|
60
|
+
|
|
61
|
+
parser = argparse.ArgumentParser(description='Used to load gw image')
|
|
62
|
+
parser.add_argument('--p', type=str, help='COM for the ble - meaning loading gw zip file from UART')
|
|
63
|
+
args = parser.parse_args()
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
if args.p:
|
|
67
|
+
ble_ser = serial.Serial(port=args.p, baudrate=921600, timeout=0.1)
|
|
68
|
+
ble_ser.flushInput()
|
|
69
|
+
|
|
70
|
+
failures = 0
|
|
71
|
+
|
|
72
|
+
for cmd in GW_COMMANDS:
|
|
73
|
+
failures += cmd.exec_cmd(ble_ser)
|
|
74
|
+
time.sleep(cmd.delay)
|
|
75
|
+
if failures == 0:
|
|
76
|
+
ble_ser.close()
|
|
77
|
+
time.sleep(2)
|
|
78
|
+
print("Please pick a file! (<X.Y.Z>_app.zip)")
|
|
79
|
+
root = tk.Tk()
|
|
80
|
+
root.withdraw()
|
|
81
|
+
file_path = filedialog.askopenfilename()
|
|
82
|
+
print(file_path)
|
|
83
|
+
cmd = f'{NRFUTIL_MAP[sys.platform]} dfu serial --package "{file_path}" -p {args.p} -fc 0 -b 115200 -t 10'
|
|
84
|
+
run_cmd(cmd)
|
|
85
|
+
else:
|
|
86
|
+
print("ERROR: failed to run UART commands!")
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
if __name__ == "__main__":
|
|
90
|
+
main()
|
|
@@ -12,7 +12,7 @@ import pkg_resources
|
|
|
12
12
|
from gw_certificate.common.debug import debug_print
|
|
13
13
|
from gw_certificate.interface.if_defines import *
|
|
14
14
|
|
|
15
|
-
LATEST_VERSION = '4.4.
|
|
15
|
+
LATEST_VERSION = '4.4.91'
|
|
16
16
|
LATEST_VERSION_FILE = f'{LATEST_VERSION}_sd_bl_app.zip'
|
|
17
17
|
LATEST_VERSION_PATH = pkg_resources.resource_filename(__name__, LATEST_VERSION_FILE)
|
|
18
18
|
LATEST_VERSION_FILE_APP = f'{LATEST_VERSION}_app.zip'
|
gw_certificate/tests/actions.py
CHANGED
|
@@ -131,7 +131,7 @@ class BridgeOTAStage(GenericActionsStage):
|
|
|
131
131
|
self.error_summary = "Bridge wasn't upgraded."
|
|
132
132
|
self.action = "Bridge Upgrade"
|
|
133
133
|
|
|
134
|
-
OTA_VERSIONS_TO_USE = ("4.4.
|
|
134
|
+
OTA_VERSIONS_TO_USE = ("4.4.91", "4.4.92")
|
|
135
135
|
if version.parse(OTA_VERSIONS_TO_USE[0]) != self.uart.fw_version:
|
|
136
136
|
self.desired_version = version.parse(OTA_VERSIONS_TO_USE[0])
|
|
137
137
|
else:
|
gw_certificate/tests/downlink.py
CHANGED
|
@@ -92,7 +92,7 @@ class GenericDownlinkStage(GenericStage):
|
|
|
92
92
|
slope = channel_trendline.params[1]
|
|
93
93
|
rsquared = channel_trendline.rsquared
|
|
94
94
|
# Determine Channel Pass
|
|
95
|
-
channel_pass, channel_err_summary = PassCriteria.calc_for_stage_downlink(rsquared, slope, self.stage_name)
|
|
95
|
+
channel_pass, channel_err_summary = PassCriteria.calc_for_stage_downlink(rsquared, slope, self.stage_name, sum(channel_pkts['num_pkts_received']))
|
|
96
96
|
if channel_pass < self.stage_pass:
|
|
97
97
|
self.stage_pass = channel_pass
|
|
98
98
|
self.error_summary = channel_err_summary
|
|
@@ -102,7 +102,7 @@ class GenericDownlinkStage(GenericStage):
|
|
|
102
102
|
self.add_to_stage_report(f"- R Value: {rsquared} | Slope: {slope}")
|
|
103
103
|
# Export all stage data
|
|
104
104
|
self.sent_pkts.to_csv(self.sent_csv_path)
|
|
105
|
-
self.add_to_stage_report(f'
|
|
105
|
+
self.add_to_stage_report(f'\nSent data saved - {self.sent_csv_path}')
|
|
106
106
|
self.sniffed_pkts.to_csv(self.sniffed_csv_path)
|
|
107
107
|
self.add_to_stage_report(f'Sniffed data saved - {self.sniffed_csv_path}')
|
|
108
108
|
fig.write_html(self.graph_html_path)
|
gw_certificate/tests/generic.py
CHANGED
|
@@ -40,16 +40,16 @@ class PassCriteria():
|
|
|
40
40
|
return 'Fail'
|
|
41
41
|
|
|
42
42
|
@staticmethod
|
|
43
|
-
def calc_for_stage_downlink(rsquared, slope, stage_name:str):
|
|
43
|
+
def calc_for_stage_downlink(rsquared, slope, stage_name:str, pkts_received):
|
|
44
44
|
error_msg = ''
|
|
45
45
|
if 'Sanity' in stage_name:
|
|
46
|
-
if
|
|
46
|
+
if pkts_received > 0:
|
|
47
47
|
return PERFECT_SCORE, error_msg
|
|
48
48
|
else:
|
|
49
49
|
error_msg = 'No advertisements were received from the gateway.'
|
|
50
50
|
return MINIMUM_SCORE, error_msg
|
|
51
51
|
else:
|
|
52
|
-
if rsquared > 0.
|
|
52
|
+
if rsquared > 0.7 and slope > 0:
|
|
53
53
|
return PERFECT_SCORE, error_msg
|
|
54
54
|
elif rsquared > 0.5 and slope > 0:
|
|
55
55
|
error_msg = "The correlation between 'txMaxDuration' and the board advertisements is suboptimal."
|
|
@@ -207,6 +207,7 @@ class GenericStage():
|
|
|
207
207
|
# self.stage_pass = MINIMUM_SCORE
|
|
208
208
|
# self.error_summary += "Invalid serialization-topic combination. "
|
|
209
209
|
self.add_to_stage_report(f'Note: Received message on {invalid_topic} although serialization is {self.mqttc.get_serialization()}')
|
|
210
|
+
self.add_report_line_separator()
|
|
210
211
|
|
|
211
212
|
def score_pass(self):
|
|
212
213
|
if self.stage_pass >= self.pass_min:
|
|
@@ -134,22 +134,22 @@ class GeneratedPacketTable:
|
|
|
134
134
|
|
|
135
135
|
def _acl_data(df):
|
|
136
136
|
hardcoded_data = [
|
|
137
|
-
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "
|
|
138
|
-
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "
|
|
139
|
-
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "
|
|
140
|
-
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "
|
|
141
|
-
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "
|
|
142
|
-
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "
|
|
143
|
-
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "
|
|
144
|
-
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "
|
|
145
|
-
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "
|
|
146
|
-
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "
|
|
147
|
-
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "
|
|
148
|
-
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "
|
|
149
|
-
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "
|
|
150
|
-
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "
|
|
151
|
-
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "
|
|
152
|
-
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "
|
|
137
|
+
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "1659CAFE65E31E16C6FC00003F020AD2A365FECA5916095E9101FF1104EB0958D400110100", "payload": "C6FC00003F020AD2A365FECA5916095E9101FF1104EB0958D400110100", "si": "", "bridge_id": "A365FECA5916", "adva": "1659CAFE65E3", "pkt_id": "00110100"},
|
|
138
|
+
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "1A59C6FE65E31E16C6FC00003F020AD2A365FEC6591A095E9101FF1104EB0958D400110100", "payload": "C6FC00003F020AD2A365FEC6591A095E9101FF1104EB0958D400110100", "si": "", "bridge_id": "A365FEC6591A", "adva": "1A59C6FE65E3", "pkt_id": "00110100"},
|
|
139
|
+
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "1659CAFE65E31E16C6FC00003F020AD3A365FECA5916095E9101FF1104EB0958D400110101", "payload": "C6FC00003F020AD3A365FECA5916095E9101FF1104EB0958D400110101", "si": "", "bridge_id": "A365FECA5916", "adva": "1659CAFE65E3", "pkt_id": "00110101"},
|
|
140
|
+
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "1A59C6FE65E31E16C6FC00003F020AD3A365FEC6591A095E9101FF1104EB0958D400110101", "payload": "C6FC00003F020AD3A365FEC6591A095E9101FF1104EB0958D400110101", "si": "", "bridge_id": "A365FEC6591A", "adva": "1A59C6FE65E3", "pkt_id": "00110101"},
|
|
141
|
+
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "1659CAFE65E31E16C6FC00003F020AD4A365FECA5916095E9101FF1104EB0958D400110102", "payload": "C6FC00003F020AD4A365FECA5916095E9101FF1104EB0958D400110102", "si": "", "bridge_id": "A365FECA5916", "adva": "1659CAFE65E3", "pkt_id": "00110102"},
|
|
142
|
+
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "1A59C6FE65E31E16C6FC00003F020AD4A365FEC6591A095E9101FF1104EB0958D400110102", "payload": "C6FC00003F020AD4A365FEC6591A095E9101FF1104EB0958D400110102", "si": "", "bridge_id": "A365FEC6591A", "adva": "1A59C6FE65E3", "pkt_id": "00110102"},
|
|
143
|
+
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "1659CAFE65E31E16C6FC00003F020AD5A365FECA5916095E9101FF1104EB0958D400110103", "payload": "C6FC00003F020AD5A365FECA5916095E9101FF1104EB0958D400110103", "si": "", "bridge_id": "A365FECA5916", "adva": "1659CAFE65E3", "pkt_id": "00110103"},
|
|
144
|
+
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "1A59C6FE65E31E16C6FC00003F020AD5A365FEC6591A095E9101FF1104EB0958D400110103", "payload": "C6FC00003F020AD5A365FEC6591A095E9101FF1104EB0958D400110103", "si": "", "bridge_id": "A365FEC6591A", "adva": "1A59C6FE65E3", "pkt_id": "00110103"},
|
|
145
|
+
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "1659CAFE65E31E16C6FC00003F020AD6A365FECA5916095E9101FF1104EB0958D400110104", "payload": "C6FC00003F020AD6A365FECA5916095E9101FF1104EB0958D400110104", "si": "", "bridge_id": "A365FECA5916", "adva": "1659CAFE65E3", "pkt_id": "00110104"},
|
|
146
|
+
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "1A59C6FE65E31E16C6FC00003F020AD6A365FEC6591A095E9101FF1104EB0958D400110104", "payload": "C6FC00003F020AD6A365FEC6591A095E9101FF1104EB0958D400110104", "si": "", "bridge_id": "A365FEC6591A", "adva": "1A59C6FE65E3", "pkt_id": "00110104"},
|
|
147
|
+
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "1659CAFE65E31E16C6FC00003F020AD7A365FECA5916095E9101FF1104EB0958D400110105", "payload": "C6FC00003F020AD7A365FECA5916095E9101FF1104EB0958D400110105", "si": "", "bridge_id": "A365FECA5916", "adva": "1659CAFE65E3", "pkt_id": "00110105"},
|
|
148
|
+
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "1A59C6FE65E31E16C6FC00003F020AD7A365FEC6591A095E9101FF1104EB0958D400110105", "payload": "C6FC00003F020AD7A365FEC6591A095E9101FF1104EB0958D400110105", "si": "", "bridge_id": "A365FEC6591A", "adva": "1A59C6FE65E3", "pkt_id": "00110105"},
|
|
149
|
+
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "1659CAFE65E31E16C6FC00003F020AD8A365FECA5916095E9101FF1104EB0958D400110106", "payload": "C6FC00003F020AD8A365FECA5916095E9101FF1104EB0958D400110106", "si": "", "bridge_id": "A365FECA5916", "adva": "1659CAFE65E3", "pkt_id": "00110106"},
|
|
150
|
+
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "1A59C6FE65E31E16C6FC00003F020AD8A365FEC6591A095E9101FF1104EB0958D400110106", "payload": "C6FC00003F020AD8A365FEC6591A095E9101FF1104EB0958D400110106", "si": "", "bridge_id": "A365FEC6591A", "adva": "1A59C6FE65E3", "pkt_id": "00110106"},
|
|
151
|
+
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "1659CAFE65E31E16C6FC00003F020AD9A365FECA5916095E9101FF1104EB0958D400110107", "payload": "C6FC00003F020AD9A365FECA5916095E9101FF1104EB0958D400110107", "si": "", "bridge_id": "A365FECA5916", "adva": "1659CAFE65E3", "pkt_id": "00110107"},
|
|
152
|
+
{"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "1A59C6FE65E31E16C6FC00003F020AD9A365FEC6591A095E9101FF1104EB0958D400110107", "payload": "C6FC00003F020AD9A365FEC6591A095E9101FF1104EB0958D400110107", "si": "", "bridge_id": "A365FEC6591A", "adva": "1A59C6FE65E3", "pkt_id": "00110107"},
|
|
153
153
|
]
|
|
154
154
|
|
|
155
155
|
hardcoded_df = pd.DataFrame(hardcoded_data)
|