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

Big code dump

This commit is contained in:
Simon Rasmussen
2017-04-17 13:03:54 +02:00
parent b4bb424058
commit 46f4e493cf
24 changed files with 989 additions and 257 deletions

View File

@@ -19,15 +19,38 @@ private:
std::mutex send_mutex_, receive_mutex_;
public:
URStream()
{
}
URStream(std::string& host, int port) : host_(host), port_(port), initialized_(false), stopping_(false)
{
}
URStream(int socket_fd) : socket_fd_(socket_fd), initialized_(true), stopping_(false)
{
}
URStream(URStream&& other) noexcept : socket_fd_(other.socket_fd_), host_(other.host_), initialized_(other.initialized_.load()), stopping_(other.stopping_.load())
{
}
~URStream()
{
disconnect();
}
URStream& operator=(URStream&& other)
{
socket_fd_ = std::move(other.socket_fd_);
host_ = std::move(other.host_);
initialized_ = std::move(other.initialized_.load());
stopping_ = std::move(other.stopping_.load());
return *this;
}
bool connect();
void disconnect();
void reconnect();