def create_protocol_sniff_dialog(self, testing_mode=False): pm = self.project_manager signal = next( (proto.signal for proto in self.compare_frame_controller.protocol_list), None) signals = [ f.signal for f in self.signal_tab_controller.signal_frames if f.signal ] psd = ProtocolSniffDialog(project_manager=pm, signal=signal, signals=signals, testing_mode=testing_mode, parent=self) if psd.has_empty_device_list: Errors.no_device() psd.close() return None else: psd.device_parameters_changed.connect(pm.set_device_parameters) psd.protocol_accepted.connect( self.compare_frame_controller.add_sniffed_protocol_messages) return psd
def __get_sniff_dialog(self): sniff_dialog = ProtocolSniffDialog( project_manager=self.form.project_manager, signal=self.signal, testing_mode=True, parent=self.form) if self.SHOW: sniff_dialog.show() return sniff_dialog
def show_proto_sniff_dialog(self): pm = self.project_manager signal = next((proto.signal for proto in self.compare_frame_controller.protocol_list), None) psd = ProtocolSniffDialog(project_manager=pm, signal=signal, parent=self) if psd.has_empty_device_list: Errors.no_device() psd.close() else: psd.device_parameters_changed.connect(pm.set_device_parameters) psd.protocol_accepted.connect(self.compare_frame_controller.add_sniffed_protocol_messages) psd.show()
def on_btn_test_sniff_settings_clicked(self): def on_dialog_finished(): self.device_settings_rx_widget.bootstrap(self.project_manager.simulator_rx_conf) self.sniff_settings_widget.bootstrap(self.project_manager.device_conf) self.device_settings_rx_widget.emit_device_parameters_changed() self.sniff_settings_widget.emit_sniff_parameters_changed() psd = ProtocolSniffDialog(self.project_manager, signals=self.sniff_settings_widget.signals, parent=self) psd.device_settings_widget.bootstrap(self.project_manager.simulator_rx_conf) psd.device_settings_widget.device_parameters_changed.connect(self.rx_parameters_changed.emit) psd.sniff_settings_widget.sniff_parameters_changed.connect(self.sniff_parameters_changed.emit) psd.finished.connect(on_dialog_finished) psd.ui.btnAccept.hide() psd.show()