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

implemented serialization of general rtde headers and the request

protocol version package
This commit is contained in:
Tristan Schnell
2019-04-10 19:26:39 +02:00
parent 742bc11c8f
commit b604af749f
4 changed files with 114 additions and 1 deletions

View File

@@ -39,7 +39,19 @@ bool RequestProtocolVersion::parseWith(comm::BinParser& bp)
}
std::string RequestProtocolVersion::toString() const
{
return "accepted: " + accepted_;
std::stringstream ss;
ss << "accepted: " << static_cast<int>(accepted_);
return ss.str();
}
size_t RequestProtocolVersionRequest::generateSerializedRequest(uint8_t* buffer, uint16_t version)
{
size_t size = 0;
size += PackageHeader::serializeHeader(buffer, PACKAGE_TYPE, PAYLOAD_SIZE);
size += comm::PackageSerializer::serialize(buffer + size, version);
return size;
}
} // namespace rtde_interface
} // namespace ur_driver