wiliot-certificate 1.5.2a1__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.
- brg_certificate/ag/energous_v0_defines.py +105 -114
- brg_certificate/ag/energous_v1_defines.py +105 -114
- brg_certificate/ag/energous_v2_defines.py +105 -114
- brg_certificate/ag/energous_v3_defines.py +105 -114
- brg_certificate/ag/energous_v4_defines.py +105 -114
- brg_certificate/ag/fanstel_lan_v0_defines.py +105 -114
- brg_certificate/ag/fanstel_lte_v0_defines.py +105 -114
- brg_certificate/ag/fanstel_wifi_v0_defines.py +105 -114
- brg_certificate/ag/minew_lte_v0_defines.py +105 -114
- brg_certificate/ag/wlt_types.html +983 -150
- brg_certificate/ag/wlt_types_ag.py +1326 -248
- brg_certificate/ag/wlt_types_ag_jsons/brg2brg_ota.json +69 -0
- brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb.json +101 -0
- brg_certificate/ag/wlt_types_ag_jsons/brg2gw_hb_sleep.json +45 -0
- brg_certificate/ag/wlt_types_ag_jsons/calibration.json +75 -0
- brg_certificate/ag/wlt_types_ag_jsons/custom.json +99 -0
- brg_certificate/ag/wlt_types_ag_jsons/datapath.json +133 -8
- brg_certificate/ag/wlt_types_ag_jsons/energy2400.json +99 -0
- brg_certificate/ag/wlt_types_ag_jsons/energySub1g.json +96 -0
- brg_certificate/ag/wlt_types_ag_jsons/externalSensor.json +113 -0
- brg_certificate/ag/wlt_types_ag_jsons/interface.json +157 -0
- brg_certificate/ag/wlt_types_ag_jsons/powerManagement.json +205 -0
- brg_certificate/cert_common.py +61 -11
- brg_certificate/cert_config.py +12 -7
- brg_certificate/cert_utils.py +3 -1
- brg_certificate/certificate_bcc_test_list.txt +0 -2
- brg_certificate/certificate_test_list.txt +4 -4
- brg_certificate/tests/calibration/interval_test/interval_test.json +1 -1
- brg_certificate/tests/calibration/interval_test/interval_test.py +5 -5
- brg_certificate/tests/calibration/output_power_test/output_power_test.json +1 -1
- brg_certificate/tests/calibration/output_power_test/output_power_test.py +5 -5
- brg_certificate/tests/calibration/pattern_test/pattern_test.json +1 -1
- brg_certificate/tests/calibration/pattern_test/pattern_test.py +16 -10
- brg_certificate/tests/datapath/aging_test/aging_test.py +10 -9
- brg_certificate/tests/datapath/num_of_tags_test/num_of_tags_test.py +8 -13
- brg_certificate/tests/datapath/output_power_test/output_power_test.json +1 -1
- brg_certificate/tests/datapath/output_power_test/output_power_test.py +5 -5
- 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 +11 -7
- brg_certificate/tests/datapath/pacer_interval_tags_count_test/pacer_interval_tags_count_test.py +11 -4
- brg_certificate/tests/datapath/pacer_interval_test/pacer_interval_test.py +10 -10
- brg_certificate/tests/datapath/pattern_test/pattern_test.json +1 -1
- brg_certificate/tests/datapath/pattern_test/pattern_test.py +5 -6
- 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 +10 -9
- 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 +11 -10
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.json +1 -1
- brg_certificate/tests/datapath/pkt_filter_test/pkt_filter_test.py +11 -10
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.json +1 -1
- brg_certificate/tests/datapath/rssi_threshold_test/rssi_threshold_test.py +11 -10
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.json +1 -1
- brg_certificate/tests/datapath/rx_channel_test/rx_channel_test.py +5 -6
- brg_certificate/tests/datapath/rx_rate_gen2_test/rx_rate_gen2_test.py +39 -37
- brg_certificate/tests/datapath/rx_rate_gen3_test/rx_rate_gen3_test.py +46 -46
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.json +2 -3
- brg_certificate/tests/datapath/stress_gen3_test/stress_gen3_test.py +21 -17
- brg_certificate/tests/datapath/stress_test/stress_test.json +2 -3
- brg_certificate/tests/datapath/stress_test/stress_test.py +20 -17
- brg_certificate/tests/datapath/tx_repetition_algo_test/tx_repetition_algo_test.py +1 -1
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.json +1 -1
- brg_certificate/tests/datapath/tx_repetition_test/tx_repetition_test.py +12 -10
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.json +1 -1
- brg_certificate/tests/edge_mgmt/actions_test/actions_test.py +13 -13
- brg_certificate/tests/edge_mgmt/brg2brg_ota_ble5_test/brg2brg_ota_ble5_test.py +1 -1
- brg_certificate/tests/edge_mgmt/leds_test/leds_test.py +2 -2
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.json +1 -1
- brg_certificate/tests/energy2400/duty_cycle_test/duty_cycle_test.py +5 -5
- brg_certificate/tests/energy2400/output_power_test/output_power_test.json +1 -1
- brg_certificate/tests/energy2400/output_power_test/output_power_test.py +5 -5
- brg_certificate/tests/energy2400/pattern_test/pattern_test.json +1 -1
- brg_certificate/tests/energy2400/pattern_test/pattern_test.py +5 -5
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.json +2 -2
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_250k_test/signal_indicator_ble5_10_250k_test.py +256 -278
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.json +2 -2
- brg_certificate/tests/energy2400/signal_indicator_ble5_10_500k_test/signal_indicator_ble5_10_500k_test.py +256 -278
- brg_certificate/tests/energy2400/signal_indicator_sub1g_2_4_test/signal_indicator_sub1g_2_4_test.py +3 -3
- brg_certificate/tests/energy2400/signal_indicator_test/signal_indicator_test.py +30 -91
- 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 +5 -5
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.json +1 -1
- brg_certificate/tests/energy_sub1g/pattern_test/pattern_test.py +5 -5
- brg_certificate/tests/energy_sub1g/signal_indicator_functionality_test/signal_indicator_functionality_test.py +2 -2
- 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 +5 -5
- brg_certificate/tests/pwr_mgmt/pwr_mgmt_test/pwr_mgmt_test.py +2 -2
- brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.json +1 -1
- brg_certificate/tests/sensors/ext_sensor_test/ext_sensor_test.py +6 -7
- brg_certificate/wltPb_pb2.py +4 -4
- brg_certificate/wltPb_pb2.pyi +2 -1
- gw_certificate/api_if/gw_capabilities.py +37 -1
- gw_certificate/common/serialization_formatter.py +93 -0
- gw_certificate/common/wltPb_pb2.py +50 -38
- gw_certificate/common/wltPb_pb2.pyi +42 -35
- gw_certificate/gw_certificate.py +4 -2
- gw_certificate/gw_certificate_cli.py +5 -4
- gw_certificate/interface/4.4.91_app.zip +0 -0
- gw_certificate/interface/{4.4.52_sd_bl_app.zip → 4.4.91_sd_bl_app.zip} +0 -0
- gw_certificate/interface/ble_simulator.py +5 -3
- gw_certificate/interface/flash_fw.py +90 -0
- gw_certificate/interface/mqtt.py +39 -23
- gw_certificate/interface/pkt_generator.py +0 -44
- gw_certificate/interface/uart_if.py +25 -12
- gw_certificate/tests/actions.py +33 -5
- gw_certificate/tests/connection.py +3 -1
- gw_certificate/tests/downlink.py +2 -2
- gw_certificate/tests/generic.py +5 -4
- gw_certificate/tests/registration.py +4 -4
- gw_certificate/tests/static/generated_packet_table.py +47 -25
- gw_certificate/tests/static/packet_table.csv +10067 -10051
- gw_certificate/tests/static/uplink_defines.py +2 -1
- gw_certificate/tests/throughput.py +3 -2
- gw_certificate/tests/uplink.py +171 -32
- {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/METADATA +71 -30
- {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/RECORD +119 -117
- {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/WHEEL +1 -1
- gw_certificate/interface/4.4.52_app.zip +0 -0
- {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/entry_points.txt +0 -0
- {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/licenses/LICENSE +0 -0
- {wiliot_certificate-1.5.2a1.dist-info → wiliot_certificate-4.4.0.dist-info}/top_level.txt +0 -0
|
@@ -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'
|
|
@@ -43,7 +43,8 @@ class UARTInterface:
|
|
|
43
43
|
if not update_status:
|
|
44
44
|
raise UARTError('Update Failed! Update FW manually using NRF Tools')
|
|
45
45
|
if self.fw_version >= version.Version('3.17.0'):
|
|
46
|
-
self.
|
|
46
|
+
if self.fw_version < version.Version('4.4.0'):
|
|
47
|
+
self.write_ble_command(GATEWAY_APP)
|
|
47
48
|
self.flush()
|
|
48
49
|
debug_print(f'Serial Connection {comport} Initialized')
|
|
49
50
|
|
|
@@ -64,9 +65,10 @@ class UARTInterface:
|
|
|
64
65
|
return None
|
|
65
66
|
return answer
|
|
66
67
|
|
|
67
|
-
def write_ble_command(self, cmd, read=False):
|
|
68
|
+
def write_ble_command(self, cmd, read=False, print_for_debug=True):
|
|
68
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
|
|
69
|
-
|
|
70
|
+
if print_for_debug:
|
|
71
|
+
debug_print("Write to BLE: {}".format(cmd))
|
|
70
72
|
# Shows on terminal what command is about to be printed to the BLE device
|
|
71
73
|
bytes_to_write = bytes(cmd.encode("utf-8")) + b'\r\n'
|
|
72
74
|
self.serial.write(bytes_to_write)
|
|
@@ -76,17 +78,20 @@ class UARTInterface:
|
|
|
76
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.
|
|
77
79
|
time.sleep(1)
|
|
78
80
|
answer = self.read_line()
|
|
79
|
-
|
|
81
|
+
if print_for_debug:
|
|
82
|
+
debug_print(answer)
|
|
80
83
|
return answer
|
|
81
84
|
|
|
82
|
-
def flush(self):
|
|
85
|
+
def flush(self, request_power_cycle=False):
|
|
83
86
|
self.serial.close()
|
|
87
|
+
if request_power_cycle:
|
|
88
|
+
input('Please power cycle (unplug and replug from your pc) the certificate kit. Press enter when plugged')
|
|
84
89
|
time.sleep(2)
|
|
85
90
|
self.serial.open()
|
|
86
91
|
self.serial.flushInput()
|
|
87
92
|
self.serial.flush()
|
|
88
93
|
self.serial.reset_output_buffer()
|
|
89
|
-
|
|
94
|
+
|
|
90
95
|
def reset_gw(self, stop_advertising=True):
|
|
91
96
|
self.flush()
|
|
92
97
|
self.write_ble_command(RESET_GW)
|
|
@@ -104,16 +109,20 @@ class UARTInterface:
|
|
|
104
109
|
if self.gw_app_rx is None:
|
|
105
110
|
self.reset_gw()
|
|
106
111
|
|
|
107
|
-
if self.fw_version >= version.Version('
|
|
112
|
+
if self.fw_version >= version.Version('4.4.0'):
|
|
113
|
+
# full_cfg isn't supported anymore. RX channels are configured by set_sniffer.
|
|
114
|
+
pass
|
|
115
|
+
elif self.fw_version >= version.Version('3.17.0'):
|
|
108
116
|
# from 3.17.0, only full_cfg can be used to configure channels. sending it with:
|
|
109
117
|
# Data coupling(DC) off, wifi(NW) and mqtt(MQ) on.
|
|
110
118
|
rx_ch_to_fw_enums = {37: 2, 38: 3, 39: 4}
|
|
111
119
|
cmd = f'!full_cfg DM {rx_ch_to_fw_enums[rx_channel]} DC 0 NW 1 MQ 1 CH {rx_channel}'
|
|
112
120
|
# cmd = '!gateway_app'
|
|
121
|
+
self.write_ble_command(cmd)
|
|
113
122
|
else:
|
|
114
123
|
cmd = f'!gateway_app {rx_channel} 30 0 17'
|
|
124
|
+
self.write_ble_command(cmd)
|
|
115
125
|
|
|
116
|
-
self.write_ble_command(cmd)
|
|
117
126
|
self.gw_app_rx = rx_channel
|
|
118
127
|
|
|
119
128
|
def set_sniffer(self, rx_channel):
|
|
@@ -128,7 +137,11 @@ class UARTInterface:
|
|
|
128
137
|
time.sleep(1)
|
|
129
138
|
|
|
130
139
|
def cancel_sniffer(self):
|
|
131
|
-
self.
|
|
140
|
+
if self.fw_version >= version.Version('4.4.0'):
|
|
141
|
+
# Set_logger_mode must have 2 args, even when disabled.
|
|
142
|
+
self.write_ble_command(f'{CANCEL_SNIFFER} 37')
|
|
143
|
+
else:
|
|
144
|
+
self.write_ble_command(CANCEL_SNIFFER)
|
|
132
145
|
self.flush()
|
|
133
146
|
|
|
134
147
|
def get_version_mac(self):
|
|
@@ -197,8 +210,8 @@ class UARTInterface:
|
|
|
197
210
|
return_code = dfu_full_process.returncode
|
|
198
211
|
for line in dfu_full_process.stderr:
|
|
199
212
|
if NRFUTIL_FW_TOO_LOW_ERROR in line:
|
|
200
|
-
debug_print(f"DFU failed
|
|
201
|
-
debug_print(f"
|
|
213
|
+
debug_print(f"DFU failed because bootloader/application version is too high.")
|
|
214
|
+
debug_print(f"Attempting to upgrade application only..")
|
|
202
215
|
dfu_app_process = subprocess.Popen(f'{nrfutil_file} dfu serial --package "{LATEST_VERSION_PATH_APP}" -p {self.comport} -fc 0 -b 115200 -t 10',
|
|
203
216
|
stderr=subprocess.PIPE, shell=True, text=True)
|
|
204
217
|
dfu_app_process.wait()
|
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:
|
|
@@ -144,6 +144,28 @@ class BridgeOTAStage(GenericActionsStage):
|
|
|
144
144
|
debug_print(f"BridgeOTAStage attempt: {str(self.uart.fw_version)} -> {str(self.desired_version)}")
|
|
145
145
|
# Reset to remove any log/cert mode we had in the kit so it behaves as a bridge
|
|
146
146
|
self.uart.reset_gw()
|
|
147
|
+
|
|
148
|
+
def is_final_action_status(self, msg):
|
|
149
|
+
LAST_OTA_STEP = 7
|
|
150
|
+
if not isinstance(msg, dict):
|
|
151
|
+
return False
|
|
152
|
+
|
|
153
|
+
step = msg.get('step')
|
|
154
|
+
progress = msg.get('progress')
|
|
155
|
+
status = msg.get('statusCode')
|
|
156
|
+
if status == None:
|
|
157
|
+
# Both json/pb
|
|
158
|
+
status = msg.get('status')
|
|
159
|
+
|
|
160
|
+
if step == None:
|
|
161
|
+
# Old action status
|
|
162
|
+
if status != None:
|
|
163
|
+
return True
|
|
164
|
+
else:
|
|
165
|
+
# New progress action status
|
|
166
|
+
if (step == LAST_OTA_STEP and progress == 100) or (status != 0):
|
|
167
|
+
return True
|
|
168
|
+
return False
|
|
147
169
|
|
|
148
170
|
def run(self):
|
|
149
171
|
super().run()
|
|
@@ -156,15 +178,21 @@ class BridgeOTAStage(GenericActionsStage):
|
|
|
156
178
|
self.mqttc.send_bridge_ota_action(self.uart.mac, str(self.desired_version), 200, False, self.gw_id, "aws", self.env)
|
|
157
179
|
debug_print("Sent a BridgeOTA action to the gateway")
|
|
158
180
|
debug_print("Waiting for an actionStatus message from the gateway... (timeout=10)")
|
|
181
|
+
|
|
159
182
|
while datetime.datetime.now() < timeout and self.action_status is None:
|
|
160
183
|
line = self.uart.read_line()
|
|
161
184
|
if line != None and 'reset' in line:
|
|
162
|
-
self.uart.reset_gw(stop_advertising=False)
|
|
163
185
|
self.reboot_packet_ts = datetime.datetime.now()
|
|
164
186
|
debug_print("A reboot packet was received by the bridge")
|
|
165
|
-
|
|
187
|
+
self.uart.reset_gw(stop_advertising=False)
|
|
188
|
+
|
|
189
|
+
# Ignoring progress report until test supported
|
|
190
|
+
msg = self.mqttc.get_action_status_message()
|
|
191
|
+
if self.is_final_action_status(msg):
|
|
192
|
+
self.action_status = msg
|
|
166
193
|
time.sleep(2)
|
|
167
194
|
|
|
195
|
+
debug_print(f'{self.action_status}')
|
|
168
196
|
if self.action_status != None:
|
|
169
197
|
debug_print("actionStatus was received from the gateway")
|
|
170
198
|
self.action_status_ts = datetime.datetime.now()
|
|
@@ -181,8 +209,8 @@ class BridgeOTAStage(GenericActionsStage):
|
|
|
181
209
|
|
|
182
210
|
cur_ver = self.uart.get_version()
|
|
183
211
|
if cur_ver == None:
|
|
184
|
-
debug_print("ERROR: The certificate kit, acting as bridge in this stage, is not responding
|
|
185
|
-
self.uart.flush()
|
|
212
|
+
debug_print("ERROR: The certificate kit, acting as bridge in this stage, is not responding.")
|
|
213
|
+
self.uart.flush(request_power_cycle=True)
|
|
186
214
|
cur_ver = self.uart.get_version()
|
|
187
215
|
if cur_ver == None:
|
|
188
216
|
raise UARTError("Communication to the certificate kit halted! "
|
|
@@ -35,6 +35,7 @@ class ConnectionStage(GenericStage):
|
|
|
35
35
|
self.status_message = None
|
|
36
36
|
|
|
37
37
|
while datetime.datetime.now() < timeout and self.status_message is None:
|
|
38
|
+
time.sleep(2)
|
|
38
39
|
self.status_message = self.mqttc.get_status_message()
|
|
39
40
|
|
|
40
41
|
if self.status_message is not None:
|
|
@@ -49,6 +50,7 @@ class ConnectionStage(GenericStage):
|
|
|
49
50
|
for key, value in self.status_message.items():
|
|
50
51
|
if key in GWCapabilities.get_capabilities() and type(value) is bool:
|
|
51
52
|
self.gw_capabilities.set_capability(key, value)
|
|
53
|
+
self.cfg_data.status_msg_set(self.status_message, self.mqttc.get_serialization())
|
|
52
54
|
|
|
53
55
|
def generate_stage_report(self):
|
|
54
56
|
self.add_report_header()
|
|
@@ -73,7 +75,7 @@ class ConnectionStage(GenericStage):
|
|
|
73
75
|
|
|
74
76
|
self.add_report_topic_validation('status')
|
|
75
77
|
else:
|
|
76
|
-
self.error_summary = "No message recieved from GW in status topic after
|
|
78
|
+
self.error_summary = f"No message recieved from GW in status topic after {STATUS_MSG_TIMEOUT} mins."
|
|
77
79
|
self.add_to_stage_report(self.error_summary)
|
|
78
80
|
|
|
79
81
|
self.report_html = self.template_engine.render_template('stage.html', stage=self,
|
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."
|
|
@@ -161,7 +161,7 @@ class GenericStage():
|
|
|
161
161
|
self.result_indication = kwargs.get('result_indication', SCORE_BASED)
|
|
162
162
|
self.stage_pass = MINIMUM_SCORE
|
|
163
163
|
self.pass_min = kwargs.get('pass_min', PASS_MINIMUM)
|
|
164
|
-
self.inconclusive_min = INCONCLUSIVE_MINIMUM
|
|
164
|
+
self.inconclusive_min = kwargs.get('inconclusive_min', INCONCLUSIVE_MINIMUM)
|
|
165
165
|
self.report = ''
|
|
166
166
|
self.report_html = ''
|
|
167
167
|
self.start_time = None
|
|
@@ -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:
|
|
@@ -41,7 +41,7 @@ class Status(Enum):
|
|
|
41
41
|
APPROVED = 'approved'
|
|
42
42
|
ACTIVE = 'active'
|
|
43
43
|
|
|
44
|
-
class
|
|
44
|
+
class RegistrationData():
|
|
45
45
|
"""
|
|
46
46
|
Hold variables which values must be shared between different stages.
|
|
47
47
|
gw_online_ts hold the time in which the gateway status became online
|
|
@@ -205,7 +205,7 @@ class OnlineStage(GenericRegistrationStage):
|
|
|
205
205
|
self.add_to_stage_report("Token acquisition and MQTT connection were done succesfully.")
|
|
206
206
|
self.add_to_stage_report("Gateway is online.")
|
|
207
207
|
debug_print("Gateway connected to MQTT successfully, it is online")
|
|
208
|
-
self.
|
|
208
|
+
self.reg_data.gw_online_ts = datetime.datetime.now()
|
|
209
209
|
|
|
210
210
|
self.report_html = self.template_engine.render_template('stage.html', stage=self,
|
|
211
211
|
stage_report=self.report.split('\n'))
|
|
@@ -259,7 +259,7 @@ class RefreshStage(GenericRegistrationStage):
|
|
|
259
259
|
def run(self):
|
|
260
260
|
super().run()
|
|
261
261
|
debug_print(f"Waiting for the token to expire..")
|
|
262
|
-
timeout = self.
|
|
262
|
+
timeout = self.reg_data.gw_online_ts + datetime.timedelta(minutes=TOKEN_EXPIRY_MINUTES)
|
|
263
263
|
while datetime.datetime.now() < timeout:
|
|
264
264
|
time.sleep(BUSY_WAIT_DELAY_SEC)
|
|
265
265
|
|
|
@@ -313,7 +313,7 @@ class RegistrationTest(GenericTest):
|
|
|
313
313
|
raise Exception(f"An API security key must be set to the envrionment variable {self.env_variable} in order to run the RegistrationTest")
|
|
314
314
|
self.edge = ExtendedEdgeClient(api_sec_key, REG_CERT_OWNER_ID, env=self.env)
|
|
315
315
|
|
|
316
|
-
self.
|
|
316
|
+
self.reg_data = RegistrationData()
|
|
317
317
|
|
|
318
318
|
super().__init__(**self.__dict__, test_name=type(self).__name__)
|
|
319
319
|
stages = STAGES
|
|
@@ -39,10 +39,6 @@ class GeneratedPacketTable:
|
|
|
39
39
|
if columns is not None:
|
|
40
40
|
return self.table[columns]
|
|
41
41
|
return self.table
|
|
42
|
-
|
|
43
|
-
# def get_unified_data(self) -> pd.DataFrame:
|
|
44
|
-
# t = self.table
|
|
45
|
-
# return t.loc[((t['test'] == 'stress'))]
|
|
46
42
|
|
|
47
43
|
def get_stress_data(self) -> pd.DataFrame:
|
|
48
44
|
t = self.table
|
|
@@ -56,6 +52,10 @@ class GeneratedPacketTable:
|
|
|
56
52
|
t = self.table
|
|
57
53
|
return t.loc[((t['test'] == 'mgmt'))]
|
|
58
54
|
|
|
55
|
+
def get_acl_data(self) -> pd.DataFrame:
|
|
56
|
+
t = self.table
|
|
57
|
+
return t.loc[((t['test'] == 'acl'))]
|
|
58
|
+
|
|
59
59
|
def get_unified_data(self) -> pd.DataFrame:
|
|
60
60
|
t = self.table
|
|
61
61
|
return t.loc[((t['test'] == 'unified'))]
|
|
@@ -74,15 +74,11 @@ class GeneratedPacketTable:
|
|
|
74
74
|
data = pkts[idx]['data_packet']
|
|
75
75
|
brg_id = self.brg_network.brg_list[idx].bridge_id
|
|
76
76
|
# log the sent packet with relevant info from run
|
|
77
|
-
expected_pkt = brg.get_expected_mqtt_unified(full_data_pkt=data)
|
|
78
|
-
for pkt in expected_pkt:
|
|
79
|
-
pkt.update({'duplication': duplication, 'time_delay': time_delay})
|
|
80
77
|
packet_list.append({'test': TEST_UNIFIED,
|
|
81
78
|
'duplication': duplication,
|
|
82
79
|
'time_delay': time_delay,
|
|
83
80
|
'bridge_idx': idx,
|
|
84
|
-
'
|
|
85
|
-
,ADVA_PAYLOAD: data, 'bridge_id': brg_id,
|
|
81
|
+
ADVA_PAYLOAD: data, 'bridge_id': brg_id,
|
|
86
82
|
'adva': data[:12], 'payload': data[16:], 'pkt_id': data[-8:]
|
|
87
83
|
})
|
|
88
84
|
|
|
@@ -96,12 +92,10 @@ class GeneratedPacketTable:
|
|
|
96
92
|
debug_print(f'Bridge {target_idx}')
|
|
97
93
|
data = pkts[target_idx]['data_packet']
|
|
98
94
|
brg_id = brg.bridge_id
|
|
99
|
-
expected_pkt = brg.get_expected_mqtt_unified(full_data_pkt=data)
|
|
100
95
|
packet_list.append({
|
|
101
96
|
'test': TEST_STRESS,
|
|
102
97
|
'duplication': 1,
|
|
103
98
|
'bridge_idx': target_idx,
|
|
104
|
-
'expected_mqtt': expected_pkt,
|
|
105
99
|
ADVA_PAYLOAD: data,
|
|
106
100
|
'bridge_id': brg_id,
|
|
107
101
|
'adva': data[:12],
|
|
@@ -111,18 +105,18 @@ class GeneratedPacketTable:
|
|
|
111
105
|
|
|
112
106
|
def _sensor_data(df):
|
|
113
107
|
hardcoded_data = [
|
|
114
|
-
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2,
|
|
115
|
-
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2,
|
|
116
|
-
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2,
|
|
117
|
-
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2,
|
|
118
|
-
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2,
|
|
119
|
-
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2,
|
|
120
|
-
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2,
|
|
121
|
-
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2,
|
|
122
|
-
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2,
|
|
123
|
-
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2,
|
|
124
|
-
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2,
|
|
125
|
-
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2,
|
|
108
|
+
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "3B613D0817FB101690FCA1016417913C42FD38AF3F23AC0201060303E1FF060000FA0EAB04", "payload":"90FCA1016417913C42FD38AF3F23AC0201060303E1FF060000FA0EAB04" ,"si": "3B613D0817FB1E16C6FC0000EB3B613D08177B00003600AC233FAF38FD16E1FF05FA0EAB04", "bridge_id": "3B613D08177B", "adva": "3B613D0817FB", "pkt_id": "FA0EAB04"},
|
|
109
|
+
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "3B613D0817FB101690FCA10164157D358A0E39AF3F23AC0201060303E1FF0600007EE3A33F", "payload":"90FCA10164157D358A0E39AF3F23AC0201060303E1FF0600007EE3A33F" ,"si": "3B613D0817FB1E16C6FC0000EB3B613D08177B00004300AC233FAF390E16E1FF057EE3A33F", "bridge_id": "3B613D08177B", "adva": "3B613D0817FB", "pkt_id": "7EE3A33F"},
|
|
110
|
+
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "3B613D0817FB111690FCA1085CCA5BF13F23AC4D425330310201060303E1FF0500E16ED8EA", "payload":"90FCA1085CCA5BF13F23AC4D425330310201060303E1FF0500E16ED8EA" ,"si": "3B613D0817FB1E16C6FC0000EB3B613D08177B00004700AC233FF15BCA16E1FF05E16ED8EA", "bridge_id": "3B613D08177B", "adva": "3B613D0817FB", "pkt_id": "E16ED8EA"},
|
|
111
|
+
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "3B613D0817FB101690FCA10164157D358A0E39AF3F23AC0201060303E1FF06000003E3A33F", "payload":"90FCA10164157D358A0E39AF3F23AC0201060303E1FF06000003E3A33F" ,"si": "3B613D0817FB1E16C6FC0000EB3B613D08177B00073E00AC233FAF390E16E1FF0503E3A33F", "bridge_id": "3B613D08177B", "adva": "3B613D0817FB", "pkt_id": "03E3A33F"},
|
|
112
|
+
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "3B613D0817FB111690FCA10858CA5BF13F23AC4D425330310201060303E1FF0500996ED8EE", "payload":"90FCA10858CA5BF13F23AC4D425330310201060303E1FF0500996ED8EE" ,"si": "3B613D0817FB1E16C6FC0000EB3B613D08177B00043F00AC233FF15BCA16E1FF05996ED8EE", "bridge_id": "3B613D08177B", "adva": "3B613D0817FB", "pkt_id": "996ED8EE"},
|
|
113
|
+
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "3B613D0817FB0E1690FCA10864FD38AF3F23AC53310201060303E1FF0800000000157A359C", "payload":"90FCA10864FD38AF3F23AC53310201060303E1FF0800000000157A359C" ,"si": "3B613D0817FB1E16C6FC0000EB3B613D08177B000E3600AC233FAF38FD16E1FF05157A359C", "bridge_id": "3B613D08177B", "adva": "3B613D0817FB", "pkt_id": "157A359C"},
|
|
114
|
+
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "3B613D0817FB1E1690FC0200002CC60917A02CB02367771BE9EA20F9666ED8A06F6612745B", "payload":"90FC0200002CC60917A02CB02367771BE9EA20F9666ED8A06F6612745B" ,"si": "3B613D0817FB1E16C6FC0000EB3B613D08177BF1EBC500000000000000000000006612745B", "bridge_id": "3B613D08177B", "adva": "3B613D0817FB", "pkt_id": "6612745B"},
|
|
115
|
+
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "3B613D0817FB1E1690FC02000007EFE229109B044DB995A506179C99094720AE8BF9F78C1A", "payload":"90FC02000007EFE229109B044DB995A506179C99094720AE8BF9F78C1A" ,"si": "3B613D0817FB1E16C6FC0000EB3B613D08177B6CEC9A0000000000000000000000F9F78C1A", "bridge_id": "3B613D08177B", "adva": "3B613D0817FB", "pkt_id": "F9F78C1A"},
|
|
116
|
+
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "3B613D0817FB1E1690FC0200002CA1E008E364D0DCF65631718BCD659DE3323A69A674F7B9", "payload":"90FC0200002CA1E008E364D0DCF65631718BCD659DE3323A69A674F7B9" ,"si": "3B613D0817FB1E16C6FC0000EB3B613D08177B1051900000000000000000000000A674F7B9", "bridge_id": "3B613D08177B", "adva": "3B613D0817FB", "pkt_id": "A674F7B9"},
|
|
117
|
+
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "3B613D0817FB1E1690FC02000049ADD722F535679C37983927655C974A4980B080045DA6C2", "payload":"90FC02000049ADD722F535679C37983927655C974A4980B080045DA6C2" ,"si": "3B613D0817FB1E16C6FC0000EB3B613D08177B5280B20000000000000000000000045DA6C2", "bridge_id": "3B613D08177B", "adva": "3B613D0817FB", "pkt_id": "045DA6C2"},
|
|
118
|
+
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "3B613D0817FB1E1690FC0200004C8AD49C6D96923BFB70DF06554F5E8F438F1DF57E063773", "payload":"90FC0200004C8AD49C6D96923BFB70DF06554F5E8F438F1DF57E063773" ,"si": "3B613D0817FB1E16C6FC0000EB3B613D08177BB4085900000000000000000000007E063773", "bridge_id": "3B613D08177B", "adva": "3B613D0817FB", "pkt_id": "7E063773"},
|
|
119
|
+
{"test": "sensor", "duplication": "5", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "3B613D0817FB1E1690FC02000064A5B54285BB6BCDB457ABBED8EE26B4EB43B27A8C26781C", "payload":"90FC02000064A5B54285BB6BCDB457ABBED8EE26B4EB43B27A8C26781C" ,"si": "3B613D0817FB1E16C6FC0000EB3B613D08177B27363800000000000000000000008C26781C", "bridge_id": "3B613D08177B", "adva": "3B613D0817FB", "pkt_id": "8C26781C"},
|
|
126
120
|
]
|
|
127
121
|
|
|
128
122
|
hardcoded_df = pd.DataFrame(hardcoded_data)
|
|
@@ -131,8 +125,31 @@ class GeneratedPacketTable:
|
|
|
131
125
|
def _mgmt_data(df):
|
|
132
126
|
hardcoded_data = [
|
|
133
127
|
# First pkt is HB, second is CFG_INFO of MODULE_IF
|
|
134
|
-
{"test": "mgmt", "duplication": "10", "time_delay": "20", "bridge_idx": 2,
|
|
135
|
-
{"test": "mgmt", "duplication": "10", "time_delay": "20", "bridge_idx": 2,
|
|
128
|
+
{"test": "mgmt", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659D21E16C6FC0000EE020AD2A365FEC65912095E9101FF1104EB0958D400110100", "payload": "C6FC0000EE020AD2A365FEC65912095E9101FF1104EB0958D400110100", "si": "", "bridge_id": "A365FEC65912", "adva": "A365FEC659D2", "pkt_id": "00110100"},
|
|
129
|
+
{"test": "mgmt", "duplication": "10", "time_delay": "20", "bridge_idx": 2, ADVA_PAYLOAD: "A365FEC659D21E16C6FC0000EE110BD3A365FEC6591203040121E8F2FDB000000000000000", "payload": "C6FC0000EE110BD3A365FEC6591203040121E8F2FDB000000000000000", "si": "", "bridge_id": "A365FEC65912", "adva": "A365FEC659D2", "pkt_id": "00000000"},
|
|
130
|
+
]
|
|
131
|
+
|
|
132
|
+
hardcoded_df = pd.DataFrame(hardcoded_data)
|
|
133
|
+
return pd.concat([df, hardcoded_df], ignore_index=True)
|
|
134
|
+
|
|
135
|
+
def _acl_data(df):
|
|
136
|
+
hardcoded_data = [
|
|
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"},
|
|
136
153
|
]
|
|
137
154
|
|
|
138
155
|
hardcoded_df = pd.DataFrame(hardcoded_data)
|
|
@@ -141,6 +158,7 @@ class GeneratedPacketTable:
|
|
|
141
158
|
df = pd.DataFrame(packet_list)
|
|
142
159
|
df = _sensor_data(df)
|
|
143
160
|
df = _mgmt_data(df)
|
|
161
|
+
df = _acl_data(df)
|
|
144
162
|
df.to_csv(PACKET_TABLE_CSV_PATH)
|
|
145
163
|
|
|
146
164
|
class UnifiedRunData:
|
|
@@ -159,6 +177,10 @@ class MgmtRunData:
|
|
|
159
177
|
def __init__(self) -> None:
|
|
160
178
|
self.data = GeneratedPacketTable().get_mgmt_data()
|
|
161
179
|
|
|
180
|
+
class ACLRunData:
|
|
181
|
+
def __init__(self) -> None:
|
|
182
|
+
self.data = GeneratedPacketTable().get_acl_data()
|
|
183
|
+
|
|
162
184
|
class PacketTableHelper():
|
|
163
185
|
def __init__(self):
|
|
164
186
|
self.table = GeneratedPacketTable().get_df()
|