CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
LibCarla
source
carla
streaming
detail
StreamStateBase.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/NonCopyable.h
"
10
#include "
carla/streaming/detail/Session.h
"
11
#include "
carla/streaming/detail/Token.h
"
12
13
#include <memory>
14
15
namespace
carla
{
16
17
class
BufferPool
;
18
19
namespace
streaming
{
20
namespace
detail
{
21
22
/// Shared state among all the copies of a stream. Provides access to the
23
/// underlying server session(s) if active.
24
class
StreamStateBase
:
private
NonCopyable
{
25
public
:
26
27
explicit
StreamStateBase
(
const
token_type
&
token
);
28
29
virtual
~StreamStateBase
();
30
31
const
token_type
&
token
()
const
{
32
return
_token
;
33
}
34
35
Buffer
MakeBuffer
();
36
37
virtual
void
ConnectSession
(std::shared_ptr<Session> session) = 0;
38
39
virtual
void
DisconnectSession
(std::shared_ptr<Session> session) = 0;
40
41
virtual
void
ClearSessions
() = 0;
42
43
private
:
44
45
const
token_type
_token
;
46
47
const
std::shared_ptr<BufferPool>
_buffer_pool
;
48
};
49
50
}
// namespace detail
51
}
// namespace streaming
52
}
// namespace carla
NonCopyable.h
Session.h
carla::BufferPool
A pool of Buffer.
Definition
BufferPool.h:29
carla::Buffer
A piece of raw data.
Definition
carla/Buffer.h:42
carla::NonCopyable::NonCopyable
NonCopyable()=default
carla::streaming::detail::StreamStateBase::StreamStateBase
StreamStateBase(const token_type &token)
Definition
StreamStateBase.cpp:15
carla::streaming::detail::StreamStateBase::DisconnectSession
virtual void DisconnectSession(std::shared_ptr< Session > session)=0
carla::streaming::detail::StreamStateBase::~StreamStateBase
virtual ~StreamStateBase()
carla::streaming::detail::StreamStateBase::ClearSessions
virtual void ClearSessions()=0
carla::streaming::detail::StreamStateBase::_token
const token_type _token
Definition
StreamStateBase.h:45
carla::streaming::detail::StreamStateBase::ConnectSession
virtual void ConnectSession(std::shared_ptr< Session > session)=0
carla::streaming::detail::StreamStateBase::token
const token_type & token() const
Definition
StreamStateBase.h:31
carla::streaming::detail::StreamStateBase::_buffer_pool
const std::shared_ptr< BufferPool > _buffer_pool
Definition
StreamStateBase.h:47
carla::streaming::detail::StreamStateBase::MakeBuffer
Buffer MakeBuffer()
Definition
StreamStateBase.cpp:21
carla::streaming::detail::token_type
Serializes a stream endpoint.
Definition
detail/Token.h:61
Token.h
carla::streaming::detail
Definition
Dispatcher.cpp:17
carla::streaming
Definition
client/detail/Client.h:61
carla
This file contains definitions of common data structures used in traffic manager.
Definition
SignComponent.h:21
Generated by
1.18.0