calibration_checker.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 //
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 #ifndef UR_CLIENT_LIBRARY_UR_CALIBRATION_CHECKER_H_INCLUDED
28 #define UR_CLIENT_LIBRARY_UR_CALIBRATION_CHECKER_H_INCLUDED
29 
31 
33 
34 namespace urcl
35 {
41 class CalibrationChecker : public comm::IConsumer<primary_interface::PrimaryPackage>
42 {
43 public:
50  CalibrationChecker(const std::string& expected_hash);
51  virtual ~CalibrationChecker() = default;
52 
56  virtual void setupConsumer()
57  {
58  }
62  virtual void teardownConsumer()
63  {
64  }
68  virtual void stopConsumer()
69  {
70  }
74  virtual void onTimeout()
75  {
76  }
77 
86  virtual bool consume(std::shared_ptr<primary_interface::PrimaryPackage> product);
87 
93  bool isChecked()
94  {
95  return checked_;
96  }
97 
98 private:
99  std::string expected_hash_;
100  bool checked_;
101 };
102 } // namespace urcl
103 
104 #endif // ifndef UR_CLIENT_LIBRARY_UR_CALIBRATION_CHECKER_H_INCLUDED
virtual bool consume(std::shared_ptr< primary_interface::PrimaryPackage > product)
Consumes a package, checking its hash if it is a KinematicsInfo package. If the hash does not match t...
virtual void stopConsumer()
Stops the consumer.
virtual void setupConsumer()
Empty setup function, as no setup is needed.
Parent class for for arbitrary consumers.
Definition: pipeline.h:42
virtual void teardownConsumer()
Tears down the consumer.
virtual ~CalibrationChecker()=default
CalibrationChecker(const std::string &expected_hash)
Creates a new CalibrationChecker object with an expected hash calculated from the used kinematics...
virtual void onTimeout()
Handles timeouts.
bool isChecked()
Used to make sure the calibration check is not performed several times.
The CalibrationChecker class consumes primary packages ignoring all but KinematicsInfo packages...


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