CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
LibCarla
source
carla
rpc
rpc/Client.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/rpc/Metadata.h
"
10
11
#include <rpc/client.h>
12
13
namespace
carla
{
14
namespace
rpc
{
15
16
class
Client
{
17
public
:
18
19
template
<
typename
... Args>
20
explicit
Client
(Args &&... args)
21
:
_client
(
std
::forward<Args>(args)...) {}
22
23
void
set_timeout
(int64_t value) {
24
_client
.set_timeout(value);
25
}
26
27
auto
get_timeout
()
const
{
28
return
_client
.get_timeout();
29
}
30
31
template
<
typename
... Args>
32
auto
call
(
const
std::string &function, Args &&... args) {
33
return
_client
.call(function,
Metadata::MakeSync
(), std::forward<Args>(args)...);
34
}
35
36
template
<
typename
... Args>
37
void
async_call
(
const
std::string &function, Args &&... args) {
38
_client
.async_call(function,
Metadata::MakeAsync
(), std::forward<Args>(args)...);
39
}
40
41
private
:
42
43
::rpc::client
_client
;
44
};
45
46
}
// namespace rpc
47
}
// namespace carla
Metadata.h
carla::rpc::Client::_client
::rpc::client _client
Definition
rpc/Client.h:43
carla::rpc::Client::async_call
void async_call(const std::string &function, Args &&... args)
Definition
rpc/Client.h:37
carla::rpc::Client::call
auto call(const std::string &function, Args &&... args)
Definition
rpc/Client.h:32
carla::rpc::Client::Client
Client(Args &&... args)
Definition
rpc/Client.h:20
carla::rpc::Client::get_timeout
auto get_timeout() const
Definition
rpc/Client.h:27
carla::rpc::Client::set_timeout
void set_timeout(int64_t value)
Definition
rpc/Client.h:23
carla::rpc::Metadata::MakeAsync
static Metadata MakeAsync()
Definition
Metadata.h:24
carla::rpc::Metadata::MakeSync
static Metadata MakeSync()
Definition
Metadata.h:20
carla::rpc
Definition
DebugShapeDrawer.h:11
carla
This file contains definitions of common data structures used in traffic manager.
Definition
SignComponent.h:21
std
Definition
CarlaRecorderCollision.h:31
Generated by
1.18.0