From: Mart Lubbers Date: Sun, 20 Dec 2015 16:48:13 +0000 (+0100) Subject: add data transfer X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=3ea556c913039c9f7e50e15717c2784e208fc600;p=tt2015.git add data transfer --- diff --git a/a3/code/jtorx/client/helloworld.py b/a3/code/jtorx/client/helloworld.py index c114558..3578d3e 100644 --- a/a3/code/jtorx/client/helloworld.py +++ b/a3/code/jtorx/client/helloworld.py @@ -47,6 +47,10 @@ if __name__ == "__main__": print 'RP: {}'.format(seqnr) response = sender.sendInput("RP", seqnr, 0) sender.sendReset() + if data == 'DAT?': + seqnr += 1 + print 'DAT: {} sending: a'.format(seqnr) + response = sender.sendInput('PA', seqnr, sender.lastSeqReceived + 1, 'a') if response: if response == 'Timeout': print 'data: {} - TIMEOUT!'.format(data)