diff --git a/rosidl_generator_c/resource/action__type_support.h.em b/rosidl_generator_c/resource/action__type_support.h.em index a7db4c136..efab57097 100644 --- a/rosidl_generator_c/resource/action__type_support.h.em +++ b/rosidl_generator_c/resource/action__type_support.h.em @@ -1,5 +1,5 @@ @# Included from rosidl_generator_c/resource/idl__type_support.h.em -@{header_file = 'rosidl_generator_c/action_type_support_struct.h'}@ +@{header_file = 'rosidl_runtime_c/action_type_support_struct.h'}@ @[if header_file in include_directives]@ // already included above // @ diff --git a/rosidl_generator_c/resource/idl__functions.h.em b/rosidl_generator_c/resource/idl__functions.h.em index 98a8457d3..e819881b3 100644 --- a/rosidl_generator_c/resource/idl__functions.h.em +++ b/rosidl_generator_c/resource/idl__functions.h.em @@ -30,7 +30,7 @@ extern "C" #include #include -#include "rosidl_generator_c/visibility_control.h" +#include "rosidl_runtime_c/visibility_control.h" #include "@(package_name)/msg/rosidl_generator_c__visibility_control.h" #include "@(include_base)__struct.h" diff --git a/rosidl_generator_c/resource/msg__functions.c.em b/rosidl_generator_c/resource/msg__functions.c.em index eb00991a3..60758a69b 100644 --- a/rosidl_generator_c/resource/msg__functions.c.em +++ b/rosidl_generator_c/resource/msg__functions.c.em @@ -29,18 +29,18 @@ includes = OrderedDict() for member in message.structure.members: if isinstance(member.type, AbstractSequence) and isinstance(member.type.value_type, BasicType): member_names = includes.setdefault( - 'rosidl_generator_c/primitives_sequence_functions.h', []) + 'rosidl_runtime_c/primitives_sequence_functions.h', []) member_names.append(member.name) continue type_ = member.type if isinstance(type_, AbstractNestedType): type_ = type_.value_type if isinstance(type_, AbstractString): - member_names = includes.setdefault('rosidl_generator_c/string_functions.h', []) + member_names = includes.setdefault('rosidl_runtime_c/string_functions.h', []) member_names.append(member.name) elif isinstance(type_, AbstractWString): member_names = includes.setdefault( - 'rosidl_generator_c/u16string_functions.h', []) + 'rosidl_runtime_c/u16string_functions.h', []) member_names.append(member.name) elif isinstance(type_, NamespacedType): include_prefix = idl_structure_type_to_c_include_prefix(type_) diff --git a/rosidl_generator_c/resource/msg__struct.h.em b/rosidl_generator_c/resource/msg__struct.h.em index 9dbdc9ee5..698e7f13a 100644 --- a/rosidl_generator_c/resource/msg__struct.h.em +++ b/rosidl_generator_c/resource/msg__struct.h.em @@ -29,18 +29,18 @@ includes = OrderedDict() for member in message.structure.members: if isinstance(member.type, AbstractSequence) and isinstance(member.type.value_type, BasicType): member_names = includes.setdefault( - 'rosidl_generator_c/primitives_sequence.h', []) + 'rosidl_runtime_c/primitives_sequence.h', []) member_names.append(member.name) continue type_ = member.type if isinstance(type_, AbstractNestedType): type_ = type_.value_type if isinstance(type_, AbstractString): - member_names = includes.setdefault('rosidl_generator_c/string.h', []) + member_names = includes.setdefault('rosidl_runtime_c/string.h', []) member_names.append(member.name) elif isinstance(type_, AbstractWString): member_names = includes.setdefault( - 'rosidl_generator_c/u16string.h', []) + 'rosidl_runtime_c/u16string.h', []) member_names.append(member.name) elif isinstance(type_, NamespacedType): include_prefix = idl_structure_type_to_c_include_prefix(type_) diff --git a/rosidl_generator_c/resource/msg__type_support.h.em b/rosidl_generator_c/resource/msg__type_support.h.em index 5756ef17c..9c0065cc8 100644 --- a/rosidl_generator_c/resource/msg__type_support.h.em +++ b/rosidl_generator_c/resource/msg__type_support.h.em @@ -1,5 +1,5 @@ @# Included from rosidl_generator_c/resource/idl__type_support.h.em -@{header_file = 'rosidl_generator_c/message_type_support_struct.h'}@ +@{header_file = 'rosidl_runtime_c/message_type_support_struct.h'}@ @[if header_file in include_directives]@ // already included above // @ diff --git a/rosidl_generator_c/resource/srv__type_support.h.em b/rosidl_generator_c/resource/srv__type_support.h.em index e5d88408c..c6108cb5b 100644 --- a/rosidl_generator_c/resource/srv__type_support.h.em +++ b/rosidl_generator_c/resource/srv__type_support.h.em @@ -13,7 +13,7 @@ TEMPLATE( include_directives=include_directives) }@ -@{header_file = 'rosidl_generator_c/service_type_support_struct.h'}@ +@{header_file = 'rosidl_runtime_c/service_type_support_struct.h'}@ @[if header_file in include_directives]@ // already included above // @ diff --git a/rosidl_generator_c/rosidl_generator_c/__init__.py b/rosidl_generator_c/rosidl_generator_c/__init__.py index dc7bb638c..b90c71944 100644 --- a/rosidl_generator_c/rosidl_generator_c/__init__.py +++ b/rosidl_generator_c/rosidl_generator_c/__init__.py @@ -124,7 +124,7 @@ def idl_type_to_c(type_): assert False, 'The array size is part of the variable' if isinstance(type_, AbstractSequence): if isinstance(type_.value_type, BasicType): - c_type = 'rosidl_generator_c__' + type_.value_type.typename.replace(' ', '_') + c_type = 'rosidl_runtime_c__' + type_.value_type.typename.replace(' ', '_') else: c_type = basetype_to_c(type_.value_type) c_type += '__Sequence' @@ -136,9 +136,9 @@ def basetype_to_c(basetype): if isinstance(basetype, BasicType): return BASIC_IDL_TYPES_TO_C[basetype.typename] if isinstance(basetype, AbstractString): - return 'rosidl_generator_c__String' + return 'rosidl_runtime_c__String' if isinstance(basetype, AbstractWString): - return 'rosidl_generator_c__U16String' + return 'rosidl_runtime_c__U16String' if isinstance(basetype, NamespacedType): return idl_structure_type_to_c_typename(basetype) assert False, str(basetype) diff --git a/rosidl_generator_c/test/test_interfaces.c b/rosidl_generator_c/test/test_interfaces.c index 164fc8a0e..c02c9a952 100644 --- a/rosidl_generator_c/test/test_interfaces.c +++ b/rosidl_generator_c/test/test_interfaces.c @@ -21,9 +21,9 @@ #include #include -#include "rosidl_generator_c/primitives_sequence_functions.h" -#include "rosidl_generator_c/string_functions.h" -#include "rosidl_generator_c/u16string_functions.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" +#include "rosidl_runtime_c/string_functions.h" +#include "rosidl_runtime_c/u16string_functions.h" #include "rosidl_generator_c/msg/arrays.h" #include "rosidl_generator_c/msg/defaults.h" @@ -242,7 +242,7 @@ int test_bounded_sequences() seq = rosidl_generator_c__msg__BoundedSequences__create(); EXPECT_NE(seq, NULL); bool res = false; - res = rosidl_generator_c__boolean__Sequence__init(&seq->bool_values, ARR_SIZE); + res = rosidl_runtime_c__boolean__Sequence__init(&seq->bool_values, ARR_SIZE); EXPECT_EQ(true, res); int i = 0; for (i = 0; i < ARR_SIZE; i++) { @@ -261,7 +261,7 @@ int test_bounded_sequences() } // byte_values - res = rosidl_generator_c__byte__Sequence__init(&seq->byte_values, ARR_SIZE); + res = rosidl_runtime_c__byte__Sequence__init(&seq->byte_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->byte_values.data[i] = test_values_byte[i]; @@ -271,7 +271,7 @@ int test_bounded_sequences() } // char_values - res = rosidl_generator_c__uint8__Sequence__init(&seq->char_values, ARR_SIZE); + res = rosidl_runtime_c__uint8__Sequence__init(&seq->char_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->char_values.data[i] = test_values_char[i]; @@ -281,7 +281,7 @@ int test_bounded_sequences() } // float32_values - res = rosidl_generator_c__float32__Sequence__init(&seq->float32_values, ARR_SIZE); + res = rosidl_runtime_c__float32__Sequence__init(&seq->float32_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->float32_values.data[i] = test_values_float32[i]; @@ -290,7 +290,7 @@ int test_bounded_sequences() EXPECT_EQ(test_values_float32[i], seq->float32_values.data[i]); } // float64_values - res = rosidl_generator_c__float64__Sequence__init(&seq->float64_values, ARR_SIZE); + res = rosidl_runtime_c__float64__Sequence__init(&seq->float64_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->float64_values.data[i] = test_values_float64[i]; @@ -300,7 +300,7 @@ int test_bounded_sequences() } // int8_values - res = rosidl_generator_c__int8__Sequence__init(&seq->int8_values, ARR_SIZE); + res = rosidl_runtime_c__int8__Sequence__init(&seq->int8_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->int8_values.data[i] = test_values_int8[i]; @@ -310,7 +310,7 @@ int test_bounded_sequences() } // uint8_values - res = rosidl_generator_c__uint8__Sequence__init(&seq->uint8_values, ARR_SIZE); + res = rosidl_runtime_c__uint8__Sequence__init(&seq->uint8_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->uint8_values.data[i] = test_values_uint8[i]; @@ -320,7 +320,7 @@ int test_bounded_sequences() } // int16_values - res = rosidl_generator_c__int16__Sequence__init(&seq->int16_values, ARR_SIZE); + res = rosidl_runtime_c__int16__Sequence__init(&seq->int16_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->int16_values.data[i] = test_values_int16[i]; @@ -330,7 +330,7 @@ int test_bounded_sequences() } // uint16_values - res = rosidl_generator_c__uint16__Sequence__init(&seq->uint16_values, ARR_SIZE); + res = rosidl_runtime_c__uint16__Sequence__init(&seq->uint16_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->uint16_values.data[i] = test_values_uint16[i]; @@ -340,7 +340,7 @@ int test_bounded_sequences() } // int32_values - res = rosidl_generator_c__int32__Sequence__init(&seq->int32_values, ARR_SIZE); + res = rosidl_runtime_c__int32__Sequence__init(&seq->int32_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->int32_values.data[i] = test_values_int32[i]; @@ -350,7 +350,7 @@ int test_bounded_sequences() } // uint32_values - res = rosidl_generator_c__uint32__Sequence__init(&seq->uint32_values, ARR_SIZE); + res = rosidl_runtime_c__uint32__Sequence__init(&seq->uint32_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->uint32_values.data[i] = test_values_uint32[i]; @@ -360,7 +360,7 @@ int test_bounded_sequences() } // int64_values - res = rosidl_generator_c__int64__Sequence__init(&seq->int64_values, ARR_SIZE); + res = rosidl_runtime_c__int64__Sequence__init(&seq->int64_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->int64_values.data[i] = test_values_int64[i]; @@ -370,7 +370,7 @@ int test_bounded_sequences() } // uint64_values - res = rosidl_generator_c__uint64__Sequence__init(&seq->uint64_values, ARR_SIZE); + res = rosidl_runtime_c__uint64__Sequence__init(&seq->uint64_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->uint64_values.data[i] = test_values_uint64[i]; @@ -380,10 +380,10 @@ int test_bounded_sequences() } // string_values - res = rosidl_generator_c__String__Sequence__init(&seq->string_values, ARR_SIZE); + res = rosidl_runtime_c__String__Sequence__init(&seq->string_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { - rosidl_generator_c__String__assign(&seq->string_values.data[i], test_values_string[i]); + rosidl_runtime_c__String__assign(&seq->string_values.data[i], test_values_string[i]); } for (i = 0; i < ARR_SIZE; i++) { EXPECT_EQ(0, strcmp(seq->string_values.data[i].data, test_values_string[i])); @@ -459,7 +459,7 @@ int test_unbounded_sequences() bool res = false; // bool_values - res = rosidl_generator_c__boolean__Sequence__init(&seq->bool_values, ARR_SIZE); + res = rosidl_runtime_c__boolean__Sequence__init(&seq->bool_values, ARR_SIZE); EXPECT_EQ(true, res); int i = 0; for (i = 0; i < ARR_SIZE; i++) { @@ -478,7 +478,7 @@ int test_unbounded_sequences() } // byte_values - res = rosidl_generator_c__byte__Sequence__init(&seq->byte_values, ARR_SIZE); + res = rosidl_runtime_c__byte__Sequence__init(&seq->byte_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->byte_values.data[i] = test_values_byte[i]; @@ -488,7 +488,7 @@ int test_unbounded_sequences() } // char_values - res = rosidl_generator_c__uint8__Sequence__init(&seq->char_values, ARR_SIZE); + res = rosidl_runtime_c__uint8__Sequence__init(&seq->char_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->char_values.data[i] = test_values_char[i]; @@ -498,7 +498,7 @@ int test_unbounded_sequences() } // float32_values - res = rosidl_generator_c__float32__Sequence__init(&seq->float32_values, ARR_SIZE); + res = rosidl_runtime_c__float32__Sequence__init(&seq->float32_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->float32_values.data[i] = test_values_float32[i]; @@ -507,7 +507,7 @@ int test_unbounded_sequences() EXPECT_EQ(test_values_float32[i], seq->float32_values.data[i]); } // float64_values - res = rosidl_generator_c__float64__Sequence__init(&seq->float64_values, ARR_SIZE); + res = rosidl_runtime_c__float64__Sequence__init(&seq->float64_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->float64_values.data[i] = test_values_float64[i]; @@ -517,7 +517,7 @@ int test_unbounded_sequences() } // int8_values - res = rosidl_generator_c__int8__Sequence__init(&seq->int8_values, ARR_SIZE); + res = rosidl_runtime_c__int8__Sequence__init(&seq->int8_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->int8_values.data[i] = test_values_int8[i]; @@ -527,7 +527,7 @@ int test_unbounded_sequences() } // uint8_values - res = rosidl_generator_c__uint8__Sequence__init(&seq->uint8_values, ARR_SIZE); + res = rosidl_runtime_c__int8__Sequence__init(&seq->uint8_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->uint8_values.data[i] = test_values_uint8[i]; @@ -537,7 +537,7 @@ int test_unbounded_sequences() } // int16_values - res = rosidl_generator_c__int16__Sequence__init(&seq->int16_values, ARR_SIZE); + res = rosidl_runtime_c__int16__Sequence__init(&seq->int16_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->int16_values.data[i] = test_values_int16[i]; @@ -547,7 +547,7 @@ int test_unbounded_sequences() } // uint16_values - res = rosidl_generator_c__uint16__Sequence__init(&seq->uint16_values, ARR_SIZE); + res = rosidl_runtime_c__uint16__Sequence__init(&seq->uint16_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->uint16_values.data[i] = test_values_uint16[i]; @@ -557,7 +557,7 @@ int test_unbounded_sequences() } // int32_values - res = rosidl_generator_c__int32__Sequence__init(&seq->int32_values, ARR_SIZE); + res = rosidl_runtime_c__int32__Sequence__init(&seq->int32_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->int32_values.data[i] = test_values_int32[i]; @@ -567,7 +567,7 @@ int test_unbounded_sequences() } // uint32_values - res = rosidl_generator_c__uint32__Sequence__init(&seq->uint32_values, ARR_SIZE); + res = rosidl_runtime_c__uint32__Sequence__init(&seq->uint32_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->uint32_values.data[i] = test_values_uint32[i]; @@ -577,7 +577,7 @@ int test_unbounded_sequences() } // int64_values - res = rosidl_generator_c__int64__Sequence__init(&seq->int64_values, ARR_SIZE); + res = rosidl_runtime_c__int64__Sequence__init(&seq->int64_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->int64_values.data[i] = test_values_int64[i]; @@ -587,7 +587,7 @@ int test_unbounded_sequences() } // uint64_values - res = rosidl_generator_c__uint64__Sequence__init(&seq->uint64_values, ARR_SIZE); + res = rosidl_runtime_c__uint64__Sequence__init(&seq->uint64_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { seq->uint64_values.data[i] = test_values_uint64[i]; @@ -597,10 +597,10 @@ int test_unbounded_sequences() } // string_values - res = rosidl_generator_c__String__Sequence__init(&seq->string_values, ARR_SIZE); + res = rosidl_runtime_c__String__Sequence__init(&seq->string_values, ARR_SIZE); EXPECT_EQ(true, res); for (i = 0; i < ARR_SIZE; i++) { - rosidl_generator_c__String__assign(&seq->string_values.data[i], test_values_string[i]); + rosidl_runtime_c__String__assign(&seq->string_values.data[i], test_values_string[i]); } for (i = 0; i < ARR_SIZE; i++) { EXPECT_EQ(0, strcmp(seq->string_values.data[i].data, test_values_string[i])); @@ -679,15 +679,15 @@ int test_strings() EXPECT_EQ(0, strcmp(rosidl_generator_c__msg__Strings__STRING_CONST, "Hello world!")); bool res = false; - res = rosidl_generator_c__String__assign(&str->bounded_string_value, TEST_STRING); + res = rosidl_runtime_c__String__assign(&str->bounded_string_value, TEST_STRING); EXPECT_EQ(true, res); EXPECT_EQ(0, strcmp(str->bounded_string_value.data, TEST_STRING)); - res = rosidl_generator_c__String__assign(&str->bounded_string_value, TEST_STRING2); + res = rosidl_runtime_c__String__assign(&str->bounded_string_value, TEST_STRING2); EXPECT_EQ(true, res); EXPECT_EQ(0, strcmp(str->bounded_string_value.data, TEST_STRING2)); - res = rosidl_generator_c__String__assign(&str->bounded_string_value, TEST_STRING3); + res = rosidl_runtime_c__String__assign(&str->bounded_string_value, TEST_STRING3); EXPECT_EQ(true, res); EXPECT_EQ(0, strcmp(str->bounded_string_value.data, TEST_STRING3)); @@ -982,7 +982,7 @@ int test_wstrings() EXPECT_NE(wstr, NULL); bool res = false; - res = rosidl_generator_c__U16String__assign(&wstr->wstring_value, TEST_WSTRING); + res = rosidl_runtime_c__U16String__assign(&wstr->wstring_value, TEST_WSTRING); EXPECT_EQ(true, res); // EXPECT_EQ(0, strcmp(wstr->wstring_value_default1.data, "Hello world!")); @@ -1120,7 +1120,7 @@ int test_arrays() // string_values for (i = 0; i < ARR_SIZE; i++) { - rosidl_generator_c__String__assign(&arr->string_values[i], test_values_string[i]); + rosidl_runtime_c__String__assign(&arr->string_values[i], test_values_string[i]); } for (i = 0; i < ARR_SIZE; i++) { EXPECT_EQ(0, strcmp(arr->string_values[i].data, test_values_string[i])); diff --git a/rosidl_generator_c/test/test_invalid_initialization.c b/rosidl_generator_c/test/test_invalid_initialization.c index fd26bdb7e..e0bafa749 100644 --- a/rosidl_generator_c/test/test_invalid_initialization.c +++ b/rosidl_generator_c/test/test_invalid_initialization.c @@ -21,7 +21,7 @@ #include #include -#include "rosidl_generator_c/string_functions.h" +#include "rosidl_runtime_c/string_functions.h" #include "rosidl_generator_c/msg/strings.h" #define EXPECT_EQ(arg1, arg2) if ((arg1) != (arg2)) return 1 @@ -68,8 +68,8 @@ int test_partial_fini_cleanup(void) rosidl_generator_c__msg__Strings * msg = rosidl_generator_c__msg__Strings__create(); EXPECT_NE(msg, NULL); /* call fini on a few fields */ - rosidl_generator_c__String__fini(&msg->string_value); - rosidl_generator_c__String__fini(&msg->string_value_default1); + rosidl_runtime_c__String__fini(&msg->string_value); + rosidl_runtime_c__String__fini(&msg->string_value_default1); /* destroy the message */ rosidl_generator_c__msg__Strings__destroy(msg); return 0; diff --git a/rosidl_runtime_c/include/rosidl_generator_c/primitives_sequence.h b/rosidl_runtime_c/include/rosidl_generator_c/primitives_sequence.h deleted file mode 100644 index ac47235a7..000000000 --- a/rosidl_runtime_c/include/rosidl_generator_c/primitives_sequence.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2015 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 ROSIDL_GENERATOR_C__PRIMITIVES_SEQUENCE_H_ -#define ROSIDL_GENERATOR_C__PRIMITIVES_SEQUENCE_H_ - -#include -#include -#include - -#define ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(STRUCT_NAME, TYPE_NAME) \ - typedef struct rosidl_generator_c__ ## STRUCT_NAME ## __Sequence \ - { \ - TYPE_NAME * data; \ - size_t size; /*!< The number of valid items in data */ \ - size_t capacity; /*!< The number of allocated items in data */ \ - } rosidl_generator_c__ ## STRUCT_NAME ## __Sequence; - -// sequence types for all basic types -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(float, float) -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(double, double) -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(long_double, long double) -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(char, signed char) -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(wchar, uint16_t) -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(boolean, bool) -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(octet, uint8_t) -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(uint8, uint8_t) -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(int8, int8_t) -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(uint16, uint16_t) -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(int16, int16_t) -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(uint32, uint32_t) -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(int32, int32_t) -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(uint64, uint64_t) -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(int64, int64_t) - -// emulate legacy API -typedef rosidl_generator_c__boolean__Sequence - rosidl_generator_c__bool__Sequence; -typedef rosidl_generator_c__octet__Sequence - rosidl_generator_c__byte__Sequence; -typedef rosidl_generator_c__float__Sequence - rosidl_generator_c__float32__Sequence; -typedef rosidl_generator_c__double__Sequence - rosidl_generator_c__float64__Sequence; - -#endif // ROSIDL_GENERATOR_C__PRIMITIVES_SEQUENCE_H_ diff --git a/rosidl_runtime_c/include/rosidl_generator_c/primitives_sequence_functions.h b/rosidl_runtime_c/include/rosidl_generator_c/primitives_sequence_functions.h deleted file mode 100644 index f62252038..000000000 --- a/rosidl_runtime_c/include/rosidl_generator_c/primitives_sequence_functions.h +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2015 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 ROSIDL_GENERATOR_C__PRIMITIVES_SEQUENCE_FUNCTIONS_H_ -#define ROSIDL_GENERATOR_C__PRIMITIVES_SEQUENCE_FUNCTIONS_H_ - -#include -#include - -#include "rosidl_generator_c/primitives_sequence.h" -#include "rosidl_generator_c/visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -#define ROSIDL_GENERATOR_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(STRUCT_NAME, TYPE_NAME) \ - ROSIDL_GENERATOR_C_PUBLIC \ - bool rosidl_generator_c__ ## STRUCT_NAME ## __Sequence__init( \ - rosidl_generator_c__ ## STRUCT_NAME ## __Sequence * sequence, size_t size); \ - \ - ROSIDL_GENERATOR_C_PUBLIC \ - void rosidl_generator_c__ ## STRUCT_NAME ## __Sequence__fini( \ - rosidl_generator_c__ ## STRUCT_NAME ## __Sequence * sequence); - -// array functions for all basic types -ROSIDL_GENERATOR_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(float, float) -ROSIDL_GENERATOR_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(double, double) -ROSIDL_GENERATOR_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(long_double, long double) -ROSIDL_GENERATOR_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(char, signed char) -ROSIDL_GENERATOR_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(wchar, uint16_t) -ROSIDL_GENERATOR_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(boolean, bool) -ROSIDL_GENERATOR_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(octet, uint8_t) -ROSIDL_GENERATOR_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(uint8, uint8_t) -ROSIDL_GENERATOR_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(int8, int8_t) -ROSIDL_GENERATOR_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(uint16, uint16_t) -ROSIDL_GENERATOR_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(int16, int16_t) -ROSIDL_GENERATOR_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(uint32, uint32_t) -ROSIDL_GENERATOR_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(int32, int32_t) -ROSIDL_GENERATOR_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(uint64, uint64_t) -ROSIDL_GENERATOR_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(int64, int64_t) - -// emulate legacy API -ROSIDL_GENERATOR_C_PUBLIC -bool rosidl_generator_c__bool__Sequence__init( - rosidl_generator_c__boolean__Sequence * sequence, size_t size); -ROSIDL_GENERATOR_C_PUBLIC -void rosidl_generator_c__bool__Sequence__fini( - rosidl_generator_c__boolean__Sequence * sequence); - -ROSIDL_GENERATOR_C_PUBLIC -bool rosidl_generator_c__byte__Sequence__init( - rosidl_generator_c__octet__Sequence * sequence, size_t size); -ROSIDL_GENERATOR_C_PUBLIC -void rosidl_generator_c__byte__Sequence__fini( - rosidl_generator_c__octet__Sequence * sequence); - -ROSIDL_GENERATOR_C_PUBLIC -bool rosidl_generator_c__float32__Sequence__init( - rosidl_generator_c__float__Sequence * sequence, size_t size); -ROSIDL_GENERATOR_C_PUBLIC -void rosidl_generator_c__float32__Sequence__fini( - rosidl_generator_c__float__Sequence * sequence); - -ROSIDL_GENERATOR_C_PUBLIC -bool rosidl_generator_c__float64__Sequence__init( - rosidl_generator_c__double__Sequence * sequence, size_t size); -ROSIDL_GENERATOR_C_PUBLIC -void rosidl_generator_c__float64__Sequence__fini( - rosidl_generator_c__double__Sequence * sequence); - -#ifdef __cplusplus -} -#endif - -#endif // ROSIDL_GENERATOR_C__PRIMITIVES_SEQUENCE_FUNCTIONS_H_ diff --git a/rosidl_runtime_c/include/rosidl_generator_c/u16string_functions.h b/rosidl_runtime_c/include/rosidl_generator_c/u16string_functions.h deleted file mode 100644 index 94c4958be..000000000 --- a/rosidl_runtime_c/include/rosidl_generator_c/u16string_functions.h +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2015-2018 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 ROSIDL_GENERATOR_C__U16STRING_FUNCTIONS_H_ -#define ROSIDL_GENERATOR_C__U16STRING_FUNCTIONS_H_ - -#include - -#include "rosidl_generator_c/u16string.h" -#include "rosidl_generator_c/visibility_control.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -/// Initialize a rosidl_generator_c__U16String structure. -/* The contents of rosidl_generator_c__U16String are initialized to a single null character. - * The string initially has size 0 and capacity 1. - * Size represents the size of the contents of the string, while capacity represents the overall - * storage of the string (counting the null terminator). - * All strings must be null-terminated. - */ -ROSIDL_GENERATOR_C_PUBLIC -bool -rosidl_generator_c__U16String__init(rosidl_generator_c__U16String * str); - -ROSIDL_GENERATOR_C_PUBLIC -void -rosidl_generator_c__U16String__fini(rosidl_generator_c__U16String * str); - -ROSIDL_GENERATOR_C_PUBLIC -bool -rosidl_generator_c__U16String__assignn( - rosidl_generator_c__U16String * str, const uint16_t * value, size_t n); - -ROSIDL_GENERATOR_C_PUBLIC -bool -rosidl_generator_c__U16String__assignn_from_char( - rosidl_generator_c__U16String * str, const char * value, size_t n); - -ROSIDL_GENERATOR_C_PUBLIC -bool -rosidl_generator_c__U16String__assign( - rosidl_generator_c__U16String * str, const uint16_t * value); - -ROSIDL_GENERATOR_C_PUBLIC -size_t -rosidl_generator_c__U16String__len(const uint16_t * value); - -ROSIDL_GENERATOR_C_PUBLIC -bool -rosidl_generator_c__U16String__resize( - rosidl_generator_c__U16String * str, size_t n); - -ROSIDL_GENERATOR_C_PUBLIC -bool -rosidl_generator_c__U16String__Sequence__init( - rosidl_generator_c__U16String__Sequence * sequence, size_t size); - -ROSIDL_GENERATOR_C_PUBLIC -void -rosidl_generator_c__U16String__Sequence__fini( - rosidl_generator_c__U16String__Sequence * sequence); - -ROSIDL_GENERATOR_C_PUBLIC -rosidl_generator_c__U16String__Sequence * -rosidl_generator_c__U16String__Sequence__create(size_t size); - -ROSIDL_GENERATOR_C_PUBLIC -void -rosidl_generator_c__U16String__Sequence__destroy( - rosidl_generator_c__U16String__Sequence * sequence); - -#ifdef __cplusplus -} -#endif - -#endif // ROSIDL_GENERATOR_C__U16STRING_FUNCTIONS_H_ diff --git a/rosidl_runtime_c/include/rosidl_generator_c/action_type_support_struct.h b/rosidl_runtime_c/include/rosidl_runtime_c/action_type_support_struct.h similarity index 79% rename from rosidl_runtime_c/include/rosidl_generator_c/action_type_support_struct.h rename to rosidl_runtime_c/include/rosidl_runtime_c/action_type_support_struct.h index 6cf72ef2c..5bd1ad393 100644 --- a/rosidl_runtime_c/include/rosidl_generator_c/action_type_support_struct.h +++ b/rosidl_runtime_c/include/rosidl_runtime_c/action_type_support_struct.h @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef ROSIDL_GENERATOR_C__ACTION_TYPE_SUPPORT_STRUCT_H_ -#define ROSIDL_GENERATOR_C__ACTION_TYPE_SUPPORT_STRUCT_H_ +#ifndef ROSIDL_RUNTIME_C__ACTION_TYPE_SUPPORT_STRUCT_H_ +#define ROSIDL_RUNTIME_C__ACTION_TYPE_SUPPORT_STRUCT_H_ -#include "rosidl_generator_c/message_type_support_struct.h" -#include "rosidl_generator_c/service_type_support_struct.h" -#include "rosidl_generator_c/visibility_control.h" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_runtime_c/service_type_support_struct.h" +#include "rosidl_runtime_c/visibility_control.h" #include "rosidl_typesupport_interface/macros.h" #ifdef __cplusplus @@ -44,4 +44,4 @@ struct rosidl_action_type_support_t } #endif -#endif // ROSIDL_GENERATOR_C__ACTION_TYPE_SUPPORT_STRUCT_H_ +#endif // ROSIDL_RUNTIME_C__ACTION_TYPE_SUPPORT_STRUCT_H_ diff --git a/rosidl_runtime_c/include/rosidl_generator_c/message_bounds_struct.h b/rosidl_runtime_c/include/rosidl_runtime_c/message_bounds_struct.h similarity index 88% rename from rosidl_runtime_c/include/rosidl_generator_c/message_bounds_struct.h rename to rosidl_runtime_c/include/rosidl_runtime_c/message_bounds_struct.h index 55d149e1c..731ca7a20 100644 --- a/rosidl_runtime_c/include/rosidl_generator_c/message_bounds_struct.h +++ b/rosidl_runtime_c/include/rosidl_runtime_c/message_bounds_struct.h @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef ROSIDL_GENERATOR_C__MESSAGE_BOUNDS_STRUCT_H_ -#define ROSIDL_GENERATOR_C__MESSAGE_BOUNDS_STRUCT_H_ +#ifndef ROSIDL_RUNTIME_C__MESSAGE_BOUNDS_STRUCT_H_ +#define ROSIDL_RUNTIME_C__MESSAGE_BOUNDS_STRUCT_H_ -#include "rosidl_generator_c/visibility_control.h" +#include "rosidl_runtime_c/visibility_control.h" #include "rosidl_typesupport_interface/macros.h" #ifdef __cplusplus @@ -51,4 +51,4 @@ const rosidl_message_bounds_t * get_message_bounds_handle_function( } #endif -#endif // ROSIDL_GENERATOR_C__MESSAGE_BOUNDS_STRUCT_H_ +#endif // ROSIDL_RUNTIME_C__MESSAGE_BOUNDS_STRUCT_H_ diff --git a/rosidl_runtime_c/include/rosidl_generator_c/message_initialization.h b/rosidl_runtime_c/include/rosidl_runtime_c/message_initialization.h similarity index 89% rename from rosidl_runtime_c/include/rosidl_generator_c/message_initialization.h rename to rosidl_runtime_c/include/rosidl_runtime_c/message_initialization.h index b1c848a64..c8a0f364e 100644 --- a/rosidl_runtime_c/include/rosidl_generator_c/message_initialization.h +++ b/rosidl_runtime_c/include/rosidl_runtime_c/message_initialization.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef ROSIDL_GENERATOR_C__MESSAGE_INITIALIZATION_H_ -#define ROSIDL_GENERATOR_C__MESSAGE_INITIALIZATION_H_ +#ifndef ROSIDL_RUNTIME_C__MESSAGE_INITIALIZATION_H_ +#define ROSIDL_RUNTIME_C__MESSAGE_INITIALIZATION_H_ // TODO(clalancette): this should be moved out into a separate runtime package @@ -34,4 +34,4 @@ enum rosidl_runtime_c_message_initialization ROSIDL_RUNTIME_C_MSG_INIT_DEFAULTS_ONLY, }; -#endif // ROSIDL_GENERATOR_C__MESSAGE_INITIALIZATION_H_ +#endif // ROSIDL_RUNTIME_C__MESSAGE_INITIALIZATION_H_ diff --git a/rosidl_runtime_c/include/rosidl_generator_c/message_type_support_struct.h b/rosidl_runtime_c/include/rosidl_runtime_c/message_type_support_struct.h similarity index 87% rename from rosidl_runtime_c/include/rosidl_generator_c/message_type_support_struct.h rename to rosidl_runtime_c/include/rosidl_runtime_c/message_type_support_struct.h index 93952f8fe..da000672e 100644 --- a/rosidl_runtime_c/include/rosidl_generator_c/message_type_support_struct.h +++ b/rosidl_runtime_c/include/rosidl_runtime_c/message_type_support_struct.h @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef ROSIDL_GENERATOR_C__MESSAGE_TYPE_SUPPORT_STRUCT_H_ -#define ROSIDL_GENERATOR_C__MESSAGE_TYPE_SUPPORT_STRUCT_H_ +#ifndef ROSIDL_RUNTIME_C__MESSAGE_TYPE_SUPPORT_STRUCT_H_ +#define ROSIDL_RUNTIME_C__MESSAGE_TYPE_SUPPORT_STRUCT_H_ -#include "rosidl_generator_c/visibility_control.h" +#include "rosidl_runtime_c/visibility_control.h" #include "rosidl_typesupport_interface/macros.h" #ifdef __cplusplus @@ -51,4 +51,4 @@ const rosidl_message_type_support_t * get_message_typesupport_handle_function( } #endif -#endif // ROSIDL_GENERATOR_C__MESSAGE_TYPE_SUPPORT_STRUCT_H_ +#endif // ROSIDL_RUNTIME_C__MESSAGE_TYPE_SUPPORT_STRUCT_H_ diff --git a/rosidl_runtime_c/include/rosidl_runtime_c/primitives_sequence.h b/rosidl_runtime_c/include/rosidl_runtime_c/primitives_sequence.h new file mode 100644 index 000000000..c95320576 --- /dev/null +++ b/rosidl_runtime_c/include/rosidl_runtime_c/primitives_sequence.h @@ -0,0 +1,57 @@ +// Copyright 2015 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 ROSIDL_RUNTIME_C__PRIMITIVES_SEQUENCE_H_ +#define ROSIDL_RUNTIME_C__PRIMITIVES_SEQUENCE_H_ + +#include +#include +#include + +#define ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(STRUCT_NAME, TYPE_NAME) \ + typedef struct rosidl_runtime_c__ ## STRUCT_NAME ## __Sequence \ + { \ + TYPE_NAME * data; \ + size_t size; /*!< The number of valid items in data */ \ + size_t capacity; /*!< The number of allocated items in data */ \ + } rosidl_runtime_c__ ## STRUCT_NAME ## __Sequence; + +// sequence types for all basic types +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(float, float) +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(double, double) +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(long_double, long double) +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(char, signed char) +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(wchar, uint16_t) +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(boolean, bool) +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(octet, uint8_t) +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(uint8, uint8_t) +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(int8, int8_t) +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(uint16, uint16_t) +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(int16, int16_t) +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(uint32, uint32_t) +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(int32, int32_t) +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(uint64, uint64_t) +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(int64, int64_t) + +// emulate legacy API +typedef rosidl_runtime_c__boolean__Sequence + rosidl_runtime_c__bool__Sequence; +typedef rosidl_runtime_c__octet__Sequence + rosidl_runtime_c__byte__Sequence; +typedef rosidl_runtime_c__float__Sequence + rosidl_runtime_c__float32__Sequence; +typedef rosidl_runtime_c__double__Sequence + rosidl_runtime_c__float64__Sequence; + +#endif // ROSIDL_RUNTIME_C__PRIMITIVES_SEQUENCE_H_ diff --git a/rosidl_runtime_c/include/rosidl_runtime_c/primitives_sequence_functions.h b/rosidl_runtime_c/include/rosidl_runtime_c/primitives_sequence_functions.h new file mode 100644 index 000000000..e6ab252b6 --- /dev/null +++ b/rosidl_runtime_c/include/rosidl_runtime_c/primitives_sequence_functions.h @@ -0,0 +1,88 @@ +// Copyright 2015 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 ROSIDL_RUNTIME_C__PRIMITIVES_SEQUENCE_FUNCTIONS_H_ +#define ROSIDL_RUNTIME_C__PRIMITIVES_SEQUENCE_FUNCTIONS_H_ + +#include +#include + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#define ROSIDL_RUNTIME_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(STRUCT_NAME, TYPE_NAME) \ + ROSIDL_GENERATOR_C_PUBLIC \ + bool rosidl_runtime_c__ ## STRUCT_NAME ## __Sequence__init( \ + rosidl_runtime_c__ ## STRUCT_NAME ## __Sequence * sequence, size_t size); \ + \ + ROSIDL_GENERATOR_C_PUBLIC \ + void rosidl_runtime_c__ ## STRUCT_NAME ## __Sequence__fini( \ + rosidl_runtime_c__ ## STRUCT_NAME ## __Sequence * sequence); + +// array functions for all basic types +ROSIDL_RUNTIME_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(float, float) +ROSIDL_RUNTIME_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(double, double) +ROSIDL_RUNTIME_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(long_double, long double) +ROSIDL_RUNTIME_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(char, signed char) +ROSIDL_RUNTIME_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(wchar, uint16_t) +ROSIDL_RUNTIME_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(boolean, bool) +ROSIDL_RUNTIME_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(octet, uint8_t) +ROSIDL_RUNTIME_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(uint8, uint8_t) +ROSIDL_RUNTIME_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(int8, int8_t) +ROSIDL_RUNTIME_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(uint16, uint16_t) +ROSIDL_RUNTIME_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(int16, int16_t) +ROSIDL_RUNTIME_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(uint32, uint32_t) +ROSIDL_RUNTIME_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(int32, int32_t) +ROSIDL_RUNTIME_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(uint64, uint64_t) +ROSIDL_RUNTIME_C__DECLARE_PRIMITIVE_SEQUENCE_FUNCTIONS(int64, int64_t) + +// emulate legacy API +ROSIDL_GENERATOR_C_PUBLIC +bool rosidl_runtime_c__bool__Sequence__init( + rosidl_runtime_c__boolean__Sequence * sequence, size_t size); +ROSIDL_GENERATOR_C_PUBLIC +void rosidl_runtime_c__bool__Sequence__fini( + rosidl_runtime_c__boolean__Sequence * sequence); + +ROSIDL_GENERATOR_C_PUBLIC +bool rosidl_runtime_c__byte__Sequence__init( + rosidl_runtime_c__octet__Sequence * sequence, size_t size); +ROSIDL_GENERATOR_C_PUBLIC +void rosidl_runtime_c__byte__Sequence__fini( + rosidl_runtime_c__octet__Sequence * sequence); + +ROSIDL_GENERATOR_C_PUBLIC +bool rosidl_runtime_c__float32__Sequence__init( + rosidl_runtime_c__float__Sequence * sequence, size_t size); +ROSIDL_GENERATOR_C_PUBLIC +void rosidl_runtime_c__float32__Sequence__fini( + rosidl_runtime_c__float__Sequence * sequence); + +ROSIDL_GENERATOR_C_PUBLIC +bool rosidl_runtime_c__float64__Sequence__init( + rosidl_runtime_c__double__Sequence * sequence, size_t size); +ROSIDL_GENERATOR_C_PUBLIC +void rosidl_runtime_c__float64__Sequence__fini( + rosidl_runtime_c__double__Sequence * sequence); + +#ifdef __cplusplus +} +#endif + +#endif // ROSIDL_RUNTIME_C__PRIMITIVES_SEQUENCE_FUNCTIONS_H_ diff --git a/rosidl_runtime_c/include/rosidl_generator_c/service_type_support_struct.h b/rosidl_runtime_c/include/rosidl_runtime_c/service_type_support_struct.h similarity index 87% rename from rosidl_runtime_c/include/rosidl_generator_c/service_type_support_struct.h rename to rosidl_runtime_c/include/rosidl_runtime_c/service_type_support_struct.h index 4ecdf4173..d240c3828 100644 --- a/rosidl_runtime_c/include/rosidl_generator_c/service_type_support_struct.h +++ b/rosidl_runtime_c/include/rosidl_runtime_c/service_type_support_struct.h @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef ROSIDL_GENERATOR_C__SERVICE_TYPE_SUPPORT_STRUCT_H_ -#define ROSIDL_GENERATOR_C__SERVICE_TYPE_SUPPORT_STRUCT_H_ +#ifndef ROSIDL_RUNTIME_C__SERVICE_TYPE_SUPPORT_STRUCT_H_ +#define ROSIDL_RUNTIME_C__SERVICE_TYPE_SUPPORT_STRUCT_H_ -#include "rosidl_generator_c/visibility_control.h" +#include "rosidl_runtime_c/visibility_control.h" #include "rosidl_typesupport_interface/macros.h" @@ -52,4 +52,4 @@ const rosidl_service_type_support_t * get_service_typesupport_handle_function( } #endif -#endif // ROSIDL_GENERATOR_C__SERVICE_TYPE_SUPPORT_STRUCT_H_ +#endif // ROSIDL_RUNTIME_C__SERVICE_TYPE_SUPPORT_STRUCT_H_ diff --git a/rosidl_runtime_c/include/rosidl_generator_c/string.h b/rosidl_runtime_c/include/rosidl_runtime_c/string.h similarity index 72% rename from rosidl_runtime_c/include/rosidl_generator_c/string.h rename to rosidl_runtime_c/include/rosidl_runtime_c/string.h index 633a9b0e1..1660b2523 100644 --- a/rosidl_runtime_c/include/rosidl_generator_c/string.h +++ b/rosidl_runtime_c/include/rosidl_runtime_c/string.h @@ -12,23 +12,23 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef ROSIDL_GENERATOR_C__STRING_H_ -#define ROSIDL_GENERATOR_C__STRING_H_ +#ifndef ROSIDL_RUNTIME_C__STRING_H_ +#define ROSIDL_RUNTIME_C__STRING_H_ #include -#include "rosidl_generator_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence.h" /// String struct -typedef struct rosidl_generator_c__String +typedef struct rosidl_runtime_c__String { char * data; /// The length of the string (excluding the null byte). size_t size; /// The capacity represents the number of allocated bytes (including the null byte). size_t capacity; -} rosidl_generator_c__String; +} rosidl_runtime_c__String; -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(String, rosidl_generator_c__String) +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(String, rosidl_runtime_c__String) -#endif // ROSIDL_GENERATOR_C__STRING_H_ +#endif // ROSIDL_RUNTIME_C__STRING_H_ diff --git a/rosidl_runtime_c/include/rosidl_generator_c/string_bounds.h b/rosidl_runtime_c/include/rosidl_runtime_c/string_bounds.h similarity index 76% rename from rosidl_runtime_c/include/rosidl_generator_c/string_bounds.h rename to rosidl_runtime_c/include/rosidl_runtime_c/string_bounds.h index 29988d9d3..fbd45cf45 100644 --- a/rosidl_runtime_c/include/rosidl_generator_c/string_bounds.h +++ b/rosidl_runtime_c/include/rosidl_runtime_c/string_bounds.h @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef ROSIDL_GENERATOR_C__STRING_BOUNDS_H_ -#define ROSIDL_GENERATOR_C__STRING_BOUNDS_H_ +#ifndef ROSIDL_RUNTIME_C__STRING_BOUNDS_H_ +#define ROSIDL_RUNTIME_C__STRING_BOUNDS_H_ #include /// String struct -typedef struct rosidl_generator_c__String__bounds +typedef struct rosidl_runtime_c__String__bounds { /// The length of the string (excluding the null byte). size_t bounds; -} rosidl_generator_c__String__bounds; +} rosidl_runtime_c__String__bounds; -#endif // ROSIDL_GENERATOR_C__STRING_BOUNDS_H_ +#endif // ROSIDL_RUNTIME_C__STRING_BOUNDS_H_ diff --git a/rosidl_runtime_c/include/rosidl_generator_c/string_functions.h b/rosidl_runtime_c/include/rosidl_runtime_c/string_functions.h similarity index 51% rename from rosidl_runtime_c/include/rosidl_generator_c/string_functions.h rename to rosidl_runtime_c/include/rosidl_runtime_c/string_functions.h index 22e5d8243..f2a7db0e5 100644 --- a/rosidl_runtime_c/include/rosidl_generator_c/string_functions.h +++ b/rosidl_runtime_c/include/rosidl_runtime_c/string_functions.h @@ -12,21 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef ROSIDL_GENERATOR_C__STRING_FUNCTIONS_H_ -#define ROSIDL_GENERATOR_C__STRING_FUNCTIONS_H_ +#ifndef ROSIDL_RUNTIME_C__STRING_FUNCTIONS_H_ +#define ROSIDL_RUNTIME_C__STRING_FUNCTIONS_H_ #include -#include "rosidl_generator_c/string.h" -#include "rosidl_generator_c/visibility_control.h" +#include "rosidl_runtime_c/string.h" +#include "rosidl_runtime_c/visibility_control.h" #ifdef __cplusplus extern "C" { #endif -/// Initialize a rosidl_generator_c__String structure. -/* The contents of rosidl_generator_c__String are initialized to a single null character ('\0'). +/// Initialize a rosidl_runtime_c__String structure. +/* The contents of rosidl_runtime_c__String are initialized to a single null character ('\0'). * The string initially has size 0 and capacity 1. * Size represents the size of the contents of the string, while capacity represents the overall * storage of the string (counting the null terminator). @@ -34,43 +34,43 @@ extern "C" */ ROSIDL_GENERATOR_C_PUBLIC bool -rosidl_generator_c__String__init(rosidl_generator_c__String * str); +rosidl_runtime_c__String__init(rosidl_runtime_c__String * str); ROSIDL_GENERATOR_C_PUBLIC void -rosidl_generator_c__String__fini(rosidl_generator_c__String * str); +rosidl_runtime_c__String__fini(rosidl_runtime_c__String * str); ROSIDL_GENERATOR_C_PUBLIC bool -rosidl_generator_c__String__assignn( - rosidl_generator_c__String * str, const char * value, size_t n); +rosidl_runtime_c__String__assignn( + rosidl_runtime_c__String * str, const char * value, size_t n); ROSIDL_GENERATOR_C_PUBLIC bool -rosidl_generator_c__String__assign( - rosidl_generator_c__String * str, const char * value); +rosidl_runtime_c__String__assign( + rosidl_runtime_c__String * str, const char * value); ROSIDL_GENERATOR_C_PUBLIC bool -rosidl_generator_c__String__Sequence__init( - rosidl_generator_c__String__Sequence * sequence, size_t size); +rosidl_runtime_c__String__Sequence__init( + rosidl_runtime_c__String__Sequence * sequence, size_t size); ROSIDL_GENERATOR_C_PUBLIC void -rosidl_generator_c__String__Sequence__fini( - rosidl_generator_c__String__Sequence * sequence); +rosidl_runtime_c__String__Sequence__fini( + rosidl_runtime_c__String__Sequence * sequence); ROSIDL_GENERATOR_C_PUBLIC -rosidl_generator_c__String__Sequence * -rosidl_generator_c__String__Sequence__create(size_t size); +rosidl_runtime_c__String__Sequence * +rosidl_runtime_c__String__Sequence__create(size_t size); ROSIDL_GENERATOR_C_PUBLIC void -rosidl_generator_c__String__Sequence__destroy( - rosidl_generator_c__String__Sequence * sequence); +rosidl_runtime_c__String__Sequence__destroy( + rosidl_runtime_c__String__Sequence * sequence); #ifdef __cplusplus } #endif -#endif // ROSIDL_GENERATOR_C__STRING_FUNCTIONS_H_ +#endif // ROSIDL_RUNTIME_C__STRING_FUNCTIONS_H_ diff --git a/rosidl_runtime_c/include/rosidl_generator_c/u16string.h b/rosidl_runtime_c/include/rosidl_runtime_c/u16string.h similarity index 74% rename from rosidl_runtime_c/include/rosidl_generator_c/u16string.h rename to rosidl_runtime_c/include/rosidl_runtime_c/u16string.h index 509bccc40..1bc9f79c2 100644 --- a/rosidl_runtime_c/include/rosidl_generator_c/u16string.h +++ b/rosidl_runtime_c/include/rosidl_runtime_c/u16string.h @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef ROSIDL_GENERATOR_C__U16STRING_H_ -#define ROSIDL_GENERATOR_C__U16STRING_H_ +#ifndef ROSIDL_RUNTIME_C__U16STRING_H_ +#define ROSIDL_RUNTIME_C__U16STRING_H_ #include -#include "rosidl_generator_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence.h" /// U16String struct -typedef struct rosidl_generator_c__U16String +typedef struct rosidl_runtime_c__U16String { /// The pointer to the first character. uint_least16_t * data; // using uint_least16_t to match a C++ std::u16string @@ -28,8 +28,8 @@ typedef struct rosidl_generator_c__U16String size_t size; /// The capacity represents the number of allocated characters (including the null byte). size_t capacity; -} rosidl_generator_c__U16String; +} rosidl_runtime_c__U16String; -ROSIDL_GENERATOR_C__PRIMITIVE_SEQUENCE(U16String, rosidl_generator_c__U16String) +ROSIDL_RUNTIME_C__PRIMITIVE_SEQUENCE(U16String, rosidl_runtime_c__U16String) -#endif // ROSIDL_GENERATOR_C__U16STRING_H_ +#endif // ROSIDL_RUNTIME_C__U16STRING_H_ diff --git a/rosidl_runtime_c/include/rosidl_runtime_c/u16string_functions.h b/rosidl_runtime_c/include/rosidl_runtime_c/u16string_functions.h new file mode 100644 index 000000000..eddf29a73 --- /dev/null +++ b/rosidl_runtime_c/include/rosidl_runtime_c/u16string_functions.h @@ -0,0 +1,90 @@ +// Copyright 2015-2018 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 ROSIDL_RUNTIME_C__U16STRING_FUNCTIONS_H_ +#define ROSIDL_RUNTIME_C__U16STRING_FUNCTIONS_H_ + +#include + +#include "rosidl_runtime_c/u16string.h" +#include "rosidl_runtime_c/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +/// Initialize a rosidl_runtime_c__U16String structure. +/* The contents of rosidl_runtime_c__U16String are initialized to a single null character. + * The string initially has size 0 and capacity 1. + * Size represents the size of the contents of the string, while capacity represents the overall + * storage of the string (counting the null terminator). + * All strings must be null-terminated. + */ +ROSIDL_GENERATOR_C_PUBLIC +bool +rosidl_runtime_c__U16String__init(rosidl_runtime_c__U16String * str); + +ROSIDL_GENERATOR_C_PUBLIC +void +rosidl_runtime_c__U16String__fini(rosidl_runtime_c__U16String * str); + +ROSIDL_GENERATOR_C_PUBLIC +bool +rosidl_runtime_c__U16String__assignn( + rosidl_runtime_c__U16String * str, const uint16_t * value, size_t n); + +ROSIDL_GENERATOR_C_PUBLIC +bool +rosidl_runtime_c__U16String__assignn_from_char( + rosidl_runtime_c__U16String * str, const char * value, size_t n); + +ROSIDL_GENERATOR_C_PUBLIC +bool +rosidl_runtime_c__U16String__assign( + rosidl_runtime_c__U16String * str, const uint16_t * value); + +ROSIDL_GENERATOR_C_PUBLIC +size_t +rosidl_runtime_c__U16String__len(const uint16_t * value); + +ROSIDL_GENERATOR_C_PUBLIC +bool +rosidl_runtime_c__U16String__resize( + rosidl_runtime_c__U16String * str, size_t n); + +ROSIDL_GENERATOR_C_PUBLIC +bool +rosidl_runtime_c__U16String__Sequence__init( + rosidl_runtime_c__U16String__Sequence * sequence, size_t size); + +ROSIDL_GENERATOR_C_PUBLIC +void +rosidl_runtime_c__U16String__Sequence__fini( + rosidl_runtime_c__U16String__Sequence * sequence); + +ROSIDL_GENERATOR_C_PUBLIC +rosidl_runtime_c__U16String__Sequence * +rosidl_runtime_c__U16String__Sequence__create(size_t size); + +ROSIDL_GENERATOR_C_PUBLIC +void +rosidl_runtime_c__U16String__Sequence__destroy( + rosidl_runtime_c__U16String__Sequence * sequence); + +#ifdef __cplusplus +} +#endif + +#endif // ROSIDL_RUNTIME_C__U16STRING_FUNCTIONS_H_ diff --git a/rosidl_runtime_c/include/rosidl_generator_c/visibility_control.h b/rosidl_runtime_c/include/rosidl_runtime_c/visibility_control.h similarity index 92% rename from rosidl_runtime_c/include/rosidl_generator_c/visibility_control.h rename to rosidl_runtime_c/include/rosidl_runtime_c/visibility_control.h index cf9f35b42..05c95bff0 100644 --- a/rosidl_runtime_c/include/rosidl_generator_c/visibility_control.h +++ b/rosidl_runtime_c/include/rosidl_runtime_c/visibility_control.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef ROSIDL_GENERATOR_C__VISIBILITY_CONTROL_H_ -#define ROSIDL_GENERATOR_C__VISIBILITY_CONTROL_H_ +#ifndef ROSIDL_RUNTIME_C__VISIBILITY_CONTROL_H_ +#define ROSIDL_RUNTIME_C__VISIBILITY_CONTROL_H_ #ifdef __cplusplus extern "C" @@ -55,4 +55,4 @@ extern "C" } #endif -#endif // ROSIDL_GENERATOR_C__VISIBILITY_CONTROL_H_ +#endif // ROSIDL_RUNTIME_C__VISIBILITY_CONTROL_H_ diff --git a/rosidl_runtime_c/src/message_bounds.c b/rosidl_runtime_c/src/message_bounds.c index 619e432c0..3e799d0df 100644 --- a/rosidl_runtime_c/src/message_bounds.c +++ b/rosidl_runtime_c/src/message_bounds.c @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "rosidl_generator_c/message_bounds_struct.h" +#include "rosidl_runtime_c/message_bounds_struct.h" #include #include diff --git a/rosidl_runtime_c/src/message_type_support.c b/rosidl_runtime_c/src/message_type_support.c index 714fa48b3..439e332cf 100644 --- a/rosidl_runtime_c/src/message_type_support.c +++ b/rosidl_runtime_c/src/message_type_support.c @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "rosidl_generator_c/message_type_support_struct.h" +#include "rosidl_runtime_c/message_type_support_struct.h" #include #include diff --git a/rosidl_runtime_c/src/primitives_sequence_functions.c b/rosidl_runtime_c/src/primitives_sequence_functions.c index 3891271c0..5884c8e69 100644 --- a/rosidl_runtime_c/src/primitives_sequence_functions.c +++ b/rosidl_runtime_c/src/primitives_sequence_functions.c @@ -16,11 +16,11 @@ #include #include -#include "rosidl_generator_c/primitives_sequence_functions.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" #define ROSIDL_GENERATOR_C__DEFINE_PRIMITIVE_SEQUENCE_FUNCTIONS(STRUCT_NAME, TYPE_NAME) \ - bool rosidl_generator_c__ ## STRUCT_NAME ## __Sequence__init( \ - rosidl_generator_c__ ## STRUCT_NAME ## __Sequence * sequence, size_t size) \ + bool rosidl_runtime_c__ ## STRUCT_NAME ## __Sequence__init( \ + rosidl_runtime_c__ ## STRUCT_NAME ## __Sequence * sequence, size_t size) \ { \ if (!sequence) { \ return false; \ @@ -38,8 +38,8 @@ return true; \ } \ \ - void rosidl_generator_c__ ## STRUCT_NAME ## __Sequence__fini( \ - rosidl_generator_c__ ## STRUCT_NAME ## __Sequence * sequence) \ + void rosidl_runtime_c__ ## STRUCT_NAME ## __Sequence__fini( \ + rosidl_runtime_c__ ## STRUCT_NAME ## __Sequence * sequence) \ { \ if (!sequence) { \ return; \ @@ -76,54 +76,54 @@ ROSIDL_GENERATOR_C__DEFINE_PRIMITIVE_SEQUENCE_FUNCTIONS(uint64, uint64_t) ROSIDL_GENERATOR_C__DEFINE_PRIMITIVE_SEQUENCE_FUNCTIONS(int64, int64_t) // emulate legacy API -bool rosidl_generator_c__bool__Sequence__init( - rosidl_generator_c__boolean__Sequence * sequence, size_t size) +bool rosidl_runtime_c__bool__Sequence__init( + rosidl_runtime_c__boolean__Sequence * sequence, size_t size) { - return rosidl_generator_c__boolean__Sequence__init( + return rosidl_runtime_c__boolean__Sequence__init( sequence, size); } -void rosidl_generator_c__bool__Sequence__fini( - rosidl_generator_c__boolean__Sequence * sequence) +void rosidl_runtime_c__bool__Sequence__fini( + rosidl_runtime_c__boolean__Sequence * sequence) { - rosidl_generator_c__boolean__Sequence__fini( + rosidl_runtime_c__boolean__Sequence__fini( sequence); } -bool rosidl_generator_c__byte__Sequence__init( - rosidl_generator_c__octet__Sequence * sequence, size_t size) +bool rosidl_runtime_c__byte__Sequence__init( + rosidl_runtime_c__octet__Sequence * sequence, size_t size) { - return rosidl_generator_c__octet__Sequence__init( + return rosidl_runtime_c__octet__Sequence__init( sequence, size); } -void rosidl_generator_c__byte__Sequence__fini( - rosidl_generator_c__octet__Sequence * sequence) +void rosidl_runtime_c__byte__Sequence__fini( + rosidl_runtime_c__octet__Sequence * sequence) { - rosidl_generator_c__octet__Sequence__fini( + rosidl_runtime_c__octet__Sequence__fini( sequence); } -bool rosidl_generator_c__float32__Sequence__init( - rosidl_generator_c__float__Sequence * sequence, size_t size) +bool rosidl_runtime_c__float32__Sequence__init( + rosidl_runtime_c__float__Sequence * sequence, size_t size) { - return rosidl_generator_c__float__Sequence__init( + return rosidl_runtime_c__float__Sequence__init( sequence, size); } -void rosidl_generator_c__float32__Sequence__fini( - rosidl_generator_c__float__Sequence * sequence) +void rosidl_runtime_c__float32__Sequence__fini( + rosidl_runtime_c__float__Sequence * sequence) { - rosidl_generator_c__float__Sequence__fini( + rosidl_runtime_c__float__Sequence__fini( sequence); } -bool rosidl_generator_c__float64__Sequence__init( - rosidl_generator_c__double__Sequence * sequence, size_t size) +bool rosidl_runtime_c__float64__Sequence__init( + rosidl_runtime_c__double__Sequence * sequence, size_t size) { - return rosidl_generator_c__double__Sequence__init( + return rosidl_runtime_c__double__Sequence__init( sequence, size); } -void rosidl_generator_c__float64__Sequence__fini( - rosidl_generator_c__double__Sequence * sequence) +void rosidl_runtime_c__float64__Sequence__fini( + rosidl_runtime_c__double__Sequence * sequence) { - rosidl_generator_c__double__Sequence__fini( + rosidl_runtime_c__double__Sequence__fini( sequence); } diff --git a/rosidl_runtime_c/src/service_type_support.c b/rosidl_runtime_c/src/service_type_support.c index ede413be9..d7a5aff4e 100644 --- a/rosidl_runtime_c/src/service_type_support.c +++ b/rosidl_runtime_c/src/service_type_support.c @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "rosidl_generator_c/service_type_support_struct.h" +#include "rosidl_runtime_c/service_type_support_struct.h" #include #include diff --git a/rosidl_runtime_c/src/string_functions.c b/rosidl_runtime_c/src/string_functions.c index 8b5584b4b..04bdb9d6f 100644 --- a/rosidl_runtime_c/src/string_functions.c +++ b/rosidl_runtime_c/src/string_functions.c @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "rosidl_generator_c/string_functions.h" +#include "rosidl_runtime_c/string_functions.h" #include #include @@ -20,7 +20,7 @@ #include bool -rosidl_generator_c__String__init(rosidl_generator_c__String * str) +rosidl_runtime_c__String__init(rosidl_runtime_c__String * str) { if (!str) { return false; @@ -36,7 +36,7 @@ rosidl_generator_c__String__init(rosidl_generator_c__String * str) } void -rosidl_generator_c__String__fini(rosidl_generator_c__String * str) +rosidl_runtime_c__String__fini(rosidl_runtime_c__String * str) { if (!str) { return; @@ -71,8 +71,8 @@ rosidl_generator_c__String__fini(rosidl_generator_c__String * str) } bool -rosidl_generator_c__String__assignn( - rosidl_generator_c__String * str, const char * value, size_t n) +rosidl_runtime_c__String__assignn( + rosidl_runtime_c__String * str, const char * value, size_t n) { if (!str) { return false; @@ -98,32 +98,32 @@ rosidl_generator_c__String__assignn( } bool -rosidl_generator_c__String__assign( - rosidl_generator_c__String * str, const char * value) +rosidl_runtime_c__String__assign( + rosidl_runtime_c__String * str, const char * value) { - return rosidl_generator_c__String__assignn( + return rosidl_runtime_c__String__assignn( str, value, strlen(value)); } bool -rosidl_generator_c__String__Sequence__init( - rosidl_generator_c__String__Sequence * sequence, size_t size) +rosidl_runtime_c__String__Sequence__init( + rosidl_runtime_c__String__Sequence * sequence, size_t size) { if (!sequence) { return false; } - rosidl_generator_c__String * data = NULL; + rosidl_runtime_c__String * data = NULL; if (size) { - data = (rosidl_generator_c__String *)calloc(size, sizeof(rosidl_generator_c__String)); + data = (rosidl_runtime_c__String *)calloc(size, sizeof(rosidl_runtime_c__String)); if (!data) { return false; } // initialize all sequence elements for (size_t i = 0; i < size; ++i) { - if (!rosidl_generator_c__String__init(&data[i])) { + if (!rosidl_runtime_c__String__init(&data[i])) { /* free currently allocated and return false */ for (; i-- > 0; ) { - rosidl_generator_c__String__fini(&data[i]); + rosidl_runtime_c__String__fini(&data[i]); } free(data); return false; @@ -137,8 +137,8 @@ rosidl_generator_c__String__Sequence__init( } void -rosidl_generator_c__String__Sequence__fini( - rosidl_generator_c__String__Sequence * sequence) +rosidl_runtime_c__String__Sequence__fini( + rosidl_runtime_c__String__Sequence * sequence) { if (!sequence) { return; @@ -148,7 +148,7 @@ rosidl_generator_c__String__Sequence__fini( assert(sequence->capacity > 0); // finalize all sequence elements for (size_t i = 0; i < sequence->capacity; ++i) { - rosidl_generator_c__String__fini(&sequence->data[i]); + rosidl_runtime_c__String__fini(&sequence->data[i]); } free(sequence->data); sequence->data = NULL; @@ -161,15 +161,15 @@ rosidl_generator_c__String__Sequence__fini( } } -rosidl_generator_c__String__Sequence * -rosidl_generator_c__String__Sequence__create(size_t size) +rosidl_runtime_c__String__Sequence * +rosidl_runtime_c__String__Sequence__create(size_t size) { - rosidl_generator_c__String__Sequence * sequence = - (rosidl_generator_c__String__Sequence *)malloc(sizeof(rosidl_generator_c__String__Sequence)); + rosidl_runtime_c__String__Sequence * sequence = + (rosidl_runtime_c__String__Sequence *)malloc(sizeof(rosidl_runtime_c__String__Sequence)); if (!sequence) { return NULL; } - bool success = rosidl_generator_c__String__Sequence__init(sequence, size); + bool success = rosidl_runtime_c__String__Sequence__init(sequence, size); if (!success) { free(sequence); return NULL; @@ -178,11 +178,11 @@ rosidl_generator_c__String__Sequence__create(size_t size) } void -rosidl_generator_c__String__Sequence__destroy( - rosidl_generator_c__String__Sequence * sequence) +rosidl_runtime_c__String__Sequence__destroy( + rosidl_runtime_c__String__Sequence * sequence) { if (sequence) { - rosidl_generator_c__String__Sequence__fini(sequence); + rosidl_runtime_c__String__Sequence__fini(sequence); } free(sequence); } diff --git a/rosidl_runtime_c/src/u16string_functions.c b/rosidl_runtime_c/src/u16string_functions.c index 2f9be7451..7e316ecab 100644 --- a/rosidl_runtime_c/src/u16string_functions.c +++ b/rosidl_runtime_c/src/u16string_functions.c @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "rosidl_generator_c/u16string_functions.h" +#include "rosidl_runtime_c/u16string_functions.h" #include #include @@ -20,7 +20,7 @@ #include bool -rosidl_generator_c__U16String__init(rosidl_generator_c__U16String * str) +rosidl_runtime_c__U16String__init(rosidl_runtime_c__U16String * str) { if (!str) { return false; @@ -36,7 +36,7 @@ rosidl_generator_c__U16String__init(rosidl_generator_c__U16String * str) } void -rosidl_generator_c__U16String__fini(rosidl_generator_c__U16String * str) +rosidl_runtime_c__U16String__fini(rosidl_runtime_c__U16String * str) { if (!str) { return; @@ -71,8 +71,8 @@ rosidl_generator_c__U16String__fini(rosidl_generator_c__U16String * str) } bool -rosidl_generator_c__U16String__assignn( - rosidl_generator_c__U16String * str, const uint16_t * value, size_t n) +rosidl_runtime_c__U16String__assignn( + rosidl_runtime_c__U16String * str, const uint16_t * value, size_t n) { if (!str) { return false; @@ -98,27 +98,27 @@ rosidl_generator_c__U16String__assignn( } bool -rosidl_generator_c__U16String__assignn_from_char( - rosidl_generator_c__U16String * str, const char * value, size_t n) +rosidl_runtime_c__U16String__assignn_from_char( + rosidl_runtime_c__U16String * str, const char * value, size_t n) { // since n represents the number of 8-bit characters it must be an even number if (n % 2 != 0) { return false; } - return rosidl_generator_c__U16String__assignn( + return rosidl_runtime_c__U16String__assignn( str, (const uint16_t *)value, n / 2); } bool -rosidl_generator_c__U16String__assign( - rosidl_generator_c__U16String * str, const uint16_t * value) +rosidl_runtime_c__U16String__assign( + rosidl_runtime_c__U16String * str, const uint16_t * value) { - return rosidl_generator_c__U16String__assignn( - str, value, rosidl_generator_c__U16String__len(value)); + return rosidl_runtime_c__U16String__assignn( + str, value, rosidl_runtime_c__U16String__len(value)); } size_t -rosidl_generator_c__U16String__len(const uint16_t * value) +rosidl_runtime_c__U16String__len(const uint16_t * value) { if (!value) { return 0; @@ -131,8 +131,8 @@ rosidl_generator_c__U16String__len(const uint16_t * value) } bool -rosidl_generator_c__U16String__resize( - rosidl_generator_c__U16String * str, size_t n) +rosidl_runtime_c__U16String__resize( + rosidl_runtime_c__U16String * str, size_t n) { if (!str) { return false; @@ -153,24 +153,24 @@ rosidl_generator_c__U16String__resize( } bool -rosidl_generator_c__U16String__Sequence__init( - rosidl_generator_c__U16String__Sequence * sequence, size_t size) +rosidl_runtime_c__U16String__Sequence__init( + rosidl_runtime_c__U16String__Sequence * sequence, size_t size) { if (!sequence) { return false; } - rosidl_generator_c__U16String * data = NULL; + rosidl_runtime_c__U16String * data = NULL; if (size) { - data = (rosidl_generator_c__U16String *)malloc(size * sizeof(rosidl_generator_c__U16String)); + data = (rosidl_runtime_c__U16String *)malloc(size * sizeof(rosidl_runtime_c__U16String)); if (!data) { return false; } // initialize all sequence elements for (size_t i = 0; i < size; ++i) { - if (!rosidl_generator_c__U16String__init(&data[i])) { + if (!rosidl_runtime_c__U16String__init(&data[i])) { /* free currently allocated and return false */ for (; i-- > 0; ) { - rosidl_generator_c__U16String__fini(&data[i]); + rosidl_runtime_c__U16String__fini(&data[i]); } free(data); return false; @@ -184,8 +184,8 @@ rosidl_generator_c__U16String__Sequence__init( } void -rosidl_generator_c__U16String__Sequence__fini( - rosidl_generator_c__U16String__Sequence * sequence) +rosidl_runtime_c__U16String__Sequence__fini( + rosidl_runtime_c__U16String__Sequence * sequence) { if (!sequence) { return; @@ -195,7 +195,7 @@ rosidl_generator_c__U16String__Sequence__fini( assert(sequence->capacity > 0); // finalize all sequence elements for (size_t i = 0; i < sequence->capacity; ++i) { - rosidl_generator_c__U16String__fini(&sequence->data[i]); + rosidl_runtime_c__U16String__fini(&sequence->data[i]); } free(sequence->data); sequence->data = NULL; @@ -208,16 +208,16 @@ rosidl_generator_c__U16String__Sequence__fini( } } -rosidl_generator_c__U16String__Sequence * -rosidl_generator_c__U16String__Sequence__create(size_t size) +rosidl_runtime_c__U16String__Sequence * +rosidl_runtime_c__U16String__Sequence__create(size_t size) { - rosidl_generator_c__U16String__Sequence * sequence = - (rosidl_generator_c__U16String__Sequence *)malloc( - sizeof(rosidl_generator_c__U16String__Sequence)); + rosidl_runtime_c__U16String__Sequence * sequence = + (rosidl_runtime_c__U16String__Sequence *)malloc( + sizeof(rosidl_runtime_c__U16String__Sequence)); if (!sequence) { return NULL; } - bool success = rosidl_generator_c__U16String__Sequence__init(sequence, size); + bool success = rosidl_runtime_c__U16String__Sequence__init(sequence, size); if (!success) { free(sequence); return NULL; @@ -226,11 +226,11 @@ rosidl_generator_c__U16String__Sequence__create(size_t size) } void -rosidl_generator_c__U16String__Sequence__destroy( - rosidl_generator_c__U16String__Sequence * sequence) +rosidl_runtime_c__U16String__Sequence__destroy( + rosidl_runtime_c__U16String__Sequence * sequence) { if (sequence) { - rosidl_generator_c__U16String__Sequence__fini(sequence); + rosidl_runtime_c__U16String__Sequence__fini(sequence); } free(sequence); } diff --git a/rosidl_runtime_cpp/include/rosidl_runtime_cpp/action_type_support_decl.hpp b/rosidl_runtime_cpp/include/rosidl_runtime_cpp/action_type_support_decl.hpp index 297fe89c7..a5b0d5531 100644 --- a/rosidl_runtime_cpp/include/rosidl_runtime_cpp/action_type_support_decl.hpp +++ b/rosidl_runtime_cpp/include/rosidl_runtime_cpp/action_type_support_decl.hpp @@ -15,8 +15,8 @@ #ifndef ROSIDL_RUNTIME_CPP__ACTION_TYPE_SUPPORT_DECL_HPP_ #define ROSIDL_RUNTIME_CPP__ACTION_TYPE_SUPPORT_DECL_HPP_ -#include -#include +#include +#include namespace rosidl_runtime_cpp { diff --git a/rosidl_runtime_cpp/include/rosidl_runtime_cpp/message_initialization.hpp b/rosidl_runtime_cpp/include/rosidl_runtime_cpp/message_initialization.hpp index 7a522073b..73a771464 100644 --- a/rosidl_runtime_cpp/include/rosidl_runtime_cpp/message_initialization.hpp +++ b/rosidl_runtime_cpp/include/rosidl_runtime_cpp/message_initialization.hpp @@ -17,7 +17,7 @@ // TODO(clalancette): this should be moved out into a separate runtime package -#include +#include namespace rosidl_runtime_cpp { diff --git a/rosidl_runtime_cpp/include/rosidl_runtime_cpp/message_type_support_decl.hpp b/rosidl_runtime_cpp/include/rosidl_runtime_cpp/message_type_support_decl.hpp index c76145afc..12a1e753c 100644 --- a/rosidl_runtime_cpp/include/rosidl_runtime_cpp/message_type_support_decl.hpp +++ b/rosidl_runtime_cpp/include/rosidl_runtime_cpp/message_type_support_decl.hpp @@ -15,8 +15,8 @@ #ifndef ROSIDL_RUNTIME_CPP__MESSAGE_TYPE_SUPPORT_DECL_HPP_ #define ROSIDL_RUNTIME_CPP__MESSAGE_TYPE_SUPPORT_DECL_HPP_ -#include -#include +#include +#include namespace rosidl_runtime_cpp { diff --git a/rosidl_runtime_cpp/include/rosidl_runtime_cpp/service_type_support_decl.hpp b/rosidl_runtime_cpp/include/rosidl_runtime_cpp/service_type_support_decl.hpp index c0b81db9f..31829fe92 100644 --- a/rosidl_runtime_cpp/include/rosidl_runtime_cpp/service_type_support_decl.hpp +++ b/rosidl_runtime_cpp/include/rosidl_runtime_cpp/service_type_support_decl.hpp @@ -15,8 +15,8 @@ #ifndef ROSIDL_RUNTIME_CPP__SERVICE_TYPE_SUPPORT_DECL_HPP_ #define ROSIDL_RUNTIME_CPP__SERVICE_TYPE_SUPPORT_DECL_HPP_ -#include -#include +#include +#include namespace rosidl_runtime_cpp { diff --git a/rosidl_runtime_cpp/include/rosidl_typesupport_cpp/action_type_support.hpp b/rosidl_runtime_cpp/include/rosidl_typesupport_cpp/action_type_support.hpp index 2a0cca677..e0befe2bc 100644 --- a/rosidl_runtime_cpp/include/rosidl_typesupport_cpp/action_type_support.hpp +++ b/rosidl_runtime_cpp/include/rosidl_typesupport_cpp/action_type_support.hpp @@ -15,8 +15,8 @@ #ifndef ROSIDL_TYPESUPPORT_CPP__ACTION_TYPE_SUPPORT_HPP_ #define ROSIDL_TYPESUPPORT_CPP__ACTION_TYPE_SUPPORT_HPP_ -#include -#include +#include +#include namespace rosidl_typesupport_cpp { diff --git a/rosidl_runtime_cpp/include/rosidl_typesupport_cpp/message_type_support.hpp b/rosidl_runtime_cpp/include/rosidl_typesupport_cpp/message_type_support.hpp index 28ff3ac0c..6fad1d7d5 100644 --- a/rosidl_runtime_cpp/include/rosidl_typesupport_cpp/message_type_support.hpp +++ b/rosidl_runtime_cpp/include/rosidl_typesupport_cpp/message_type_support.hpp @@ -15,8 +15,8 @@ #ifndef ROSIDL_TYPESUPPORT_CPP__MESSAGE_TYPE_SUPPORT_HPP_ #define ROSIDL_TYPESUPPORT_CPP__MESSAGE_TYPE_SUPPORT_HPP_ -#include -#include +#include +#include namespace rosidl_typesupport_cpp { diff --git a/rosidl_runtime_cpp/include/rosidl_typesupport_cpp/service_type_support.hpp b/rosidl_runtime_cpp/include/rosidl_typesupport_cpp/service_type_support.hpp index 11b2d39bb..d0fc4e58e 100644 --- a/rosidl_runtime_cpp/include/rosidl_typesupport_cpp/service_type_support.hpp +++ b/rosidl_runtime_cpp/include/rosidl_typesupport_cpp/service_type_support.hpp @@ -15,8 +15,8 @@ #ifndef ROSIDL_TYPESUPPORT_CPP__SERVICE_TYPE_SUPPORT_HPP_ #define ROSIDL_TYPESUPPORT_CPP__SERVICE_TYPE_SUPPORT_HPP_ -#include -#include +#include +#include namespace rosidl_typesupport_cpp { diff --git a/rosidl_typesupport_introspection_c/include/rosidl_typesupport_introspection_c/message_introspection.h b/rosidl_typesupport_introspection_c/include/rosidl_typesupport_introspection_c/message_introspection.h index 04ae695d0..67079d8c2 100644 --- a/rosidl_typesupport_introspection_c/include/rosidl_typesupport_introspection_c/message_introspection.h +++ b/rosidl_typesupport_introspection_c/include/rosidl_typesupport_introspection_c/message_introspection.h @@ -19,8 +19,8 @@ #include #include -#include "rosidl_generator_c/message_initialization.h" -#include "rosidl_generator_c/message_type_support_struct.h" +#include "rosidl_runtime_c/message_initialization.h" +#include "rosidl_runtime_c/message_type_support_struct.h" #include "rosidl_typesupport_introspection_c/visibility_control.h" diff --git a/rosidl_typesupport_introspection_c/include/rosidl_typesupport_introspection_c/service_introspection.h b/rosidl_typesupport_introspection_c/include/rosidl_typesupport_introspection_c/service_introspection.h index 1d63ab40c..c5d82a51b 100644 --- a/rosidl_typesupport_introspection_c/include/rosidl_typesupport_introspection_c/service_introspection.h +++ b/rosidl_typesupport_introspection_c/include/rosidl_typesupport_introspection_c/service_introspection.h @@ -18,8 +18,8 @@ #include #include -#include "rosidl_generator_c/service_type_support_struct.h" -#include "rosidl_generator_c/visibility_control.h" +#include "rosidl_runtime_c/service_type_support_struct.h" +#include "rosidl_runtime_c/visibility_control.h" #include "rosidl_typesupport_introspection_c/message_introspection.h" diff --git a/rosidl_typesupport_introspection_c/resource/msg__rosidl_typesupport_introspection_c.h.em b/rosidl_typesupport_introspection_c/resource/msg__rosidl_typesupport_introspection_c.h.em index ac083f58a..d9a68229f 100644 --- a/rosidl_typesupport_introspection_c/resource/msg__rosidl_typesupport_introspection_c.h.em +++ b/rosidl_typesupport_introspection_c/resource/msg__rosidl_typesupport_introspection_c.h.em @@ -1,7 +1,7 @@ @# Included from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em @{ header_files = [ - 'rosidl_generator_c/message_type_support_struct.h', + 'rosidl_runtime_c/message_type_support_struct.h', 'rosidl_typesupport_interface/macros.h', package_name + '/msg/rosidl_typesupport_introspection_c__visibility_control.h', ] diff --git a/rosidl_typesupport_introspection_c/resource/msg__type_support.c.em b/rosidl_typesupport_introspection_c/resource/msg__type_support.c.em index a40f9e5a2..619355d5f 100644 --- a/rosidl_typesupport_introspection_c/resource/msg__type_support.c.em +++ b/rosidl_typesupport_introspection_c/resource/msg__type_support.c.em @@ -51,18 +51,18 @@ includes = OrderedDict() for member in message.structure.members: if isinstance(member.type, AbstractSequence) and isinstance(member.type.value_type, BasicType): member_names = includes.setdefault( - 'rosidl_generator_c/primitives_sequence_functions.h', []) + 'rosidl_runtime_c/primitives_sequence_functions.h', []) member_names.append(member.name) continue type_ = member.type if isinstance(type_, AbstractNestedType): type_ = type_.value_type if isinstance(type_, AbstractString): - member_names = includes.setdefault('rosidl_generator_c/string_functions.h', []) + member_names = includes.setdefault('rosidl_runtime_c/string_functions.h', []) member_names.append(member.name) elif isinstance(type_, AbstractWString): member_names = includes.setdefault( - 'rosidl_generator_c/u16string_functions.h', []) + 'rosidl_runtime_c/u16string_functions.h', []) member_names.append(member.name) elif isinstance(type_, NamespacedType): include_prefix = idl_structure_type_to_c_include_prefix(type_) diff --git a/rosidl_typesupport_introspection_c/resource/srv__rosidl_typesupport_introspection_c.h.em b/rosidl_typesupport_introspection_c/resource/srv__rosidl_typesupport_introspection_c.h.em index 3426bf325..360ea1f7e 100644 --- a/rosidl_typesupport_introspection_c/resource/srv__rosidl_typesupport_introspection_c.h.em +++ b/rosidl_typesupport_introspection_c/resource/srv__rosidl_typesupport_introspection_c.h.em @@ -15,7 +15,7 @@ TEMPLATE( @{ header_files = [ - 'rosidl_generator_c/service_type_support_struct.h', + 'rosidl_runtime_c/service_type_support_struct.h', 'rosidl_typesupport_interface/macros.h', package_name + '/msg/rosidl_typesupport_introspection_c__visibility_control.h', ] diff --git a/rosidl_typesupport_introspection_c/resource/srv__type_support.c.em b/rosidl_typesupport_introspection_c/resource/srv__type_support.c.em index 574b4feef..80e83c206 100644 --- a/rosidl_typesupport_introspection_c/resource/srv__type_support.c.em +++ b/rosidl_typesupport_introspection_c/resource/srv__type_support.c.em @@ -20,7 +20,7 @@ include_parts = [package_name] + list(interface_path.parents[0].parts) + \ include_base = '/'.join(include_parts) header_files = [ - 'rosidl_generator_c/service_type_support_struct.h', + 'rosidl_runtime_c/service_type_support_struct.h', package_name + '/msg/rosidl_typesupport_introspection_c__visibility_control.h', include_base + '__rosidl_typesupport_introspection_c.h', 'rosidl_typesupport_introspection_c/identifier.h', diff --git a/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/message_introspection.hpp b/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/message_introspection.hpp index 42758d689..ff5747b14 100644 --- a/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/message_introspection.hpp +++ b/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/message_introspection.hpp @@ -18,7 +18,7 @@ #include #include -#include "rosidl_generator_c/message_type_support_struct.h" +#include "rosidl_runtime_c/message_type_support_struct.h" #include "rosidl_runtime_cpp/message_initialization.hpp" diff --git a/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp b/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp index 7d5d68da2..6b7579f52 100644 --- a/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp +++ b/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp @@ -16,7 +16,7 @@ #define ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__MESSAGE_TYPE_SUPPORT_DECL_HPP_ // Provides the definition of the rosidl_message_type_support_t struct. -#include "rosidl_generator_c/message_type_support_struct.h" +#include "rosidl_runtime_c/message_type_support_struct.h" // Provides visibility macros like ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC. #include "rosidl_typesupport_introspection_cpp/visibility_control.h" diff --git a/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/service_introspection.hpp b/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/service_introspection.hpp index fd9646512..58f943754 100644 --- a/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/service_introspection.hpp +++ b/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/service_introspection.hpp @@ -18,8 +18,8 @@ #include #include -#include "rosidl_generator_c/service_type_support_struct.h" -#include "rosidl_generator_c/visibility_control.h" +#include "rosidl_runtime_c/service_type_support_struct.h" +#include "rosidl_runtime_c/visibility_control.h" #include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" diff --git a/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/service_type_support_decl.hpp b/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/service_type_support_decl.hpp index d45abedda..47fa80c33 100644 --- a/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/service_type_support_decl.hpp +++ b/rosidl_typesupport_introspection_cpp/include/rosidl_typesupport_introspection_cpp/service_type_support_decl.hpp @@ -16,7 +16,7 @@ #define ROSIDL_TYPESUPPORT_INTROSPECTION_CPP__SERVICE_TYPE_SUPPORT_DECL_HPP_ // Provides the definition of the rosidl_service_type_support_t struct. -#include "rosidl_generator_c/service_type_support_struct.h" +#include "rosidl_runtime_c/service_type_support_struct.h" // Provides visibility macros like ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC. #include "rosidl_typesupport_introspection_cpp/visibility_control.h" diff --git a/rosidl_typesupport_introspection_cpp/resource/msg__rosidl_typesupport_introspection_cpp.hpp.em b/rosidl_typesupport_introspection_cpp/resource/msg__rosidl_typesupport_introspection_cpp.hpp.em index df26c9621..2ce8ac777 100644 --- a/rosidl_typesupport_introspection_cpp/resource/msg__rosidl_typesupport_introspection_cpp.hpp.em +++ b/rosidl_typesupport_introspection_cpp/resource/msg__rosidl_typesupport_introspection_cpp.hpp.em @@ -1,7 +1,7 @@ @# Included from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.hpp.em @{ header_files = [ - 'rosidl_generator_c/message_type_support_struct.h', + 'rosidl_runtime_c/message_type_support_struct.h', 'rosidl_typesupport_interface/macros.h', 'rosidl_typesupport_introspection_cpp/visibility_control.h', ] diff --git a/rosidl_typesupport_introspection_cpp/resource/msg__type_support.cpp.em b/rosidl_typesupport_introspection_cpp/resource/msg__type_support.cpp.em index f576c720b..c8e81e2d6 100644 --- a/rosidl_typesupport_introspection_cpp/resource/msg__type_support.cpp.em +++ b/rosidl_typesupport_introspection_cpp/resource/msg__type_support.cpp.em @@ -20,7 +20,7 @@ header_files = [ 'cstddef', # providing offsetof() 'string', 'vector', - 'rosidl_generator_c/message_type_support_struct.h', + 'rosidl_runtime_c/message_type_support_struct.h', 'rosidl_typesupport_cpp/message_type_support.hpp', 'rosidl_typesupport_interface/macros.h', include_base + '__struct.hpp', diff --git a/rosidl_typesupport_introspection_cpp/resource/srv__rosidl_typesupport_introspection_cpp.hpp.em b/rosidl_typesupport_introspection_cpp/resource/srv__rosidl_typesupport_introspection_cpp.hpp.em index 8cf2ed3c5..36e02b69d 100644 --- a/rosidl_typesupport_introspection_cpp/resource/srv__rosidl_typesupport_introspection_cpp.hpp.em +++ b/rosidl_typesupport_introspection_cpp/resource/srv__rosidl_typesupport_introspection_cpp.hpp.em @@ -15,7 +15,7 @@ TEMPLATE( @{ header_files = [ - 'rosidl_generator_c/service_type_support_struct.h', + 'rosidl_runtime_c/service_type_support_struct.h', 'rosidl_typesupport_interface/macros.h', 'rosidl_typesupport_introspection_cpp/visibility_control.h', ] diff --git a/rosidl_typesupport_introspection_cpp/resource/srv__type_support.cpp.em b/rosidl_typesupport_introspection_cpp/resource/srv__type_support.cpp.em index 298ca90bf..ac8b85ead 100644 --- a/rosidl_typesupport_introspection_cpp/resource/srv__type_support.cpp.em +++ b/rosidl_typesupport_introspection_cpp/resource/srv__type_support.cpp.em @@ -20,7 +20,7 @@ include_parts = [package_name] + list(interface_path.parents[0].parts) + \ include_base = '/'.join(include_parts) header_files = [ - 'rosidl_generator_c/service_type_support_struct.h', + 'rosidl_runtime_c/service_type_support_struct.h', 'rosidl_typesupport_cpp/message_type_support.hpp', 'rosidl_typesupport_cpp/service_type_support.hpp', 'rosidl_typesupport_interface/macros.h',