serial.h
Go to the documentation of this file.
1 
6 #ifndef SERIAL_H
7 #define SERIAL_H
8 
9 #include <sstream>
10 
11 #include <termios.h>
12 
14 
15 namespace toposens_driver
16 {
23 class Serial
24 {
25 public:
29  Serial(std::string port);
30  ~Serial();
31 
35  void getFrame(std::stringstream &data);
36 
44  void sendCmd(Command cmd, std::stringstream &data);
45 
55  bool waitForAcknowledgement(std::stringstream &buffer);
56 
74  bool isAcknowledgementFrame(std::string frame);
75 
76 private:
77  int _fd;
78  std::string _port;
79  const unsigned int kBaud = B576000;
80 };
81 
82 } // namespace toposens_driver
83 
84 #endif // SERIAL_H
bool isAcknowledgementFrame(std::string frame)
Definition: serial.cpp:190
std::string _port
Definition: serial.h:78
string cmd
const unsigned int kBaud
Definition: serial.h:79
Provides low-level I/O access to TS data stream using native Unix API.
Definition: serial.h:23
Serial(std::string port)
Definition: serial.cpp:22
Generates firmware-compatible commands for tuning performance parameters.
Definition: command.h:60
bool waitForAcknowledgement(std::stringstream &buffer)
Definition: serial.cpp:203
void sendCmd(Command cmd, std::stringstream &data)
Definition: serial.cpp:157
void getFrame(std::stringstream &data)
Definition: serial.cpp:127


toposens_driver
Author(s): Adi Singh, Sebastian Dengler, Christopher Lang, Roua Mokchah, Nancy Seckel, Georgiana Barbut
autogenerated on Mon Feb 28 2022 23:57:40