58 TTYBase(
const char *driverName);
140 bool m_Debug {
false };
142 const char *m_DriverName;
Base class for serial communications.
TTY_RESPONSE read(uint8_t *buffer, uint32_t nbytes, uint8_t timeout, uint32_t *nbytes_read)
read buffer from terminal
TTYBase(const char *driverName)
const std::string error(TTY_RESPONSE code) const
Retrieve the tty error message.
void setDebug(INDI::Logger::VerbosityLevel channel)
setDebug Enable or Disable debug logging
TTY_RESPONSE writeString(const char *string, uint32_t *nbytes_written)
Writes a null terminated string to fd.
TTY_RESPONSE readSection(uint8_t *buffer, uint32_t nsize, uint8_t stop_byte, uint8_t timeout, uint32_t *nbytes_read)
read buffer from terminal with a delimiter
TTY_RESPONSE disconnect()
Closes a tty connection and flushes the bus.
TTY_RESPONSE write(const uint8_t *buffer, uint32_t nbytes, uint32_t *nbytes_written)
Writes a buffer to fd.
TTY_RESPONSE connect(const char *device, uint32_t bit_rate, uint8_t word_size, uint8_t parity, uint8_t stop_bits)
Establishes a tty connection to a terminal device.
std::vector< uint8_t > buffer