CARLA
Loading...
Searching...
No Matches
CarlaServer.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
11
12#include <util/ue-header-guard-begin.h>
13#include "CoreMinimal.h"
14#include <util/ue-header-guard-end.h>
15
20
21
22class UCarlaEpisode;
23
25{
26public:
27
29
31
32 FDataMultiStream Start(uint16_t RPCPort, uint16_t StreamingPort, uint16_t SecondaryPort);
33
34 void NotifyBeginEpisode(UCarlaEpisode &Episode);
35
36 void NotifyEndEpisode();
37
38 void AsyncRun(uint32 NumberOfWorkerThreads);
39
40 void RunSome(uint32 Milliseconds);
41
42 void Tick();
43
44 bool TickCueReceived();
45
46 /// Drops the tick cues banked so far. A tick cue is counted whatever the
47 /// mode but only consumed in synchronous mode, so cues sent while
48 /// asynchronous would otherwise let the server run that many frames on its
49 /// own once synchronous mode is turned on.
50 void ResetTickCues();
51
52 /// A Multi-GPU secondary refuses every call that would change its world.
53 void SetIsSecondaryServer(bool bIsSecondary);
54
55 void Stop();
56
57 FDataStream OpenStream() const;
58
59 std::shared_ptr<carla::multigpu::Router> GetSecondaryServer();
60
62
63private:
64
65 class FPimpl;
66 TUniquePtr<FPimpl> Pimpl;
67};
FDataStreamTmpl< carla::streaming::Stream > FDataMultiStream
Definition DataStream.h:82
FDataStreamTmpl< carla::streaming::Stream > FDataStream
Definition DataStream.h:80
bool TickCueReceived()
std::shared_ptr< carla::multigpu::Router > GetSecondaryServer()
void RunSome(uint32 Milliseconds)
TUniquePtr< FPimpl > Pimpl
Definition CarlaServer.h:66
void ResetTickCues()
Drops the tick cues banked so far.
carla::streaming::Server & GetStreamingServer()
FDataStream OpenStream() const
void NotifyEndEpisode()
void NotifyBeginEpisode(UCarlaEpisode &Episode)
void SetIsSecondaryServer(bool bIsSecondary)
A Multi-GPU secondary refuses every call that would change its world.
FDataMultiStream Start(uint16_t RPCPort, uint16_t StreamingPort, uint16_t SecondaryPort)
void AsyncRun(uint32 NumberOfWorkerThreads)
A simulation episode.
A streaming server.