The RTDEWriter class offers an abstraction layer to send data to the robot via the RTDE interface. Several simple to use functions to create data packages to send exist, which are then sent to the robot in an additional thread.
More...
#include <rtde_writer.h>
|
void | init (uint8_t recipe_id) |
| Starts the writer thread, which periodically clears the queue to write packages to the robot. More...
|
|
| RTDEWriter ()=delete |
|
| RTDEWriter (comm::URStream< RTDEPackage > *stream, const std::vector< std::string > &recipe) |
| Creates a new RTDEWriter object using a given URStream and recipe. More...
|
|
void | run () |
| The writer thread loop, continually serializing and sending packages to the robot. More...
|
|
bool | sendConfigurableDigitalOutput (uint8_t output_pin, bool value) |
| Creates a package to request setting a new value for one of the configurable digital output pins. More...
|
|
bool | sendInputBitRegister (uint32_t register_id, bool value) |
| Creates a package to request setting a new value for an input_bit_register. More...
|
|
bool | sendInputDoubleRegister (uint32_t register_id, double value) |
| Creates a package to request setting a new value for an input_double_register. More...
|
|
bool | sendInputIntRegister (uint32_t register_id, int32_t value) |
| Creates a package to request setting a new value for an input_int_register. More...
|
|
bool | sendSpeedSlider (double speed_slider_fraction) |
| Creates a package to request setting a new value for the speed slider. More...
|
|
bool | sendStandardAnalogOutput (uint8_t output_pin, double value) |
| Creates a package to request setting a new value for one of the standard analog output pins. More...
|
|
bool | sendStandardDigitalOutput (uint8_t output_pin, bool value) |
| Creates a package to request setting a new value for one of the standard digital output pins. More...
|
|
bool | sendToolDigitalOutput (uint8_t output_pin, bool value) |
| Creates a package to request setting a new value for one of the tool output pins. More...
|
|
| ~RTDEWriter () |
|
The RTDEWriter class offers an abstraction layer to send data to the robot via the RTDE interface. Several simple to use functions to create data packages to send exist, which are then sent to the robot in an additional thread.
Definition at line 48 of file rtde_writer.h.
urcl::rtde_interface::RTDEWriter::RTDEWriter |
( |
| ) |
|
|
delete |
urcl::rtde_interface::RTDEWriter::RTDEWriter |
( |
comm::URStream< RTDEPackage > * |
stream, |
|
|
const std::vector< std::string > & |
recipe |
|
) |
| |
Creates a new RTDEWriter object using a given URStream and recipe.
- Parameters
-
stream | The URStream to use for communication with the robot |
recipe | The recipe to use for communication |
Definition at line 34 of file rtde_writer.cpp.
urcl::rtde_interface::RTDEWriter::~RTDEWriter |
( |
| ) |
|
|
inline |
void urcl::rtde_interface::RTDEWriter::init |
( |
uint8_t |
recipe_id | ) |
|
Starts the writer thread, which periodically clears the queue to write packages to the robot.
- Parameters
-
recipe_id | The recipe id to use, so the robot correctly identifies the used recipe |
Definition at line 39 of file rtde_writer.cpp.
uint8_t urcl::rtde_interface::RTDEWriter::pinToMask |
( |
uint8_t |
pin | ) |
|
|
private |
void urcl::rtde_interface::RTDEWriter::run |
( |
| ) |
|
The writer thread loop, continually serializing and sending packages to the robot.
Definition at line 47 of file rtde_writer.cpp.
bool urcl::rtde_interface::RTDEWriter::sendConfigurableDigitalOutput |
( |
uint8_t |
output_pin, |
|
|
bool |
value |
|
) |
| |
Creates a package to request setting a new value for one of the configurable digital output pins.
- Parameters
-
output_pin | The pin to change |
value | The new value |
- Returns
- Success of the package creation
Definition at line 114 of file rtde_writer.cpp.
bool urcl::rtde_interface::RTDEWriter::sendInputBitRegister |
( |
uint32_t |
register_id, |
|
|
bool |
value |
|
) |
| |
Creates a package to request setting a new value for an input_bit_register.
- Parameters
-
register_id | The id of the register that should be changed [64..127] |
value | The new value |
- Returns
- Success of the package creation
Definition at line 206 of file rtde_writer.cpp.
bool urcl::rtde_interface::RTDEWriter::sendInputDoubleRegister |
( |
uint32_t |
register_id, |
|
|
double |
value |
|
) |
| |
Creates a package to request setting a new value for an input_double_register.
- Parameters
-
register_id | The id of the register that should be changed [24..47] |
value | The new value |
- Returns
- Success of the package creation
Definition at line 242 of file rtde_writer.cpp.
bool urcl::rtde_interface::RTDEWriter::sendInputIntRegister |
( |
uint32_t |
register_id, |
|
|
int32_t |
value |
|
) |
| |
Creates a package to request setting a new value for an input_int_register.
- Parameters
-
register_id | The id of the register that should be changed [24..47] |
value | The new value |
- Returns
- Success of the package creation
Definition at line 224 of file rtde_writer.cpp.
bool urcl::rtde_interface::RTDEWriter::sendSpeedSlider |
( |
double |
speed_slider_fraction | ) |
|
Creates a package to request setting a new value for the speed slider.
- Parameters
-
speed_slider_fraction | The new speed slider fraction as a value between 0.0 and 1.0 |
- Returns
- Success of the package creation
Definition at line 65 of file rtde_writer.cpp.
bool urcl::rtde_interface::RTDEWriter::sendStandardAnalogOutput |
( |
uint8_t |
output_pin, |
|
|
double |
value |
|
) |
| |
Creates a package to request setting a new value for one of the standard analog output pins.
- Parameters
-
output_pin | The pin to change |
value | The new value |
- Returns
- Success of the package creation
Definition at line 172 of file rtde_writer.cpp.
bool urcl::rtde_interface::RTDEWriter::sendStandardDigitalOutput |
( |
uint8_t |
output_pin, |
|
|
bool |
value |
|
) |
| |
Creates a package to request setting a new value for one of the standard digital output pins.
- Parameters
-
output_pin | The pin to change |
value | The new value |
- Returns
- Success of the package creation
Definition at line 85 of file rtde_writer.cpp.
bool urcl::rtde_interface::RTDEWriter::sendToolDigitalOutput |
( |
uint8_t |
output_pin, |
|
|
bool |
value |
|
) |
| |
Creates a package to request setting a new value for one of the tool output pins.
- Parameters
-
output_pin | The pin to change |
value | The new value |
- Returns
- Success of the package creation
Definition at line 143 of file rtde_writer.cpp.
std::mutex urcl::rtde_interface::RTDEWriter::package_mutex_ |
|
private |
std::vector<std::string> urcl::rtde_interface::RTDEWriter::recipe_ |
|
private |
uint8_t urcl::rtde_interface::RTDEWriter::recipe_id_ |
|
private |
bool urcl::rtde_interface::RTDEWriter::running_ |
|
private |
std::thread urcl::rtde_interface::RTDEWriter::writer_thread_ |
|
private |
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 Sun May 9 2021 02:16:26