Skip to content

Commit 0e028a9

Browse files
rtt_rosparam: ammend PR comments clean includes
1 parent 11957ea commit 0e028a9

File tree

2 files changed

+23
-30
lines changed

2 files changed

+23
-30
lines changed

rtt_rosparam/include/rtt_rosparam/ros_param_data_source.hpp

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
/***************************************************************************
2-
* This file is part of the OROCOS toolchain ROS project
3-
*
4-
* (C) 2020, Intermodalics BVBA
1+
/*
2+
* (C) 2020, Intermodalics BVBA
53
*
64
* Redistribution and use in source and binary forms, with or without
75
* modification, are permitted provided that the following conditions
@@ -11,37 +9,31 @@
119
* 2. Redistributions in binary form must reproduce the above copyright
1210
* notice, this list of conditions and the following disclaimer in the
1311
* documentation and/or other materials provided with the distribution.
14-
* 3. Neither the name of the author nor the names of its contributors may
15-
* be used to endorse or promote products derived from this software
12+
* 3. Neither the name of the copyright holder nor the names of its contributors
13+
* may be used to endorse or promote products derived from this software
1614
* without specific prior written permission.
1715
*
18-
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21-
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24-
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25-
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26-
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27-
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28-
* SUCH DAMAGE.
16+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
19+
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
20+
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
21+
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22+
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
26+
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27+
* POSSIBILITY OF SUCH DAMAGE.
2928
*/
3029

3130
#ifndef __RTT_ROSPARAM__ROS_PARAM_DATA_SOURCE_HPP
3231
#define __RTT_ROSPARAM__ROS_PARAM_DATA_SOURCE_HPP
3332

3433
#include "rtt/internal/DataSource.hpp"
35-
#include "rtt/internal/DataSourceTypeInfo.hpp"
36-
#include "rtt/internal/Reference.hpp"
3734
#include "rtt/Logger.hpp"
3835

39-
#include "ros/ros.h"
4036
#include "ros/param.h"
41-
#include "ros/names.h"
42-
43-
#include <boost/function.hpp>
44-
#include <exception>
4537

4638
using namespace RTT;
4739

@@ -82,7 +74,8 @@ class RosParamDataSource
8274
{
8375
}
8476

85-
typename internal::DataSource<T>::result_t get() const {
77+
typename internal::DataSource<T>::result_t get() const
78+
{
8679
(void) evaluate();
8780
return value();
8881
}
@@ -115,16 +108,16 @@ class RosParamDataSource
115108
updated();
116109
}
117110

118-
// There is not referred element, no allocation exists for this data source
119-
// and it is not an alias.
111+
// The referenced element is a cache, since the source of the data is external.
120112
// After working with the reference, if something was assigned, the data
121113
// source may need a call to updated() after set()
122114
typename internal::AssignableDataSource<T>::reference_t set()
123115
{
124116
return mcached_data_;
125117
}
126118

127-
void updated() {
119+
void updated()
120+
{
128121
ros::param::set(mparam_name_, mcached_data_);
129122
}
130123

rtt_rosparam/src/rtt_rosparam_service.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ class ROSParamService: public RTT::Service
251251
/**
252252
* Adds a ROS parameter of supported types by ROS param as a property to this
253253
* bag.
254-
* The new property mirror the value of the respective ROS parameter of the
255-
* name.
254+
* The new property mirrors the value of the respective ROS parameter of the
255+
* same name.
256256
* Setting the value of the property sets the ROS parameter, and evaluating it
257257
* loads the current value from the ROS parameter server.
258258
* @param name The name of the ROS parameter and the property to be added.

0 commit comments

Comments
 (0)