Public interface to an ImageGrabber grabber. More...
#include <ImageGrabber.h>
Public Member Functions | |
ImageGrabber (const std::string &_deviceName, const std::string &_deviceType, const std::string &_deviceSource, zmq::context_t &ctx, const std::string &_brokerEndpoint) | |
Setup a grabber. More... | |
~ImageGrabber () | |
int | getWidth () |
int | getHeight () |
int | getBytesPerPixel () |
void | startServing () |
Start the server asynchronously. More... | |
void | stopServing () |
Stop the server. More... | |
void | addEndpoint (const std::string &_endpoint) |
Add a publisher endpoint. More... | |
Public interface to an ImageGrabber grabber.
This class holds an asynchronous server which provides image data from an Image grabber card via ZeroMQ PUB socket.
Definition at line 45 of file ImageGrabber.h.
ImageGrabber::ImageGrabber | ( | const std::string & | _deviceName, |
const std::string & | _deviceType, | ||
const std::string & | _deviceSource, | ||
zmq::context_t & | ctx, | ||
const std::string & | _brokerEndpoint | ||
) |
Setup a grabber.
_deviceName | Grabber device name (as passed to the Hardware driver). |
ctx | ZeroMQ context to use. |
Definition at line 30 of file ImageGrabber.cpp.
ImageGrabber::~ImageGrabber | ( | ) |
Definition at line 54 of file ImageGrabber.cpp.
void ImageGrabber::addEndpoint | ( | const std::string & | _endpoint | ) |
Add a publisher endpoint.
All image data will be published over all provided endpoints. Normally you want to provide an inproc endpoint, which allows real zero-copy data distribution.
_endpoint | Name of the endpoint. |
Definition at line 78 of file ImageGrabber.cpp.
int ImageGrabber::getBytesPerPixel | ( | ) |
Get the pixel resolution of the connected image source
Definition at line 66 of file ImageGrabber.cpp.
int ImageGrabber::getHeight | ( | ) |
Get the height of the connected image source
Definition at line 62 of file ImageGrabber.cpp.
int ImageGrabber::getWidth | ( | ) |
Get the width of the connected image source
Definition at line 58 of file ImageGrabber.cpp.
void ImageGrabber::startServing | ( | ) |
Start the server asynchronously.
Definition at line 70 of file ImageGrabber.cpp.
void ImageGrabber::stopServing | ( | ) |
Stop the server.
Definition at line 74 of file ImageGrabber.cpp.