runMACS
 All Data Structures Files Functions Variables Enumerations Enumerator Macros
RemoteGrabber.h
Go to the documentation of this file.
1 #ifndef REMOTE_GRABBER_H
2 #define REMOTE_GRABBER_H
3 
4 #include <ImageGrabber.h>
5 
6 #include <list>
7 #include <string>
8 
9 #include <thread>
10 
11 #include <zmq.hpp>
12 
14  friend ImageGrabber;
15 public:
16  int getWidth();
17  int getHeight();
18  int getBytesPerPixel();
19  void startServing();
20  void stopServing();
21  void addEndpoint(const std::string & _endpoint);
22 protected:
23  _RemoteGrabberImpl(const std::string & _deviceName, const std::string & _deviceSource, zmq::context_t & _ctx);
25 private:
26  std::string deviceName;
27  std::string deviceSource;
28  int width = 0;
29  int height = 0;
30  int bytesPerPixel = 0;
31 
32  void acquisition();
33  std::thread acquisitionThread;
34  volatile bool enableAcquisition = false;
35 
36  zmq::context_t & ctx;
37  std::list<std::string> endpoints;
38 };
39 
40 #endif //REMOTE_GRABBER_H
void addEndpoint(const std::string &_endpoint)
Public interface to an ImageGrabber grabber.
Definition: ImageGrabber.h:45
_RemoteGrabberImpl(const std::string &_deviceName, const std::string &_deviceSource, zmq::context_t &_ctx)