def rtuFrameSize(buffer, byte_count_pos):
 return ((struct.unpack('>B', buffer[byte_count_pos])[0] + byte_count_pos) + 3)

def rtuFrameSize ( buffer , byte_count_pos ) : return ( ( struct . unpack ( '>B' , buffer [ byte_count_pos ] ) [ 0 ] + byte_count_pos ) + 3 )
calculates the size of the frame based on the byte count .