CARLA
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
carla::streaming::low_level::Server< T > Class Template Reference

A low-level streaming server. More...

#include <Server.h>

+ Inheritance diagram for carla::streaming::low_level::Server< T >:
+ Collaboration diagram for carla::streaming::low_level::Server< T >:

Public Types

using protocol_type = typename underlying_server::protocol_type
 
using stream_id = carla::streaming::detail::stream_id_type
 
using token_type = carla::streaming::detail::token_type
 
using underlying_server = T
 

Public Member Functions

void CloseStream (carla::streaming::detail::stream_id_type id)
 
void DisableForROS (stream_id sensor_id)
 
void EnableForROS (stream_id sensor_id)
 
underlying_server::endpoint GetLocalEndpoint () const
 
token_type GetToken (stream_id sensor_id)
 
bool IsEnabledForROS (stream_id sensor_id)
 
Stream MakeStream ()
 
template<typename InternalEPType , typename ExternalEPType >
 Server (boost::asio::io_context &io_context, detail::EndPoint< protocol_type, InternalEPType > internal_ep, detail::EndPoint< protocol_type, ExternalEPType > external_ep)
 
template<typename InternalEPType >
 Server (boost::asio::io_context &io_context, detail::EndPoint< protocol_type, InternalEPType > internal_ep)
 
template<typename... EPArgs>
 Server (boost::asio::io_context &io_context, EPArgs &&... args)
 
void SetSynchronousMode (bool is_synchro)
 
void SetTimeout (time_duration timeout)
 

Private Member Functions

void StartServer ()
 

Private Attributes

detail::Dispatcher _dispatcher
 
underlying_server _server
 

Detailed Description

template<typename T>
class carla::streaming::low_level::Server< T >

A low-level streaming server.

Each new stream has a token associated, this token can be used by a client to subscribe to the stream. This server requires an external io_context running.

Warning
This server cannot be destructed before its io_context is stopped.

Definition at line 26 of file streaming/low_level/Server.h.

Member Typedef Documentation

◆ protocol_type

template<typename T>
using carla::streaming::low_level::Server< T >::protocol_type = typename underlying_server::protocol_type

Definition at line 31 of file streaming/low_level/Server.h.

◆ stream_id

Definition at line 35 of file streaming/low_level/Server.h.

◆ token_type

Definition at line 33 of file streaming/low_level/Server.h.

◆ underlying_server

template<typename T>
using carla::streaming::low_level::Server< T >::underlying_server = T

Definition at line 29 of file streaming/low_level/Server.h.

Constructor & Destructor Documentation

◆ Server() [1/3]

template<typename T>
template<typename InternalEPType , typename ExternalEPType >
carla::streaming::low_level::Server< T >::Server ( boost::asio::io_context &  io_context,
detail::EndPoint< protocol_type, InternalEPType >  internal_ep,
detail::EndPoint< protocol_type, ExternalEPType >  external_ep 
)
inlineexplicit

Definition at line 38 of file streaming/low_level/Server.h.

◆ Server() [2/3]

template<typename T>
template<typename InternalEPType >
carla::streaming::low_level::Server< T >::Server ( boost::asio::io_context &  io_context,
detail::EndPoint< protocol_type, InternalEPType >  internal_ep 
)
inlineexplicit

Definition at line 48 of file streaming/low_level/Server.h.

◆ Server() [3/3]

template<typename T>
template<typename... EPArgs>
carla::streaming::low_level::Server< T >::Server ( boost::asio::io_context &  io_context,
EPArgs &&...  args 
)
inlineexplicit

Definition at line 57 of file streaming/low_level/Server.h.

Member Function Documentation

◆ CloseStream()

template<typename T>
void carla::streaming::low_level::Server< T >::CloseStream ( carla::streaming::detail::stream_id_type  id)
inline

Definition at line 72 of file streaming/low_level/Server.h.

Referenced by carla::streaming::Server::CloseStream().

+ Here is the caller graph for this function:

◆ DisableForROS()

template<typename T>
void carla::streaming::low_level::Server< T >::DisableForROS ( stream_id  sensor_id)
inline

Definition at line 88 of file streaming/low_level/Server.h.

Referenced by carla::streaming::Server::DisableForROS().

+ Here is the caller graph for this function:

◆ EnableForROS()

template<typename T>
void carla::streaming::low_level::Server< T >::EnableForROS ( stream_id  sensor_id)
inline

Definition at line 84 of file streaming/low_level/Server.h.

Referenced by carla::streaming::Server::EnableForROS().

+ Here is the caller graph for this function:

◆ GetLocalEndpoint()

template<typename T>
underlying_server::endpoint carla::streaming::low_level::Server< T >::GetLocalEndpoint ( ) const
inline

Definition at line 60 of file streaming/low_level/Server.h.

Referenced by carla::streaming::Server::GetLocalEndpoint().

+ Here is the caller graph for this function:

◆ GetToken()

template<typename T>
token_type carla::streaming::low_level::Server< T >::GetToken ( stream_id  sensor_id)
inline

Definition at line 80 of file streaming/low_level/Server.h.

Referenced by carla::streaming::Server::GetToken().

+ Here is the caller graph for this function:

◆ IsEnabledForROS()

template<typename T>
bool carla::streaming::low_level::Server< T >::IsEnabledForROS ( stream_id  sensor_id)
inline

Definition at line 92 of file streaming/low_level/Server.h.

Referenced by carla::streaming::Server::IsEnabledForROS().

+ Here is the caller graph for this function:

◆ MakeStream()

template<typename T>
Stream carla::streaming::low_level::Server< T >::MakeStream ( )
inline

Definition at line 68 of file streaming/low_level/Server.h.

Referenced by carla::streaming::Server::MakeStream(), and TEST().

+ Here is the caller graph for this function:

◆ SetSynchronousMode()

template<typename T>
void carla::streaming::low_level::Server< T >::SetSynchronousMode ( bool  is_synchro)
inline

Definition at line 76 of file streaming/low_level/Server.h.

Referenced by carla::streaming::Server::SetSynchronousMode().

+ Here is the caller graph for this function:

◆ SetTimeout()

template<typename T>
void carla::streaming::low_level::Server< T >::SetTimeout ( time_duration  timeout)
inline

Definition at line 64 of file streaming/low_level/Server.h.

Referenced by carla::streaming::Server::SetTimeout(), and TEST().

+ Here is the caller graph for this function:

◆ StartServer()

template<typename T>
void carla::streaming::low_level::Server< T >::StartServer ( )
inlineprivate

Definition at line 98 of file streaming/low_level/Server.h.

Referenced by carla::streaming::low_level::Server< detail::tcp::Server >::Server().

+ Here is the caller graph for this function:

Member Data Documentation

◆ _dispatcher

template<typename T>
detail::Dispatcher carla::streaming::low_level::Server< T >::_dispatcher
private

◆ _server

template<typename T>
underlying_server carla::streaming::low_level::Server< T >::_server
private

The documentation for this class was generated from the following file: