def encode_for_device (self,device): return Packet.encode( self.Codes[0] )
def encode_for_device (self, device): self.check_device_support( device ) link = self.link_code( device.link ) command = self.command_code( device.link ) return Packet.encode( link, struct.pack('<H',command) )