Class Publisher, used to send data to associated subscribers.
More...
#include <Publisher.h>
Class Publisher, used to send data to associated subscribers.
◆ Publisher()
Constructor from a PublisherImpl pointer.
- Parameters
-
pimpl | Actual implementation of the publisher |
◆ assert_liveliness()
void assert_liveliness |
( |
| ) |
|
◆ dispose()
bool dispose |
( |
void * |
data, |
|
|
const rtps::InstanceHandle_t & |
handle |
|
) |
| |
Requests the middleware to delete the instance.
Applications are made aware of the deletion through the DataReader objects.
- Parameters
-
[in] | data | Sample used to deduce instance's key in case of handle parameter is HANDLE_NIL. |
[in] | handle | Instance's key to be unregistered. |
- Returns
- Returns the operation's result. If the operation finishes successfully,
true
is returned.
◆ get_liveliness_lost_status()
void get_liveliness_lost_status |
( |
LivelinessLostStatus & |
status | ) |
|
Returns the liveliness lost status.
- Parameters
-
status | Liveliness lost status |
◆ get_offered_deadline_missed_status()
Returns the offered deadline missed status.
- Parameters
-
status | missed status struct |
◆ get_sending_locators()
void get_sending_locators |
( |
rtps::LocatorList_t & |
locators | ) |
const |
Get the list of locators from which this publisher may send data.
- Parameters
-
[out] | locators | LocatorList_t where the list of locators will be stored. |
◆ getAttributes()
Get the Attributes of the Publisher.
- Returns
- Attributes of the publisher
◆ getGuid()
const rtps::GUID_t & getGuid |
( |
| ) |
|
Get the GUID_t of the associated RTPSWriter.
- Returns
- GUID_t.
◆ register_instance()
fastrtps::rtps::InstanceHandle_t register_instance |
( |
void * |
instance | ) |
|
Informs that the application will be modifying a particular instance.
It gives and opportunity to the middleware to pre-configure itself to improve performance.
- Parameters
-
[in] | instance | Sample used to get the instance's key. |
- Returns
- Handle containing the instance's key. This handle could be used in successive
write
or dispose
operations. In case of error, HANDLE_NIL will be returned.
◆ removeAllChange()
bool removeAllChange |
( |
size_t * |
removed = nullptr | ) |
|
Remove all the Changes in the associated RTPSWriter.
- Parameters
-
[out] | removed | Number of elements removed |
- Returns
- True if all elements were removed.
◆ unregister_instance()
bool unregister_instance |
( |
void * |
instance, |
|
|
const rtps::InstanceHandle_t & |
handle |
|
) |
| |
This operation reserves the action of register_instance
.
Informs the middleware that the DataWriter is not intending to modify any more of that data instance. Also indicates that the middleware can locally remove all information regarding that instance.
- Parameters
-
[in] | instance | Sample used to deduce instance's key in case of handle parameter is HANDLE_NIL. |
[in] | handle | Instance's key to be unregistered. |
- Returns
- Returns the operation's result. If the operation finishes successfully,
true
is returned.
◆ updateAttributes()
Update the Attributes of the publisher.
- Parameters
-
- Returns
- True if correctly updated, false if ANY of the updated parameters cannot be updated.
◆ wait_for_all_acked()
bool wait_for_all_acked |
( |
const Duration_t & |
max_wait | ) |
|
Waits until all changes were acknowledged or max_wait.
- Parameters
-
max_wait | Maximum time to wait until all changes are acknowledged. |
- Returns
- True if all were acknowledged.
◆ write() [1/2]
bool write |
( |
void * |
sample | ) |
|
Writes a sample of the topic.
- Parameters
-
sample | Pointer to the sample. |
- Returns
- true when operation works successfully.
- Note
- This method is blocked for a period of time. ReliabilityQosPolicy.max_blocking_time on PublisherAttributes defines this period of time.
- Calling example:
TypeStructure tp;
bool write(void *sample)
Writes a sample of the topic.
◆ write() [2/2]
bool write |
( |
void * |
sample, |
|
|
rtps::WriteParams & |
wparams |
|
) |
| |
Writes a sample of the topic with additional options.
- Parameters
-
sample | Pointer to the sample. |
wparams | Extra write parameters. |
- Returns
- true when operation works successfully.
- Note
- This method is blocked for a period of time. ReliabilityQosPolicy.max_blocking_time on PublisherAttributes defines this period of time.
- Calling example:
-
◆ PublisherImpl
friend class PublisherImpl |
|
friend |
The documentation for this class was generated from the following file: