Go to the documentation of this file.00001
00002
00003 <% ros_pkg_name = typekit.plugin('ros').ros_package_name_for_typekit(typekit) %>
00004
00005 #ifndef __OROGEN_GENERATED_<%= ros_pkg_name.upcase %>_ROS_CONVERTIONS_HPP
00006 #define __OROGEN_GENERATED_<%= ros_pkg_name.upcase %>_ROS_CONVERTIONS_HPP
00007
00008 #include <<%= typekit.name %>/typekit/Types.hpp>
00009
00010 <% if !user_converted_types.empty? %>
00011 #include <<%= typekit.name %>/transports/ros/ROSConvertions.hpp>
00012 <% end %>
00013 <% convert_boxed_types.each do |type, ros_type| %>
00014 #include <<%= ros_message_name(ros_type, true) %>.h>
00015 <% end %>
00016 <% all_messages.each do |msg_name| %>
00017 #include <<%= ros_pkg_name %>/<%= msg_name %>.h>
00018 <% end %>
00019 <% convert_types.
00020 find_all { |_, t| t.respond_to?(:deference) && (t.deference <= Typelib::CompoundType || t.deference <= Typelib::OpaqueType) }.
00021 each do |_, ros_type| %>
00022 #include <<%= ros_message_name(ros_type.deference, true) %>.h>
00023 <% end %>
00024 <% convert_array_types.each do |_, ros_type|
00025 if ros_type <= Typelib::CompoundType || ros_type <= Typelib::OpaqueType %>
00026 #include <<%= ros_message_name(ros_type, true) %>.h>
00027 <% end %>
00028 <% end %>
00029
00030 namespace ros_convertions {
00032 <% convert_types.each do |type, ros_type| %>
00033 void toROS( <%= ros_ref_type(ros_type) %> ros, <%= type.arg_type %> value );
00034 void fromROS( <%= type.ref_type %> value, <%= ros_arg_type(ros_type) %> ros );
00035 <% end %>
00037 <% convert_array_types.each do |type, ros_type| %>
00038 <% next if type <= Typelib::NumericType %>
00039 void toROS( std::vector< <%= ros_cxx_type(ros_type) %> >& ros, <%= type.cxx_name%> const* value, int length );
00040 void fromROS( <%= type.cxx_name %>* value, std::vector< <%= ros_cxx_type(ros_type) %> > const& ros, int length );
00041 <% end %>
00042
00043 <% convert_boxed_types.each do |type, ros_type| %>
00044 void toROS( <%= ros_ref_type(ros_type, false) %> ros, <%= type.arg_type %> value );
00045 void fromROS( <%= type.ref_type %> value, <%= ros_arg_type(ros_type, false) %> ros );
00046 <% end %>
00047 }
00048
00049 #endif
00050
00051