|
CARLA
|
Type-erased abstract interface for a publisher middleware. More...
#include <IPublisherMiddleware.h>
Inheritance diagram for carla::ros2::IPublisherMiddleware:Public Member Functions | |
| virtual std::string | GetTopicName () const =0 |
| virtual bool | Init (const std::string &topic_name)=0 |
| Initialize the underlying middleware entities. | |
| virtual bool | Init (const std::string &topic_name, const QosProfile &qos) |
| Initialize with an explicit per-topic QoS profile (see QosProfile.h). | |
| virtual bool | IsAlive () const =0 |
| virtual bool | Publish (void *message_data)=0 |
| Serialize and write a message to the network. | |
| virtual | ~IPublisherMiddleware ()=default |
Type-erased abstract interface for a publisher middleware.
Concrete implementations handle all vendor-specific entity creation, type registration, and data writing.
Contract: when an implementation establishes its process-wide transport context (a DDS DomainParticipant, a Zenoh session, ...) it must honor carla::ros2::MiddlewareConfig::GetDomainId(), mapping kUnsetDomainId to its own native default. This keeps the ROS 2 domain id configurable and middleware-agnostic (see MiddlewareConfig.h).
Definition at line 23 of file IPublisherMiddleware.h.
|
virtualdefault |
|
pure virtual |
Implemented in carla::ros2::FastDDSPublisherMiddleware< T >, and MockPublisherMiddleware.
|
pure virtual |
Initialize the underlying middleware entities.
| topic_name | Full topic name including "rt/" prefix. |
Implemented in carla::ros2::FastDDSPublisherMiddleware< T >, and MockPublisherMiddleware.
Referenced by Init().
|
inlinevirtual |
Initialize with an explicit per-topic QoS profile (see QosProfile.h).
The default implementation ignores the profile and falls back to the QoS-less Init so test fakes and QoS-agnostic middlewares keep working; concrete backends override this to honor the profile.
Reimplemented in carla::ros2::FastDDSPublisherMiddleware< T >.
Definition at line 36 of file IPublisherMiddleware.h.
References Init().
|
pure virtual |
Implemented in carla::ros2::FastDDSPublisherMiddleware< T >, and MockPublisherMiddleware.
|
pure virtual |
Serialize and write a message to the network.
| message_data | Pointer to the message object (type-erased, cast internally). |
Implemented in carla::ros2::FastDDSPublisherMiddleware< T >, and MockPublisherMiddleware.