Skip to content

Commit 07ec3f3

Browse files
urfeexurmahp
andauthored
Apply suggestions from code review
Co-authored-by: Mads Holm Peters <[email protected]>
1 parent 426cff5 commit 07ec3f3

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

include/ur_client_library/ur/dashboard_client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,8 @@ class DashboardClient
493493
*
494494
* \return True succeeded
495495
*/
496-
497496
bool commandRobotMode(std::string& robot_mode);
497+
498498
/*!
499499
* \brief Get Robot mode
500500
*

include/ur_client_library/ur/dashboard_client_implementation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class DashboardClientImpl
9999
* \brief Sends command and verifies that a valid answer is received.
100100
*
101101
* \param command Command that will be sent to the server.
102-
* \param expected_response_patterh Expected response as a regex string.
102+
* \param expected_response_pattern Expected response as a regex string.
103103
* \param payload Optional payload to be sent with the command.
104104
*
105105
* \return True if the reply to the command is as expected

src/ur/dashboard_client.cpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void DashboardClient::disconnect()
8080
}
8181
else
8282
{
83-
throw UrException("DashboardClient::connect called, but impl_ is nullptr. This should not happen.");
83+
throw UrException("DashboardClient::disconnect called, but impl_ is nullptr. This should not happen.");
8484
}
8585
}
8686

@@ -106,7 +106,7 @@ std::string DashboardClient::sendRequestString(const std::string& command, const
106106
{
107107
if (impl_ == nullptr)
108108
{
109-
throw UrException("DashboardClient::sendAndReceive called, but impl_ is nullptr. This should not happen.");
109+
throw UrException("DashboardClient::sendRequestString called, but impl_ is nullptr. This should not happen.");
110110
}
111111
return impl_->sendRequestString(command, expected);
112112
}
@@ -200,6 +200,7 @@ bool DashboardClient::commandLoadInstallation(const std::string& installation_fi
200200
{
201201
return commandLoadInstallationWithResponse(installation_file_name).ok;
202202
}
203+
203204
DashboardResponse DashboardClient::commandLoadInstallationWithResponse(const std::string& installation_file_name)
204205
{
205206
return impl_->commandLoadInstallation(installation_file_name);
@@ -228,6 +229,7 @@ bool DashboardClient::commandResume()
228229
{
229230
return commandResumeWithResponse().ok;
230231
}
232+
231233
DashboardResponse DashboardClient::commandResumeWithResponse()
232234
{
233235
return impl_->commandResume();
@@ -246,6 +248,7 @@ bool DashboardClient::commandClosePopup()
246248
{
247249
return commandClosePopupWithResponse().ok;
248250
}
251+
249252
DashboardResponse DashboardClient::commandClosePopupWithResponse()
250253
{
251254
return impl_->commandClosePopup();
@@ -255,6 +258,7 @@ bool DashboardClient::commandCloseSafetyPopup()
255258
{
256259
return commandCloseSafetyPopupWithResponse().ok;
257260
}
261+
258262
DashboardResponse DashboardClient::commandCloseSafetyPopupWithResponse()
259263
{
260264
return impl_->commandCloseSafetyPopup();
@@ -273,6 +277,7 @@ bool DashboardClient::commandUnlockProtectiveStop()
273277
{
274278
return commandUnlockProtectiveStopWithResponse().ok;
275279
}
280+
276281
DashboardResponse DashboardClient::commandUnlockProtectiveStopWithResponse()
277282
{
278283
return impl_->commandUnlockProtectiveStop();
@@ -282,6 +287,7 @@ bool DashboardClient::commandShutdown()
282287
{
283288
return commandShutdownWithResponse().ok;
284289
}
290+
285291
DashboardResponse DashboardClient::commandShutdownWithResponse()
286292
{
287293
return impl_->commandShutdown();
@@ -291,6 +297,7 @@ bool DashboardClient::commandQuit()
291297
{
292298
return commandQuitWithResponse().ok;
293299
}
300+
294301
DashboardResponse DashboardClient::commandQuitWithResponse()
295302
{
296303
return impl_->commandQuit();
@@ -312,6 +319,7 @@ bool DashboardClient::commandIsProgramSaved()
312319
auto response = impl_->commandIsProgramSaved();
313320
return response.ok && std::get<bool>(response.data["saved"]);
314321
}
322+
315323
DashboardResponse DashboardClient::commandIsProgramSavedWithResponse()
316324
{
317325
return impl_->commandIsProgramSaved();
@@ -322,6 +330,7 @@ bool DashboardClient::commandIsInRemoteControl()
322330
auto response = impl_->commandIsInRemoteControl();
323331
return response.ok && std::get<bool>(response.data["remote_control"]);
324332
}
333+
325334
DashboardResponse DashboardClient::commandIsInRemoteControlWithResponse()
326335
{
327336
return impl_->commandIsInRemoteControl();
@@ -331,6 +340,7 @@ bool DashboardClient::commandPopup(const std::string& popup_text)
331340
{
332341
return commandPopupWithResponse(popup_text).ok;
333342
}
343+
334344
DashboardResponse DashboardClient::commandPopupWithResponse(const std::string& popup_text)
335345
{
336346
return impl_->commandPopup(popup_text);
@@ -340,6 +350,7 @@ bool DashboardClient::commandAddToLog(const std::string& log_text)
340350
{
341351
return commandAddToLogWithResponse(log_text).ok;
342352
}
353+
343354
DashboardResponse DashboardClient::commandAddToLogWithResponse(const std::string& log_text)
344355
{
345356
return impl_->commandAddToLog(log_text);
@@ -384,6 +395,7 @@ bool DashboardClient::commandGetSerialNumber(std::string& serial_number)
384395
}
385396
return response.ok;
386397
}
398+
387399
DashboardResponse DashboardClient::commandGetSerialNumberWithResponse()
388400
{
389401
return impl_->commandGetSerialNumber();

0 commit comments

Comments
 (0)