|
CARLA
|
Type-erased abstract interface for a subscriber middleware. More...
#include <ISubscriberMiddleware.h>
Inheritance diagram for carla::ros2::ISubscriberMiddleware:Public Member Functions | |
| virtual std::string | GetTopicName () const =0 |
| virtual bool | Init (const std::string &topic_name, void *message_ptr, bool *new_message_flag)=0 |
| Initialize the underlying middleware entities. | |
| virtual bool | Init (const std::string &topic_name, void *message_ptr, bool *new_message_flag, const QosProfile &qos) |
| Initialize with an explicit per-topic QoS profile (see QosProfile.h). | |
| virtual bool | IsAlive () const =0 |
| virtual | ~ISubscriberMiddleware ()=default |
Type-erased abstract interface for a subscriber middleware.
Concrete implementations write received messages directly into the caller-provided storage (message_ptr / new_message_flag) to avoid an extra copy.
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 ISubscriberMiddleware.h.
|
virtualdefault |
|
pure virtual |
Implemented in carla::ros2::FastDDSSubscriberMiddleware< S >, and MockSubscriberMiddleware.
|
pure virtual |
Initialize the underlying middleware entities.
The middleware writes incoming messages to *message_ptr and sets *new_message_flag = true.
| topic_name | Full topic name. |
| message_ptr | Pointer to the message storage owned by the caller. |
| new_message_flag | Pointer to the new-message flag owned by the caller. |
Implemented in carla::ros2::FastDDSSubscriberMiddleware< S >, and MockSubscriberMiddleware.
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::FastDDSSubscriberMiddleware< S >.
Definition at line 42 of file ISubscriberMiddleware.h.
References Init().
|
pure virtual |
Implemented in carla::ros2::FastDDSSubscriberMiddleware< S >, and MockSubscriberMiddleware.