Exemplo n.º 1
0
 def assign(self, network, channelType):
     msg = message.ChannelAssignMessage(self.number, channelType, network.number)
     response = self.node.evm.writeMessage(msg).waitForAck(msg)
     if response != RESPONSE_NO_ERROR:
         raise ChannelError('%s: could not assign (%.2x).' % (str(self), response))
     self.type = channelType
     self.network = network
Exemplo n.º 2
0
 def assign(self, net_key, ch_type):
     msg = message.ChannelAssignMessage(number=self.number)
     msg.setNetworkNumber(self.node.getNetworkKey(net_key).number)
     msg.setChannelType(ch_type)
     self.node.driver.write(msg.encode())
     if self.node.evm.waitForAck(msg) != RESPONSE_NO_ERROR:
         raise ChannelError('Could not assign channel.')
     self.is_free = False
Exemplo n.º 3
0
 def setUp(self):
     self.message = MSG.ChannelAssignMessage()