// // Created by h44z on 07.05.19. // #ifndef GCLOGGER_SERIALPORT_H #define GCLOGGER_SERIALPORT_H #include #include #include // POSIX terminal control definitions #include #include using namespace std; class SerialPort { int fd; struct termios tio; int tioBaud; int getTioBaud(int); public: // Constructor SerialPort(); SerialPort(const string&, int); ~SerialPort(); bool isOpen(); bool serialClose(); string serialRead(int); int serialWrite(const string&); bool clearInput(int); }; #endif //GCLOGGER_SERIALPORT_H