Skip to content

Commit d74bfc0

Browse files
committed
Revert "Add macro with also enable argument"
1 parent e1750c9 commit d74bfc0

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

doc/introspection.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ How to register a variable for introspection
4646
// The variable is introspected only when the controller is active and
4747
// then deactivated when the controller is deactivated.
4848
REGISTER_ROS2_CONTROL_INTROSPECTION("my_variable_name", &my_variable_);
49-
// Register the variable for introspection that starts with the introspection enabled
50-
// So, that the variable starts to be introspected, when the controller is in configured state.
51-
// However, once the controller is activated and deactivated, the introspection is disabled.
52-
REGISTER_ROS2_CONTROL_INTROSPECTION("my_active_variable", &my_active_variable_, true);
5349
...
5450
}
5551

hardware_interface/include/hardware_interface/introspection.hpp

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,10 @@ namespace hardware_interface
2424
constexpr char DEFAULT_REGISTRY_KEY[] = "ros2_control";
2525
constexpr char DEFAULT_INTROSPECTION_TOPIC[] = "~/introspection_data";
2626

27-
#define REGISTER_ROS2_CONTROL_INTROSPECTION_2_ARGS(ID, ENTITY) \
27+
#define REGISTER_ROS2_CONTROL_INTROSPECTION(ID, ENTITY) \
2828
REGISTER_ENTITY( \
2929
hardware_interface::DEFAULT_REGISTRY_KEY, get_name() + "." + ID, ENTITY, \
3030
&stats_registrations_, false)
31-
32-
#define REGISTER_ROS2_CONTROL_INTROSPECTION_3_ARGS(ID, ENTITY, ENABLE) \
33-
REGISTER_ENTITY( \
34-
hardware_interface::DEFAULT_REGISTRY_KEY, get_name() + "." + ID, ENTITY, \
35-
&stats_registrations_, ENABLE)
36-
37-
#ifndef GET_4TH_ARG
38-
#define GET_4TH_ARG(arg1, arg2, arg3, arg4, ...) arg4
39-
#endif
40-
41-
#define REGISTER_ROS2_CONTROL_INTROSPECTION_MACRO_CHOOSER(...) \
42-
GET_4TH_ARG( \
43-
__VA_ARGS__, REGISTER_ROS2_CONTROL_INTROSPECTION_3_ARGS, \
44-
REGISTER_ROS2_CONTROL_INTROSPECTION_2_ARGS)
45-
46-
#define REGISTER_ROS2_CONTROL_INTROSPECTION(...) \
47-
REGISTER_ROS2_CONTROL_INTROSPECTION_MACRO_CHOOSER(__VA_ARGS__)(__VA_ARGS__)
48-
4931
} // namespace hardware_interface
5032

5133
#endif // HARDWARE_INTERFACE__INTROSPECTION_HPP_

0 commit comments

Comments
 (0)