17 #include <type_traits>
19 #include "rclcpp/future_return_code.hpp"
27 return os <<
to_string(future_return_code);
33 using enum_type = std::underlying_type<FutureReturnCode>::type;
34 std::string prefix =
"Unknown enum value (";
35 std::string ret_as_string = std::to_string(
static_cast<enum_type
>(future_return_code));
36 switch (future_return_code) {
37 case FutureReturnCode::SUCCESS:
40 case FutureReturnCode::INTERRUPTED:
41 prefix =
"INTERRUPTED (";
43 case FutureReturnCode::TIMEOUT:
47 return prefix + ret_as_string +
")";
Versions of rosidl_typesupport_cpp::get_message_type_support_handle that handle adapted types.
RCLCPP_PUBLIC std::string to_string(const FutureReturnCode &future_return_code)
String conversion function for FutureReturnCode.
RCLCPP_PUBLIC std::ostream & operator<<(std::ostream &os, const FutureReturnCode &future_return_code)
Stream operator for FutureReturnCode.
FutureReturnCode
Return codes to be used with spin_until_future_complete.