module OroGen::TypekitMarshallers::ROS::CompoundTypeExtension

Public Instance Methods

from_ros(typekit, buffer, indent) click to toggle source

Convert a C++ value into the corresponding ROS value The C++ value is called 'value' and is a ref to the C++ type. The ROS value is called 'ros' and is a const-ref.

The method must return the string that will be used for convertion

# File lib/orogen/marshallers/ros.rb, line 634
def from_ros(typekit, buffer, indent)
    each_field do |field_name, field_type|
        buffer << "#{indent}#{field_type.call_from_ros("value.#{field_name}", "ros.#{field_name}")};\n"
    end
end
to_ros(typekit, buffer, indent) click to toggle source

Convert a C++ value into the corresponding ROS value The C++ value is called 'value' and is a const-ref to the C++ type. The ROS value is called 'ros' and is a ref.

The method must return the string that will be used for convertion

# File lib/orogen/marshallers/ros.rb, line 623
def to_ros(typekit, buffer, indent)
    each_field do |field_name, field_type|
        buffer << "#{indent}#{field_type.call_to_ros("ros.#{field_name}", "value.#{field_name}")};\n"
    end
end