Class RTDEParser
Defined in File rtde_parser.h
Inheritance Relationships
Base Type
public urcl::comm::Parser< RTDEPackage >(Template Class Parser)
Class Documentation
-
class RTDEParser : public urcl::comm::Parser<RTDEPackage>
The RTDE specific parser. Interprets a given byte stream as serialized RTDE packages and parses it accordingly.
Public Functions
-
RTDEParser() = delete
-
inline RTDEParser(const std::vector<std::string> &recipe)
Creates a new RTDEParser object, registering the used recipe.
- Parameters:
recipe – The recipe used in RTDE data communication
-
virtual ~RTDEParser() = default
-
bool parse(comm::BinParser &bp, std::unique_ptr<RTDEPackage> &result) override
Uses the given BinParser to fill single package object from the contained serialization.
- Parameters:
bp – A BinParser holding a serialized RTDE package
result – A pointer to the created RTDE package object. Ideally, the passed
resultis a pre-allocated package of the type expected to be read. For example, when RTDE communication has been setup it enters the data communication phase, where the expected package is a DataPackage. If the package content inside thebpobject being doesn’t match the result package’s type or if theresultis a nullptr, a new package will be allocated.
- Returns:
True, if the byte stream could successfully be parsed as an RTDE package, false otherwise
-
bool parse(comm::BinParser &bp, std::vector<std::unique_ptr<RTDEPackage>> &results) override
Uses the given BinParser to create package objects from the contained serialization.
- Parameters:
bp – A BinParser holding one or more serialized RTDE packages
results – A vector of pointers to created RTDE package objects
- Returns:
True, if the byte stream could successfully be parsed as RTDE packages, false otherwise
-
inline void setProtocolVersion(uint16_t protocol_version)
-
inline uint16_t getProtocolVersion() const
-
RTDEParser() = delete