def _init(self): self.stateChan = self.getChannelObject("state") try: self.moveStateChan = self.getChannelObject("hardware_state") except KeyError: self.moveStateChan = None try: self.changeCmd = self.getCommandObject("command") except KeyError: self.changeCmd = None try: self.stateListChannel = self.getChannelObject("statelist") except KeyError: self.stateListChannel = None try: self.commandtype = self.getProperty("commandtype") except KeyError: self.commandtype = None self.stateChan.connectSignal("update", self.stateChanged) if self.moveStateChan: self.moveStateChan.connectSignal("update", self.hardwareStateChanged) Device._init(self)
def _init(self): self.stateChan = self.getChannelObject("state") try: self.moveStateChan = self.getChannelObject("hardware_state") except KeyError: self.moveStateChan = None try: self.changeCmd = self.getCommandObject("command") except KeyError: self.changeCmd = None try: self.stateListChannel = self.getChannelObject("statelist") except KeyError: self.stateListChannel = None try: self.commandtype = self.getProperty("commandtype") except KeyError: self.commandtype = None self.stateChan.connectSignal("update", self.stateChanged) if self.moveStateChan: self.moveStateChan.connectSignal("update", self.hardwareStateChanged) Device._init(self)