Logo Search packages:      
Sourcecode: g15daemon version File versions  Download package

def g15daemon::g15screen::__validate_buffer (   self,
) [private]
Validate given buffer

Definition at line 93 of file g15daemon.py.

        """Validate given buffer"""
        if len(buf) != MAX_BUFFER_LENGTH:
            if use_exceptions:
                raise Exception("Buffer has wrong size(%d)" % len(buf))
            return False
        for i in range(0,MAX_BUFFER_LENGTH):
            if not self.__validate_pixel(buf[i]):
                if use_exceptions:
                    raise Exception("Buffer contains at position %d an invalid char" % i)
                return False
        return True

Generated by  Doxygen 1.6.0   Back to index