1
0
mirror of https://gitlab.com/obbart/universal_robots_ros_driver.git synced 2026-04-12 19:10:47 +02:00

implemented serializing of the output setup and control start packages

This commit is contained in:
Tristan Schnell
2019-04-11 13:57:36 +02:00
parent b604af749f
commit 8975957b5f
5 changed files with 50 additions and 0 deletions

View File

@@ -47,6 +47,17 @@ public:
return size;
}
static size_t serialize(uint8_t* buffer, std::string val)
{
const uint8_t* c_val = reinterpret_cast<const uint8_t*>(val.c_str());
for (size_t i = 0; i < val.size(); i++)
{
buffer[i] = c_val[i];
}
return val.size();
}
private:
template <typename T>
static T encode(T val)