RobotReceiveTimeout class containing a timeout configuration. More...
#include <robot_receive_timeout.h>
Public Member Functions | |
std::chrono::milliseconds | getAsMilliseconds () const |
RobotReceiveTimeout ()=delete | |
int | verifyRobotReceiveTimeout (const comm::ControlMode control_mode, const std::chrono::milliseconds step_time) const |
Helper function to verify that the robot receive timeout is configured appropriately given the current control mode. More... | |
~RobotReceiveTimeout ()=default | |
Static Public Member Functions | |
static RobotReceiveTimeout | millisec (const unsigned int milliseconds=20) |
Create a RobotReceiveTimeout object with a specific timeout given in milliseconds. More... | |
static RobotReceiveTimeout | off () |
Creates a RobotReceiveTimeout object with no timeout, this will make the read function on the robot blocking. More... | |
static RobotReceiveTimeout | sec (const float seconds=0.02) |
Create a RobotReceiveTimeout object with a specific timeout given in seconds. More... | |
Static Public Attributes | |
static constexpr std::chrono::milliseconds | MAX_RT_RECEIVE_TIMEOUT_MS = std::chrono::milliseconds(200) |
Private Member Functions | |
RobotReceiveTimeout (std::chrono::milliseconds timeout) | |
Private Attributes | |
std::chrono::milliseconds | timeout_ |
RobotReceiveTimeout class containing a timeout configuration.
This robot receive timeout is used to configure the read timeout for the reverse socket running in the external control script. The read timeout is the number of milliseconds until the read action times out. A timeout of 0 or negative number indicates that the function should not return until a read is completed, this will make the read function on the robot blocking. This can be set using the function off().
Definition at line 47 of file robot_receive_timeout.h.
|
delete |
|
default |
|
private |
Definition at line 40 of file robot_receive_timeout.cpp.
|
inline |
Definition at line 90 of file robot_receive_timeout.h.
|
static |
Create a RobotReceiveTimeout object with a specific timeout given in milliseconds.
milliseconds | robot receive timeout |
Definition at line 44 of file robot_receive_timeout.cpp.
|
static |
Creates a RobotReceiveTimeout object with no timeout, this will make the read function on the robot blocking.
Definition at line 58 of file robot_receive_timeout.cpp.
|
static |
Create a RobotReceiveTimeout object with a specific timeout given in seconds.
seconds | robot receive timeout |
Definition at line 51 of file robot_receive_timeout.cpp.
int urcl::RobotReceiveTimeout::verifyRobotReceiveTimeout | ( | const comm::ControlMode | control_mode, |
const std::chrono::milliseconds | step_time | ||
) | const |
Helper function to verify that the robot receive timeout is configured appropriately given the current control mode.
control_mode | current control mode |
step_time | The robots step time |
Definition at line 64 of file robot_receive_timeout.cpp.
|
staticconstexpr |
Definition at line 50 of file robot_receive_timeout.h.
|
private |
Definition at line 96 of file robot_receive_timeout.h.