CARLA
Public Member Functions | Private Member Functions | Private Attributes | List of all members
carla::multigpu::PrimaryCommands Class Reference

#include <primaryCommands.h>

+ Collaboration diagram for carla::multigpu::PrimaryCommands:

Public Member Functions

void DisableForROS (stream_id sensor_id)
 
void EnableForROS (stream_id sensor_id)
 
token_type GetToken (stream_id sensor_id)
 
bool IsEnabledForROS (stream_id sensor_id)
 
 PrimaryCommands ()
 
 PrimaryCommands (std::shared_ptr< Router > router)
 
void SendFrameData (carla::Buffer buffer)
 
void SendIsAlive ()
 
void SendLoadMap (std::string map)
 
void set_router (std::shared_ptr< Router > router)
 

Private Member Functions

void SendDisableForROS (stream_id sensor_id)
 
void SendEnableForROS (stream_id sensor_id)
 
token_type SendGetToken (carla::streaming::detail::stream_id_type sensor_id)
 
bool SendIsEnabledForROS (stream_id sensor_id)
 

Private Attributes

std::shared_ptr< Router_router
 
std::unordered_map< stream_id, std::weak_ptr< Primary > > _servers
 
std::unordered_map< stream_id, token_type_tokens
 

Detailed Description

Definition at line 26 of file primaryCommands.h.

Constructor & Destructor Documentation

◆ PrimaryCommands() [1/2]

carla::multigpu::PrimaryCommands::PrimaryCommands ( )

Definition at line 20 of file primaryCommands.cpp.

◆ PrimaryCommands() [2/2]

carla::multigpu::PrimaryCommands::PrimaryCommands ( std::shared_ptr< Router router)

Definition at line 23 of file primaryCommands.cpp.

Member Function Documentation

◆ DisableForROS()

void carla::multigpu::PrimaryCommands::DisableForROS ( stream_id  sensor_id)

Definition at line 144 of file primaryCommands.cpp.

References _servers, and SendDisableForROS().

+ Here is the call graph for this function:

◆ EnableForROS()

void carla::multigpu::PrimaryCommands::EnableForROS ( stream_id  sensor_id)

Definition at line 133 of file primaryCommands.cpp.

References _servers, GetToken(), and SendEnableForROS().

+ Here is the call graph for this function:

◆ GetToken()

token_type carla::multigpu::PrimaryCommands::GetToken ( stream_id  sensor_id)

Definition at line 113 of file primaryCommands.cpp.

References _router, _servers, _tokens, carla::log_debug(), and SendGetToken().

Referenced by EnableForROS().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsEnabledForROS()

bool carla::multigpu::PrimaryCommands::IsEnabledForROS ( stream_id  sensor_id)

Definition at line 151 of file primaryCommands.cpp.

References _servers, and SendIsEnabledForROS().

+ Here is the call graph for this function:

◆ SendDisableForROS()

void carla::multigpu::PrimaryCommands::SendDisableForROS ( stream_id  sensor_id)
private

Definition at line 81 of file primaryCommands.cpp.

References _router, _servers, carla::multigpu::DISABLE_ROS, and carla::log_error().

Referenced by DisableForROS().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendEnableForROS()

void carla::multigpu::PrimaryCommands::SendEnableForROS ( stream_id  sensor_id)
private

Definition at line 66 of file primaryCommands.cpp.

References _router, _servers, carla::multigpu::ENABLE_ROS, and carla::log_error().

Referenced by EnableForROS().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendFrameData()

void carla::multigpu::PrimaryCommands::SendFrameData ( carla::Buffer  buffer)

Definition at line 32 of file primaryCommands.cpp.

References _router, and carla::multigpu::SEND_FRAME.

◆ SendGetToken()

token_type carla::multigpu::PrimaryCommands::SendGetToken ( carla::streaming::detail::stream_id_type  sensor_id)
private

Definition at line 44 of file primaryCommands.cpp.

References _router, carla::streaming::detail::token_type::get_port(), carla::streaming::detail::token_type::get_stream_id(), carla::multigpu::GET_TOKEN, and carla::log_info().

Referenced by GetToken().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendIsAlive()

void carla::multigpu::PrimaryCommands::SendIsAlive ( )

Definition at line 57 of file primaryCommands.cpp.

References _router, carla::log_info(), and carla::multigpu::YOU_ALIVE.

+ Here is the call graph for this function:

◆ SendIsEnabledForROS()

bool carla::multigpu::PrimaryCommands::SendIsEnabledForROS ( stream_id  sensor_id)
private

Definition at line 96 of file primaryCommands.cpp.

References _router, _servers, carla::multigpu::IS_ENABLED_ROS, and carla::log_error().

Referenced by IsEnabledForROS().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendLoadMap()

void carla::multigpu::PrimaryCommands::SendLoadMap ( std::string  map)

Definition at line 38 of file primaryCommands.cpp.

References _router, and carla::multigpu::LOAD_MAP.

◆ set_router()

void carla::multigpu::PrimaryCommands::set_router ( std::shared_ptr< Router router)

Definition at line 27 of file primaryCommands.cpp.

References _router.

Referenced by carla::multigpu::Router::SetCallbacks().

+ Here is the caller graph for this function:

Member Data Documentation

◆ _router

std::shared_ptr<Router> carla::multigpu::PrimaryCommands::_router
private

◆ _servers

std::unordered_map<stream_id, std::weak_ptr<Primary> > carla::multigpu::PrimaryCommands::_servers
private

◆ _tokens

std::unordered_map<stream_id, token_type> carla::multigpu::PrimaryCommands::_tokens
private

Definition at line 64 of file primaryCommands.h.

Referenced by GetToken().


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