Helper class which provides a interface to synchronize data across multiple channels.
More...
#include <MultiSenseMultiChannel.hh>
|
| std::vector< Channel * > | m_channels {} |
| | The collection of channels raw channels to synchronize.
|
| |
| std::vector< std::unique_ptr< Channel > > | m_owned_channels {} |
| | A collection of owned channels if the user would like the synchronizer to own the channel memory.
|
| |
| std::vector< ImageFrame > | m_active_frames {} |
| | A collection of active frames which may be dispatched to the user.
|
| |
| std::chrono::nanoseconds | m_tolerance {} |
| | The max time tolerance between image frames for them to be considered equal.
|
| |
| size_t | m_max_queue_size = 0 |
| | Maximum number of synchronized frame groups that will be queued (0 = unlimited)
|
| |
| std::mutex | m_frame_mutex |
| | Mutex to notify the user a collection of synchronized frames is ready.
|
| |
| std::condition_variable | m_frame_cv |
| | Condition variable to notify the user a collection of synchronized frames is ready.
|
| |
| std::deque< std::vector< ImageFrame > > | m_ready_frames {} |
| | Queue of synchronized frames ready for the user to consume.
|
| |
Helper class which provides a interface to synchronize data across multiple channels.
Definition at line 60 of file MultiSenseMultiChannel.hh.
◆ MultiChannelSynchronizer() [1/2]
| multisense::MultiChannelSynchronizer::MultiChannelSynchronizer |
( |
std::vector< std::unique_ptr< Channel > > |
channels, |
|
|
const std::chrono::nanoseconds & |
tolerance, |
|
|
size_t |
max_queue_size = 0 |
|
) |
| |
|
inlineexplicit |
Construct a synchronizer owning the underlying channels.
- Parameters
-
| channels | The channels to synchronize |
| tolerance | The max time difference for a set of images to be considered synchronized |
| max_queue_size | The max number of synchronized frames to have queued for dispatch |
Definition at line 70 of file MultiSenseMultiChannel.hh.
◆ MultiChannelSynchronizer() [2/2]
| multisense::MultiChannelSynchronizer::MultiChannelSynchronizer |
( |
std::vector< Channel * > |
channels, |
|
|
const std::chrono::nanoseconds & |
tolerance, |
|
|
size_t |
max_queue_size = 0 |
|
) |
| |
|
inlineexplicit |
Construct a synchronizer without owning the underlying channels.
- Parameters
-
| channels | The channels to synchronize |
| tolerance | The max time difference for a set of images to be considered synchronized |
| max_queue_size | The max number of synchronized frames to have queued for dispatch |
Definition at line 100 of file MultiSenseMultiChannel.hh.
◆ ~MultiChannelSynchronizer()
| multisense::MultiChannelSynchronizer::~MultiChannelSynchronizer |
( |
| ) |
|
|
default |
◆ add_user_callbacks()
| void multisense::MultiChannelSynchronizer::add_user_callbacks |
( |
| ) |
|
|
private |
Helper to add user callbacks to the input channels.
◆ channel()
| Channel & multisense::MultiChannelSynchronizer::channel |
( |
size_t |
index | ) |
|
|
inline |
◆ get_synchronized_frame() [1/2]
| std::optional< std::vector< ImageFrame > > multisense::MultiChannelSynchronizer::get_synchronized_frame |
( |
| ) |
|
|
inline |
Get a collection synchronized frames from the input channels with no timeout on waiting.
- Returns
- Return a collection of synchronized frames
Definition at line 131 of file MultiSenseMultiChannel.hh.
◆ get_synchronized_frame() [2/2]
| std::optional< std::vector< ImageFrame > > multisense::MultiChannelSynchronizer::get_synchronized_frame |
( |
const std::optional< std::chrono::nanoseconds > & |
timeout | ) |
|
Get a collection synchronized frames from the input channels and return if we have not recieved a collection of frames before the input timeout.
- Parameters
-
| timeout | The ammount of time to wait for a synchronized frame |
- Returns
- Return a collection of synchronized frames
◆ m_active_frames
| std::vector<ImageFrame> multisense::MultiChannelSynchronizer::m_active_frames {} |
|
private |
◆ m_channels
| std::vector<Channel*> multisense::MultiChannelSynchronizer::m_channels {} |
|
private |
◆ m_frame_cv
| std::condition_variable multisense::MultiChannelSynchronizer::m_frame_cv |
|
private |
Condition variable to notify the user a collection of synchronized frames is ready.
Definition at line 185 of file MultiSenseMultiChannel.hh.
◆ m_frame_mutex
| std::mutex multisense::MultiChannelSynchronizer::m_frame_mutex |
|
private |
◆ m_max_queue_size
| size_t multisense::MultiChannelSynchronizer::m_max_queue_size = 0 |
|
private |
◆ m_owned_channels
| std::vector<std::unique_ptr<Channel> > multisense::MultiChannelSynchronizer::m_owned_channels {} |
|
private |
A collection of owned channels if the user would like the synchronizer to own the channel memory.
Definition at line 160 of file MultiSenseMultiChannel.hh.
◆ m_ready_frames
| std::deque<std::vector<ImageFrame> > multisense::MultiChannelSynchronizer::m_ready_frames {} |
|
private |
◆ m_tolerance
| std::chrono::nanoseconds multisense::MultiChannelSynchronizer::m_tolerance {} |
|
private |
The documentation for this class was generated from the following file: