Go to the documentation of this file.
99 bool getNextBlobTcp(std::vector<std::uint8_t>& receiveBufferPacketSize);
107 bool getBlobStartTcp(std::vector<std::uint8_t>& receiveBufferPacketSize);
Meta data contained in a UDP header.
@ INVALID_PACKET_TYPE_BLOB_HEADER
@ INVALID_VERSION_BLOB_HEADER
bool getBlobStartTcp(std::vector< std::uint8_t > &receiveBufferPacketSize)
std::vector< uint32_t > m_offsetSegment
Offset in byte for each data segment.
int32_t getNextTcpReception(std::vector< std::uint8_t > &receiveBuffer)
TcpSocket m_pTransportTcp
Unique TCP socket used to receive the measurement data output stream.
bool parseUdpHeader(std::vector< std::uint8_t > &buffer, UdpProtocolData &udpProtocolData)
@ DATA_SEGMENT_DEPTHMAP_ERROR
bool parseBlobHeaderUdp()
std::unique_ptr< UdpSocket > m_pTransportUdp
Unique pointer the UDP socket used to receive the measurement data output stream.
uint16_t m_numSegments
number of Blob data segments
DataStreamError m_lastDataStreamError
Stores the last error which occurred while parsing the data stream.
std::vector< uint32_t > m_changeCounter
Change counter for each data segment.
DataStreamError getLastError()
uint16_t fragmentNumber
fragment number, incremented for each new fragment of the Blob
std::shared_ptr< VisionaryData > m_dataHandler
Shared pointer to the Visionary data handler.
@ INVALID_VERSION_UDP_HEADER
@ INVALID_UDP_FRAGMENT_NUMBER
bool getNextBlobTcp(std::vector< std::uint8_t > &receiveBufferPacketSize)
SafeVisionaryDataStream(std::shared_ptr< VisionaryData > dataHandler)
@ DATA_SEGMENT_DEVICESTATUS_ERROR
bool openTcpConnection(std::uint16_t port, std::string deviceIpAddress)
Connects to the sensor data stream using the given TCP port and given IPAddress.
bool parseBlobHeaderTcp()
bool openUdpConnection(std::uint16_t port)
@ INVALID_LENGTH_UDP_HEADER
uint16_t blobNumber
BLOB number, incremented for each new Blob.
@ DATA_SEGMENT_FIELDINFORMATION_ERROR
bool isLastFragment
flag whether this was the last fragment of a Blob
~SafeVisionaryDataStream()
@ DATA_SEGMENT_LOCALIOS_ERROR
bool getBlobStartUdp(bool &lastFragment)
@ DATA_SEGMENT_LOGICSIGNALS_ERROR
bool getNextFragment(std::vector< std::uint8_t > &receiveBuffer)
uint16_t dataLength
length of the payload within the fragment
std::vector< uint8_t > m_blobDataBuffer
Buffer which stores the received Blob data.
uint16_t m_blobNumber
Number of current Blob.
@ INVALID_PACKET_TYPE_UDP_HEADER
void closeTcpConnection()
void closeUdpConnection()