Loading...
Searching...
No Matches
pcl::Grabber Class Referenceabstract
Module io

Grabber interface for PCL 1.x device drivers. More...

`#include <pcl/io/grabber.h>`

Inheritance diagram for pcl::Grabber:

## Public Member Functions

| Grabber ()=default
| Default ctor.
| Grabber (const Grabber &)=delete
| No copy ctor since Grabber can't be copied.
Grabber & | operator= (const Grabber &)=delete
| No copy assign operator since Grabber can't be copied.
| Grabber (Grabber &&)=default
| Move ctor.
Grabber & | operator= (Grabber &&)=default
| Move assign operator.
virtual | ~Grabber () noexcept=default
| virtual destructor.
template<typename T>
boost::signals2::connection | registerCallback (const std::function< T > &callback)
| registers a callback function/method to a signal with the corresponding signature
template<typename T>
bool | providesCallback () const noexcept
| indicates whether a signal with given parameter-type exists or not
virtual void | start ()=0
| For devices that are streaming, the streams are started by calling this method.
virtual void | stop ()=0
| For devices that are streaming, the streams are stopped.
bool | toggle ()
| For devices that are streaming, stopped streams are started and running stream are stopped.
virtual std::string | getName () const =0
| returns the name of the concrete subclass.
virtual bool | isRunning () const =0
| Indicates whether the grabber is streaming or not.
virtual float | getFramesPerSecond () const =0
| returns fps.

## Protected Member Functions

virtual void | signalsChanged ()
template<typename T>
boost::signals2::signal< T > * | find_signal () const noexcept
template<typename T>
int | num_slots () const noexcept
template<typename T>
void | disconnect_all_slots ()
template<typename T>
void | block_signal ()
template<typename T>
void | unblock_signal ()
void | block_signals ()
void | unblock_signals ()
template<typename T>
boost::signals2::signal< T > * | createSignal ()

## Protected Attributes

std::map< std::string, std::unique_ptr< boost::signals2::signal_base > > | signals_
std::map< std::string, std::vector< boost::signals2::connection > > | connections_
std::map< std::string, std::vector< boost::signals2::shared_connection_block > > | shared_connections_

## Detailed Description

Grabber interface for PCL 1.x device drivers.

Author
  Suat Gedikli gedik.nosp@m.li@w.nosp@m.illow.nosp@m.gara.nosp@m.ge.co.nosp@m.m

Definition at line 59 of file grabber.h.

## Constructor & Destructor Documentation

## Grabber() [1/3]

pcl::Grabber::Grabber | ( |  | ) |

default

Default ctor.

Referenced by Grabber(), Grabber(), operator=(), operator=(), and toggle().

## Grabber() [2/3]

pcl::Grabber::Grabber | ( | const Grabber & |  | ) |

delete

No copy ctor since Grabber can't be copied.

References Grabber().

## Grabber() [3/3]

pcl::Grabber::Grabber | ( | Grabber && |  | ) |

default

Move ctor.

References Grabber().

## ~Grabber()

virtual pcl::Grabber::~Grabber | ( |  | ) |

inline virtual default noexcept

virtual destructor.

References providesCallback(), and registerCallback().

## Member Function Documentation

## block_signal()

template<typename T>

void pcl::Grabber::block_signal | ( |  | ) |

protected

Definition at line 209 of file grabber.h.

References block_signal(), connections_, and shared_connections_.

Referenced by block_signal().

## block_signals()

void pcl::Grabber::block_signals | ( |  | ) |

inline protected

Definition at line 225 of file grabber.h.

References block_signals(), shared_connections_, and signals_.

Referenced by block_signals().

## createSignal()

template<typename T>

boost::signals2::signal< T > * pcl::Grabber::createSignal | ( |  | ) |

protected

Definition at line 252 of file grabber.h.

References createSignal(), and signals_.

Referenced by createSignal(), pcl::ImageGrabber< PointT >::ImageGrabber(), pcl::ImageGrabber< PointT >::ImageGrabber(), pcl::ImageGrabber< PointT >::ImageGrabber(), pcl::PCDGrabber< PointT >::PCDGrabber(), pcl::PCDGrabber< PointT >::PCDGrabber(), pcl::StereoGrabber< PointT >::StereoGrabber(), and pcl::StereoGrabber< PointT >::StereoGrabber().

## disconnect_all_slots()

template<typename T>

void pcl::Grabber::disconnect_all_slots | ( |  | ) |

protected

Definition at line 199 of file grabber.h.

References disconnect_all_slots(), and find_signal().

Referenced by disconnect_all_slots().

## find_signal()

template<typename T>

boost::signals2::signal< T > * pcl::Grabber::find_signal | ( |  | ) | const

protected noexcept

Definition at line 186 of file grabber.h.

References find_signal(), and signals_.

Referenced by disconnect_all_slots(), find_signal(), num_slots(), providesCallback(), and registerCallback().

## getFramesPerSecond()

virtual float pcl::Grabber::getFramesPerSecond | ( |  | ) | const

pure virtual

returns fps.

0 if trigger based.

Implemented in pcl::DavidSDKGrabber, pcl::DepthSenseGrabber, pcl::DinastGrabber, pcl::EnsensoGrabber, pcl::HDLGrabber, pcl::ImageGrabberBase, pcl::ONIGrabber, pcl::OpenNIGrabber, pcl::PCDGrabberBase, pcl::RealSense2Grabber, pcl::RealSenseGrabber, pcl::RobotEyeGrabber, and pcl::StereoGrabberBase.

References getFramesPerSecond().

Referenced by getFramesPerSecond().

## getName()

virtual std::string pcl::Grabber::getName | ( |  | ) | const

pure virtual

returns the name of the concrete subclass.

Returns
  the name of the concrete driver.

Implemented in pcl::DavidSDKGrabber, pcl::DepthSenseGrabber, pcl::DinastGrabber, pcl::EnsensoGrabber, pcl::HDLGrabber, pcl::ImageGrabberBase, pcl::ONIGrabber, pcl::OpenNIGrabber, pcl::PCDGrabberBase, pcl::RealSense2Grabber, pcl::RealSenseGrabber, pcl::RobotEyeGrabber, pcl::StereoGrabberBase, pcl::TimGrabber, and pcl::VLPGrabber.

References getName().

Referenced by getName(), and registerCallback().

## isRunning()

virtual bool pcl::Grabber::isRunning | ( |  | ) | const

pure virtual

Indicates whether the grabber is streaming or not.

This value is not defined for triggered devices.

Returns
  true if grabber is running / streaming. False otherwise.

Implemented in pcl::DavidSDKGrabber, pcl::DepthSenseGrabber, pcl::DinastGrabber, pcl::EnsensoGrabber, pcl::HDLGrabber, pcl::ImageGrabberBase, pcl::ONIGrabber, pcl::OpenNIGrabber, pcl::PCDGrabberBase, pcl::RealSense2Grabber, pcl::RealSenseGrabber, pcl::RobotEyeGrabber, pcl::StereoGrabberBase, and pcl::TimGrabber.

References isRunning().

Referenced by isRunning(), and toggle().

## num_slots()

template<typename T>

int pcl::Grabber::num_slots | ( |  | ) | const

protected noexcept

Definition at line 241 of file grabber.h.

References find_signal(), and num_slots().

Referenced by num_slots().

## operator=() [1/2]

Grabber & pcl::Grabber::operator= | ( | const Grabber & |  | ) |

delete

No copy assign operator since Grabber can't be copied.

References Grabber().

## operator=() [2/2]

Grabber & pcl::Grabber::operator= | ( | Grabber && |  | ) |

default

Move assign operator.

References Grabber().

## providesCallback()

template<typename T>

bool pcl::Grabber::providesCallback | ( |  | ) | const

noexcept

indicates whether a signal with given parameter-type exists or not

Returns
  true if signal exists, false otherwise

Definition at line 309 of file grabber.h.

References find_signal(), and providesCallback().

Referenced by providesCallback(), and ~Grabber().

## registerCallback()

template<typename T>

boost::signals2::connection pcl::Grabber::registerCallback | ( | const std::function< T > & | callback | ) |

registers a callback function/method to a signal with the corresponding signature

Parameters

  [in] | callback | the callback function/method

Returns
  Connection object, that can be used to disconnect the callback method from the signal again.

Definition at line 288 of file grabber.h.

References connections_, find_signal(), getName(), registerCallback(), shared_connections_, and signalsChanged().

Referenced by registerCallback(), and ~Grabber().

## signalsChanged()

virtual void pcl::Grabber::signalsChanged | ( |  | ) |

inline protected virtual

Reimplemented in pcl::OpenNIGrabber, and pcl::RealSense2Grabber.

Definition at line 141 of file grabber.h.

References signalsChanged().

Referenced by registerCallback(), and signalsChanged().

## start()

virtual void pcl::Grabber::start | ( |  | ) |

pure virtual

For devices that are streaming, the streams are started by calling this method.

Trigger-based devices, just trigger the device once for each call of start.

Implemented in pcl::DavidSDKGrabber, pcl::DepthSenseGrabber, pcl::DinastGrabber, pcl::EnsensoGrabber, pcl::HDLGrabber, pcl::ImageGrabberBase, pcl::ONIGrabber, pcl::OpenNIGrabber, pcl::PCDGrabberBase, pcl::RealSense2Grabber, pcl::RealSenseGrabber, pcl::RobotEyeGrabber, pcl::StereoGrabberBase, and pcl::TimGrabber.

References start().

Referenced by start(), and toggle().

## stop()

virtual void pcl::Grabber::stop | ( |  | ) |

pure virtual

For devices that are streaming, the streams are stopped.

This method has no effect for triggered devices.

Implemented in pcl::DavidSDKGrabber, pcl::DepthSenseGrabber, pcl::DinastGrabber, pcl::EnsensoGrabber, pcl::HDLGrabber, pcl::ImageGrabberBase, pcl::ONIGrabber, pcl::OpenNIGrabber, pcl::PCDGrabberBase, pcl::RealSense2Grabber, pcl::RealSenseGrabber, pcl::RobotEyeGrabber, pcl::StereoGrabberBase, and pcl::TimGrabber.

References stop(), and toggle().

Referenced by stop(), and toggle().

## toggle()

bool pcl::Grabber::toggle | ( |  | ) |

inline

For devices that are streaming, stopped streams are started and running stream are stopped.

For triggered devices, the behavior is not defined.

Returns
  true if grabber is running / streaming. False otherwise.

Definition at line 173 of file grabber.h.

References Grabber(), isRunning(), start(), stop(), and toggle().

Referenced by stop(), and toggle().

## unblock_signal()

template<typename T>

void pcl::Grabber::unblock_signal | ( |  | ) |

protected

Definition at line 217 of file grabber.h.

References connections_, shared_connections_, and unblock_signal().

Referenced by unblock_signal().

## unblock_signals()

void pcl::Grabber::unblock_signals | ( |  | ) |

inline protected

Definition at line 233 of file grabber.h.

References shared_connections_, signals_, and unblock_signals().

Referenced by unblock_signals().

## Member Data Documentation

## connections_

std::map<std::string, std::vector<boost::signals2::connection> > pcl::Grabber::connections_

protected

Definition at line 168 of file grabber.h.

Referenced by block_signal(), registerCallback(), and unblock_signal().

## shared_connections_

std::map<std::string, std::vector<boost::signals2::shared_connection_block> > pcl::Grabber::shared_connections_

protected

Definition at line 169 of file grabber.h.

Referenced by block_signal(), block_signals(), registerCallback(), unblock_signal(), and unblock_signals().

## signals_

std::map<std::string, std::unique_ptr<boost::signals2::signal_base> > pcl::Grabber::signals_

protected

Definition at line 167 of file grabber.h.

Referenced by block_signals(), createSignal(), find_signal(), and unblock_signals().

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

- pcl/io/grabber.h