Namespace expansion (#132)
* update to use new rmw function name * add rcl_validate_topic_name() * add rcl_expand_topic_name() * gcc couldn't handle the init lists with tuples * uncrustify and cpplint * fix signed compare warnings * address comments * organize the substitution string constants together at the top of the file * comment
This commit is contained in:
parent
fc75c58962
commit
cbfe6b90f9
11 changed files with 1140 additions and 4 deletions
|
@ -30,7 +30,7 @@ extern "C"
|
|||
|
||||
#include "rcl_lifecycle/data_types.h"
|
||||
|
||||
#include "rmw/validate_topic_name.h"
|
||||
#include "rmw/validate_full_topic_name.h"
|
||||
|
||||
#include "rosidl_generator_c/message_type_support_struct.h"
|
||||
#include "rosidl_generator_c/string_functions.h"
|
||||
|
@ -48,7 +48,7 @@ rcl_lifecycle_validate_topic_name(const char * topic_name)
|
|||
static rmw_ret_t ret = RMW_RET_ERROR;
|
||||
static int validation_result = RMW_TOPIC_INVALID_IS_EMPTY_STRING;
|
||||
|
||||
ret = rmw_validate_topic_name(topic_name, &validation_result, NULL);
|
||||
ret = rmw_validate_full_topic_name(topic_name, &validation_result, NULL);
|
||||
if (ret != RMW_RET_OK) {
|
||||
RCL_SET_ERROR_MSG("unable to validate topic name", rcl_get_default_allocator());
|
||||
return RMW_RET_ERROR;
|
||||
|
@ -56,7 +56,7 @@ rcl_lifecycle_validate_topic_name(const char * topic_name)
|
|||
// TODO(karsten1987): Handle absolute case
|
||||
if (validation_result != RMW_TOPIC_VALID && validation_result != RMW_TOPIC_INVALID_NOT_ABSOLUTE) {
|
||||
RCL_SET_ERROR_MSG(
|
||||
rmw_topic_validation_result_string(validation_result), rcl_get_default_allocator());
|
||||
rmw_full_topic_name_validation_result_string(validation_result), rcl_get_default_allocator())
|
||||
return RMW_RET_ERROR;
|
||||
}
|
||||
return RMW_RET_OK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue