diff --git a/include/iri_base_algorithm/iri_base_algorithm.h b/include/iri_base_algorithm/iri_base_algorithm.h index c1ac22ab8c3963a31a22a7769ba5f9630b45d40d..dcbfbefae2c00682490e909a81584ddc8016c791 100644 --- a/include/iri_base_algorithm/iri_base_algorithm.h +++ b/include/iri_base_algorithm/iri_base_algorithm.h @@ -1,3 +1,21 @@ +// Copyright (C) 2010-2011 Institut de Robotica i Informatica Industrial, CSIC-UPC. +// Author Sergi Hernandez & Joan Perez +// All rights reserved. +// +// This file is part of iri-ros-pkg +// iri-ros-pkg is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. + #ifndef _IRI_BASE_ALGORITHM_H #define _IRI_BASE_ALGORITHM_H @@ -206,7 +224,7 @@ class IriBaseAlgorithm : public AbstractAlgorithmNode * \param level integer referring the level in which the configuration * has been changed. */ - virtual void reconfigureCallback(Config &config, uint32_t level) = 0; + void reconfigureCallback(Config &config, uint32_t level); /** * \brief add diagnostics @@ -285,11 +303,12 @@ IriBaseAlgorithm<Algorithm>::~IriBaseAlgorithm() this->thread_server_->kill_thread(this->main_thread_id_); } -// template <class Algorithm> -// void IriBaseAlgorithm<Algorithm>::reconfigureCallback(Config &config, uint32_t level) -// { +template <class Algorithm> +void IriBaseAlgorithm<Algorithm>::reconfigureCallback(Config &config, uint32_t level) +{ // this->alg_.config_ = config; -// } + this->alg_.config_update(config, level); +} template <class Algorithm> void IriBaseAlgorithm<Algorithm>::addDiagnostics(void)