Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
b
c
d
e
f
i
m
n
o
p
s
t
v
w
Functions
Variables
Typedefs
Enumerations
Enumerator
b
c
f
i
m
o
s
t
v
w
Classes
Class List
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
~
Functions
a
c
d
e
f
g
i
n
o
p
r
s
u
v
~
Variables
a
b
c
d
e
f
h
i
m
n
p
r
s
t
v
w
x
y
Typedefs
Enumerations
Enumerator
Files
File List
File Members
All
a
b
c
g
m
s
t
Functions
m
t
Macros
include
create
serial_query.h
Go to the documentation of this file.
1
33
// Based on example from:
34
// https://github.com/labust/labust-ros-pkg/wiki/Create-a-Serial-Port-application
35
36
#ifndef CREATE_SERIAL_QUERY_H
37
#define CREATE_SERIAL_QUERY_H
38
39
#include <memory>
40
41
#include <boost/asio.hpp>
42
43
#include "
create/data.h
"
44
#include "
create/types.h
"
45
#include "
create/util.h
"
46
#include "
create/serial.h
"
47
48
namespace
create
{
49
class
SerialQuery
:
public
Serial
{
50
51
private
:
52
boost::asio::deadline_timer
streamRecoveryTimer
;
53
uint8_t
packetID
;
54
int8_t
packetByte
;
55
uint16_t
packetData
;
56
const
uint8_t
maxPacketID
;
57
58
bool
started
;
59
60
void
requestSensorData
();
61
void
restartSensorStream
(
const
boost::system::error_code& err);
62
63
void
flushInput
();
64
65
protected
:
66
bool
startSensorStream
();
67
void
processByte
(uint8_t
byteRead
);
68
69
public
:
70
SerialQuery
(std::shared_ptr<Data>
data
,
bool
install_signal_handler =
true
);
71
virtual
~SerialQuery
() =
default
;
72
};
73
}
// namespace create
74
75
#endif // CREATE_SERIAL_H
create::SerialQuery::packetByte
int8_t packetByte
Definition:
serial_query.h:54
types.h
create::SerialQuery::maxPacketID
const uint8_t maxPacketID
Definition:
serial_query.h:56
create::SerialQuery::startSensorStream
bool startSensorStream()
Definition:
serial_query.cpp:20
create::SerialQuery::streamRecoveryTimer
boost::asio::deadline_timer streamRecoveryTimer
Definition:
serial_query.h:52
create::SerialQuery::restartSensorStream
void restartSensorStream(const boost::system::error_code &err)
Definition:
serial_query.cpp:39
create::Serial
Definition:
serial.h:51
create::Serial::byteRead
uint8_t byteRead
Definition:
serial.h:65
serial.h
create::SerialQuery::started
bool started
Definition:
serial_query.h:58
create::SerialQuery::~SerialQuery
virtual ~SerialQuery()=default
create::SerialQuery::requestSensorData
void requestSensorData()
Definition:
serial_query.cpp:28
create::SerialQuery::SerialQuery
SerialQuery(std::shared_ptr< Data > data, bool install_signal_handler=true)
Definition:
serial_query.cpp:11
data.h
create::SerialQuery::packetID
uint8_t packetID
Definition:
serial_query.h:53
create::SerialQuery::flushInput
void flushInput()
Definition:
serial_query.cpp:48
create::SerialQuery::packetData
uint16_t packetData
Definition:
serial_query.h:55
create::Serial::data
std::shared_ptr< Data > data
Definition:
serial.h:78
util.h
create::SerialQuery
Definition:
serial_query.h:49
create::SerialQuery::processByte
void processByte(uint8_t byteRead)
Definition:
serial_query.cpp:53
create
Definition:
create.h:48
libcreate
Author(s): Jacob Perron
autogenerated on Wed May 24 2023 02:24:57