CARLA
secondaryCommands.h
Go to the documentation of this file.
1 // Copyright (c) 2022 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/Logging.h"
10 #include "carla/Buffer.h"
12 #include <functional>
13 
14 namespace carla {
15 namespace multigpu {
16 
17 class Secondary;
18 
20  public:
21 
22  using callback_type = std::function<void(MultiGPUCommand, carla::Buffer)>;
23 
24  void set_secondary(std::shared_ptr<Secondary> secondary);
25  void set_callback(callback_type callback);
26  void process_command(Buffer buffer);
27 
28  private:
29  std::shared_ptr<Secondary> _secondary;
31 };
32 
33 } // namespace multigpu
34 } // namespace carla
std::shared_ptr< Secondary > _secondary
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
std::function< void(MultiGPUCommand, carla::Buffer)> callback_type
void set_secondary(std::shared_ptr< Secondary > secondary)
A piece of raw data.
Definition: carla/Buffer.h:42
void set_callback(callback_type callback)