mc_rtc
2.12.0
|
#include <mc_control/ControllerServer.h>
Public Member Functions | |
ControllerServer (double dt, double server_dt, const std::vector< std::string > &pub_bind_uri, const std::vector< std::string > &pull_bind_uri) | |
ControllerServer (double dt, const ControllerServerConfiguration &config) | |
~ControllerServer () | |
void | handle_requests (mc_rtc::gui::StateBuilder &gui_builder) |
void | handle_requests (mc_rtc::gui::StateBuilder &gui, const char *data) |
void | publish (mc_rtc::gui::StateBuilder &gui_builder) |
std::pair< const char *, size_t > | data () const |
void | set_logger (std::shared_ptr< mc_rtc::Logger > logger) noexcept |
void | push_requests (const std::vector< mc_rtc::Logger::GUIEvent > &requests) |
void | update_rate (double dt, double server_dt) |
Serves data and allow interaction with the controllers
mc_control::ControllerServer::ControllerServer | ( | double | dt, |
double | server_dt, | ||
const std::vector< std::string > & | pub_bind_uri, | ||
const std::vector< std::string > & | pull_bind_uri | ||
) |
Constructor
dt | Controller timestep |
server_dt | Publication timestep |
pub_bind_uri | List of URI the PUB socket should bind to |
pull_bind_uri | List of URI the PULL socket should bind to |
Check nanomsg documentation for supported protocols
mc_control::ControllerServer::ControllerServer | ( | double | dt, |
const ControllerServerConfiguration & | config | ||
) |
Construct from the provided configuration
dt | Controller timestep |
config | Server configuration ControllerServerConfiguration for details |
mc_control::ControllerServer::~ControllerServer | ( | ) |
std::pair<const char *, size_t> mc_control::ControllerServer::data | ( | ) | const |
Get latest published data
void mc_control::ControllerServer::handle_requests | ( | mc_rtc::gui::StateBuilder & | gui, |
const char * | data | ||
) |
Handle requests from raw data
void mc_control::ControllerServer::handle_requests | ( | mc_rtc::gui::StateBuilder & | gui_builder | ) |
Handle requests made by the GUI users
void mc_control::ControllerServer::publish | ( | mc_rtc::gui::StateBuilder & | gui_builder | ) |
Publish the current GUI state
|
inline |
Set requests to handle on the next iteration
|
inlinenoexcept |
Attach a logger to the server
void mc_control::ControllerServer::update_rate | ( | double | dt, |
double | server_dt | ||
) |
Update the rate of the server