runMACS
 All Data Structures Files Functions Variables Enumerations Enumerator Macros
Public Member Functions
ImageGrabber Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Parameters
_deviceNameGrabber device name (as passed to the Hardware driver).
ctxZeroMQ context to use.

Definition at line 30 of file ImageGrabber.cpp.

ImageGrabber::~ImageGrabber ( )

Definition at line 54 of file ImageGrabber.cpp.

Member Function Documentation

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.

Parameters
_endpointName of the endpoint.

Definition at line 78 of file ImageGrabber.cpp.

int ImageGrabber::getBytesPerPixel ( )

Get the pixel resolution of the connected image source

Returns
bytes per pixel

Definition at line 66 of file ImageGrabber.cpp.

int ImageGrabber::getHeight ( )

Get the height of the connected image source

Returns
height in pixel

Definition at line 62 of file ImageGrabber.cpp.

int ImageGrabber::getWidth ( )

Get the width of the connected image source

Returns
width in pixel

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.


The documentation for this class was generated from the following files: