include
toposens_driver
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
13
#include <
toposens_driver/command.h
>
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
toposens_driver::Serial::isAcknowledgementFrame
bool isAcknowledgementFrame(std::string frame)
Definition:
serial.cpp:190
command.h
toposens_driver::Serial::_port
std::string _port
Definition:
serial.h:78
cmd
string cmd
toposens_driver::Serial::kBaud
const unsigned int kBaud
Definition:
serial.h:79
toposens_driver::Serial::_fd
int _fd
Definition:
serial.h:77
toposens_driver::Serial
Provides low-level I/O access to TS data stream using native Unix API.
Definition:
serial.h:23
toposens_driver::Serial::~Serial
~Serial()
Definition:
serial.cpp:108
toposens_driver::Serial::Serial
Serial(std::string port)
Definition:
serial.cpp:22
toposens_driver
Definition:
command.h:12
toposens_driver::Command
Generates firmware-compatible commands for tuning performance parameters.
Definition:
command.h:60
toposens_driver::Serial::waitForAcknowledgement
bool waitForAcknowledgement(std::stringstream &buffer)
Definition:
serial.cpp:203
toposens_driver::Serial::sendCmd
void sendCmd(Command cmd, std::stringstream &data)
Definition:
serial.cpp:157
toposens_driver::Serial::getFrame
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