def frequency(self, frequency): msg = message.ChannelFrequencyMessage(self.number, frequency) response = self.node.evm.writeMessage(msg).waitForAck(msg) if response != RESPONSE_NO_ERROR: raise ChannelError('%s, could not set frequency (%.2x).' % (str(self), response)) self._frequency = frequency
def setFrequency(self, frequency): msg = message.ChannelFrequencyMessage(number=self.number) msg.setFrequency(frequency) self.node.driver.write(msg.encode()) if self.node.evm.waitForAck(msg) != RESPONSE_NO_ERROR: raise ChannelError('Could not set channel frequency.')
def setUp(self): self.message = MSG.ChannelFrequencyMessage()