diff --git a/eip.py b/eip.py index 0612455..58a749f 100644 --- a/eip.py +++ b/eip.py @@ -550,46 +550,43 @@ def _buildTagIOI(self, tagName, isBoolArray): We also might be reading arrays, a bool from arrays (atomic), strings. Oh and multi-dim arrays, program scope tags... ''' - RequestPathSize = 0 # define path size RequestTagData = "" # define tag data tagArray = tagName.split(".") # this loop figures out the packet length and builds our packet for i in xrange(len(tagArray)): if tagArray[i].endswith("]"): - RequestPathSize += 1 # add a word for 0x91 and len + tag, basetag, index = TagNameParser(tagArray[i], 0) - BaseTagLenBytes = len(basetag) # get number of bytes + BaseTagLenBytes = len(basetag) # get number of bytes if isBoolArray and i == len(tagArray)-1: index = index/32 # Assemble the packet - RequestTagData += pack(' 255: # if index is more than 1 byte... - RequestPathSize += 2 # add 2 words for array for index - RequestTagData += pack(' index > 255: # if index is more than 1 byte... + RequestTagData += pack(' 65535: + RequestTagData += pack(' 255: # if index is more than 1 byte... - RequestPathSize += 2 # add 2 words for array for index - RequestTagData += pack(' index[i] > 255: # if index is more than 1 byte... + RequestTagData += pack(' 65535: # if index is more than 4 bytes + RequestTagData += pack('