diff --git a/include/iri_base_driver/iri_base_driver.h b/include/iri_base_driver/iri_base_driver.h index 137b8053093ba6b669915dbe5cc96f0ec6f73597..2250327bcd55317257344b77b92eea27a3bd3854 100644 --- a/include/iri_base_driver/iri_base_driver.h +++ b/include/iri_base_driver/iri_base_driver.h @@ -2,11 +2,11 @@ // Author Sergi Hernandez & Joan Perez // All rights reserved. // -// This file is part of iri-ros-pkg +// 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. +// 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 @@ -38,19 +38,19 @@ typedef enum {CLOSED=0,OPENED=1,RUNNING=2} state_t; * framework to integrate functional drivers implemented in C++ with the ROS * driver structure. A shared library is generated together with IriBaseNodeDriver * class to force implementation of virtual methods to final user. Common use - * functions to open, close, start and stop a driver need to be filled up when - * instantiating this class. ROS provides state transition methods to change + * functions to open, close, start and stop a driver need to be filled up when + * instantiating this class. ROS provides state transition methods to change * from one state to another. * * This class is used as an intermediate level between ROS basic classes and the - * user final driver implementation. Methods to manage drivers are implemented + * user final driver implementation. Methods for managing drivers are implemented * to provide common features to all driver-type objects. New methods are * provided to the user for the specific driver needs. * * Instances of both IriBaseDriver and IriBaseNodeDriver can be easly generated - * with the iri_ros_scripts package. Similarly, data can be sent and read + * with the iri_ros_scripts package. Similarly, data can be sent and read * through ROS topics by using those scripts. The scripts can be downloaded - * from the iri_stack SVN. + * from the GitLab repository (See http://wiki.iri.upc.edu). */ class IriBaseDriver { @@ -58,9 +58,9 @@ class IriBaseDriver state_t current_state_; /** - * \brief variable to handle the mutual exclusion mechanism + * \brief Variable to handle the mutual exclusion mechanism * - * this variable is automatically initialized when an object of this class + * This variable is automatically initialized when an object of this class * or any inherited class is created and holds all the necessary information * to handle any shared resource. * diff --git a/include/iri_base_driver/iri_base_driver_node.h b/include/iri_base_driver/iri_base_driver_node.h index 00b21355a9e31577782c3ef6ee29cd9d615df54b..1baef5b345709cbdacc8c95cfa052d2b6c96f8d0 100644 --- a/include/iri_base_driver/iri_base_driver_node.h +++ b/include/iri_base_driver/iri_base_driver_node.h @@ -77,16 +77,15 @@ class AbstractDriverNode * function loops in a defined loop_rate_. In each iteration, the abstract * mainNodeThread() function defined in the inherit node class is called. * - * Similarly, functions such as addDiagnostics() or addRunningTests() are - * prepared for detailing common features for all driver nodes while executing - * specific commands for each specification by calling the respective functions - * addNodeDiagnostics() and addNodeRunningTests() from the inherit node - * implementation. + * Similarly, functions such as addDiagnostics() are prepared for detailing + * common features for all driver nodes while executing specific commands for + * each specification by calling the respective function addNodeDiagnostics() + * from the inherit node implementation. * * Instances of both IriBaseDriver and IriBaseNodeDriver can be easly generated * with the iri_ros_scripts package. Similarly, data can be sent and read - * through ROS topics by using those scripts. The scripts can be downloaded - * from the iri_stack SVN. + * through ROS topics by using those scripts. The scripts can be downloaded + * from the IRI GitLab respository (See http://wiki.iri.upc.edu). */ template <class Driver> class IriBaseNodeDriver : public AbstractDriverNode @@ -124,7 +123,7 @@ class IriBaseNodeDriver : public AbstractDriverNode * \brief main thread loop rate * * This value determines the loop frequency of the node main thread function - * mainThread() in HZ. It is initialized at construction time. This variable + * mainThread() in Hz. It is initialized at construction time. This variable * may be modified in the node implementation constructor if a desired * frequency is required. */ @@ -228,7 +227,7 @@ class IriBaseNodeDriver : public AbstractDriverNode * Abstrac function called by postOpenHook() that adds the specific driver * node parameters to the dynamic reconfigure application. */ - virtual void postNodeOpenHook(void) = 0; + virtual void postNodeOpenHook(void); /** * \brief node implementation pre close hook @@ -382,6 +381,12 @@ void IriBaseNodeDriver<Driver>::postOpenHook(void) this->postNodeOpenHook(); } +template <class Driver> +void IriBaseNodeDriver<Driver>::postNodeOpenHook(void) +{ + +} + template <class Driver> void IriBaseNodeDriver<Driver>::preCloseHook(void) { diff --git a/src/iri_base_driver.cpp b/src/iri_base_driver.cpp index 99ff593e7966e256ecbe5a5c10067c3351a9ea59..54bc667ec3732e8e039033b7820d27f7ec2b48a5 100644 --- a/src/iri_base_driver.cpp +++ b/src/iri_base_driver.cpp @@ -166,7 +166,7 @@ std::string IriBaseDriver::getStateName(void) switch(this->current_state_) { case iri_base_driver::CLOSED: return std::string("closed"); - case iri_base_driver::OPENED: return std::string("oepned"); + case iri_base_driver::OPENED: return std::string("opened"); case iri_base_driver::RUNNING: return std::string("running"); } }