diff --git a/include/ur_rtde_driver/ur/producer.h b/include/ur_rtde_driver/comm/producer.h similarity index 79% rename from include/ur_rtde_driver/ur/producer.h rename to include/ur_rtde_driver/comm/producer.h index 186e8f9..3d49650 100644 --- a/include/ur_rtde_driver/ur/producer.h +++ b/include/ur_rtde_driver/comm/producer.h @@ -1,4 +1,6 @@ /* + * Copyright 2019, FZI Forschungszentrum Informatik (templating) + * * Copyright 2017, 2018 Simon Rasmussen (refactor) * * Copyright 2015, 2016 Thomas Timm Andersen (original version) @@ -21,19 +23,22 @@ #include "ur_rtde_driver/comm/pipeline.h" #include "ur_rtde_driver/comm/parser.h" #include "ur_rtde_driver/comm/stream.h" +#include "ur_rtde_driver/comm/package.h" namespace ur_driver { -template -class URProducer : public comm::IProducer +namespace comm +{ +template +class URProducer : public IProducer { private: - comm::URStream& stream_; - comm::URParser& parser_; + URStream& stream_; + URParser& parser_; std::chrono::seconds timeout_; public: - URProducer(comm::URStream& stream, comm::URParser& parser) : stream_(stream), parser_(parser), timeout_(1) + URProducer(URStream& stream, URParser& parser) : stream_(stream), parser_(parser), timeout_(1) { } @@ -50,7 +55,7 @@ public: stream_.disconnect(); } - bool tryGet(std::vector>& products) + bool tryGet(std::vector>>& products) { // 4KB should be enough to hold any packet received from UR uint8_t buf[4096]; @@ -83,4 +88,5 @@ public: return parser_.parse(bp, products); } }; +} // namespace comm } // namespace ur_driver