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

Improved logging and formatting

This commit is contained in:
Simon Rasmussen
2017-02-16 22:51:44 +01:00
parent 68e72e393d
commit 70cfe6cad3

View File

@@ -16,18 +16,9 @@ public:
{ {
} }
void setup_producer() void setup_producer() { _stream.connect(); }
{ void teardown_producer() { _stream.disconnect(); }
_stream.connect(); void stop_producer() { _stream.disconnect(); }
}
void teardown_producer()
{
_stream.disconnect();
}
void stop_producer()
{
_stream.disconnect();
}
bool try_get(std::vector<unique_ptr<T> >& products) bool try_get(std::vector<unique_ptr<T> >& products)
{ {
@@ -39,9 +30,12 @@ public:
//LOG_DEBUG("Read %d bytes from stream", len); //LOG_DEBUG("Read %d bytes from stream", len);
if (len < 1) { if (len == 0) {
LOG_WARN("Read nothing from stream"); LOG_WARN("Read nothing from stream");
return false; return false;
} else if (len < 0) {
LOG_WARN("Stream closed");
return false;
} }
BinParser bp(buf, static_cast<size_t>(len)); BinParser bp(buf, static_cast<size_t>(len));