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