From 9202ad229757c4f1788bc8fccd83038b3573bc5f Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Thu, 18 Feb 2016 21:20:57 +0000 Subject: [PATCH] flow_control: more documentation --- src/tools/flow_control.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tools/flow_control.py b/src/tools/flow_control.py index cf05e85..273842d 100755 --- a/src/tools/flow_control.py +++ b/src/tools/flow_control.py @@ -97,6 +97,10 @@ class Flow: } def send_data(self, data_and_type): + """ + send data to the device at self.address. + + """ data, type = data_and_type if DEBUG: print "send", data_and_type, "data:", binascii.hexlify(data), "type:", type, self.address msg = self.address + data @@ -136,6 +140,9 @@ class Flow: return data def get_var(self, named_type="flow"): + """ + get variable from device, variables are definde in self.rcommands as list [bytearray[hiAd, loAd, numHi, numLo], type] + """ cmd,fmt = self.rcommands[named_type] if DEBUG: print "get_var", cmd,fmt self.send_data([cmd,fmt])