15 #ifndef RCLCPP__DETAIL__RESOLVE_ENABLE_TOPIC_STATISTICS_HPP_
16 #define RCLCPP__DETAIL__RESOLVE_ENABLE_TOPIC_STATISTICS_HPP_
20 #include "rclcpp/topic_statistics_state.hpp"
28 template<
typename OptionsT,
typename NodeBaseT>
30 resolve_enable_topic_statistics(
const OptionsT & options,
const NodeBaseT & node_base)
32 bool topic_stats_enabled;
33 switch (options.topic_stats_options.state) {
35 topic_stats_enabled =
true;
38 topic_stats_enabled =
false;
41 topic_stats_enabled = node_base.get_enable_topic_statistics_default();
44 throw std::runtime_error(
"Unrecognized EnableTopicStatistics value");
47 return topic_stats_enabled;
Versions of rosidl_typesupport_cpp::get_message_type_support_handle that handle adapted types.
@ Enable
Explicitly enable topic statistics at subscription level.
@ NodeDefault
Take topic statistics state from the node.
@ Disable
Explicitly disable topic statistics at subscription level.