Skip to content

Commit

Permalink
rename byte_values to byte_array_values
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelarguedas committed Jan 11, 2018
1 parent ed4094a commit 2f903e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions rclcpp/include/rclcpp/parameter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class ParameterVariant
RCLCPP_PUBLIC
explicit ParameterVariant(const std::string & name, const char * string_value);
RCLCPP_PUBLIC
explicit ParameterVariant(const std::string & name, const std::vector<uint8_t> & byte_values);
explicit ParameterVariant(const std::string & name, const std::vector<uint8_t> & byte_array_value);

RCLCPP_PUBLIC
ParameterType
Expand Down Expand Up @@ -135,7 +135,7 @@ class ParameterVariant
// TODO(wjwwood): use custom exception
throw std::runtime_error("Invalid type");
}
return value_.byte_values;
return value_.byte_array_value;
}

// The following get_value() variants allow the use of primitive types
Expand Down
6 changes: 3 additions & 3 deletions rclcpp/src/rclcpp/parameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ ParameterVariant::ParameterVariant(const std::string & name, const char * string
{}

ParameterVariant::ParameterVariant(
const std::string & name, const std::vector<uint8_t> & byte_values)
const std::string & name, const std::vector<uint8_t> & byte_array_value)
: name_(name)
{
value_.byte_values = byte_values;
value_.byte_array_value = byte_array_value;
value_.type = rcl_interfaces::msg::ParameterType::PARAMETER_BYTE_ARRAY;
}

Expand Down Expand Up @@ -168,7 +168,7 @@ ParameterVariant::from_parameter(const rcl_interfaces::msg::Parameter & paramete
case PARAMETER_STRING:
return ParameterVariant(parameter.name, parameter.value.string_value);
case PARAMETER_BYTE_ARRAY:
return ParameterVariant(parameter.name, parameter.value.byte_values);
return ParameterVariant(parameter.name, parameter.value.byte_array_value);
case PARAMETER_NOT_SET:
throw std::runtime_error("Type from ParameterValue is not set");
default:
Expand Down

0 comments on commit 2f903e4

Please sign in to comment.