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

Added parse and toString functions for higher-level primary functions

This commit is contained in:
Felix Mauch
2019-04-09 11:51:07 +02:00
parent 4bf5793d79
commit 6699c1facb
10 changed files with 125 additions and 22 deletions

View File

@@ -43,6 +43,9 @@ public:
virtual ~PackageHeader() = default;
using _package_size_type = uint16_t;
PackageHeader(PackageType& type) : package_type_(type){};
PackageHeader(_package_size_type& size, PackageType& type) : package_size_(size), package_type_(type){};
static size_t getPackageLength(uint8_t* buf)
{
return be16toh(*(reinterpret_cast<_package_size_type*>(buf)));