Skip to content

Commit

Permalink
cleanup, added test cases for descriptors, fixed namespaced descriptors
Browse files Browse the repository at this point in the history
remove MAX_STRING_SIZE comparisons for rebase

add new lines

Signed-off-by: bpwilcox <[email protected]>
  • Loading branch information
bpwilcox committed Oct 28, 2019
1 parent fd939c4 commit feb60ac
Show file tree
Hide file tree
Showing 14 changed files with 424 additions and 172 deletions.
9 changes: 0 additions & 9 deletions rcl_yaml_param_parser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,6 @@ if(BUILD_TESTING)
PRIVATE ${osrf_testing_tools_cpp_INCLUDE_DIRS})
endif()

ament_add_gtest(test_parse_yaml_descriptors
test/test_parse_yaml_descriptors.cpp
)
if(TARGET test_parse_yaml_descriptors)
target_link_libraries(test_parse_yaml_descriptors ${PROJECT_NAME})
target_include_directories(test_parse_yaml_descriptors
PRIVATE ${osrf_testing_tools_cpp_INCLUDE_DIRS})
endif()

endif()

ament_export_dependencies(ament_cmake)
Expand Down
11 changes: 11 additions & 0 deletions rcl_yaml_param_parser/include/rcl_yaml_param_parser/parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ rcl_variant_t * rcl_yaml_node_struct_get(
const char * param_name,
rcl_params_t * params_st);

/// \brief Get the descriptor struct for a given parameter
/// \param[in] node_name is the name of the node to which the parameter belongs
/// \param[in] param_name is the name of the parameter whose value is to be retrieved
/// \param[inout] params_st points to the populated (or to be populated) parameter struct
/// \return parameter descriptor struct on success and NULL on failure
RCL_YAML_PARAM_PARSER_PUBLIC
rcl_param_descriptor_t * rcl_yaml_node_struct_get_descriptor(
const char * node_name,
const char * param_name,
rcl_params_t * params_st);

/// \brief Print the parameter structure to stdout
/// \param[in] params_st points to the populated parameter struct
RCL_YAML_PARAM_PARSER_PUBLIC
Expand Down
6 changes: 3 additions & 3 deletions rcl_yaml_param_parser/include/rcl_yaml_param_parser/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ typedef struct rcl_param_descriptor_s
uint8_t * type;
char * description;
char * additional_constraints;
double * from_value_float;
double * to_value_float;
double * step_float;
double * min_value_double;
double * max_value_double;
double * step_double;
int64_t * from_value_int;
int64_t * to_value_int;
int64_t * step_int;
Expand Down
Loading

0 comments on commit feb60ac

Please sign in to comment.