flow_control: more documentation
This commit is contained in:
parent
e34103c367
commit
9202ad2297
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user