The DataPackage class handles communication in the form of RTDE data packages both to and from the robot. It contains functionality to parse and serialize packages for arbitrary recipes.
More...
#include <data_package.h>
|
using | _rtde_type_variant = boost::variant< bool, uint8_t, uint32_t, uint64_t, int32_t, double, vector3d_t, vector6d_t, vector6int32_t, vector6uint32_t, std::string > |
|
using | HeaderType = PackageHeader |
|
The DataPackage class handles communication in the form of RTDE data packages both to and from the robot. It contains functionality to parse and serialize packages for arbitrary recipes.
Definition at line 59 of file data_package.h.
using urcl::rtde_interface::DataPackage::_rtde_type_variant = boost::variant<bool, uint8_t, uint32_t, uint64_t, int32_t, double, vector3d_t, vector6d_t, vector6int32_t, vector6uint32_t, std::string> |
urcl::rtde_interface::DataPackage::DataPackage |
( |
| ) |
|
|
delete |
urcl::rtde_interface::DataPackage::DataPackage |
( |
const DataPackage & |
other | ) |
|
|
inline |
urcl::rtde_interface::DataPackage::DataPackage |
( |
const std::vector< std::string > & |
recipe | ) |
|
|
inline |
virtual urcl::rtde_interface::DataPackage::~DataPackage |
( |
| ) |
|
|
virtualdefault |
template<typename T >
bool urcl::rtde_interface::DataPackage::getData |
( |
const std::string & |
name, |
|
|
T & |
val |
|
) |
| |
|
inline |
Get a data field from the DataPackage.
The data package contains a lot of different data fields, depending on the recipe.
- Parameters
-
name | The string identifier for the data field as used in the documentation. |
val | Target variable. Make sure, it's the correct type. |
- Exceptions
-
boost::bad_get | if the type under given name does not match the template type T. |
- Returns
- True on success, false if the field cannot be found inside the package.
Definition at line 124 of file data_package.h.
template<typename T , size_t N>
bool urcl::rtde_interface::DataPackage::getData |
( |
const std::string & |
name, |
|
|
std::bitset< N > & |
val |
|
) |
| |
|
inline |
Get a data field from the DataPackage as bitset.
The data package contains a lot of different data fields, depending on the recipe.
- Parameters
-
name | The string identifier for the data field as used in the documentation. |
val | Target variable. Make sure, it's the correct type. |
- Exceptions
-
boost::bad_get | if the type under given name does not match the template type T. |
- Returns
- True on success, false if the field cannot be found inside the package.
Definition at line 149 of file data_package.h.
void urcl::rtde_interface::DataPackage::initEmpty |
( |
| ) |
|
Initializes to contained list with empty values based on the recipe.
Definition at line 557 of file data_package.cpp.
Sets the attributes of the package by parsing a serialized representation of the package.
- Parameters
-
bp | A parser containing a serialized version of the package |
- Returns
- True, if the package was parsed successfully, false otherwise
Reimplemented from urcl::rtde_interface::RTDEPackage.
Definition at line 569 of file data_package.cpp.
size_t urcl::rtde_interface::DataPackage::serializePackage |
( |
uint8_t * |
buffer | ) |
|
Serializes the package.
- Parameters
-
buffer | Buffer to fill with the serialization |
- Returns
- The total size of the serialized package
Definition at line 600 of file data_package.cpp.
template<typename T >
bool urcl::rtde_interface::DataPackage::setData |
( |
const std::string & |
name, |
|
|
T & |
val |
|
) |
| |
|
inline |
Set a data field in the DataPackage.
The data package contains a lot of different data fields, depending on the recipe.
- Parameters
-
name | The string identifier for the data field as used in the documentation. |
val | Value to set. Make sure, it's the correct type. |
- Returns
- True on success, false if the field cannot be found inside the package.
Definition at line 175 of file data_package.h.
void urcl::rtde_interface::DataPackage::setRecipeID |
( |
const uint8_t & |
recipe_id | ) |
|
|
inline |
Setter of the recipe id value used to identify the used recipe to the robot.
- Parameters
-
Definition at line 193 of file data_package.h.
std::string urcl::rtde_interface::DataPackage::toString |
( |
| ) |
const |
|
virtual |
std::unordered_map<std::string, _rtde_type_variant> urcl::rtde_interface::DataPackage::data_ |
|
private |
std::vector<std::string> urcl::rtde_interface::DataPackage::recipe_ |
|
private |
uint8_t urcl::rtde_interface::DataPackage::recipe_id_ |
|
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