CARLA
primaryCommands.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"
11 #include "carla/multigpu/primary.h"
15 
16 namespace carla {
17 namespace multigpu {
18 
19 // using session = std::shared_ptr<Primary>;
20 // using callback_response = std::function<void(std::shared_ptr<Primary>, carla::Buffer)>;
22 
23 class Router;
24 
26  public:
27 
28 
30  PrimaryCommands(std::shared_ptr<Router> router);
31 
32  // broadcast to all secondary servers the frame data
33  void SendFrameData(carla::Buffer buffer);
34 
35  // broadcast to all secondary servers the map to load
36  void SendLoadMap(std::string map);
37 
38  // send to one secondary to get the token of a sensor
40 
41  // send to know if a connection is alive
42  void SendIsAlive();
43 
44  void set_router(std::shared_ptr<Router> router);
45 
46  private:
47 
48  std::shared_ptr<Router> _router;
49 };
50 
51 } // namespace multigpu
52 } // namespace carla
token_type SendGetToken(carla::streaming::detail::stream_id_type sensor_id)
void SendLoadMap(std::string map)
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
uint32_t stream_id_type
Definition: Types.h:18
Serializes a stream endpoint.
Definition: detail/Token.h:61
std::shared_ptr< Router > _router
void SendFrameData(carla::Buffer buffer)
A piece of raw data.
Definition: carla/Buffer.h:41
carla::streaming::detail::token_type token_type
void set_router(std::shared_ptr< Router > router)