SHM
Shared-memory based Handy-communication Manager
|
Class representing a subscriber that retrieves topics from shared memory This class is used to load a type or class given as template class as a topic. It also has an API that waits until the topic is updated. More...
#include <shm_pub_sub.hpp>
Public Member Functions | |
Subscriber (std::string name="") | |
Constructor Shared-memory name None Access to shared memory. | |
Subscriber (const Subscriber &)=delete | |
Subscriber & | operator= (const Subscriber &)=delete |
Subscriber (Subscriber &&other) noexcept=default | |
const T | subscribe (bool *state) |
Subscribe a topic Const reference to the loaded topic. The topic with the most recent timestamp is loaded. It is recommended to duplicate the data by copy constructor or assignment, since it returns a direct reference to memory so that it can be later extended to variable-length classes. | |
bool | waitFor (uint64_t timeout_usec) |
void | setDataExpiryTime_us (uint64_t time_us) |
Class representing a subscriber that retrieves topics from shared memory This class is used to load a type or class given as template class as a topic. It also has an API that waits until the topic is updated.
Definition at line 94 of file shm_pub_sub.hpp.