CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
LibCarla
source
carla
sensor
s11n
GnssSerializer.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
9
#include "
carla/Memory.h
"
10
#include "
carla/geom/GeoLocation.h
"
11
#include "
carla/rpc/ActorId.h
"
12
#include "
carla/sensor/RawData.h
"
13
14
#include <cstdint>
15
#include <cstring>
16
17
namespace
carla
{
18
namespace
sensor
{
19
20
class
SensorData
;
21
22
namespace
s11n
{
23
24
class
GnssSerializer
{
25
public
:
26
27
static
geom::GeoLocation
DeserializeRawData
(
const
RawData
&message) {
28
return
MsgPack::UnPack<geom::GeoLocation>
(message.
begin
(), message.
size
());
29
}
30
31
template
<
typename
SensorT>
32
static
Buffer
Serialize
(
33
const
SensorT &,
34
const
geom::GeoLocation
&geo_location
35
) {
36
return
MsgPack::Pack
(geo_location);
37
}
38
39
static
SharedPtr<SensorData>
Deserialize
(
RawData
&&
data
);
40
};
41
42
}
// namespace s11n
43
}
// namespace sensor
44
}
// namespace carla
ActorId.h
GeoLocation.h
Memory.h
RawData.h
carla::Buffer
A piece of raw data.
Definition
carla/Buffer.h:42
carla::MsgPack::UnPack
static T UnPack(const Buffer &buffer)
Definition
MsgPack.h:27
carla::MsgPack::Pack
static Buffer Pack(const T &obj)
Definition
MsgPack.h:19
carla::geom::GeoLocation
Definition
GeoLocation.h:14
carla::sensor::RawData
Wrapper around the raw data generated by a sensor plus some useful meta-information.
Definition
RawData.h:21
carla::sensor::RawData::begin
auto begin() noexcept
Begin iterator to the data generated by the sensor.
Definition
RawData.h:52
carla::sensor::RawData::size
size_t size() const
Size in bytes of the data generated by the sensor.
Definition
RawData.h:83
carla::sensor::SensorData
Base class for all the objects containing data generated by a sensor.
Definition
SensorData.h:22
carla::sensor::s11n::GnssSerializer
Definition
GnssSerializer.h:24
carla::sensor::s11n::GnssSerializer::Serialize
static Buffer Serialize(const SensorT &, const geom::GeoLocation &geo_location)
Definition
GnssSerializer.h:32
carla::sensor::s11n::GnssSerializer::Deserialize
static SharedPtr< SensorData > Deserialize(RawData &&data)
Definition
GnssSerializer.cpp:15
carla::sensor::s11n::GnssSerializer::DeserializeRawData
static geom::GeoLocation DeserializeRawData(const RawData &message)
Definition
GnssSerializer.h:27
carla::sensor::data
Definition
ROS2.h:33
carla::sensor::s11n
Definition
ROS2.h:39
carla::sensor
Definition
client/detail/Client.h:58
carla
This file contains definitions of common data structures used in traffic manager.
Definition
SignComponent.h:21
carla::SharedPtr
std::shared_ptr< T > SharedPtr
Definition
Memory.h:15
Generated by
1.18.0