#include <filter/ChannelSynchronizer.h>
|
| ChannelSynchronizer () |
|
void | unsubscribe (Authority &authority) |
| Call this instead of Authority::unsubscribe(...) to unsubscribe all the channels of the synchronizer. More...
|
|
void | subscribe (Authority &authority, StringArgumentHelper< Ts >... channelIDs, const Duration &t=Duration::milliseconds(100)) |
| Call this instead of Authority::subscribe() Function provided for convenience (if no callback function is required). More...
|
|
void | subscribe (Authority &authority, StringArgumentHelper< Ts >... channelIDs, std::function< void(ChannelRead< Ts >...)> fn, const Duration &t=Duration::milliseconds(100)) |
| Call this instead of Authority::subscribe() More...
|
|
void | subscribe (Authority &authority, const std::vector< std::string > &channelIDs, std::function< void(ChannelRead< Ts >...)> fn, const Duration &t=Duration::milliseconds(100)) |
| Same as above but with the channel IDs as std::vector<std::string>. More...
|
|
template<typename Class > |
void | subscribe (Authority &authority, StringArgumentHelper< Ts >... channelIDs, void(Class::*f)(ChannelRead< Ts >...), Class *obj, const Duration &t=Duration::milliseconds(100)) |
| Same as above but with a function and object pointer. More...
|
|
template<typename Class > |
void | subscribe (Authority &authority, std::vector< std::string > channelIDs, void(Class::*f)(ChannelRead< Ts >...), Class *obj, const Duration &t=Duration::milliseconds(100)) |
| Same as above but with a function and object pointer. More...
|
|
std::tuple< ChannelRead< Ts >... > | read () |
| Return (synchronized) ChannelRead objects. More...
|
|
bool | isValid () const |
| Return true if all ChannelRead objects contain valid data. More...
|
|
std::tuple< ChannelRead< Ts >... > | waitForData (const Duration &timeout=Duration::infinity()) |
| Return the latest (synchronized) element once it is available. More...
|
|
bool | waitForPublisher (const Duration &timeout=Duration::infinity()) const |
|
void | setSynchronizationMode (const SynchronizationMode &synchronizationMode) |
|
◆ SynchronizationMode
Enumerator |
---|
BY_TIMESTAMP | |
BY_SEQUENCE_ID | |
◆ ChannelSynchronizer()
◆ unsubscribe()
◆ subscribe() [1/5]
Call this instead of Authority::subscribe() Function provided for convenience (if no callback function is required).
- Parameters
-
authority | The authority that does the basic subscription |
channelIDs | The IDs of the channels we are subscribing on |
t | Maximum time difference of the channels message timestamps for still being synchronous |
◆ subscribe() [2/5]
Call this instead of Authority::subscribe()
- Parameters
-
authority | The authority that does the basic subscription |
channelIDs | The IDs of the channels we are subscribing on |
fn | The function that should be called when the filter matches |
t | Maximum time difference of the channels message timestamps for still being synchronous |
◆ subscribe() [3/5]
Same as above but with the channel IDs as std::vector<std::string>.
◆ subscribe() [4/5]
Same as above but with a function and object pointer.
Provided for convenience.
◆ subscribe() [5/5]
Same as above but with a function and object pointer.
Provided for convenience.
◆ read()
Return (synchronized) ChannelRead objects.
The ChannelRead objects are always synchronized by the channel with the lowest update frequency. Please note that the ChannelRead objects may be invalid if no data has been published yet.
◆ isValid()
Return true if all ChannelRead objects contain valid data.
◆ waitForData()
Return the latest (synchronized) element once it is available.
If the function times out, invalid channelRead objects will be returned. Please note that the function does not regard synchronized elements that were available BEFORE this function was called.
◆ waitForPublisher()
◆ setSynchronizationMode()
The documentation for this class was generated from the following file: