GCC Code Coverage Report


Directory: ./
File: include/package_template/gains_configuration.hpp
Date: 2023-02-07 15:30:53
Exec Total Coverage
Lines: 1 1 100.0%
Functions: 1 1 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 /**
2 * @file gains_configuration.hpp
3 * @author Vincent Berenz
4 * @copyright Copyright (c) 2019, New York University and Max Planck
5 * Gesellschaft, License BSD-3-Clause
6 * @date 2019-12-09
7 */
8
9 #pragma once
10
11 #include <iostream>
12 #include <string>
13
14 namespace package_template
15 {
16 /** @brief Abstract class defining for the PID configuration.
17 *
18 * This virtual object describes the configuration a PID objects is waiting
19 * for. Daughter class will for example be initialize through files, ROS
20 * params, etc.
21 */
22 class Gains_configuration
23 {
24 public:
25 /**
26 * @brief The default destructor do nothing.
27 */
28 12 virtual ~Gains_configuration()
29 {
30 }
31
32 /** @brief Get the proportional gain.
33 * @return double
34 */
35 virtual double get_kp() const = 0;
36
37 /** @brief Get the derivative gain.
38 * @return double
39 */
40 virtual double get_kd() const = 0;
41
42 /** @brief Get the integral gain.
43 * @return double
44 */
45 virtual double get_ki() const = 0;
46
47 /** @brief Enquire if an error was encountered while reading the
48 * configuration.
49 * @see get_error()
50 * @return true if an error has been encountered
51 * @return false otherwise
52 */
53 virtual bool has_error() const = 0;
54
55 /**
56 * returns error encountered when reading configuration
57 * @see has_error()
58 */
59 virtual std::string get_error() const = 0;
60 };
61
62 /*! print values encapsulated by the provided configuration console on the
63 * standard output */
64 void print_configuration(const Gains_configuration& configuration);
65
66 } // namespace package_template
67