Class Subscriber, contains the public API that allows the user to control the reception of messages. More...
#include <Subscriber.h>
Public Member Functions | |
Subscriber (SubscriberImpl *pimpl) | |
Constructor from a SubscriberImpl pointer. More... | |
const rtps::GUID_t & | getGuid () |
Get the associated GUID. More... | |
void | waitForUnreadMessage () |
Method to block the current thread until an unread message is available. More... | |
bool | wait_for_unread_samples (const Duration_t &timeout) |
Blocks the current thread until an unread sample is available. More... | |
bool | readNextData (void *sample, SampleInfo_t *info) |
Reads next unread sample from the Subscriber. More... | |
bool | takeNextData (void *sample, SampleInfo_t *info) |
Takes next sample from the Subscriber. More... | |
bool | get_first_untaken_info (SampleInfo_t *info) |
Returns information about the first untaken sample. More... | |
bool | updateAttributes (const SubscriberAttributes &att) |
Update the Attributes of the subscriber;. More... | |
const SubscriberAttributes & | getAttributes () const |
Get the Attributes of the Subscriber. More... | |
bool | isInCleanState () const |
Returns there is a clean state with all Publishers. More... | |
uint64_t | getUnreadCount () const |
Get the unread count. More... | |
uint64_t | get_unread_count () const |
Get the unread count. More... | |
void | get_requested_deadline_missed_status (RequestedDeadlineMissedStatus &status) |
Get the requested deadline missed status. More... | |
void | get_liveliness_changed_status (LivelinessChangedStatus &status) |
Returns the liveliness changed status. More... | |
void | get_listening_locators (rtps::LocatorList_t &locators) const |
Get the list of locators on which this subscriber is listening. More... | |
Friends | |
class | SubscriberImpl |
Class Subscriber, contains the public API that allows the user to control the reception of messages.
This class should not be instantiated directly. DomainRTPSParticipant class should be used to correctly create this element.
|
inline |
Constructor from a SubscriberImpl pointer.
pimpl | Actual implementation of the subscriber |
bool get_first_untaken_info | ( | SampleInfo_t * | info | ) |
Returns information about the first untaken sample.
[out] | info | Pointer to a SampleInfo_t structure to store first untaken sample information. |
void get_listening_locators | ( | rtps::LocatorList_t & | locators | ) | const |
Get the list of locators on which this subscriber is listening.
[out] | locators | LocatorList_t where the list of locators will be stored. |
void get_liveliness_changed_status | ( | LivelinessChangedStatus & | status | ) |
Returns the liveliness changed status.
status | Liveliness changed status |
void get_requested_deadline_missed_status | ( | RequestedDeadlineMissedStatus & | status | ) |
Get the requested deadline missed status.
status | The deadline missed status |
uint64_t get_unread_count | ( | ) | const |
Get the unread count.
const SubscriberAttributes& getAttributes | ( | ) | const |
Get the Attributes of the Subscriber.
const rtps::GUID_t& getGuid | ( | ) |
Get the associated GUID.
|
inline |
Get the unread count.
bool isInCleanState | ( | ) | const |
Returns there is a clean state with all Publishers.
It occurs when the Subscriber received all samples sent by Publishers. In other words, its WriterProxies are up to date.
bool readNextData | ( | void * | sample, |
SampleInfo_t * | info | ||
) |
Reads next unread sample from the Subscriber.
sample | Pointer to the object where you want the sample stored. |
info | Pointer to a SampleInfo_t structure that informs you about your sample. |
bool takeNextData | ( | void * | sample, |
SampleInfo_t * | info | ||
) |
Takes next sample from the Subscriber.
The sample is removed from the subscriber.
sample | Pointer to the object where you want the sample stored. |
info | Pointer to a SampleInfo_t structure that informs you about your sample. |
bool updateAttributes | ( | const SubscriberAttributes & | att | ) |
Update the Attributes of the subscriber;.
att | Reference to a SubscriberAttributes object to update the parameters; |
bool wait_for_unread_samples | ( | const Duration_t & | timeout | ) |
Blocks the current thread until an unread sample is available.
timeout | Maximum time the function will be blocked if any sample is received. |
|
inline |
Method to block the current thread until an unread message is available.
|
friend |