libvisiontransfer  5.1.0
asynctransfer.h
1 /*******************************************************************************
2  * Copyright (c) 2017 Nerian Vision Technologies
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *******************************************************************************/
14 
15 #ifndef VISIONTRANSFER_ASYNCTRANSFER_H
16 #define VISIONTRANSFER_ASYNCTRANSFER_H
17 
18 #include "visiontransfer/common.h"
19 #include "visiontransfer/imagetransfer.h"
20 #include "visiontransfer/imagepair.h"
21 
29 class VT_EXPORT AsyncTransfer {
30 public:
49  AsyncTransfer(ImageTransfer::OperationMode mode, const char* remoteAddress, const char* remoteService,
50  const char* localAddress, const char* localService, int bufferSize = 1048576,
51  int maxUdpPacketSize = 1472);
52  ~AsyncTransfer();
53 
67  void sendImagePairAsync(const ImagePair& imagePair, bool deleteData);
68 
85  bool collectReceivedImagePair(ImagePair& imagePair, double timeout = -1);
86 
87 private:
88  // We follow the pimpl idiom
89  class Pimpl;
90  Pimpl* pimpl;
91 
92  // This class cannot be copied
93  AsyncTransfer(const AsyncTransfer& other);
94  AsyncTransfer& operator=(const AsyncTransfer&);
95 };
96 
97 #endif
OperationMode
Supported transfer modes.
Definition: imagetransfer.h:33
A set of two images, which are usually the left camera image and the disparity map.
Definition: imagepair.h:30
Class for asynchronous transfer of image pairs.
Definition: asynctransfer.h:29
Nerian Vision Technologies