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

Added clang formatting

This commit is contained in:
Simon Rasmussen
2017-02-16 02:03:40 +01:00
parent e00cfac0ee
commit a78d3eadf3
46 changed files with 4476 additions and 4212 deletions

View File

@@ -1,11 +1,11 @@
#pragma once
#include <string>
#include <atomic>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <string>
#include <sys/socket.h>
#include <sys/types.h>
/// Encapsulates a TCP socket
/// Encapsulates a TCP socket
class URStream {
private:
int _socket_fd = -1;
@@ -16,19 +16,22 @@ private:
std::atomic<bool> _stopping;
public:
URStream(std::string &host, int port)
: _host(host),
_port(port),
_initialized(false),
_stopping(false) {}
~URStream() {
URStream(std::string& host, int port)
: _host(host)
, _port(port)
, _initialized(false)
, _stopping(false)
{
}
~URStream()
{
disconnect();
}
bool connect();
void disconnect();
ssize_t send(uint8_t *buf, size_t buf_len);
ssize_t receive(uint8_t *buf, size_t buf_len);
ssize_t send(uint8_t* buf, size_t buf_len);
ssize_t receive(uint8_t* buf, size_t buf_len);
};