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

Clang-format run

This commit is contained in:
Simon Rasmussen
2017-07-09 02:54:49 +02:00
parent 577fcdbf98
commit 3a5fa23f6b
31 changed files with 343 additions and 343 deletions

View File

@@ -1,9 +1,9 @@
#pragma once
#pragma once
#include <netdb.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <mutex>
#include <atomic>
#include <mutex>
#include <string>
enum class SocketState
@@ -26,23 +26,28 @@ protected:
return false;
}
virtual void setOptions(int socket_fd);
bool setup(std::string &host, int port);
public:
TCPSocket();
virtual ~TCPSocket();
SocketState getState() { return state_; }
int getSocketFD() { return socket_fd_; }
SocketState getState()
{
return state_;
}
int getSocketFD()
{
return socket_fd_;
}
bool setSocketFD(int socket_fd);
std::string getIP();
bool read(uint8_t* buf, size_t buf_len, size_t &read);
bool write(const uint8_t* buf, size_t buf_len, size_t &written);
bool read(uint8_t *buf, size_t buf_len, size_t &read);
bool write(const uint8_t *buf, size_t buf_len, size_t &written);
void close();
void close();
};