Program Listing for File validate_topic_name.h
↰ Return to documentation for file (include/rcl/validate_topic_name.h
)
// Copyright 2017 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef RCL__VALIDATE_TOPIC_NAME_H_
#define RCL__VALIDATE_TOPIC_NAME_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include "rcl/macros.h"
#include "rcl/types.h"
#include "rcl/visibility_control.h"
#define RCL_TOPIC_NAME_VALID 0
#define RCL_TOPIC_NAME_INVALID_IS_EMPTY_STRING 1
#define RCL_TOPIC_NAME_INVALID_ENDS_WITH_FORWARD_SLASH 2
#define RCL_TOPIC_NAME_INVALID_CONTAINS_UNALLOWED_CHARACTERS 3
#define RCL_TOPIC_NAME_INVALID_NAME_TOKEN_STARTS_WITH_NUMBER 4
#define RCL_TOPIC_NAME_INVALID_UNMATCHED_CURLY_BRACE 5
#define RCL_TOPIC_NAME_INVALID_MISPLACED_TILDE 6
#define RCL_TOPIC_NAME_INVALID_TILDE_NOT_FOLLOWED_BY_FORWARD_SLASH 7
#define RCL_TOPIC_NAME_INVALID_SUBSTITUTION_CONTAINS_UNALLOWED_CHARACTERS 8
#define RCL_TOPIC_NAME_INVALID_SUBSTITUTION_STARTS_WITH_NUMBER 9
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_validate_topic_name(
const char * topic_name,
int * validation_result,
size_t * invalid_index);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_validate_topic_name_with_size(
const char * topic_name,
size_t topic_name_length,
int * validation_result,
size_t * invalid_index);
RCL_PUBLIC
RCL_WARN_UNUSED
const char *
rcl_topic_name_validation_result_string(int validation_result);
#ifdef __cplusplus
}
#endif
#endif // RCL__VALIDATE_TOPIC_NAME_H_