mc_control::ControllerServerConfiguration Struct Reference

#include <mc_control/ControllerServerConfiguration.h>

Public Types

using TCPConfiguration = details::SocketConfiguration< 4242, 4343 >
 
using WebSocketConfiguration = details::SocketConfiguration< 8080, 8081 >
 

Public Member Functions

void load (const mc_rtc::Configuration &config)
 
std::vector< std::string > pub_uris () const noexcept
 
std::vector< std::string > pull_uris () const noexcept
 
void print_serving_information () const noexcept
 

Static Public Member Functions

static ControllerServerConfiguration fromConfiguration (const mc_rtc::Configuration &config)
 

Public Attributes

double timestep = 0.05
 
std::optional< std::string > ipc_socket = mc_rtc::temp_directory_path("mc_rtc")
 
std::optional< TCPConfigurationtcp_config = TCPConfiguration{}
 
std::optional< WebSocketConfigurationwebsocket_config = std::nullopt
 

Detailed Description

Configuration for mc_control::ControllerServer

Member Typedef Documentation

◆ TCPConfiguration

◆ WebSocketConfiguration

Member Function Documentation

◆ fromConfiguration()

static ControllerServerConfiguration mc_control::ControllerServerConfiguration::fromConfiguration ( const mc_rtc::Configuration config)
static

◆ load()

void mc_control::ControllerServerConfiguration::load ( const mc_rtc::Configuration config)

Loads from a configuration object

◆ print_serving_information()

void mc_control::ControllerServerConfiguration::print_serving_information ( ) const
noexcept

Prints a message about the server configuration

◆ pub_uris()

std::vector<std::string> mc_control::ControllerServerConfiguration::pub_uris ( ) const
noexcept

Returns the URI(s) the PUB socket should bind to

◆ pull_uris()

std::vector<std::string> mc_control::ControllerServerConfiguration::pull_uris ( ) const
noexcept

Returns the URI(s) the PULL socket should bind to

Member Data Documentation

◆ ipc_socket

std::optional<std::string> mc_control::ControllerServerConfiguration::ipc_socket = mc_rtc::temp_directory_path("mc_rtc")

IPC socket file

Actual ipc sockets are created as socket + "_pub.ipc" and socket + "_rep.ipc"

If nullopt, IPC is disabled

◆ tcp_config

std::optional<TCPConfiguration> mc_control::ControllerServerConfiguration::tcp_config = TCPConfiguration{}

Configuration for the TCP socket

TCP is disabled if this is nullopt

◆ timestep

double mc_control::ControllerServerConfiguration::timestep = 0.05

Controller server publication timestep

If it is null or negative, the timestep will be the same as the controller

If it happens to be lower than the controller's timestep then it will also be the same

◆ websocket_config

std::optional<WebSocketConfiguration> mc_control::ControllerServerConfiguration::websocket_config = std::nullopt

Configuration for the WebSocket socket

WebSocket is disabled if this is nullopt (default)


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