CARLA
 
载入中...
搜索中...
未找到
Metadata.h
浏览该文件的文档.
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
11namespace carla {
12namespace 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
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
41 };
42
43} // namespace rpc
44} // namespace carla
Metadata of an RPC function call.
Definition Metadata.h:15
static Metadata MakeAsync()
Definition Metadata.h:24
bool IsResponseIgnored() const
Definition Metadata.h:28
Metadata(bool asynchronous_call)
Definition Metadata.h:34
MSGPACK_DEFINE_ARRAY(_asynchronous_call)
static Metadata MakeSync()
Definition Metadata.h:20
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133