Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read only parameters #495

Merged
merged 48 commits into from
Apr 23, 2019
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
73553ec
in progress broken test_time_source
sloretz Jun 8, 2018
88a74ff
style
sloretz Jun 8, 2018
bc8457d
test undeclared params
sloretz Jun 8, 2018
a6fc8de
Only get parameter if it is set
sloretz Jun 8, 2018
7e19756
doc fixup
wjwwood Oct 18, 2018
2597f46
use override rather than virtual in places
wjwwood Oct 18, 2018
347449d
rename ParameterInfo_t to ParameterInfo and just use struct, no typedef
wjwwood Oct 18, 2018
304ba62
add method to access ParameterValue within a Parameter
wjwwood Oct 18, 2018
6e5aae9
enable get<Parameter> and get<ParameterValue> on Parameter class
wjwwood Oct 18, 2018
38c7670
avoid const pass by value
wjwwood Oct 18, 2018
c11654e
match type of enum in C++ to type used in message definition
wjwwood Oct 18, 2018
b3325aa
fixup after rebase
wjwwood Jan 30, 2019
189c02e
more fixup after rebase
wjwwood Jan 30, 2019
85b0377
replace create_parameter with declare_parameter
wjwwood Feb 1, 2019
598325d
provide implementation for templated declare_parameter method
wjwwood Feb 1, 2019
6b14049
style
wjwwood Feb 4, 2019
46c207f
do not use const reference when it's a primitive (like bool)
wjwwood Feb 22, 2019
8e28200
typo
wjwwood Feb 22, 2019
5273ad9
follow to bool change that wasn't staged
wjwwood Feb 23, 2019
06ddfc4
fixup tests
wjwwood Feb 23, 2019
04f812c
added lots of docs, alternative API signatures, and some of the tests
wjwwood Apr 10, 2019
206ffe3
more tests and associated fixes
wjwwood Apr 11, 2019
89018de
address documentation feedback
wjwwood Apr 12, 2019
9e03b08
fixup previously added tests
wjwwood Apr 15, 2019
ac1b6a6
add tests and fixes for describe_parameter(s) and get_parameter_types
wjwwood Apr 15, 2019
73b4c28
remove old parameter tests
wjwwood Apr 16, 2019
78a94d9
use const reference where possible
wjwwood Apr 16, 2019
bf1d149
address comments
wjwwood Apr 16, 2019
00da0a6
fix tests for deprecated methods
wjwwood Apr 16, 2019
570c7c2
address feedback
wjwwood Apr 17, 2019
3ef385d
significantly improve the reliability of the time_source tests
wjwwood Apr 18, 2019
01362ff
uncrustify, cpplint, and cppcheck fixes
wjwwood Apr 18, 2019
c48db2d
Revert "significantly improve the reliability of the time_source tests"
wjwwood Apr 18, 2019
4673ce9
Merge remote-tracking branch 'origin/master' into read_only_parameters
wjwwood Apr 18, 2019
ce9af32
only declare use_sim_time parameter if not already declared
wjwwood Apr 18, 2019
fb78acd
fixup rclcpp_lifecycle
wjwwood Apr 19, 2019
b7e4c0d
fixup tests
wjwwood Apr 19, 2019
efb3f85
add missing namespace scope which fails on Windows
wjwwood Apr 19, 2019
4ba4eeb
extend deprecation warning suppression to support Windows too
wjwwood Apr 19, 2019
cb72e58
fix compiler warnings and missing visibility macro
wjwwood Apr 19, 2019
7e79bba
remove commented left over tests
wjwwood Apr 19, 2019
933ac09
fix compiler warning on Windows
wjwwood Apr 19, 2019
444de25
suppress deprecation warning on include of file in Windows
wjwwood Apr 19, 2019
df7b036
avoid potential loss of data warning converting int64_t to int
wjwwood Apr 19, 2019
ea3285f
trying to fix more loss of data warnings
wjwwood Apr 20, 2019
68a4afe
fix test_node
wjwwood Apr 22, 2019
d9ad096
add option to automatically declare parameters from initial parameter…
wjwwood Apr 23, 2019
e29cdf1
remove redundant conditional
wjwwood Apr 23, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions rclcpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,6 @@ if(BUILD_TESTING)
)
target_link_libraries(test_node_global_args ${PROJECT_NAME})
endif()
ament_add_gtest(test_node_initial_parameters test/test_node_initial_parameters.cpp)
if(TARGET test_node_initial_parameters)
target_link_libraries(test_node_initial_parameters ${PROJECT_NAME})
endif()
ament_add_gtest(test_parameter_events_filter test/test_parameter_events_filter.cpp)
if(TARGET test_parameter_events_filter)
ament_target_dependencies(test_parameter_events_filter
Expand Down
27 changes: 24 additions & 3 deletions rclcpp/include/rclcpp/exceptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,35 @@ class EventNotRegisteredError : public std::runtime_error
class InvalidParametersException : public std::runtime_error
{
public:
// Inherit constructors from runtime_error;
// Inherit constructors from runtime_error.
using std::runtime_error::runtime_error;
};

/// Throwing if passed parameter value is invalid.
/// Thrown if passed parameter value is invalid.
class InvalidParameterValueException : public std::runtime_error
{
// Inherit constructors from runtime_error;
// Inherit constructors from runtime_error.
using std::runtime_error::runtime_error;
};

/// Thrown if parameter is already declared.
class ParameterAlreadyDeclaredException : public std::runtime_error
{
// Inherit constructors from runtime_error.
using std::runtime_error::runtime_error;
};

/// Thrown if parameter is not declared, e.g. either set or get was called without first declaring.
class ParameterNotDeclaredException : public std::runtime_error
{
// Inherit constructors from runtime_error.
using std::runtime_error::runtime_error;
};

/// Thrown if parameter is immutable and therefore cannot be undeclared.
class ParameterImmutableException : public std::runtime_error
{
// Inherit constructors from runtime_error.
using std::runtime_error::runtime_error;
};

Expand Down
Loading