CARLA
Loading...
Searching...
No Matches
V2XData.h
Go to the documentation of this file.
1// Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#pragma once
8
10
11#include <cstdint>
12#include <vector>
13
14namespace carla {
15namespace sensor {
16
17namespace s11n {
18
21
22} // namespace s11n
23
24namespace data {
25
26 class CAMData {
27 public:
28
29 float Power;
31 };
32
34 public:
35
36 float Power;
38 };
39
40 class CAMDataS {
41 public:
42
43 /// Returns the number of currently received messages.
44 size_t GetMessageCount() const {
45 return MessageList.size();
46 }
47
48 /// Deletes the current messages.
49 void Reset() {
50 MessageList.clear();
51 }
52
53 /// Adds a new message.
54 void WriteMessage(const CAMData &message) {
55 MessageList.push_back(message);
56 }
57
58 private:
59
60 std::vector<CAMData> MessageList;
61
63 };
64
66 public:
67
68 /// Returns the number of currently received messages.
69 size_t GetMessageCount() const {
70 return MessageList.size();
71 }
72
73 /// Deletes the current messages.
74 void Reset() {
75 MessageList.clear();
76 }
77
78 /// Adds a new message.
79 void WriteMessage(const CustomV2XData &message) {
80 MessageList.push_back(message);
81 }
82
83 private:
84
85 std::vector<CustomV2XData> MessageList;
86
88 };
89
90} // namespace data
91} // namespace sensor
92} // namespace carla
struct CAM CAM_t
void WriteMessage(const CAMData &message)
Adds a new message.
Definition V2XData.h:54
size_t GetMessageCount() const
Returns the number of currently received messages.
Definition V2XData.h:44
void Reset()
Deletes the current messages.
Definition V2XData.h:49
std::vector< CAMData > MessageList
Definition V2XData.h:60
void Reset()
Deletes the current messages.
Definition V2XData.h:74
void WriteMessage(const CustomV2XData &message)
Adds a new message.
Definition V2XData.h:79
std::vector< CustomV2XData > MessageList
Definition V2XData.h:85
size_t GetMessageCount() const
Returns the number of currently received messages.
Definition V2XData.h:69
Serializes the CAM data generated by V2X sensors.
Serializes the custom message data generated by V2X sensors.
This file contains definitions of common data structures used in traffic manager.