rcl_yaml_param_parser  master
Parse a YAML parameter file and populate the C data structure.
All Classes Namespaces Files Functions Variables
parser.h
1 // Copyright 2018 Apex.AI, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
27 #ifndef RCL_YAML_PARAM_PARSER__PARSER_H_
28 #define RCL_YAML_PARAM_PARSER__PARSER_H_
29 
30 #include <stdlib.h>
31 
32 #include "rcl_yaml_param_parser/types.h"
33 #include "rcl_yaml_param_parser/visibility_control.h"
34 
35 #ifdef __cplusplus
36 extern "C"
37 {
38 #endif
39 
43 RCL_YAML_PARAM_PARSER_PUBLIC
44 rcl_params_t * rcl_yaml_node_struct_init(
45  const rcutils_allocator_t allocator);
46 
50 RCL_YAML_PARAM_PARSER_PUBLIC
51 rcl_params_t * rcl_yaml_node_struct_copy(
52  const rcl_params_t * params_st);
53 
56 RCL_YAML_PARAM_PARSER_PUBLIC
57 void rcl_yaml_node_struct_fini(
58  rcl_params_t * params_st);
59 
66 RCL_YAML_PARAM_PARSER_PUBLIC
67 bool rcl_parse_yaml_file(
68  const char * file_path,
69  rcl_params_t * params_st);
70 
77 RCL_YAML_PARAM_PARSER_PUBLIC
78 bool rcl_parse_yaml_value(
79  const char * node_name,
80  const char * param_name,
81  const char * yaml_value,
82  rcl_params_t * params_st);
83 
90 RCL_YAML_PARAM_PARSER_PUBLIC
91 rcl_variant_t * rcl_yaml_node_struct_get(
92  const char * node_name,
93  const char * param_name,
94  rcl_params_t * params_st);
95 
98 RCL_YAML_PARAM_PARSER_PUBLIC
99 void rcl_yaml_node_struct_print(
100  const rcl_params_t * const params_st);
101 
102 #ifdef __cplusplus
103 }
104 #endif
105 
106 #endif // RCL_YAML_PARAM_PARSER__PARSER_H_
rcl_params_s
stores all the parameters of all nodes of a process
Definition: types.h:103
rcl_variant_s
variant_t stores the value of a parameter
Definition: types.h:75
rcutils_allocator_t