include
ur_client_library
comm
shell_consumer.h
Go to the documentation of this file.
1
// this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2
3
// -- BEGIN LICENSE BLOCK ----------------------------------------------
4
// Copyright 2019 FZI Forschungszentrum Informatik
5
// Created on behalf of Universal Robots A/S
6
//
7
// Licensed under the Apache License, Version 2.0 (the "License");
8
// you may not use this file except in compliance with the License.
9
// You may obtain a copy of the License at
10
//
11
// http://www.apache.org/licenses/LICENSE-2.0
12
//
13
// Unless required by applicable law or agreed to in writing, software
14
// distributed under the License is distributed on an "AS IS" BASIS,
15
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
// See the License for the specific language governing permissions and
17
// limitations under the License.
18
// -- END LICENSE BLOCK ------------------------------------------------
19
20
//----------------------------------------------------------------------
27
//----------------------------------------------------------------------
28
29
#ifndef UR_CLIENT_LIBRARY_SHELL_CONSUMER_H_INCLUDED
30
#define UR_CLIENT_LIBRARY_SHELL_CONSUMER_H_INCLUDED
31
32
#include "
ur_client_library/log.h
"
33
#include "
ur_client_library/comm/pipeline.h
"
34
#include "
ur_client_library/comm/package.h
"
35
36
namespace
urcl
37
{
38
namespace
comm
39
{
46
template
<
typename
T>
47
class
ShellConsumer
:
public
IConsumer
<T>
48
{
49
public
:
50
ShellConsumer
() =
default
;
51
virtual
~ShellConsumer
() =
default
;
52
60
virtual
bool
consume
(std::shared_ptr<T> product)
61
{
62
URCL_LOG_INFO
(
"%s"
, product->toString().c_str());
63
return
true
;
64
}
65
66
private
:
67
/* data */
68
};
69
}
// namespace comm
70
}
// namespace urcl
71
#endif // ifndef UR_CLIENT_LIBRARY_SHELL_CONSUMER_H_INCLUDED
pipeline.h
urcl::comm::ShellConsumer
The ShellConsumer class is a simple consumer that writes a readable representation to the logging inf...
Definition:
shell_consumer.h:47
urcl
Definition:
bin_parser.h:36
urcl::comm::ShellConsumer::~ShellConsumer
virtual ~ShellConsumer()=default
URCL_LOG_INFO
#define URCL_LOG_INFO(...)
Definition:
log.h:25
log.h
urcl::comm::ShellConsumer::ShellConsumer
ShellConsumer()=default
urcl::comm::ShellConsumer::consume
virtual bool consume(std::shared_ptr< T > product)
Consumes a package, writing a human readable representation to the logging.
Definition:
shell_consumer.h:60
urcl::comm::IConsumer
Parent class for for arbitrary consumers.
Definition:
pipeline.h:45
package.h
ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Mon May 26 2025 02:35:58