Exemple #1
0
class Manager:

    def __init__(self):
        print Radio
        self.radio = Radio()
        self.command = Command()

    def startup_message(self, message):
        self.command.MES(message)
        self.radio.send(self.command.cmd(), self.command.args())
        print self.radio.receive()

    def read_memory(self):
        for index in range(0, 399):
            self.command.MR(0, index)
            self.radio.send(self.command.cmd(), self.command.args())
            record = self.radio.receive()
            if record.startswith('N') == False:
                print str(index) + ' ' + record

    def write_memory(self):
        return ''
Exemple #2
0
 def __init__(self):
     print Radio
     self.radio = Radio()
     self.command = Command()