def save_protocol(self):
for msg in self.proto_analyzer.messages:
if not msg.decoder.is_nrz:
reply = QMessageBox.question(self, "Saving of protocol",
"You want to save this protocol with an encoding different from NRZ.\n"
"This may cause loss of information if you load it again.\n\n"
"Save anyway?", QMessageBox.Yes | QMessageBox.No)
if reply != QMessageBox.Yes:
return
else:
break
text = "protocol"
filename = FileOperator.get_save_file_name("{0}.proto.xml".format(text), caption="Save protocol")
if not filename:
return
self.proto_analyzer.to_xml_file(filename=filename, decoders=self.decodings,
participants=self.project_manager.participants, write_bits=True)
评论列表
文章目录