15 #ifndef VISIONTRANSFER_IMAGEPROTOCOL_H
16 #define VISIONTRANSFER_IMAGEPROTOCOL_H
18 #include "visiontransfer/common.h"
19 #include "visiontransfer/imageset.h"
23 namespace visiontransfer {
40 class VT_EXPORT ImageProtocol {
58 ImageProtocol(
bool server, ProtocolType protType,
int maxUdpPacketSize = 1472);
71 void setTransferImageSet(
const ImageSet& imageSet);
103 void setRawTransferData(
const ImageSet& metaData,
const std::vector<unsigned char*>& imageData,
104 int firstTileWidth = 0,
int middleTilesWidth = 0,
int lastTileWidth = 0);
115 void setRawValidBytes(
const std::vector<int>& validBytes);
125 const unsigned char* getTransferMessage(
int& length);
130 bool transferComplete();
136 void resetTransfer();
152 bool getReceivedImageSet(ImageSet& imageSet);
176 bool getPartiallyReceivedImageSet(ImageSet& imageSet,
int& validRows,
bool& complete);
181 bool imagesReceived()
const;
189 unsigned char* getNextReceiveBuffer(
int& maxLength);
206 void processReceivedMessage(
int length);
215 int getNumDroppedFrames()
const;
221 void resetReception();
227 bool newClientConnected();
232 bool isConnected()
const;
243 const unsigned char* getNextControlMessage(
int& length);
249 bool supportsExtendedConnectionStateProtocol()
const;
251 #ifndef DOXYGEN_SHOULD_SKIP_THIS
252 std::string statusReport();
262 ImageProtocol(
const ImageProtocol& other);
263 ImageProtocol& operator=(
const ImageProtocol&);