CARLA
 
载入中...
搜索中...
未找到
V2XData.h
浏览该文件的文档.
1// Copyright (c) 2024 Institut fuer Technik der Informationsverarbeitung (ITIV) at the
2// Karlsruhe Institute of Technology
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6#pragma once
7
8#include <cstdint>
9#include <vector>
10#include <cstdio>
11#include "LibITS.h"
12
13namespace carla
14{
15 namespace sensor
16 {
17
18 namespace s11n
19 {
20 class CAMDataSerializer;
21 class CustomV2XDataSerializer;
22 }
23
24 namespace data
25 {
26 class CAMData
27 {
28 public:
29 float Power;
31 };
32
34 {
35 public:
36 float Power;
38 };
39
41 {
42
43 public:
44 explicit CAMDataS() = default;
45
46 CAMDataS &operator=(CAMDataS &&) = default;
47
48 // Returns the number of current received messages.
49 size_t GetMessageCount() const
50 {
51 return MessageList.size();
52 }
53
54 // Deletes the current messages.
55 void Reset()
56 {
57 MessageList.clear();
58 }
59
60 // Adds a new detection.
61 void WriteMessage(CAMData message)
62 {
63 MessageList.push_back(message);
64 }
65
66 private:
67 std::vector<CAMData> MessageList;
68
70 };
71
73 {
74
75 public:
76 explicit CustomV2XDataS() = default;
77
79
80 // Returns the number of current received messages.
81 size_t GetMessageCount() const
82 {
83 return MessageList.size();
84 }
85
86 // Deletes the current messages.
87 void Reset()
88 {
89 MessageList.clear();
90 }
91
92 // Adds a new detection.
94 {
95 MessageList.push_back(message);
96 }
97
98 private:
99 std::vector<CustomV2XData> MessageList;
100
102 };
103
104 } // namespace s11n
105 } // namespace sensor
106} // namespace carla
void WriteMessage(CAMData message)
Definition V2XData.h:61
CAMDataS & operator=(CAMDataS &&)=default
size_t GetMessageCount() const
Definition V2XData.h:49
std::vector< CAMData > MessageList
Definition V2XData.h:67
void WriteMessage(CustomV2XData message)
Definition V2XData.h:93
CustomV2XDataS & operator=(CustomV2XDataS &&)=default
std::vector< CustomV2XData > MessageList
Definition V2XData.h:99
Serializes the data generated by V2X sensors.
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133
Definition LibITS.h:761