CARLA
Loading...
Searching...
No Matches
CarlaSubscriber.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 <string>
8
9namespace carla {
10namespace ros2 {
11
13 public:
14 const std::string& frame_id() const { return _frame_id; }
15 const std::string& name() const { return _name; }
16 const std::string& parent() const { return _parent; }
17
18 void frame_id(std::string&& frame_id) { _frame_id = std::move(frame_id); }
19 void name(std::string&& name) { _name = std::move(name); }
20 void parent(std::string&& parent) { _parent = std::move(parent); }
21
22 virtual const char* type() const = 0;
23
24 public:
25 CarlaSubscriber() = default;
26 virtual ~CarlaSubscriber() = default;
27
28 protected:
29 std::string _frame_id = "";
30 std::string _name = "";
31 std::string _parent = "";
32 };
33}
34}
void frame_id(std::string &&frame_id)
virtual const char * type() const =0
const std::string & frame_id() const
void name(std::string &&name)
const std::string & name() const
void parent(std::string &&parent)
const std::string & parent() const
virtual ~CarlaSubscriber()=default
This file contains definitions of common data structures used in traffic manager.