docs: def _read_byte(self):
          """Read a byte from input."""
  
          to_return = ""
          if (self._mode == PROP_MODE_SERIAL):
              to_return = self._serial.read(1)
          elif (self._mode == PROP_MODE_TCP):
              to_return = self._socket.recv(1)
          elif (self._mode == PROP_MODE_FILE):
              to_return = struct.pack("B", int(self._file.readline()))
  
          _LOGGER.debug("READ: " + str(ord(to_return)))
          self._logdata.append(ord(to_return))
          if (len(self._logdata) > self._logdatalen):
              self._logdata = self._logdata[len(self._logdata) - self._logdatalen:]
  
          self._debug(PROP_LOGLEVEL_TRACE, "READ: " + str(ord(to_return)))
  
          return to_return