CARLA
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
commands.h File Reference
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <optional>
#include <string>
#include <string_view>

Go to the source code of this file.

Classes

struct  carla::multigpu::CommandHeader
 
struct  carla::multigpu::GetTokenRequest
 GET_TOKEN request payload. More...
 
struct  carla::multigpu::LoadMapExtras
 What a LOAD_MAP carries besides the map: for a world the primary generated from OpenDRIVE (generate_opendrive_world), the OpenDRIVE and the generation parameters (rpc::OpendriveGenerationParameters, msgpack). More...
 
struct  carla::multigpu::LoadMapRequest
 

Namespaces

namespace  carla
 This file contains definitions of common data structures used in traffic manager.
 
namespace  carla::multigpu
 

Typedefs

using carla::multigpu::load_map_id_type = uint32_t
 Identifies one LOAD_MAP broadcast.
 

Enumerations

enum  carla::multigpu::MultiGPUCommand : uint32_t {
  carla::multigpu::SEND_FRAME = 0 , carla::multigpu::LOAD_MAP , carla::multigpu::GET_TOKEN , carla::multigpu::ENABLE_ROS ,
  carla::multigpu::DISABLE_ROS , carla::multigpu::IS_ENABLED_ROS , carla::multigpu::YOU_ALIVE
}
 

Functions

std::string carla::multigpu::MakeEpisodeReadyMessage (load_map_id_type load_id)
 Episode-ready message: the marker followed by the load id of the LOAD_MAP that started the episode, so the primary can ignore a stale one.
 
std::string carla::multigpu::MakeLoadMapPayload (std::string_view map, load_map_id_type load_id, const LoadMapExtras &extras={})
 LOAD_MAP payload: the NUL-terminated map path, the load id, then the extras as [u8 kind][u32 size][bytes] fields; a reader skips the kinds it does not know.
 
std::optional< load_map_id_type > carla::multigpu::ParseEpisodeReadyMessage (std::string_view payload)
 Load id of an episode-ready message (0 for a bare marker), or nullopt if payload is not one.
 
LoadMapRequest carla::multigpu::ParseLoadMapPayload (std::string_view payload)
 

Variables

constexpr std::string_view carla::multigpu::kEpisodeReadyMarker {"EPISODE_READY"}
 Sent unprompted by a secondary, on the same channel as command responses, to signal that its episode is ready to receive frames (see Router::HandleResponse).
 
constexpr std::size_t carla::multigpu::kMaxMultiGpuMessageBytes = (std::size_t{1u} << 30u) + (std::size_t{1u} << 20u)
 Largest message either end accepts: a frame (capped at 1 GiB by the primary) plus room for its headers.
 
constexpr std::string_view carla::multigpu::kTokenNotReadyMarker {"TOKEN_NOT_READY"}
 GET_TOKEN reply when the secondary cannot resolve the sensor to a stream (or the request is malformed).