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 49 of file rtde_writer.h.
◆ RTDEWriter() [1/2]
urcl::rtde_interface::RTDEWriter::RTDEWriter |
( |
| ) |
|
|
delete |
◆ RTDEWriter() [2/2]
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 35 of file rtde_writer.cpp.
◆ ~RTDEWriter()
urcl::rtde_interface::RTDEWriter::~RTDEWriter |
( |
| ) |
|
|
inline |
◆ init()
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 40 of file rtde_writer.cpp.
◆ pinToMask()
uint8_t urcl::rtde_interface::RTDEWriter::pinToMask |
( |
uint8_t |
pin | ) |
|
|
private |
◆ run()
void urcl::rtde_interface::RTDEWriter::run |
( |
| ) |
|
The writer thread loop, continually serializing and sending packages to the robot.
Definition at line 48 of file rtde_writer.cpp.
◆ sendConfigurableDigitalOutput()
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 132 of file rtde_writer.cpp.
◆ sendInputBitRegister()
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 256 of file rtde_writer.cpp.
◆ sendInputDoubleRegister()
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 308 of file rtde_writer.cpp.
◆ sendInputIntRegister()
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 282 of file rtde_writer.cpp.
◆ sendSpeedSlider()
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 66 of file rtde_writer.cpp.
◆ sendStandardAnalogOutput()
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, it should be between 0 and 1, where 0 is 4mA and 1 is 20mA. |
- Returns
- Success of the package creation
Definition at line 207 of file rtde_writer.cpp.
◆ sendStandardDigitalOutput()
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 95 of file rtde_writer.cpp.
◆ sendToolDigitalOutput()
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 170 of file rtde_writer.cpp.
◆ package_
◆ package_mutex_
std::mutex urcl::rtde_interface::RTDEWriter::package_mutex_ |
|
private |
◆ queue_
◆ recipe_
std::vector<std::string> urcl::rtde_interface::RTDEWriter::recipe_ |
|
private |
◆ recipe_id_
uint8_t urcl::rtde_interface::RTDEWriter::recipe_id_ |
|
private |
◆ running_
bool urcl::rtde_interface::RTDEWriter::running_ |
|
private |
◆ stream_
◆ writer_thread_
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 Tue Jul 4 2023 02:09:47