#include <primaryCommands.h>
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 |
Definition at line 26 of file primaryCommands.h.
carla::multigpu::PrimaryCommands::PrimaryCommands | ( | ) |
Definition at line 20 of file primaryCommands.cpp.
carla::multigpu::PrimaryCommands::PrimaryCommands | ( | std::shared_ptr< Router > | router | ) |
Definition at line 23 of file primaryCommands.cpp.
void carla::multigpu::PrimaryCommands::DisableForROS | ( | stream_id | sensor_id | ) |
Definition at line 144 of file primaryCommands.cpp.
References _servers, and SendDisableForROS().
void carla::multigpu::PrimaryCommands::EnableForROS | ( | stream_id | sensor_id | ) |
Definition at line 133 of file primaryCommands.cpp.
References _servers, GetToken(), and SendEnableForROS().
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().
bool carla::multigpu::PrimaryCommands::IsEnabledForROS | ( | stream_id | sensor_id | ) |
Definition at line 151 of file primaryCommands.cpp.
References _servers, and SendIsEnabledForROS().
|
private |
Definition at line 81 of file primaryCommands.cpp.
References _router, _servers, carla::multigpu::DISABLE_ROS, and carla::log_error().
Referenced by DisableForROS().
|
private |
Definition at line 66 of file primaryCommands.cpp.
References _router, _servers, carla::multigpu::ENABLE_ROS, and carla::log_error().
Referenced by EnableForROS().
void carla::multigpu::PrimaryCommands::SendFrameData | ( | carla::Buffer | buffer | ) |
Definition at line 32 of file primaryCommands.cpp.
References _router, and carla::multigpu::SEND_FRAME.
|
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().
void carla::multigpu::PrimaryCommands::SendIsAlive | ( | ) |
Definition at line 57 of file primaryCommands.cpp.
References _router, carla::log_info(), and carla::multigpu::YOU_ALIVE.
|
private |
Definition at line 96 of file primaryCommands.cpp.
References _router, _servers, carla::multigpu::IS_ENABLED_ROS, and carla::log_error().
Referenced by IsEnabledForROS().
void carla::multigpu::PrimaryCommands::SendLoadMap | ( | std::string | map | ) |
Definition at line 38 of file primaryCommands.cpp.
References _router, and carla::multigpu::LOAD_MAP.
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().
|
private |
Definition at line 63 of file primaryCommands.h.
Referenced by GetToken(), SendDisableForROS(), SendEnableForROS(), SendFrameData(), SendGetToken(), SendIsAlive(), SendIsEnabledForROS(), SendLoadMap(), and set_router().
|
private |
Definition at line 65 of file primaryCommands.h.
Referenced by DisableForROS(), EnableForROS(), GetToken(), IsEnabledForROS(), SendDisableForROS(), SendEnableForROS(), and SendIsEnabledForROS().
|
private |
Definition at line 64 of file primaryCommands.h.
Referenced by GetToken().