Index: simulator/plugins/GeneralResponseMessage/interface.ui =================================================================== diff -u -r2204a65b0af94e7e555f0f4207fd2701c164d1d5 -r26b852b6e979e73cf806699b050401065b5f8fb2 --- simulator/plugins/GeneralResponseMessage/interface.ui (.../interface.ui) (revision 2204a65b0af94e7e555f0f4207fd2701c164d1d5) +++ simulator/plugins/GeneralResponseMessage/interface.ui (.../interface.ui) (revision 26b852b6e979e73cf806699b050401065b5f8fb2) @@ -7,7 +7,7 @@ 0 0 299 - 149 + 178 @@ -35,7 +35,27 @@ - + + + + MsgID + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + D000 + + + 94 + + + + @@ -57,7 +77,7 @@ - + @@ -81,27 +101,25 @@ - - + + + + + 0 + 0 + + 10 - - Accept - - - - - - 10 - - + + - Reject + Decimal @@ -124,45 +142,44 @@ - - - - - 0 - 0 - - + + 10 + + Accept + - - + + + + + 10 + + - MsgID + Reject - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - + + - Decimal + HD + + true + - - - - D000 - + + - 94 + DG Index: simulator/plugins/GeneralResponseMessage/loader.py =================================================================== diff -u -r2204a65b0af94e7e555f0f4207fd2701c164d1d5 -r26b852b6e979e73cf806699b050401065b5f8fb2 --- simulator/plugins/GeneralResponseMessage/loader.py (.../loader.py) (revision 2204a65b0af94e7e555f0f4207fd2701c164d1d5) +++ simulator/plugins/GeneralResponseMessage/loader.py (.../loader.py) (revision 26b852b6e979e73cf806699b050401065b5f8fb2) @@ -4,7 +4,6 @@ # Python import os # Qt -from email import message from PySide2 import QtWidgets from PySide2.QtCore import Slot @@ -21,7 +20,8 @@ """ The ui loader class """ - + rbHD: QtWidgets.QRadioButton + rbDG: QtWidgets.QRadioButton leMessageID: QtWidgets.QLineEdit btnAccept: QtWidgets.QPushButton btnReject: QtWidgets.QPushButton @@ -36,6 +36,8 @@ finds and creates widgets :return: none """ + self.rbHD = self.find_radio_button('rbHD') + self.rbDG = self.find_radio_button('rbDG') self.leMessageID = self.find_line_edit('leMessageID') self.btnAccept = self.find_button('btnAccept') self.btnReject = self.find_button('btnReject') @@ -64,7 +66,7 @@ :return: none """ message_id = self.leMessageID.text() - self.hd_simulator.cmd_send_general_response(int(message_id), True, 0) + self.hd_simulator.cmd_send_general_response(int(message_id), True, 0, self.rbHD.isChecked()) self.lblAction.setText('Accepted ') @Slot() @@ -75,5 +77,5 @@ """ message_id = self.leMessageID.text() reason = self.spnReason.value() - self.hd_simulator.cmd_send_general_response(int(message_id), False, reason) + self.hd_simulator.cmd_send_general_response(int(message_id), False, reason, self.rbHD.isChecked()) self.lblAction.setText('Rejected ' + "{}".format(reason)) Index: simulator/simulator/dynamicloader.py =================================================================== diff -u -r2204a65b0af94e7e555f0f4207fd2701c164d1d5 -r26b852b6e979e73cf806699b050401065b5f8fb2 --- simulator/simulator/dynamicloader.py (.../dynamicloader.py) (revision 2204a65b0af94e7e555f0f4207fd2701c164d1d5) +++ simulator/simulator/dynamicloader.py (.../dynamicloader.py) (revision 26b852b6e979e73cf806699b050401065b5f8fb2) @@ -151,6 +151,15 @@ child = self.find_widget(QtWidgets.QSpinBox, name) return child + def find_radio_button(self, name: str) -> QtWidgets.QRadioButton: + """ + convenient method of find_widget for QRadioButton + :param name: (str) name of the QRadioButton Object + :return: (QRadioButton) reference to the QSpinBox + """ + child = self.find_widget(QtWidgets.QRadioButton, name) + return child + def find_slider(self, name: str) -> QtWidgets.QSlider: """ convenient method of find_widget for QSlider