wiliot-certificate 1.5.3a1__py3-none-any.whl → 4.4.0__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.
Files changed (99) hide show
  1. brg_certificate/ag/energous_v0_defines.py +105 -114
  2. brg_certificate/ag/energous_v1_defines.py +105 -114
  3. brg_certificate/ag/energous_v2_defines.py +105 -114
  4. brg_certificate/ag/energous_v3_defines.py +105 -114
  5. brg_certificate/ag/energous_v4_defines.py +105 -114
  6. brg_certificate/ag/fanstel_lan_v0_defines.py +105 -114
  7. brg_certificate/ag/fanstel_lte_v0_defines.py +105 -114
  8. brg_certificate/ag/fanstel_wifi_v0_defines.py +105 -114
  9. brg_certificate/ag/minew_lte_v0_defines.py +105 -114
  10. brg_certificate/ag/wlt_types.html +980 -147
  11. brg_certificate/ag/wlt_types_ag.py +1318 -240
  12. brg_certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +69 -0
  13. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +101 -0
  14. brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +45 -0
  15. brg_certificate/ag/wlt_types_ag_jsons/calibration.json +75 -0
  16. brg_certificate/ag/wlt_types_ag_jsons/custom.json +99 -0
  17. brg_certificate/ag/wlt_types_ag_jsons/datapath.json +133 -8
  18. brg_certificate/ag/wlt_types_ag_jsons/energy2400.json +99 -0
  19. brg_certificate/ag/wlt_types_ag_jsons/energySub1g.json +96 -0
  20. brg_certificate/ag/wlt_types_ag_jsons/externalSensor.json +113 -0
  21. brg_certificate/ag/wlt_types_ag_jsons/interface.json +157 -0
  22. brg_certificate/ag/wlt_types_ag_jsons/powerManagement.json +205 -0
  23. brg_certificate/certificate_bcc_test_list.txt +0 -2
  24. brg_certificate/certificate_test_list.txt +2 -2
  25. brg_certificate/tests/calibration/interval_test/interval_test.json +1 -1
  26. brg_certificate/tests/calibration/interval_test/interval_test.py +4 -4
  27. brg_certificate/tests/calibration/output_power_test/output_power_test.json +1 -1
  28. brg_certificate/tests/calibration/output_power_test/output_power_test.py +4 -4
  29. brg_certificate/tests/calibration/pattern_test/pattern_test.json +1 -1
  30. brg_certificate/tests/calibration/pattern_test/pattern_test.py +14 -8
  31. brg_certificate/tests/datapath/aging_test/aging_test.py +9 -8
  32. brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.py +7 -12
  33. brg_certificate/tests/datapath/output_power_test/output_power_test.json +1 -1
  34. brg_certificate/tests/datapath/output_power_test/output_power_test.py +4 -4
  35. brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.json +1 -1
  36. brg_certificate/tests/datapath/pacer_interval_ble5_test/pacer_interval_ble5_test.py +10 -6
  37. brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +10 -3
  38. brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.py +9 -9
  39. brg_certificate/tests/datapath/pattern_test/pattern_test.json +1 -1
  40. brg_certificate/tests/datapath/pattern_test/pattern_test.py +4 -5
  41. brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.json +1 -1
  42. brg_certificate/tests/datapath/pkt_filter_ble5_test/pkt_filter_ble5_test.py +10 -9
  43. brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.json +1 -1
  44. brg_certificate/tests/datapath/pkt_filter_gen3_test/pkt_filter_gen3_test.py +10 -9
  45. brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.json +1 -1
  46. brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.py +10 -9
  47. brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +1 -1
  48. brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +10 -9
  49. brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.json +1 -1
  50. brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.py +4 -5
  51. brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +38 -36
  52. brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +45 -45
  53. brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +2 -3
  54. brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +20 -16
  55. brg_certificate/tests/datapath/stress_test/stress_test.json +2 -3
  56. brg_certificate/tests/datapath/stress_test/stress_test.py +19 -16
  57. brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.json +1 -1
  58. brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.py +11 -9
  59. brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +1 -1
  60. brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +4 -4
  61. brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.json +1 -1
  62. brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.py +4 -4
  63. brg_certificate/tests/energy2400/output_power_test/output_power_test.json +1 -1
  64. brg_certificate/tests/energy2400/output_power_test/output_power_test.py +4 -4
  65. brg_certificate/tests/energy2400/pattern_test/pattern_test.json +1 -1
  66. brg_certificate/tests/energy2400/pattern_test/pattern_test.py +4 -4
  67. brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +6 -4
  68. brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.json +1 -1
  69. brg_certificate/tests/energy_sub1g/duty_cycle_test/duty_cycle_test.py +4 -4
  70. brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.json +1 -1
  71. brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.py +4 -4
  72. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.json +1 -1
  73. brg_certificate/tests/energy_sub1g/signal_indicator_test/signal_indicator_test.py +4 -4
  74. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.json +1 -1
  75. brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +4 -5
  76. brg_certificate/wltPb_pb2.py +4 -4
  77. brg_certificate/wltPb_pb2.pyi +2 -1
  78. gw_certificate/common/serialization_formatter.py +14 -1
  79. gw_certificate/common/wltPb_pb2.py +4 -4
  80. gw_certificate/common/wltPb_pb2.pyi +2 -1
  81. gw_certificate/interface/{4.4.82_app.zip → 4.4.91_app.zip} +0 -0
  82. gw_certificate/interface/{4.4.82_sd_bl_app.zip → 4.4.91_sd_bl_app.zip} +0 -0
  83. gw_certificate/interface/ble_simulator.py +5 -3
  84. gw_certificate/interface/flash_fw.py +90 -0
  85. gw_certificate/interface/uart_if.py +6 -4
  86. gw_certificate/tests/actions.py +1 -1
  87. gw_certificate/tests/downlink.py +2 -2
  88. gw_certificate/tests/generic.py +4 -3
  89. gw_certificate/tests/static/generated_packet_table.py +16 -16
  90. gw_certificate/tests/static/packet_table.csv +10052 -10052
  91. gw_certificate/tests/static/uplink_defines.py +1 -1
  92. gw_certificate/tests/throughput.py +3 -2
  93. gw_certificate/tests/uplink.py +38 -19
  94. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/METADATA +71 -30
  95. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/RECORD +99 -98
  96. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/WHEEL +1 -1
  97. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/entry_points.txt +0 -0
  98. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/licenses/LICENSE +0 -0
  99. {wiliot_certificate-1.5.3a1.dist-info → wiliot_certificate-4.4.0.dist-info}/top_level.txt +0 -0
@@ -293,11 +293,10 @@ def run(test):
293
293
  field_functionality_pass_fail_print(test, param.name)
294
294
  test.set_phase_rc(param.name, test.rc)
295
295
  test.add_phase_reason(param.name, test.reason)
296
- if test.rc == TEST_FAILED and test.exit_on_param_failure:
297
- field_functionality_pass_fail_print(test, 'phase', param.name)
298
- break
299
- else:
300
- test.reset_result()
296
+ if test.rc == TEST_FAILED:
297
+ if test.exit_on_param_failure:
298
+ break # break the whole for loop and keep the test as failed
299
+ test.reset_result() # reset result and continue to next param
301
300
 
302
301
  # Kill the ble simulator
303
302
  if test.data == DATA_SIMULATION:
@@ -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.29.1
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
- 5,
15
- 29,
16
- 1,
14
+ 6,
15
+ 30,
16
+ 2,
17
17
  '',
18
18
  'wltPb.proto'
19
19
  )
@@ -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 typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
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
@@ -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.29.1
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
- 5,
15
- 29,
16
- 1,
14
+ 6,
15
+ 30,
16
+ 2,
17
17
  '',
18
18
  'wltPb.proto'
19
19
  )
@@ -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 typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
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
 
@@ -20,19 +20,21 @@ class BLESimulator():
20
20
  self.uart.reset_gw()
21
21
  time.sleep(3)
22
22
 
23
- def send_packet(self, raw_packet, duplicates=DEFAULT_DUPLICATES, output_power=DEFAULT_OUTPUT_POWER, channel=SEND_ALL_ADV_CHANNELS, delay=DEFAULT_DELAY):
23
+ def send_packet(self, raw_packet, duplicates=DEFAULT_DUPLICATES, output_power=DEFAULT_OUTPUT_POWER, channel=SEND_ALL_ADV_CHANNELS,
24
+ delay=DEFAULT_DELAY, print_for_debug=True):
24
25
  assert self.sim_mode is True, 'BLE Sim not initialized!'
25
26
  if len(raw_packet) == 62:
26
27
  # Add ADVA
27
28
  raw_packet = DEFAULT_ADVA + raw_packet
28
29
  if len(raw_packet) != 74:
29
30
  raise ValueError('Raw Packet must be 62/74 chars long!')
30
- self.uart.write_ble_command(f"!ble_sim {str(raw_packet)} {str(duplicates)} {str(output_power)} {str(channel)} {str(delay)}")
31
+ self.uart.write_ble_command(f"!ble_sim {str(raw_packet)} {str(duplicates)} {str(output_power)} {str(channel)} {str(delay)}", print_for_debug=print_for_debug)
31
32
  if delay > 0:
32
33
  diff = time.perf_counter()
33
34
  time.sleep((delay/1000) * duplicates)
34
35
  diff = time.perf_counter() - diff
35
- debug_print(f'Desired Delay: {(delay/1000) * duplicates} Actual Delay {diff}')
36
+ if print_for_debug:
37
+ debug_print(f'Desired Delay: {(delay/1000) * duplicates} Actual Delay {diff}')
36
38
 
37
39
 
38
40
  def send_data_si_pair(self, data_packet, si_packet, duplicates, output_power=DEFAULT_OUTPUT_POWER, delay=DEFAULT_DELAY, packet_error=None):
@@ -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.82'
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'
@@ -65,9 +65,10 @@ class UARTInterface:
65
65
  return None
66
66
  return answer
67
67
 
68
- def write_ble_command(self, cmd, read=False):
68
+ def write_ble_command(self, cmd, read=False, print_for_debug=True):
69
69
  # This function writes a command (cmd) to the ble using a serial connection (ble_ser) that are provided to it beforehand.. and returns the answer from the device as string
70
- debug_print("Write to BLE: {}".format(cmd))
70
+ if print_for_debug:
71
+ debug_print("Write to BLE: {}".format(cmd))
71
72
  # Shows on terminal what command is about to be printed to the BLE device
72
73
  bytes_to_write = bytes(cmd.encode("utf-8")) + b'\r\n'
73
74
  self.serial.write(bytes_to_write)
@@ -77,7 +78,8 @@ class UARTInterface:
77
78
  # Pauses the program for execution for 0.01sec. This is done to allow the device to process the command and provide a response before reading the response.
78
79
  time.sleep(1)
79
80
  answer = self.read_line()
80
- debug_print(answer)
81
+ if print_for_debug:
82
+ debug_print(answer)
81
83
  return answer
82
84
 
83
85
  def flush(self, request_power_cycle=False):
@@ -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.82", "4.4.83")
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:
@@ -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'Sent data saved - {self.sent_csv_path}')
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)
@@ -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 not math.isnan(rsquared) and rsquared != 0:
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.8 and slope > 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: "A365FECA59D61E16C6FC00003F020AD2A365FECA5916095E9101FF1104EB0958D400110100", "payload": "C6FC00003F020AD2A365FECA5916095E9101FF1104EB0958D400110100", "si": "", "bridge_id": "A365FECA5916", "adva": "A365FECA59D6", "pkt_id": "00110100"},
138
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659DA1E16C6FC00003F020AD2A365FEC6591A095E9101FF1104EB0958D400110100", "payload": "C6FC00003F020AD2A365FEC6591A095E9101FF1104EB0958D400110100", "si": "", "bridge_id": "A365FEC6591A", "adva": "A365FEC659DA", "pkt_id": "00110100"},
139
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "A365FECA59D61E16C6FC00003F020AD3A365FECA5916095E9101FF1104EB0958D400110101", "payload": "C6FC00003F020AD3A365FECA5916095E9101FF1104EB0958D400110101", "si": "", "bridge_id": "A365FECA5916", "adva": "A365FECA59D6", "pkt_id": "00110101"},
140
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659DA1E16C6FC00003F020AD3A365FEC6591A095E9101FF1104EB0958D400110101", "payload": "C6FC00003F020AD3A365FEC6591A095E9101FF1104EB0958D400110101", "si": "", "bridge_id": "A365FEC6591A", "adva": "A365FEC659DA", "pkt_id": "00110101"},
141
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "A365FECA59D61E16C6FC00003F020AD4A365FECA5916095E9101FF1104EB0958D400110102", "payload": "C6FC00003F020AD4A365FECA5916095E9101FF1104EB0958D400110102", "si": "", "bridge_id": "A365FECA5916", "adva": "A365FECA59D6", "pkt_id": "00110102"},
142
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659DA1E16C6FC00003F020AD4A365FEC6591A095E9101FF1104EB0958D400110102", "payload": "C6FC00003F020AD4A365FEC6591A095E9101FF1104EB0958D400110102", "si": "", "bridge_id": "A365FEC6591A", "adva": "A365FEC659DA", "pkt_id": "00110102"},
143
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "A365FECA59D61E16C6FC00003F020AD5A365FECA5916095E9101FF1104EB0958D400110103", "payload": "C6FC00003F020AD5A365FECA5916095E9101FF1104EB0958D400110103", "si": "", "bridge_id": "A365FECA5916", "adva": "A365FECA59D6", "pkt_id": "00110103"},
144
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659DA1E16C6FC00003F020AD5A365FEC6591A095E9101FF1104EB0958D400110103", "payload": "C6FC00003F020AD5A365FEC6591A095E9101FF1104EB0958D400110103", "si": "", "bridge_id": "A365FEC6591A", "adva": "A365FEC659DA", "pkt_id": "00110103"},
145
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "A365FECA59D61E16C6FC00003F020AD6A365FECA5916095E9101FF1104EB0958D400110104", "payload": "C6FC00003F020AD6A365FECA5916095E9101FF1104EB0958D400110104", "si": "", "bridge_id": "A365FECA5916", "adva": "A365FECA59D6", "pkt_id": "00110104"},
146
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659DA1E16C6FC00003F020AD6A365FEC6591A095E9101FF1104EB0958D400110104", "payload": "C6FC00003F020AD6A365FEC6591A095E9101FF1104EB0958D400110104", "si": "", "bridge_id": "A365FEC6591A", "adva": "A365FEC659DA", "pkt_id": "00110104"},
147
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "A365FECA59D61E16C6FC00003F020AD7A365FECA5916095E9101FF1104EB0958D400110105", "payload": "C6FC00003F020AD7A365FECA5916095E9101FF1104EB0958D400110105", "si": "", "bridge_id": "A365FECA5916", "adva": "A365FECA59D6", "pkt_id": "00110105"},
148
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659DA1E16C6FC00003F020AD7A365FEC6591A095E9101FF1104EB0958D400110105", "payload": "C6FC00003F020AD7A365FEC6591A095E9101FF1104EB0958D400110105", "si": "", "bridge_id": "A365FEC6591A", "adva": "A365FEC659DA", "pkt_id": "00110105"},
149
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "A365FECA59D61E16C6FC00003F020AD8A365FECA5916095E9101FF1104EB0958D400110106", "payload": "C6FC00003F020AD8A365FECA5916095E9101FF1104EB0958D400110106", "si": "", "bridge_id": "A365FECA5916", "adva": "A365FECA59D6", "pkt_id": "00110106"},
150
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659DA1E16C6FC00003F020AD8A365FEC6591A095E9101FF1104EB0958D400110106", "payload": "C6FC00003F020AD8A365FEC6591A095E9101FF1104EB0958D400110106", "si": "", "bridge_id": "A365FEC6591A", "adva": "A365FEC659DA", "pkt_id": "00110106"},
151
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 1, ADVA_PAYLOAD: "A365FECA59D61E16C6FC00003F020AD9A365FECA5916095E9101FF1104EB0958D400110107", "payload": "C6FC00003F020AD9A365FECA5916095E9101FF1104EB0958D400110107", "si": "", "bridge_id": "A365FECA5916", "adva": "A365FECA59D6", "pkt_id": "00110107"},
152
- {"test": "acl", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659DA1E16C6FC00003F020AD9A365FEC6591A095E9101FF1104EB0958D400110107", "payload": "C6FC00003F020AD9A365FEC6591A095E9101FF1104EB0958D400110107", "si": "", "bridge_id": "A365FEC6591A", "adva": "A365FEC659DA", "pkt_id": "00110107"},
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)