#include <VisionaryDataStream.h>
Definition at line 14 of file VisionaryDataStream.h.
◆ ByteBuffer
◆ VisionaryDataStream()
visionary::VisionaryDataStream::VisionaryDataStream |
( |
std::shared_ptr< VisionaryData > |
dataHandler | ) |
|
◆ ~VisionaryDataStream()
visionary::VisionaryDataStream::~VisionaryDataStream |
( |
| ) |
|
◆ close()
void visionary::VisionaryDataStream::close |
( |
| ) |
|
Close a connection
Closes the connection. It is allowed to call close of a connection that is not open. In this case this call is a no-op.
Definition at line 49 of file VisionaryDataStream.cpp.
◆ getDataHandler()
std::shared_ptr< VisionaryData > visionary::VisionaryDataStream::getDataHandler |
( |
| ) |
|
◆ getNextFrame()
bool visionary::VisionaryDataStream::getNextFrame |
( |
| ) |
|
◆ isConnected()
bool visionary::VisionaryDataStream::isConnected |
( |
| ) |
const |
Checks if connection is established
- Attention
- To check if the connection is estabilished data has to be sent to the camera which means this is a costly operation. Should only be used when get getNextFrame fails.
- Return values
-
true | The connection to the sensor is established. |
false | The connection to the sensor is lost. A reconnection by calling close + open is necessary. |
Definition at line 218 of file VisionaryDataStream.cpp.
◆ open() [1/2]
bool visionary::VisionaryDataStream::open |
( |
const std::string & |
hostname, |
|
|
std::uint16_t |
port, |
|
|
std::uint32_t |
timeoutMs = 5000u |
|
) |
| |
Opens a connection to a Visionary sensor
- Parameters
-
[in] | hostname | name or IP address of the Visionary sensor. |
[in] | port | control command port of the sensor, usually 2112 for CoLa-B or 2122 for CoLa-2 (given in host-byte order). |
[in] | timeoutMs | controls the socket timeout, default 5000ms |
- Return values
-
true | The connection to the sensor successfully was established. |
false | The connection attempt failed; the sensor is either
- switched off or has a different IP address or name
- not available using for PCs network settings (different subnet)
- the protocol type or the port did not match. Please check your sensor documentation.
|
Definition at line 27 of file VisionaryDataStream.cpp.
◆ open() [2/2]
bool visionary::VisionaryDataStream::open |
( |
std::unique_ptr< ITransport > & |
pTransport | ) |
|
Sets a socket used for the connection to a Visionary sensor The socket must already be ready to use and opened.
- Parameters
-
- Return values
-
Definition at line 43 of file VisionaryDataStream.cpp.
◆ parseSegmentBinaryData()
bool visionary::VisionaryDataStream::parseSegmentBinaryData |
( |
const ByteBuffer::iterator |
itBuf, |
|
|
std::size_t |
bufferSize |
|
) |
| |
|
private |
◆ setDataHandler()
void visionary::VisionaryDataStream::setDataHandler |
( |
std::shared_ptr< VisionaryData > |
dataHandler | ) |
|
◆ syncCoLa()
bool visionary::VisionaryDataStream::syncCoLa |
( |
| ) |
const |
◆ m_dataHandler
std::shared_ptr<VisionaryData> visionary::VisionaryDataStream::m_dataHandler |
|
private |
◆ m_pTransport
std::unique_ptr<ITransport> visionary::VisionaryDataStream::m_pTransport |
|
private |
The documentation for this class was generated from the following files: