// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em
// with input from virtual_robot_prococol:msg/RobotStatus.idl
// generated code does not contain a copyright notice

#ifndef VIRTUAL_ROBOT_PROCOCOL__MSG__DETAIL__ROBOT_STATUS__TRAITS_HPP_
#define VIRTUAL_ROBOT_PROCOCOL__MSG__DETAIL__ROBOT_STATUS__TRAITS_HPP_

#include <stdint.h>

#include <sstream>
#include <string>
#include <type_traits>

#include "virtual_robot_prococol/msg/detail/robot_status__struct.hpp"
#include "rosidl_runtime_cpp/traits.hpp"

namespace virtual_robot_prococol
{

namespace msg
{

inline void to_flow_style_yaml(
  const RobotStatus & msg,
  std::ostream & out)
{
  out << "{";
  // member: pos_x
  {
    out << "pos_x: ";
    rosidl_generator_traits::value_to_yaml(msg.pos_x, out);
    out << ", ";
  }

  // member: pos_y
  {
    out << "pos_y: ";
    rosidl_generator_traits::value_to_yaml(msg.pos_y, out);
    out << ", ";
  }

  // member: speed_x
  {
    out << "speed_x: ";
    rosidl_generator_traits::value_to_yaml(msg.speed_x, out);
    out << ", ";
  }

  // member: speed_y
  {
    out << "speed_y: ";
    rosidl_generator_traits::value_to_yaml(msg.speed_y, out);
  }
  out << "}";
}  // NOLINT(readability/fn_size)

inline void to_block_style_yaml(
  const RobotStatus & msg,
  std::ostream & out, size_t indentation = 0)
{
  // member: pos_x
  {
    if (indentation > 0) {
      out << std::string(indentation, ' ');
    }
    out << "pos_x: ";
    rosidl_generator_traits::value_to_yaml(msg.pos_x, out);
    out << "\n";
  }

  // member: pos_y
  {
    if (indentation > 0) {
      out << std::string(indentation, ' ');
    }
    out << "pos_y: ";
    rosidl_generator_traits::value_to_yaml(msg.pos_y, out);
    out << "\n";
  }

  // member: speed_x
  {
    if (indentation > 0) {
      out << std::string(indentation, ' ');
    }
    out << "speed_x: ";
    rosidl_generator_traits::value_to_yaml(msg.speed_x, out);
    out << "\n";
  }

  // member: speed_y
  {
    if (indentation > 0) {
      out << std::string(indentation, ' ');
    }
    out << "speed_y: ";
    rosidl_generator_traits::value_to_yaml(msg.speed_y, out);
    out << "\n";
  }
}  // NOLINT(readability/fn_size)

inline std::string to_yaml(const RobotStatus & msg, bool use_flow_style = false)
{
  std::ostringstream out;
  if (use_flow_style) {
    to_flow_style_yaml(msg, out);
  } else {
    to_block_style_yaml(msg, out);
  }
  return out.str();
}

}  // namespace msg

}  // namespace virtual_robot_prococol

namespace rosidl_generator_traits
{

[[deprecated("use virtual_robot_prococol::msg::to_block_style_yaml() instead")]]
inline void to_yaml(
  const virtual_robot_prococol::msg::RobotStatus & msg,
  std::ostream & out, size_t indentation = 0)
{
  virtual_robot_prococol::msg::to_block_style_yaml(msg, out, indentation);
}

[[deprecated("use virtual_robot_prococol::msg::to_yaml() instead")]]
inline std::string to_yaml(const virtual_robot_prococol::msg::RobotStatus & msg)
{
  return virtual_robot_prococol::msg::to_yaml(msg);
}

template<>
inline const char * data_type<virtual_robot_prococol::msg::RobotStatus>()
{
  return "virtual_robot_prococol::msg::RobotStatus";
}

template<>
inline const char * name<virtual_robot_prococol::msg::RobotStatus>()
{
  return "virtual_robot_prococol/msg/RobotStatus";
}

template<>
struct has_fixed_size<virtual_robot_prococol::msg::RobotStatus>
  : std::integral_constant<bool, true> {};

template<>
struct has_bounded_size<virtual_robot_prococol::msg::RobotStatus>
  : std::integral_constant<bool, true> {};

template<>
struct is_message<virtual_robot_prococol::msg::RobotStatus>
  : std::true_type {};

}  // namespace rosidl_generator_traits

#endif  // VIRTUAL_ROBOT_PROCOCOL__MSG__DETAIL__ROBOT_STATUS__TRAITS_HPP_
