libvisiontransfer  4.1.5
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:
48  AsyncTransfer(ImageTransfer::OperationMode mode, const char* remoteAddress, const char* remoteService,
49  const char* localAddress, const char* localService, int bufferSize = 800000);
50  ~AsyncTransfer();
51 
65  void sendImagePairAsync(const ImagePair& imagePair, bool deleteData);
66 
83  bool collectReceivedImagePair(ImagePair& imagePair, double timeout = -1);
84 
85 private:
86  // We follow the pimpl idiom
87  class Pimpl;
88  Pimpl* pimpl;
89 
90  // This class cannot be copied
91  AsyncTransfer(const AsyncTransfer& other);
92  AsyncTransfer& operator=(const AsyncTransfer&);
93 };
94 
95 #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