CARLA
Loading...
Searching...
No Matches
BasicSubscriber.h
Go to the documentation of this file.
1// Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma de Barcelona (UAB).
2// This work is licensed under the terms of the MIT license.
3// For a copy, see <https://opensource.org/licenses/MIT>.
4
5#pragma once
6
7#include <memory>
8#include <vector>
9
10#include "CarlaSubscriber.h"
12
13namespace carla {
14namespace ros2 {
15
16 struct BasicSubscriberImpl;
17
19 public:
20 BasicSubscriber(void* actor, const char* ros_name = "", const char* parent = "");
26
27 bool HasNewMessage();
28 bool IsAlive();
29 const char* GetMessage();
30 void* GetActor();
31
32 bool Init();
33 // bool Read();
34 const char* type() const override { return "basic_subscriber"; }
35
36 //Do not call, for internal use only
37 void ForwardMessage(const std::string& message);
38 void DestroySubscriber();
39
40 private:
41 std::shared_ptr<BasicSubscriberImpl> _impl;
42 };
43}
44}
std::shared_ptr< BasicSubscriberImpl > _impl
void ForwardMessage(const std::string &message)
BasicSubscriber & operator=(const BasicSubscriber &)
const char * type() const override
const std::string & parent() const
This file contains definitions of common data structures used in traffic manager.