#include <SafeVisionaryDataStream.h>
Definition at line 65 of file SafeVisionaryDataStream.h.
◆ SafeVisionaryDataStream()
visionary::SafeVisionaryDataStream::SafeVisionaryDataStream |
( |
std::shared_ptr< VisionaryData > |
dataHandler | ) |
|
◆ ~SafeVisionaryDataStream()
visionary::SafeVisionaryDataStream::~SafeVisionaryDataStream |
( |
| ) |
|
◆ closeTcpConnection()
void visionary::SafeVisionaryDataStream::closeTcpConnection |
( |
| ) |
|
◆ closeUdpConnection()
void visionary::SafeVisionaryDataStream::closeUdpConnection |
( |
| ) |
|
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 157 of file SafeVisionaryDataStream.cpp.
◆ getBlobStartTcp()
bool visionary::SafeVisionaryDataStream::getBlobStartTcp |
( |
std::vector< std::uint8_t > & |
receiveBufferPacketSize | ) |
|
◆ getBlobStartUdp()
bool visionary::SafeVisionaryDataStream::getBlobStartUdp |
( |
bool & |
lastFragment | ) |
|
|
private |
Finds the start of the next Blob data.
This function gets the next Blob data telegram until a telegram with the fragment number 0 is received. In case the Blob data start has been found, this telegram is stored in the internal BlobData buffer.
- Parameters
-
[out] | lastFragment | true in case the Blob data consists only of one fragment |
Definition at line 298 of file SafeVisionaryDataStream.cpp.
◆ getLastError()
Gets the last error which occurred while parsing the data stream.
- Returns
- Returns the last error, OK in case there occurred no error
Definition at line 825 of file SafeVisionaryDataStream.cpp.
◆ getNextBlobTcp()
bool visionary::SafeVisionaryDataStream::getNextBlobTcp |
( |
std::vector< std::uint8_t > & |
receiveBufferPacketSize | ) |
|
◆ getNextBlobUdp()
bool visionary::SafeVisionaryDataStream::getNextBlobUdp |
( |
| ) |
|
Receive a single blob from the connected device and store it in buffer.
- Returns
- Returns true when a complete blob has been successfully received.
Definition at line 661 of file SafeVisionaryDataStream.cpp.
◆ getNextFragment()
bool visionary::SafeVisionaryDataStream::getNextFragment |
( |
std::vector< std::uint8_t > & |
receiveBuffer | ) |
|
|
private |
Gets the next fragment of the Blob data via the opened UDP socket.
- Parameters
-
[out] | receiveBuffer | Vector which contains the received fragment |
- Returns
- Returns true in case the next fragment has been received successfully
Definition at line 174 of file SafeVisionaryDataStream.cpp.
◆ getNextTcpReception()
int32_t visionary::SafeVisionaryDataStream::getNextTcpReception |
( |
std::vector< std::uint8_t > & |
receiveBuffer | ) |
|
|
private |
Gets the next packet of the Blob data via the opened TCP socket.
- Parameters
-
[out] | receiveBuffer | Vector which contains the received Packet |
- Returns
- the received size of the tcp packet
Definition at line 203 of file SafeVisionaryDataStream.cpp.
◆ openTcpConnection()
bool visionary::SafeVisionaryDataStream::openTcpConnection |
( |
std::uint16_t |
port, |
|
|
std::string |
deviceIpAddress |
|
) |
| |
◆ openUdpConnection()
bool visionary::SafeVisionaryDataStream::openUdpConnection |
( |
std::uint16_t |
port | ) |
|
Connects to the sensor data stream using the given UDP port
- Parameters
-
- Return values
-
true | The connection to the sensor data stream has been successfully established. |
false | The connection attempt failed; the sensor is either
- switched off or streams on a different UPD port
- 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 130 of file SafeVisionaryDataStream.cpp.
◆ parseBlobData()
bool visionary::SafeVisionaryDataStream::parseBlobData |
( |
| ) |
|
|
private |
Parses the segments of the Blob data
- Returns
- Returns true in case the parsing of the Blob data has been successful, otherwise returns false
Definition at line 531 of file SafeVisionaryDataStream.cpp.
◆ parseBlobHeaderTcp()
bool visionary::SafeVisionaryDataStream::parseBlobHeaderTcp |
( |
| ) |
|
|
private |
Parses and checks the Blob header of a complete Blob data telegram. In case the Blob header is valid
- Returns
- Returns true in case the Blob header is valid
Definition at line 381 of file SafeVisionaryDataStream.cpp.
◆ parseBlobHeaderUdp()
bool visionary::SafeVisionaryDataStream::parseBlobHeaderUdp |
( |
| ) |
|
|
private |
Parses and checks the Blob header of a complete Blob data telegram. In case the Blob header is valid, the offset and change counter of each Blob data segment is stored.
- Returns
- Returns true in case the Blob header is valid
Definition at line 456 of file SafeVisionaryDataStream.cpp.
◆ parseUdpHeader()
bool visionary::SafeVisionaryDataStream::parseUdpHeader |
( |
std::vector< std::uint8_t > & |
buffer, |
|
|
UdpProtocolData & |
udpProtocolData |
|
) |
| |
|
private |
Parses and checks the UDP header of one UDP fragment. Furthermore it returns some metadata regarding the fragment.
- Parameters
-
[in] | buffer | Vector which contains the received UDP telegram |
[out] | udpProtocolData | reference to the UDP protocol data which is gotten from the UDP telegram for later use |
- Returns
- Returns true in case the UDP header is valid
Definition at line 231 of file SafeVisionaryDataStream.cpp.
◆ m_blobDataBuffer
std::vector<uint8_t> visionary::SafeVisionaryDataStream::m_blobDataBuffer |
|
private |
◆ m_blobNumber
uint16_t visionary::SafeVisionaryDataStream::m_blobNumber |
|
private |
◆ m_changeCounter
std::vector<uint32_t> visionary::SafeVisionaryDataStream::m_changeCounter |
|
private |
◆ m_dataHandler
std::shared_ptr<VisionaryData> visionary::SafeVisionaryDataStream::m_dataHandler |
|
private |
◆ m_lastDataStreamError
◆ m_numSegments
uint16_t visionary::SafeVisionaryDataStream::m_numSegments |
|
private |
◆ m_offsetSegment
std::vector<uint32_t> visionary::SafeVisionaryDataStream::m_offsetSegment |
|
private |
◆ m_pTransportTcp
TcpSocket visionary::SafeVisionaryDataStream::m_pTransportTcp |
|
private |
◆ m_pTransportUdp
std::unique_ptr<UdpSocket> visionary::SafeVisionaryDataStream::m_pTransportUdp |
|
private |
The documentation for this class was generated from the following files: