Go to the documentation of this file.
28 #ifndef UR_ROBOT_DRIVER_DASHBOARD_CLIENT_DASHBOARD_CLIENT_H_INCLUDED
29 #define UR_ROBOT_DRIVER_DASHBOARD_CLIENT_DASHBOARD_CLIENT_H_INCLUDED
69 bool connect(
const size_t max_num_tries = 0,
70 const std::chrono::milliseconds reconnection_time = std::chrono::seconds(10));
96 bool sendRequest(
const std::string& command,
const std::string& expected);
108 std::string
sendRequestString(
const std::string& command,
const std::string& expected);
119 bool waitForReply(
const std::string& command,
const std::string& expected,
120 std::chrono::duration<double> timeout = std::chrono::seconds(30));
135 bool retryCommand(
const std::string& requestCommand,
const std::string& requestExpectedResponse,
136 const std::string& waitRequest,
const std::string& waitExpectedResponse,
137 const std::chrono::duration<double> timeout,
138 const std::chrono::duration<double> retry_period = std::chrono::seconds(1));
155 bool commandPowerOn(
const std::chrono::duration<double> timeout = std::chrono::seconds(300));
446 void assertVersion(
const std::string& e_series_min_ver,
const std::string& cb3_min_ver,
447 const std::string& required_call);
461 bool send(
const std::string& text);
463 void rtrim(std::string& str,
const std::string& chars =
"\t\n\v\f\r ");
470 #endif // ifndef UR_ROBOT_DRIVER_DASHBOARD_CLIENT_DASHBOARD_CLIENT_H_INCLUDED
Class for TCP socket abstraction.
bool commandRestartSafety()
Send Restart Safety command.
bool commandPlay()
Send Play program command.
bool commandSetOperationalMode(const std::string &operational_mode)
Send Set operational mode command (Only available for e-series)
void assertVersion(const std::string &e_series_min_ver, const std::string &cb3_min_ver, const std::string &required_call)
Makes sure that the dashboard_server's version is above the required version.
bool commandIsProgramSaved()
Send "Is program saved" request command.
bool commandGetSerialNumber(std::string &serial_number)
Get Serial number.
VersionInformation polyscope_version_
bool commandClosePopup()
Send Close popup command.
bool commandStop()
Send Stop program command.
bool commandGenerateSupportFile(const std::string &dir_path)
Send Generate support file command.
bool commandSetUserRole(const std::string &user_role)
Send Set user role command (Only available for CB3)
bool commandUnlockProtectiveStop()
Send Unlock Protective stop popup command.
bool retryCommand(const std::string &requestCommand, const std::string &requestExpectedResponse, const std::string &waitRequest, const std::string &waitExpectedResponse, const std::chrono::duration< double > timeout, const std::chrono::duration< double > retry_period=std::chrono::seconds(1))
Keep Sending the requesting Command and wait until it returns the expected answer.
bool send(const std::string &text)
bool waitForReply(const std::string &command, const std::string &expected, std::chrono::duration< double > timeout=std::chrono::seconds(30))
brief Sends a command and wait until it returns the expected answer
void rtrim(std::string &str, const std::string &chars="\t\n\v\f\r ")
static constexpr int DASHBOARD_SERVER_PORT
bool commandLoadProgram(const std::string &program_file_name)
Send Load program command.
bool commandShutdown()
Send Shutdown command.
bool commandGetRobotModel(std::string &robot_model)
Get Robot model.
bool commandPopup(const std::string &popup_text)
Send popup command.
bool commandBrakeRelease()
Send Brake release command.
bool commandAddToLog(const std::string &log_text)
Send text to log.
virtual ~DashboardClient()=default
bool sendRequest(const std::string &command, const std::string &expected)
Sends command and compare it with the expected answer.
std::string sendAndReceive(const std::string &command)
Sends a command through the socket and waits for an answer.
bool commandQuit()
Send Quit command.
bool commandProgramState(std::string &program_state)
Get Program state.
bool commandSaveLog()
Flush the polyscope log to the log_history.txt file.
bool commandClearOperationalMode()
Send Clear operational mode command.
bool commandRunning()
Send Running command.
timeval getConfiguredReceiveTimeout() const
Gets the configured receive timeout. If receive timeout is unconfigured "normal" socket timeout of 1 ...
bool commandLoadInstallation(const std::string &installation_file_name)
Send Load installation command.
void disconnect()
Makes sure no connection to the dashboard server is held inside the object.
bool commandGetLoadedProgram(std::string &loaded_program)
Get Loaded Program.
This class is a wrapper around the dashboard server.
bool commandGenerateFlightReport(const std::string &report_type)
Send Generate flight report command.
bool connect(const size_t max_num_tries=0, const std::chrono::milliseconds reconnection_time=std::chrono::seconds(10))
Opens a connection to the dashboard server on the host as specified in the constructor.
bool commandSafetyStatus(std::string &safety_status)
Get Safety status.
bool commandGetUserRole(std::string &user_role)
Send Get user role command (Only available for CB3)
bool commandPause()
Send Pause program command.
bool commandPolyscopeVersion(std::string &polyscope_version)
Get Polyscope version.
bool commandPowerOn(const std::chrono::duration< double > timeout=std::chrono::seconds(300))
Send Power on command.
bool commandPowerOff()
Send Power off command.
bool commandGetOperationalMode(std::string &operational_mode)
Get Operational mode.
bool commandCloseSafetyPopup()
Send Close safety popup command.
bool commandSafetyMode(std::string &safety_mode)
Get Safety mode.
bool commandRobotMode(std::string &robot_mode)
Get Robot mode.
std::string sendRequestString(const std::string &command, const std::string &expected)
Sends command and compare it with the expected answer.
bool commandIsInRemoteControl()
Send "Is in remote control" query command.
ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Mon May 26 2025 02:35:58