#pragma once
#include <string>
#include <termios.h>

class SerialPort {
private:
    const int device;
    termios configuration, oldConfiguration;

    void SetAttributes(const speed_t baudrate = B115200);

protected:
public:
    std::string ReadLine();

    SerialPort(const int fd);

    ~SerialPort();

    SerialPort(const SerialPort &) = delete;
    SerialPort(SerialPort &&) = delete;
    SerialPort & operator=(const SerialPort &) = delete;
    SerialPort & operator=(SerialPort &&) = delete;
};
