The ReverseInterface class handles communication to the robot. It starts a server and waits for the robot to connect via its URCaps program.
More...
#include <reverse_interface.h>
The ReverseInterface class handles communication to the robot. It starts a server and waits for the robot to connect via its URCaps program.
Definition at line 68 of file reverse_interface.h.
◆ ReverseInterface() [1/2]
urcl::control::ReverseInterface::ReverseInterface |
( |
| ) |
|
|
delete |
◆ ReverseInterface() [2/2]
urcl::control::ReverseInterface::ReverseInterface |
( |
uint32_t |
port, |
|
|
std::function< void(bool)> |
handle_program_state |
|
) |
| |
Creates a ReverseInterface object including a TCPServer.
- Parameters
-
port | Port the Server is started on |
handle_program_state | Function handle to a callback on program state changes. |
Definition at line 35 of file reverse_interface.cpp.
◆ ~ReverseInterface()
virtual urcl::control::ReverseInterface::~ReverseInterface |
( |
| ) |
|
|
virtualdefault |
Disconnects possible clients so the reverse interface object can be safely destroyed.
◆ append()
template<typename T >
size_t urcl::control::ReverseInterface::append |
( |
uint8_t * |
buffer, |
|
|
T & |
val |
|
) |
| |
|
inlineprotected |
◆ connectionCallback()
void urcl::control::ReverseInterface::connectionCallback |
( |
const int |
filedescriptor | ) |
|
|
protectedvirtual |
◆ disconnectionCallback()
void urcl::control::ReverseInterface::disconnectionCallback |
( |
const int |
filedescriptor | ) |
|
|
protectedvirtual |
◆ messageCallback()
void urcl::control::ReverseInterface::messageCallback |
( |
const int |
filedescriptor, |
|
|
char * |
buffer, |
|
|
int |
nbytesrecv |
|
) |
| |
|
protectedvirtual |
◆ setKeepaliveCount()
virtual void urcl::control::ReverseInterface::setKeepaliveCount |
( |
const uint32_t & |
count | ) |
|
|
inlinevirtual |
Set the Keepalive count. This will set the number of allowed timeout reads on the robot.
- Parameters
-
count | Number of allowed timeout reads on the robot. |
Definition at line 122 of file reverse_interface.h.
◆ write()
Writes needed information to the robot to be read by the URCaps program.
- Parameters
-
positions | A vector of joint targets for the robot |
control_mode | Control mode assigned to this command. See documentation of comm::ControlMode for details on possible values. |
- Returns
- True, if the write was performed successfully, false otherwise.
Definition at line 47 of file reverse_interface.cpp.
◆ writeFreedriveControlMessage()
bool urcl::control::ReverseInterface::writeFreedriveControlMessage |
( |
const FreedriveControlMessage |
freedrive_action | ) |
|
Writes needed information to the robot to be read by the URScript program.
- Parameters
-
freedrive_action | 1 if freedrive mode is to be started, -1 if it should be stopped and 0 to keep it running |
- Returns
- True, if the write was performed successfully, false otherwise.
Definition at line 126 of file reverse_interface.cpp.
◆ writeTrajectoryControlMessage()
bool urcl::control::ReverseInterface::writeTrajectoryControlMessage |
( |
const TrajectoryControlMessage |
trajectory_action, |
|
|
const int |
point_number = 0 |
|
) |
| |
Writes needed information to the robot to be read by the URScript program.
- Parameters
-
trajectory_action | 1 if a trajectory is to be started, -1 if it should be stopped |
point_number | The number of points of the trajectory to be executed |
- Returns
- True, if the write was performed successfully, false otherwise.
Definition at line 90 of file reverse_interface.cpp.
◆ client_fd_
int urcl::control::ReverseInterface::client_fd_ |
|
protected |
◆ handle_program_state_
std::function<void(bool)> urcl::control::ReverseInterface::handle_program_state_ |
|
protected |
◆ keepalive_count_
uint32_t urcl::control::ReverseInterface::keepalive_count_ |
|
protected |
◆ MAX_MESSAGE_LENGTH
const int urcl::control::ReverseInterface::MAX_MESSAGE_LENGTH = 8 |
|
staticprotected |
◆ MULT_JOINTSTATE
const int32_t urcl::control::ReverseInterface::MULT_JOINTSTATE = 1000000 |
|
static |
◆ server_
The documentation for this class was generated from the following files:
ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Tue Jul 4 2023 02:09:47