def _set_cpri_status(self): cmd = RRUCmd.get_cpri(self.parentWidget.get_option()) thread_cpri_set = WorkThread(self, RRUCmd.SET_CPRI, cmd) thread_cpri_set.sigConnectionOut.connect(self.slot_connection_out_signal) thread_cpri_set.sigGetRes.connect(self.set_resp_handler) thread_cpri_set.start() thread_cpri_set.exec()
def _set_cpri_loop_mode(self): # TODO Valid Check not added yet loopMode2set = self.cpriLoopModeEdit.text().strip() if loopMode2set != self.cpriValueLabel.text(): if len(loopMode2set) != 0: self.cpriValueLabel.setStyleSheet(NonQSSStyle.displayValueTempStyle) cmd = RRUCmd.config_cpri_loop_mode(self.parentWidget.get_option(), loopMode2set) thread_cpri_loop_mode_set = WorkThread(self, RRUCmd.SET_CPRI_LOOP_MODE, cmd) thread_cpri_loop_mode_set.sigConnectionOut.connect(self.slot_connection_out_signal) thread_cpri_loop_mode_set.sigSetOK.connect(self.set_resp_handler) thread_cpri_loop_mode_set.start() thread_cpri_loop_mode_set.exec() else: self.cpriLoopModeEdit.setStyleSheet(NonQSSStyle.warningStyle)
def _set_axis_offset(self): axiOffset2set = self.axisOffsetEdit.text().strip() if axiOffset2set != self.axisOffsetValueLabel.text(): match = ValidCheck.filter(ValidCheck.HEX_RE, axiOffset2set) if match is not None: self.axisOffsetValueLabel.setStyleSheet(NonQSSStyle.displayValueTempStyle) cmd = RRUCmd.config_axis_offset(self.parentWidget.get_option(), str(match.group())) thread_axi_offset_set = WorkThread(self, RRUCmd.SET_AXI_OFFSET, cmd) thread_axi_offset_set.sigConnectionOut.connect(self.slot_connection_out_signal) thread_axi_offset_set.sigSetOK.connect(self.set_resp_handler) thread_axi_offset_set.start() thread_axi_offset_set.exec() else: self.axisOffsetEdit.setStyleSheet(NonQSSStyle.warningStyle)
def _send(self): self._set_axis_offset() # TODO Valid Check not added yet ulOffset2set = self.ulOffsetEdit.text().strip() if len(ulOffset2set) != 0: self.ulOffsetValueLabel.setStyleSheet(NonQSSStyle.displayValueTempStyle) if ulOffset2set != self.ulOffsetValueLabel.text(): cmd = RRUCmd.set_ul_frame_offset(self.parentWidget.get_option(), self.parentWidget.get_ant_num(), ulOffset2set) self.antenna_bean_arr[self.antenna_index].ulFrameOffsetOutDated = True thread_ul_offset_Set = WorkThread(self, RRUCmd.SET_UL_OFFSET, cmd) thread_ul_offset_Set.sigConnectionOut.connect(self.slot_connection_out_signal) thread_ul_offset_Set.sigSetOK.connect(self.set_resp_handler) thread_ul_offset_Set.start() thread_ul_offset_Set.exec() else: self.ulOffsetEdit.setStyleSheet(NonQSSStyle.warningStyle) # TODO Valid Check not added yet dlOffset2set = self.udlOffsetEdit.text().strip() if len(dlOffset2set) != 0: self.ulOffsetValueLabel.setStyleSheet(NonQSSStyle.displayValueTempStyle) if dlOffset2set != self.dlOffsetValueLabel.text(): cmd = RRUCmd.set_dl_frame_offset(self.parentWidget.get_option(), self.parentWidget.get_ant_num(), dlOffset2set) self.antenna_bean_arr[self.antenna_index].dlFrameOffsetOutDated = True thread_dl_offset_Set = WorkThread(self, RRUCmd.SET_DL_OFFSET, cmd) thread_dl_offset_Set.sigConnectionOut.connect(self.slot_connection_out_signal) thread_dl_offset_Set.sigSetOK.connect(self.set_resp_handler) thread_dl_offset_Set.start() thread_dl_offset_Set.exec() else: self.dlOffsetEdit.setStyleSheet(NonQSSStyle.warningStyle)