def __send_buffer(self):
bytes_written = self.serial.write(self.__out_buffer.raw)<EOL>if self.DEBUG_MODE:<EOL><INDENT>print("<STR_LIT>".format(binascii.hexlify(self.__out_buffer.raw)))<EOL><DEDENT>if bytes_written != len(self.__out_buffer):<EOL><INDENT>raise IOError("<STR_LIT>".format(bytes_written,<EOL>len(self.__out_buffer)))<EOL><DEDENT>return bytes_written<EOL>
Sends the contents of self.__out_buffer to serial device
:return: Number of bytes written