Rewrite electricity-logger to use an sqlite3 database
This commit is contained in:
24
include/electricity/logger/serialport.hpp
Normal file
24
include/electricity/logger/serialport.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#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;
|
||||
};
|
||||
Reference in New Issue
Block a user