39 namespace rtde_interface
76 if (!bp.
checkSize(size -
sizeof(size) -
sizeof(type)))
88 if (!package->parseWith(bp))
90 URCL_LOG_ERROR(
"Package parsing of type %d failed!", static_cast<int>(type));
93 results.push_back(std::move(package));
99 if (!package->parseWith(bp))
101 URCL_LOG_ERROR(
"Package parsing of type %d failed!", static_cast<int>(type));
105 results.push_back(std::move(package));
111 URCL_LOG_ERROR(
"Package of type %d was not parsed completely!", static_cast<int>(type));
void setProtocolVersion(uint16_t protocol_version)
void debug()
Logs debugging information about the BinParser object.
#define URCL_LOG_ERROR(...)
void parse(T &val)
Parses the next bytes as given type.
This class handles the robot's response to a requested start in RTDE data package communication...
bool empty()
Checks if no unparsed bytes remain in the buffer.
The BinParser class handles a byte buffer and functionality to iteratively parse the content...
std::vector< std::string > recipe_
This class handles RTDE text messages sent by the robot.
The parser is a general paser. The namsepace rtde_interface and primary_interface both iclude classes...
PackageType
Possible package types.
virtual ~RTDEParser()=default
uint16_t protocol_version_
This class handles the package detailing the UR control version sent by the robot.
bool checkSize(size_t bytes)
Checks if at least a given number of bytes is still remaining unparsed in the buffer.
bool parse(comm::BinParser &bp, std::vector< std::unique_ptr< RTDEPackage >> &results)
Uses the given BinParser to create package objects from the contained serialization.
The RTDE specific parser. Interprets a given byte stream as serialized RTDE packages and parses it ac...
This class handles the robot's response to a requested stop in RTDE data package communication.
This class handles the robot's response to a requested output recipe setup.
This class handles the robot's response after trying to set the used RTDE protocol version...
RTDEParser(const std::vector< std::string > &recipe)
Creates a new RTDEParser object, registering the used recipe.
RTDEPackage * packageFromType(PackageType type)
The DataPackage class handles communication in the form of RTDE data packages both to and from the ro...