Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
Variables
_
a
b
i
k
n
p
r
s
t
v
Typedefs
a
b
c
f
h
i
m
n
p
s
t
u
w
y
Enumerations
Enumerator
a
b
c
e
f
h
i
l
m
n
o
p
r
s
t
u
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
~
Variables
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
Enumerator
a
b
c
e
g
i
k
l
m
n
o
p
r
s
u
v
Related Functions
a
b
c
d
e
i
l
m
o
r
s
u
w
x
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
g
m
o
p
r
s
t
Variables
_
a
b
f
g
l
t
u
Typedefs
Enumerations
Enumerator
Macros
_
a
b
c
e
f
g
i
l
m
r
s
u
v
w
x
sick_visionary_cpp_shared
src
VisionaryDataStream.h
Go to the documentation of this file.
1
//
2
// Copyright (c) 2023 SICK AG, Waldkirch
3
//
4
// SPDX-License-Identifier: Unlicense
5
6
#pragma once
7
8
#include "
TcpSocket.h
"
9
#include "
VisionaryData.h
"
10
#include <memory>
11
12
namespace
visionary
{
13
14
class
VisionaryDataStream
15
{
16
public
:
17
using
ByteBuffer
= std::vector<std::uint8_t>;
18
19
VisionaryDataStream
(std::shared_ptr<VisionaryData> dataHandler);
20
~VisionaryDataStream
();
21
33
bool
open
(
const
std::string& hostname, std::uint16_t port, std::uint32_t timeoutMs = 5000u);
34
41
bool
open
(std::unique_ptr<ITransport>& pTransport);
42
47
void
close
();
48
49
bool
syncCoLa
()
const
;
50
51
//-----------------------------------------------
52
// Receive a single blob from the connected device and store it in buffer.
53
// Returns true when valid frame completely received.
54
bool
getNextFrame
();
55
65
bool
isConnected
()
const
;
66
70
void
setDataHandler
(std::shared_ptr<VisionaryData> dataHandler);
71
75
std::shared_ptr<VisionaryData>
getDataHandler
();
76
77
private
:
78
std::shared_ptr<VisionaryData>
m_dataHandler
;
79
std::unique_ptr<ITransport>
m_pTransport
;
80
81
// Parse the Segment-Binary-Data (Blob data without protocol version and packet type).
82
// Returns true when parsing was successful.
83
bool
parseSegmentBinaryData
(
const
ByteBuffer::iterator itBuf, std::size_t bufferSize);
84
};
85
86
}
// namespace visionary
TcpSocket.h
visionary::VisionaryDataStream::m_pTransport
std::unique_ptr< ITransport > m_pTransport
Definition:
VisionaryDataStream.h:79
visionary::VisionaryDataStream::syncCoLa
bool syncCoLa() const
Definition:
VisionaryDataStream.cpp:58
visionary::VisionaryDataStream::getNextFrame
bool getNextFrame()
Definition:
VisionaryDataStream.cpp:82
visionary::VisionaryDataStream::VisionaryDataStream
VisionaryDataStream(std::shared_ptr< VisionaryData > dataHandler)
Definition:
VisionaryDataStream.cpp:17
visionary
Definition:
MD5.cpp:44
visionary::VisionaryDataStream::setDataHandler
void setDataHandler(std::shared_ptr< VisionaryData > dataHandler)
Definition:
VisionaryDataStream.cpp:213
visionary::VisionaryDataStream::ByteBuffer
std::vector< std::uint8_t > ByteBuffer
Definition:
VisionaryDataStream.h:17
VisionaryData.h
visionary::VisionaryDataStream::close
void close()
Definition:
VisionaryDataStream.cpp:49
visionary::VisionaryDataStream::parseSegmentBinaryData
bool parseSegmentBinaryData(const ByteBuffer::iterator itBuf, std::size_t bufferSize)
Definition:
VisionaryDataStream.cpp:131
visionary::VisionaryDataStream::~VisionaryDataStream
~VisionaryDataStream()
Definition:
VisionaryDataStream.cpp:22
visionary::VisionaryDataStream::m_dataHandler
std::shared_ptr< VisionaryData > m_dataHandler
Definition:
VisionaryDataStream.h:78
visionary::VisionaryDataStream
Definition:
VisionaryDataStream.h:14
visionary::VisionaryDataStream::getDataHandler
std::shared_ptr< VisionaryData > getDataHandler()
Definition:
VisionaryDataStream.cpp:208
visionary::VisionaryDataStream::isConnected
bool isConnected() const
Definition:
VisionaryDataStream.cpp:218
visionary::VisionaryDataStream::open
bool open(const std::string &hostname, std::uint16_t port, std::uint32_t timeoutMs=5000u)
Definition:
VisionaryDataStream.cpp:27
sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:56:19