We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b7bccd commit 1bcac0eCopy full SHA for 1bcac0e
ur_robot_driver/include/ur_robot_driver/rtde/data_package.h
@@ -102,6 +102,19 @@ class DataPackage : public RTDEPackage
102
*/
103
size_t serializePackage(uint8_t* buffer);
104
105
+ /*!
106
+ * \brief Check if a specific data field is of a given type.
107
+ *
108
+ * \param name The string identifier for the data field as used in the documentation.
109
110
+ * \returns True, if the data field is of the given type, false otherwise.
111
+ */
112
+ template <typename T>
113
+ static bool isType(const std::string& name)
114
+ {
115
+ return g_type_list[name].which() == _rtde_type_variant(T()).which();
116
+ }
117
+
118
/*!
119
* \brief Get a data field from the DataPackage.
120
*
0 commit comments