Files
home-data-collection-tools/include/electricity/logger/serialport.hpp

25 lines
504 B
C++

#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;
};