abstract_primary_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 2020 FZI Forschungszentrum Informatik
5 //
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at
9 //
10 // http://www.apache.org/licenses/LICENSE-2.0
11 //
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 // See the License for the specific language governing permissions and
16 // limitations under the License.
17 // -- END LICENSE BLOCK ------------------------------------------------
18 
19 //----------------------------------------------------------------------
26 //----------------------------------------------------------------------
27 
28 #ifndef UR_ROBOT_DRIVER_ABSTRACT_PRIMARY_CONSUMER_H_INCLUDED
29 #define UR_ROBOT_DRIVER_ABSTRACT_PRIMARY_CONSUMER_H_INCLUDED
30 
31 #include "ur_client_library/log.h"
35 
36 namespace urcl
37 {
38 namespace primary_interface
39 {
46 class AbstractPrimaryConsumer : public comm::IConsumer<PrimaryPackage>
47 {
48 public:
49  AbstractPrimaryConsumer() = default;
50  virtual ~AbstractPrimaryConsumer() = default;
51 
61  virtual bool consume(std::shared_ptr<PrimaryPackage> product) final
62  {
63  if (product != nullptr)
64  {
65  return product->consumeWith(*this);
66  }
67  return false;
68  }
69 
70  // To be implemented in specific consumers
71  virtual bool consume(RobotMessage& pkg) = 0;
72  virtual bool consume(RobotState& pkg) = 0;
73  virtual bool consume(VersionMessage& pkg) = 0;
74  virtual bool consume(KinematicsInfo& pkg) = 0;
75 
76 private:
77  /* data */
78 };
79 } // namespace primary_interface
80 } // namespace urcl
81 
82 #endif // ifndef UR_ROBOT_DRIVER_ABSTRACT_PRIMARY_CONSUMER_H_INCLUDED
virtual bool consume(std::shared_ptr< PrimaryPackage > product) final
This consume method is usally being called by the Pipeline structure. We don&#39;t necessarily need to kn...
Base class for a RobotState data packages will be used directly.
Definition: robot_state.h:58
Parent class for for arbitrary consumers.
Definition: pipeline.h:42
The VersionMessage class handles the version messages sent via the primary UR interface.
This messages contains information about the robot&#39;s calibration. The DH parameters are a combination...
The RobotMessage class is a parent class for the different received robot messages.
Definition: robot_message.h:56


ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Sun May 9 2021 02:16:26