CARLA
LibCarla
source
carla
rpc
Metadata.h
Go to the documentation of this file.
1
// Copyright (c) 2019 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/MsgPack.h
"
10
11
namespace
carla
{
12
namespace
rpc {
13
14
/// Metadata of an RPC function call.
15
class
Metadata
{
16
public
:
17
18
Metadata
() =
default
;
19
20
static
Metadata
MakeSync
() {
21
return
{
false
};
22
}
23
24
static
Metadata
MakeAsync
() {
25
return
{
true
};
26
}
27
28
bool
IsResponseIgnored
()
const
{
29
return
_asynchronous_call
;
30
}
31
32
private
:
33
34
Metadata
(
bool
asynchronous_call) :
_asynchronous_call
(asynchronous_call) {}
35
36
bool
_asynchronous_call
=
false
;
37
38
public
:
39
40
MSGPACK_DEFINE_ARRAY
(_asynchronous_call);
41
};
42
43
}
// namespace rpc
44
}
// namespace carla
carla::rpc::Metadata::MakeSync
static Metadata MakeSync()
Definition:
Metadata.h:20
carla
This file contains definitions of common data structures used in traffic manager. ...
Definition:
Carla.cpp:133
carla::rpc::Metadata::_asynchronous_call
bool _asynchronous_call
Definition:
Metadata.h:36
carla::rpc::Metadata::IsResponseIgnored
bool IsResponseIgnored() const
Definition:
Metadata.h:28
carla::rpc::Metadata::Metadata
Metadata()=default
MsgPack.h
carla::rpc::Metadata::Metadata
Metadata(bool asynchronous_call)
Definition:
Metadata.h:34
carla::rpc::Metadata
Metadata of an RPC function call.
Definition:
Metadata.h:15
carla::rpc::Metadata::MSGPACK_DEFINE_ARRAY
MSGPACK_DEFINE_ARRAY(_asynchronous_call)
carla::rpc::Metadata::MakeAsync
static Metadata MakeAsync()
Definition:
Metadata.h:24
Generated by
1.8.13