Initial commit

This commit is contained in:
CaiXiang
2024-10-25 14:21:27 +08:00
commit 314bf9ad25
2041 changed files with 272126 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/msg/num.hpp"
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__NUM__BUILDER_HPP_
#define TUTORIAL_INTERFACES__MSG__DETAIL__NUM__BUILDER_HPP_
#include <algorithm>
#include <utility>
#include "tutorial_interfaces/msg/detail/num__struct.hpp"
#include "rosidl_runtime_cpp/message_initialization.hpp"
namespace tutorial_interfaces
{
namespace msg
{
namespace builder
{
class Init_Num_num
{
public:
Init_Num_num()
: msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP)
{}
::tutorial_interfaces::msg::Num num(::tutorial_interfaces::msg::Num::_num_type arg)
{
msg_.num = std::move(arg);
return std::move(msg_);
}
private:
::tutorial_interfaces::msg::Num msg_;
};
} // namespace builder
} // namespace msg
template<typename MessageType>
auto build();
template<>
inline
auto build<::tutorial_interfaces::msg::Num>()
{
return tutorial_interfaces::msg::builder::Init_Num_num();
}
} // namespace tutorial_interfaces
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__NUM__BUILDER_HPP_

View File

@@ -0,0 +1,101 @@
// generated from rosidl_generator_c/resource/idl__description.c.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
#include "tutorial_interfaces/msg/detail/num__functions.h"
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_type_hash_t *
tutorial_interfaces__msg__Num__get_type_hash(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static rosidl_type_hash_t hash = {1, {
0x03, 0x64, 0x0e, 0xde, 0x65, 0x94, 0x10, 0x3d,
0x8e, 0x85, 0x15, 0xe5, 0xd7, 0x33, 0xcf, 0x75,
0x24, 0x94, 0xe4, 0x18, 0x5a, 0xca, 0x5a, 0x1f,
0x38, 0x19, 0x7f, 0x5c, 0xba, 0xa8, 0xd3, 0xc4,
}};
return &hash;
}
#include <assert.h>
#include <string.h>
// Include directives for referenced types
// Hashes for external referenced types
#ifndef NDEBUG
#endif
static char tutorial_interfaces__msg__Num__TYPE_NAME[] = "tutorial_interfaces/msg/Num";
// Define type names, field names, and default values
static char tutorial_interfaces__msg__Num__FIELD_NAME__num[] = "num";
static rosidl_runtime_c__type_description__Field tutorial_interfaces__msg__Num__FIELDS[] = {
{
{tutorial_interfaces__msg__Num__FIELD_NAME__num, 3, 3},
{
rosidl_runtime_c__type_description__FieldType__FIELD_TYPE_INT64,
0,
0,
{NULL, 0, 0},
},
{NULL, 0, 0},
},
};
const rosidl_runtime_c__type_description__TypeDescription *
tutorial_interfaces__msg__Num__get_type_description(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static bool constructed = false;
static const rosidl_runtime_c__type_description__TypeDescription description = {
{
{tutorial_interfaces__msg__Num__TYPE_NAME, 27, 27},
{tutorial_interfaces__msg__Num__FIELDS, 1, 1},
},
{NULL, 0, 0},
};
if (!constructed) {
constructed = true;
}
return &description;
}
static char toplevel_type_raw_source[] =
"int64 num";
static char msg_encoding[] = "msg";
// Define all individual source functions
const rosidl_runtime_c__type_description__TypeSource *
tutorial_interfaces__msg__Num__get_individual_type_description_source(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static const rosidl_runtime_c__type_description__TypeSource source = {
{tutorial_interfaces__msg__Num__TYPE_NAME, 27, 27},
{msg_encoding, 3, 3},
{toplevel_type_raw_source, 9, 9},
};
return &source;
}
const rosidl_runtime_c__type_description__TypeSource__Sequence *
tutorial_interfaces__msg__Num__get_type_description_sources(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static rosidl_runtime_c__type_description__TypeSource sources[1];
static const rosidl_runtime_c__type_description__TypeSource__Sequence source_sequence = {sources, 1, 1};
static bool constructed = false;
if (!constructed) {
sources[0] = *tutorial_interfaces__msg__Num__get_individual_type_description_source(NULL),
constructed = true;
}
return &source_sequence;
}

View File

@@ -0,0 +1,236 @@
// generated from rosidl_generator_c/resource/idl__functions.c.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
#include "tutorial_interfaces/msg/detail/num__functions.h"
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "rcutils/allocator.h"
bool
tutorial_interfaces__msg__Num__init(tutorial_interfaces__msg__Num * msg)
{
if (!msg) {
return false;
}
// num
return true;
}
void
tutorial_interfaces__msg__Num__fini(tutorial_interfaces__msg__Num * msg)
{
if (!msg) {
return;
}
// num
}
bool
tutorial_interfaces__msg__Num__are_equal(const tutorial_interfaces__msg__Num * lhs, const tutorial_interfaces__msg__Num * rhs)
{
if (!lhs || !rhs) {
return false;
}
// num
if (lhs->num != rhs->num) {
return false;
}
return true;
}
bool
tutorial_interfaces__msg__Num__copy(
const tutorial_interfaces__msg__Num * input,
tutorial_interfaces__msg__Num * output)
{
if (!input || !output) {
return false;
}
// num
output->num = input->num;
return true;
}
tutorial_interfaces__msg__Num *
tutorial_interfaces__msg__Num__create(void)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__msg__Num * msg = (tutorial_interfaces__msg__Num *)allocator.allocate(sizeof(tutorial_interfaces__msg__Num), allocator.state);
if (!msg) {
return NULL;
}
memset(msg, 0, sizeof(tutorial_interfaces__msg__Num));
bool success = tutorial_interfaces__msg__Num__init(msg);
if (!success) {
allocator.deallocate(msg, allocator.state);
return NULL;
}
return msg;
}
void
tutorial_interfaces__msg__Num__destroy(tutorial_interfaces__msg__Num * msg)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
if (msg) {
tutorial_interfaces__msg__Num__fini(msg);
}
allocator.deallocate(msg, allocator.state);
}
bool
tutorial_interfaces__msg__Num__Sequence__init(tutorial_interfaces__msg__Num__Sequence * array, size_t size)
{
if (!array) {
return false;
}
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__msg__Num * data = NULL;
if (size) {
data = (tutorial_interfaces__msg__Num *)allocator.zero_allocate(size, sizeof(tutorial_interfaces__msg__Num), allocator.state);
if (!data) {
return false;
}
// initialize all array elements
size_t i;
for (i = 0; i < size; ++i) {
bool success = tutorial_interfaces__msg__Num__init(&data[i]);
if (!success) {
break;
}
}
if (i < size) {
// if initialization failed finalize the already initialized array elements
for (; i > 0; --i) {
tutorial_interfaces__msg__Num__fini(&data[i - 1]);
}
allocator.deallocate(data, allocator.state);
return false;
}
}
array->data = data;
array->size = size;
array->capacity = size;
return true;
}
void
tutorial_interfaces__msg__Num__Sequence__fini(tutorial_interfaces__msg__Num__Sequence * array)
{
if (!array) {
return;
}
rcutils_allocator_t allocator = rcutils_get_default_allocator();
if (array->data) {
// ensure that data and capacity values are consistent
assert(array->capacity > 0);
// finalize all array elements
for (size_t i = 0; i < array->capacity; ++i) {
tutorial_interfaces__msg__Num__fini(&array->data[i]);
}
allocator.deallocate(array->data, allocator.state);
array->data = NULL;
array->size = 0;
array->capacity = 0;
} else {
// ensure that data, size, and capacity values are consistent
assert(0 == array->size);
assert(0 == array->capacity);
}
}
tutorial_interfaces__msg__Num__Sequence *
tutorial_interfaces__msg__Num__Sequence__create(size_t size)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__msg__Num__Sequence * array = (tutorial_interfaces__msg__Num__Sequence *)allocator.allocate(sizeof(tutorial_interfaces__msg__Num__Sequence), allocator.state);
if (!array) {
return NULL;
}
bool success = tutorial_interfaces__msg__Num__Sequence__init(array, size);
if (!success) {
allocator.deallocate(array, allocator.state);
return NULL;
}
return array;
}
void
tutorial_interfaces__msg__Num__Sequence__destroy(tutorial_interfaces__msg__Num__Sequence * array)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
if (array) {
tutorial_interfaces__msg__Num__Sequence__fini(array);
}
allocator.deallocate(array, allocator.state);
}
bool
tutorial_interfaces__msg__Num__Sequence__are_equal(const tutorial_interfaces__msg__Num__Sequence * lhs, const tutorial_interfaces__msg__Num__Sequence * rhs)
{
if (!lhs || !rhs) {
return false;
}
if (lhs->size != rhs->size) {
return false;
}
for (size_t i = 0; i < lhs->size; ++i) {
if (!tutorial_interfaces__msg__Num__are_equal(&(lhs->data[i]), &(rhs->data[i]))) {
return false;
}
}
return true;
}
bool
tutorial_interfaces__msg__Num__Sequence__copy(
const tutorial_interfaces__msg__Num__Sequence * input,
tutorial_interfaces__msg__Num__Sequence * output)
{
if (!input || !output) {
return false;
}
if (output->capacity < input->size) {
const size_t allocation_size =
input->size * sizeof(tutorial_interfaces__msg__Num);
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__msg__Num * data =
(tutorial_interfaces__msg__Num *)allocator.reallocate(
output->data, allocation_size, allocator.state);
if (!data) {
return false;
}
// If reallocation succeeded, memory may or may not have been moved
// to fulfill the allocation request, invalidating output->data.
output->data = data;
for (size_t i = output->capacity; i < input->size; ++i) {
if (!tutorial_interfaces__msg__Num__init(&output->data[i])) {
// If initialization of any new item fails, roll back
// all previously initialized items. Existing items
// in output are to be left unmodified.
for (; i-- > output->capacity; ) {
tutorial_interfaces__msg__Num__fini(&output->data[i]);
}
return false;
}
}
output->capacity = input->size;
}
output->size = input->size;
for (size_t i = 0; i < input->size; ++i) {
if (!tutorial_interfaces__msg__Num__copy(
&(input->data[i]), &(output->data[i])))
{
return false;
}
}
return true;
}

View File

@@ -0,0 +1,210 @@
// generated from rosidl_generator_c/resource/idl__functions.h.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/msg/num.h"
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__NUM__FUNCTIONS_H_
#define TUTORIAL_INTERFACES__MSG__DETAIL__NUM__FUNCTIONS_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdbool.h>
#include <stdlib.h>
#include "rosidl_runtime_c/action_type_support_struct.h"
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_runtime_c/service_type_support_struct.h"
#include "rosidl_runtime_c/type_description/type_description__struct.h"
#include "rosidl_runtime_c/type_description/type_source__struct.h"
#include "rosidl_runtime_c/type_hash.h"
#include "rosidl_runtime_c/visibility_control.h"
#include "tutorial_interfaces/msg/rosidl_generator_c__visibility_control.h"
#include "tutorial_interfaces/msg/detail/num__struct.h"
/// Initialize msg/Num message.
/**
* If the init function is called twice for the same message without
* calling fini inbetween previously allocated memory will be leaked.
* \param[in,out] msg The previously allocated message pointer.
* Fields without a default value will not be initialized by this function.
* You might want to call memset(msg, 0, sizeof(
* tutorial_interfaces__msg__Num
* )) before or use
* tutorial_interfaces__msg__Num__create()
* to allocate and initialize the message.
* \return true if initialization was successful, otherwise false
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__msg__Num__init(tutorial_interfaces__msg__Num * msg);
/// Finalize msg/Num message.
/**
* \param[in,out] msg The allocated message pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__msg__Num__fini(tutorial_interfaces__msg__Num * msg);
/// Create msg/Num message.
/**
* It allocates the memory for the message, sets the memory to zero, and
* calls
* tutorial_interfaces__msg__Num__init().
* \return The pointer to the initialized message if successful,
* otherwise NULL
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
tutorial_interfaces__msg__Num *
tutorial_interfaces__msg__Num__create(void);
/// Destroy msg/Num message.
/**
* It calls
* tutorial_interfaces__msg__Num__fini()
* and frees the memory of the message.
* \param[in,out] msg The allocated message pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__msg__Num__destroy(tutorial_interfaces__msg__Num * msg);
/// Check for msg/Num message equality.
/**
* \param[in] lhs The message on the left hand size of the equality operator.
* \param[in] rhs The message on the right hand size of the equality operator.
* \return true if messages are equal, otherwise false.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__msg__Num__are_equal(const tutorial_interfaces__msg__Num * lhs, const tutorial_interfaces__msg__Num * rhs);
/// Copy a msg/Num message.
/**
* This functions performs a deep copy, as opposed to the shallow copy that
* plain assignment yields.
*
* \param[in] input The source message pointer.
* \param[out] output The target message pointer, which must
* have been initialized before calling this function.
* \return true if successful, or false if either pointer is null
* or memory allocation fails.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__msg__Num__copy(
const tutorial_interfaces__msg__Num * input,
tutorial_interfaces__msg__Num * output);
/// Retrieve pointer to the hash of the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_type_hash_t *
tutorial_interfaces__msg__Num__get_type_hash(
const rosidl_message_type_support_t * type_support);
/// Retrieve pointer to the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeDescription *
tutorial_interfaces__msg__Num__get_type_description(
const rosidl_message_type_support_t * type_support);
/// Retrieve pointer to the single raw source text that defined this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeSource *
tutorial_interfaces__msg__Num__get_individual_type_description_source(
const rosidl_message_type_support_t * type_support);
/// Retrieve pointer to the recursive raw sources that defined the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeSource__Sequence *
tutorial_interfaces__msg__Num__get_type_description_sources(
const rosidl_message_type_support_t * type_support);
/// Initialize array of msg/Num messages.
/**
* It allocates the memory for the number of elements and calls
* tutorial_interfaces__msg__Num__init()
* for each element of the array.
* \param[in,out] array The allocated array pointer.
* \param[in] size The size / capacity of the array.
* \return true if initialization was successful, otherwise false
* If the array pointer is valid and the size is zero it is guaranteed
# to return true.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__msg__Num__Sequence__init(tutorial_interfaces__msg__Num__Sequence * array, size_t size);
/// Finalize array of msg/Num messages.
/**
* It calls
* tutorial_interfaces__msg__Num__fini()
* for each element of the array and frees the memory for the number of
* elements.
* \param[in,out] array The initialized array pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__msg__Num__Sequence__fini(tutorial_interfaces__msg__Num__Sequence * array);
/// Create array of msg/Num messages.
/**
* It allocates the memory for the array and calls
* tutorial_interfaces__msg__Num__Sequence__init().
* \param[in] size The size / capacity of the array.
* \return The pointer to the initialized array if successful, otherwise NULL
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
tutorial_interfaces__msg__Num__Sequence *
tutorial_interfaces__msg__Num__Sequence__create(size_t size);
/// Destroy array of msg/Num messages.
/**
* It calls
* tutorial_interfaces__msg__Num__Sequence__fini()
* on the array,
* and frees the memory of the array.
* \param[in,out] array The initialized array pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__msg__Num__Sequence__destroy(tutorial_interfaces__msg__Num__Sequence * array);
/// Check for msg/Num message array equality.
/**
* \param[in] lhs The message array on the left hand size of the equality operator.
* \param[in] rhs The message array on the right hand size of the equality operator.
* \return true if message arrays are equal in size and content, otherwise false.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__msg__Num__Sequence__are_equal(const tutorial_interfaces__msg__Num__Sequence * lhs, const tutorial_interfaces__msg__Num__Sequence * rhs);
/// Copy an array of msg/Num messages.
/**
* This functions performs a deep copy, as opposed to the shallow copy that
* plain assignment yields.
*
* \param[in] input The source array pointer.
* \param[out] output The target array pointer, which must
* have been initialized before calling this function.
* \return true if successful, or false if either pointer
* is null or memory allocation fails.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__msg__Num__Sequence__copy(
const tutorial_interfaces__msg__Num__Sequence * input,
tutorial_interfaces__msg__Num__Sequence * output);
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__NUM__FUNCTIONS_H_

View File

@@ -0,0 +1,65 @@
// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__NUM__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_
#define TUTORIAL_INTERFACES__MSG__DETAIL__NUM__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_
#include <stddef.h>
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h"
#include "tutorial_interfaces/msg/detail/num__struct.h"
#include "fastcdr/Cdr.h"
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
bool cdr_serialize_tutorial_interfaces__msg__Num(
const tutorial_interfaces__msg__Num * ros_message,
eprosima::fastcdr::Cdr & cdr);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
bool cdr_deserialize_tutorial_interfaces__msg__Num(
eprosima::fastcdr::Cdr &,
tutorial_interfaces__msg__Num * ros_message);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t get_serialized_size_tutorial_interfaces__msg__Num(
const void * untyped_ros_message,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t max_serialized_size_tutorial_interfaces__msg__Num(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
bool cdr_serialize_key_tutorial_interfaces__msg__Num(
const tutorial_interfaces__msg__Num * ros_message,
eprosima::fastcdr::Cdr & cdr);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t get_serialized_size_key_tutorial_interfaces__msg__Num(
const void * untyped_ros_message,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t max_serialized_size_key_tutorial_interfaces__msg__Num(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, tutorial_interfaces, msg, Num)();
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__NUM__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_

View File

@@ -0,0 +1,100 @@
// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__NUM__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_
#define TUTORIAL_INTERFACES__MSG__DETAIL__NUM__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_
#include <cstddef>
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h"
#include "tutorial_interfaces/msg/detail/num__struct.hpp"
#ifndef _WIN32
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
# ifdef __clang__
# pragma clang diagnostic ignored "-Wdeprecated-register"
# pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
# endif
#endif
#ifndef _WIN32
# pragma GCC diagnostic pop
#endif
#include "fastcdr/Cdr.h"
namespace tutorial_interfaces
{
namespace msg
{
namespace typesupport_fastrtps_cpp
{
bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
cdr_serialize(
const tutorial_interfaces::msg::Num & ros_message,
eprosima::fastcdr::Cdr & cdr);
bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
cdr_deserialize(
eprosima::fastcdr::Cdr & cdr,
tutorial_interfaces::msg::Num & ros_message);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
get_serialized_size(
const tutorial_interfaces::msg::Num & ros_message,
size_t current_alignment);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
max_serialized_size_Num(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
cdr_serialize_key(
const tutorial_interfaces::msg::Num & ros_message,
eprosima::fastcdr::Cdr &);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
get_serialized_size_key(
const tutorial_interfaces::msg::Num & ros_message,
size_t current_alignment);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
max_serialized_size_key_Num(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
} // namespace typesupport_fastrtps_cpp
} // namespace msg
} // namespace tutorial_interfaces
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, tutorial_interfaces, msg, Num)();
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__NUM__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_

View File

@@ -0,0 +1,26 @@
// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__NUM__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_
#define TUTORIAL_INTERFACES__MSG__DETAIL__NUM__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h"
ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tutorial_interfaces, msg, Num)();
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__NUM__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_

View File

@@ -0,0 +1,27 @@
// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__NUM__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_
#define TUTORIAL_INTERFACES__MSG__DETAIL__NUM__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_typesupport_interface/macros.h"
#include "rosidl_typesupport_introspection_cpp/visibility_control.h"
#ifdef __cplusplus
extern "C"
{
#endif
// TODO(dirk-thomas) these visibility macros should be message package specific
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, tutorial_interfaces, msg, Num)();
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__NUM__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_

View File

@@ -0,0 +1,42 @@
// generated from rosidl_generator_c/resource/idl__struct.h.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/msg/num.h"
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__NUM__STRUCT_H_
#define TUTORIAL_INTERFACES__MSG__DETAIL__NUM__STRUCT_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
// Constants defined in the message
/// Struct defined in msg/Num in the package tutorial_interfaces.
typedef struct tutorial_interfaces__msg__Num
{
int64_t num;
} tutorial_interfaces__msg__Num;
// Struct for a sequence of tutorial_interfaces__msg__Num.
typedef struct tutorial_interfaces__msg__Num__Sequence
{
tutorial_interfaces__msg__Num * data;
/// The number of valid items in data
size_t size;
/// The number of allocated items in data
size_t capacity;
} tutorial_interfaces__msg__Num__Sequence;
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__NUM__STRUCT_H_

View File

@@ -0,0 +1,134 @@
// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/msg/num.hpp"
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__NUM__STRUCT_HPP_
#define TUTORIAL_INTERFACES__MSG__DETAIL__NUM__STRUCT_HPP_
#include <algorithm>
#include <array>
#include <memory>
#include <string>
#include <vector>
#include "rosidl_runtime_cpp/bounded_vector.hpp"
#include "rosidl_runtime_cpp/message_initialization.hpp"
#ifndef _WIN32
# define DEPRECATED__tutorial_interfaces__msg__Num __attribute__((deprecated))
#else
# define DEPRECATED__tutorial_interfaces__msg__Num __declspec(deprecated)
#endif
namespace tutorial_interfaces
{
namespace msg
{
// message struct
template<class ContainerAllocator>
struct Num_
{
using Type = Num_<ContainerAllocator>;
explicit Num_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL)
{
if (rosidl_runtime_cpp::MessageInitialization::ALL == _init ||
rosidl_runtime_cpp::MessageInitialization::ZERO == _init)
{
this->num = 0ll;
}
}
explicit Num_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL)
{
(void)_alloc;
if (rosidl_runtime_cpp::MessageInitialization::ALL == _init ||
rosidl_runtime_cpp::MessageInitialization::ZERO == _init)
{
this->num = 0ll;
}
}
// field types and members
using _num_type =
int64_t;
_num_type num;
// setters for named parameter idiom
Type & set__num(
const int64_t & _arg)
{
this->num = _arg;
return *this;
}
// constant declarations
// pointer types
using RawPtr =
tutorial_interfaces::msg::Num_<ContainerAllocator> *;
using ConstRawPtr =
const tutorial_interfaces::msg::Num_<ContainerAllocator> *;
using SharedPtr =
std::shared_ptr<tutorial_interfaces::msg::Num_<ContainerAllocator>>;
using ConstSharedPtr =
std::shared_ptr<tutorial_interfaces::msg::Num_<ContainerAllocator> const>;
template<typename Deleter = std::default_delete<
tutorial_interfaces::msg::Num_<ContainerAllocator>>>
using UniquePtrWithDeleter =
std::unique_ptr<tutorial_interfaces::msg::Num_<ContainerAllocator>, Deleter>;
using UniquePtr = UniquePtrWithDeleter<>;
template<typename Deleter = std::default_delete<
tutorial_interfaces::msg::Num_<ContainerAllocator>>>
using ConstUniquePtrWithDeleter =
std::unique_ptr<tutorial_interfaces::msg::Num_<ContainerAllocator> const, Deleter>;
using ConstUniquePtr = ConstUniquePtrWithDeleter<>;
using WeakPtr =
std::weak_ptr<tutorial_interfaces::msg::Num_<ContainerAllocator>>;
using ConstWeakPtr =
std::weak_ptr<tutorial_interfaces::msg::Num_<ContainerAllocator> const>;
// pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead
// NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly
typedef DEPRECATED__tutorial_interfaces__msg__Num
std::shared_ptr<tutorial_interfaces::msg::Num_<ContainerAllocator>>
Ptr;
typedef DEPRECATED__tutorial_interfaces__msg__Num
std::shared_ptr<tutorial_interfaces::msg::Num_<ContainerAllocator> const>
ConstPtr;
// comparison operators
bool operator==(const Num_ & other) const
{
if (this->num != other.num) {
return false;
}
return true;
}
bool operator!=(const Num_ & other) const
{
return !this->operator==(other);
}
}; // struct Num_
// alias to use template instance with default allocator
using Num =
tutorial_interfaces::msg::Num_<std::allocator<void>>;
// constant definitions
} // namespace msg
} // namespace tutorial_interfaces
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__NUM__STRUCT_HPP_

View File

@@ -0,0 +1,112 @@
// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/msg/num.hpp"
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__NUM__TRAITS_HPP_
#define TUTORIAL_INTERFACES__MSG__DETAIL__NUM__TRAITS_HPP_
#include <stdint.h>
#include <sstream>
#include <string>
#include <type_traits>
#include "tutorial_interfaces/msg/detail/num__struct.hpp"
#include "rosidl_runtime_cpp/traits.hpp"
namespace tutorial_interfaces
{
namespace msg
{
inline void to_flow_style_yaml(
const Num & msg,
std::ostream & out)
{
out << "{";
// member: num
{
out << "num: ";
rosidl_generator_traits::value_to_yaml(msg.num, out);
}
out << "}";
} // NOLINT(readability/fn_size)
inline void to_block_style_yaml(
const Num & msg,
std::ostream & out, size_t indentation = 0)
{
// member: num
{
if (indentation > 0) {
out << std::string(indentation, ' ');
}
out << "num: ";
rosidl_generator_traits::value_to_yaml(msg.num, out);
out << "\n";
}
} // NOLINT(readability/fn_size)
inline std::string to_yaml(const Num & msg, bool use_flow_style = false)
{
std::ostringstream out;
if (use_flow_style) {
to_flow_style_yaml(msg, out);
} else {
to_block_style_yaml(msg, out);
}
return out.str();
}
} // namespace msg
} // namespace tutorial_interfaces
namespace rosidl_generator_traits
{
[[deprecated("use tutorial_interfaces::msg::to_block_style_yaml() instead")]]
inline void to_yaml(
const tutorial_interfaces::msg::Num & msg,
std::ostream & out, size_t indentation = 0)
{
tutorial_interfaces::msg::to_block_style_yaml(msg, out, indentation);
}
[[deprecated("use tutorial_interfaces::msg::to_yaml() instead")]]
inline std::string to_yaml(const tutorial_interfaces::msg::Num & msg)
{
return tutorial_interfaces::msg::to_yaml(msg);
}
template<>
inline const char * data_type<tutorial_interfaces::msg::Num>()
{
return "tutorial_interfaces::msg::Num";
}
template<>
inline const char * name<tutorial_interfaces::msg::Num>()
{
return "tutorial_interfaces/msg/Num";
}
template<>
struct has_fixed_size<tutorial_interfaces::msg::Num>
: std::integral_constant<bool, true> {};
template<>
struct has_bounded_size<tutorial_interfaces::msg::Num>
: std::integral_constant<bool, true> {};
template<>
struct is_message<tutorial_interfaces::msg::Num>
: std::true_type {};
} // namespace rosidl_generator_traits
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__NUM__TRAITS_HPP_

View File

@@ -0,0 +1,19 @@
// generated from rosidl_generator_c/resource/idl__type_support.c.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
#include <string.h>
#include "tutorial_interfaces/msg/detail/num__struct.h"
#include "tutorial_interfaces/msg/detail/num__type_support.h"
#include "tutorial_interfaces/msg/detail/num__functions.h"
#include "rosidl_typesupport_interface/macros.h"
#ifdef __cplusplus
extern "C"
{
#endif
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,115 @@
// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
#include "array"
#include "cstddef"
#include "string"
#include "vector"
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_typesupport_cpp/message_type_support.hpp"
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/detail/num__functions.h"
#include "tutorial_interfaces/msg/detail/num__struct.hpp"
#include "rosidl_typesupport_introspection_cpp/field_types.hpp"
#include "rosidl_typesupport_introspection_cpp/identifier.hpp"
#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp"
#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp"
#include "rosidl_typesupport_introspection_cpp/visibility_control.h"
namespace tutorial_interfaces
{
namespace msg
{
namespace rosidl_typesupport_introspection_cpp
{
void Num_init_function(
void * message_memory, rosidl_runtime_cpp::MessageInitialization _init)
{
new (message_memory) tutorial_interfaces::msg::Num(_init);
}
void Num_fini_function(void * message_memory)
{
auto typed_message = static_cast<tutorial_interfaces::msg::Num *>(message_memory);
typed_message->~Num();
}
static const ::rosidl_typesupport_introspection_cpp::MessageMember Num_message_member_array[1] = {
{
"num", // name
::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT64, // type
0, // upper bound of string
nullptr, // members of sub message
false, // is key
false, // is array
0, // array size
false, // is upper bound
offsetof(tutorial_interfaces::msg::Num, num), // bytes offset in struct
nullptr, // default value
nullptr, // size() function pointer
nullptr, // get_const(index) function pointer
nullptr, // get(index) function pointer
nullptr, // fetch(index, &value) function pointer
nullptr, // assign(index, value) function pointer
nullptr // resize(index) function pointer
}
};
static const ::rosidl_typesupport_introspection_cpp::MessageMembers Num_message_members = {
"tutorial_interfaces::msg", // message namespace
"Num", // message name
1, // number of fields
sizeof(tutorial_interfaces::msg::Num),
false, // has_any_key_member_
Num_message_member_array, // message members
Num_init_function, // function to initialize message memory (memory has to be allocated)
Num_fini_function // function to terminate message instance (will not free memory)
};
static const rosidl_message_type_support_t Num_message_type_support_handle = {
::rosidl_typesupport_introspection_cpp::typesupport_identifier,
&Num_message_members,
get_message_typesupport_handle_function,
&tutorial_interfaces__msg__Num__get_type_hash,
&tutorial_interfaces__msg__Num__get_type_description,
&tutorial_interfaces__msg__Num__get_type_description_sources,
};
} // namespace rosidl_typesupport_introspection_cpp
} // namespace msg
} // namespace tutorial_interfaces
namespace rosidl_typesupport_introspection_cpp
{
template<>
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_message_type_support_t *
get_message_type_support_handle<tutorial_interfaces::msg::Num>()
{
return &::tutorial_interfaces::msg::rosidl_typesupport_introspection_cpp::Num_message_type_support_handle;
}
} // namespace rosidl_typesupport_introspection_cpp
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, tutorial_interfaces, msg, Num)() {
return &::tutorial_interfaces::msg::rosidl_typesupport_introspection_cpp::Num_message_type_support_handle;
}
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,36 @@
// generated from rosidl_generator_c/resource/idl__type_support.h.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/msg/num.h"
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__NUM__TYPE_SUPPORT_H_
#define TUTORIAL_INTERFACES__MSG__DETAIL__NUM__TYPE_SUPPORT_H_
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/rosidl_generator_c__visibility_control.h"
#ifdef __cplusplus
extern "C"
{
#endif
#include "rosidl_runtime_c/message_type_support_struct.h"
// Forward declare the get type support functions for this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_c,
tutorial_interfaces,
msg,
Num
)(void);
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__NUM__TYPE_SUPPORT_H_

View File

@@ -0,0 +1,31 @@
// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__NUM__TYPE_SUPPORT_HPP_
#define TUTORIAL_INTERFACES__MSG__DETAIL__NUM__TYPE_SUPPORT_HPP_
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp"
#include "rosidl_typesupport_cpp/message_type_support.hpp"
#ifdef __cplusplus
extern "C"
{
#endif
// Forward declare the get type support functions for this type.
ROSIDL_GENERATOR_CPP_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_cpp,
tutorial_interfaces,
msg,
Num
)();
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__NUM__TYPE_SUPPORT_HPP_

View File

@@ -0,0 +1,75 @@
// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/msg/sphere.hpp"
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__BUILDER_HPP_
#define TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__BUILDER_HPP_
#include <algorithm>
#include <utility>
#include "tutorial_interfaces/msg/detail/sphere__struct.hpp"
#include "rosidl_runtime_cpp/message_initialization.hpp"
namespace tutorial_interfaces
{
namespace msg
{
namespace builder
{
class Init_Sphere_radius
{
public:
explicit Init_Sphere_radius(::tutorial_interfaces::msg::Sphere & msg)
: msg_(msg)
{}
::tutorial_interfaces::msg::Sphere radius(::tutorial_interfaces::msg::Sphere::_radius_type arg)
{
msg_.radius = std::move(arg);
return std::move(msg_);
}
private:
::tutorial_interfaces::msg::Sphere msg_;
};
class Init_Sphere_center
{
public:
Init_Sphere_center()
: msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP)
{}
Init_Sphere_radius center(::tutorial_interfaces::msg::Sphere::_center_type arg)
{
msg_.center = std::move(arg);
return Init_Sphere_radius(msg_);
}
private:
::tutorial_interfaces::msg::Sphere msg_;
};
} // namespace builder
} // namespace msg
template<typename MessageType>
auto build();
template<>
inline
auto build<::tutorial_interfaces::msg::Sphere>()
{
return tutorial_interfaces::msg::builder::Init_Sphere_center();
}
} // namespace tutorial_interfaces
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__BUILDER_HPP_

View File

@@ -0,0 +1,131 @@
// generated from rosidl_generator_c/resource/idl__description.c.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
#include "tutorial_interfaces/msg/detail/sphere__functions.h"
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_type_hash_t *
tutorial_interfaces__msg__Sphere__get_type_hash(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static rosidl_type_hash_t hash = {1, {
0xdf, 0x3d, 0x7d, 0xcc, 0xe5, 0x29, 0xc7, 0xe9,
0x35, 0x61, 0x0c, 0xfd, 0x7d, 0x44, 0xe5, 0xfd,
0x03, 0xce, 0xdd, 0x44, 0x16, 0x3f, 0xd7, 0xe0,
0x1b, 0x7f, 0x62, 0xd5, 0xcc, 0x21, 0xcd, 0x1b,
}};
return &hash;
}
#include <assert.h>
#include <string.h>
// Include directives for referenced types
#include "geometry_msgs/msg/detail/point__functions.h"
// Hashes for external referenced types
#ifndef NDEBUG
static const rosidl_type_hash_t geometry_msgs__msg__Point__EXPECTED_HASH = {1, {
0x69, 0x63, 0x08, 0x48, 0x42, 0xa9, 0xb0, 0x44,
0x94, 0xd6, 0xb2, 0x94, 0x1d, 0x11, 0x44, 0x47,
0x08, 0xd8, 0x92, 0xda, 0x2f, 0x4b, 0x09, 0x84,
0x3b, 0x9c, 0x43, 0xf4, 0x2a, 0x7f, 0x68, 0x81,
}};
#endif
static char tutorial_interfaces__msg__Sphere__TYPE_NAME[] = "tutorial_interfaces/msg/Sphere";
static char geometry_msgs__msg__Point__TYPE_NAME[] = "geometry_msgs/msg/Point";
// Define type names, field names, and default values
static char tutorial_interfaces__msg__Sphere__FIELD_NAME__center[] = "center";
static char tutorial_interfaces__msg__Sphere__FIELD_NAME__radius[] = "radius";
static rosidl_runtime_c__type_description__Field tutorial_interfaces__msg__Sphere__FIELDS[] = {
{
{tutorial_interfaces__msg__Sphere__FIELD_NAME__center, 6, 6},
{
rosidl_runtime_c__type_description__FieldType__FIELD_TYPE_NESTED_TYPE,
0,
0,
{geometry_msgs__msg__Point__TYPE_NAME, 23, 23},
},
{NULL, 0, 0},
},
{
{tutorial_interfaces__msg__Sphere__FIELD_NAME__radius, 6, 6},
{
rosidl_runtime_c__type_description__FieldType__FIELD_TYPE_DOUBLE,
0,
0,
{NULL, 0, 0},
},
{NULL, 0, 0},
},
};
static rosidl_runtime_c__type_description__IndividualTypeDescription tutorial_interfaces__msg__Sphere__REFERENCED_TYPE_DESCRIPTIONS[] = {
{
{geometry_msgs__msg__Point__TYPE_NAME, 23, 23},
{NULL, 0, 0},
},
};
const rosidl_runtime_c__type_description__TypeDescription *
tutorial_interfaces__msg__Sphere__get_type_description(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static bool constructed = false;
static const rosidl_runtime_c__type_description__TypeDescription description = {
{
{tutorial_interfaces__msg__Sphere__TYPE_NAME, 30, 30},
{tutorial_interfaces__msg__Sphere__FIELDS, 2, 2},
},
{tutorial_interfaces__msg__Sphere__REFERENCED_TYPE_DESCRIPTIONS, 1, 1},
};
if (!constructed) {
assert(0 == memcmp(&geometry_msgs__msg__Point__EXPECTED_HASH, geometry_msgs__msg__Point__get_type_hash(NULL), sizeof(rosidl_type_hash_t)));
description.referenced_type_descriptions.data[0].fields = geometry_msgs__msg__Point__get_type_description(NULL)->type_description.fields;
constructed = true;
}
return &description;
}
static char toplevel_type_raw_source[] =
"geometry_msgs/Point center\n"
"float64 radius";
static char msg_encoding[] = "msg";
// Define all individual source functions
const rosidl_runtime_c__type_description__TypeSource *
tutorial_interfaces__msg__Sphere__get_individual_type_description_source(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static const rosidl_runtime_c__type_description__TypeSource source = {
{tutorial_interfaces__msg__Sphere__TYPE_NAME, 30, 30},
{msg_encoding, 3, 3},
{toplevel_type_raw_source, 41, 41},
};
return &source;
}
const rosidl_runtime_c__type_description__TypeSource__Sequence *
tutorial_interfaces__msg__Sphere__get_type_description_sources(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static rosidl_runtime_c__type_description__TypeSource sources[2];
static const rosidl_runtime_c__type_description__TypeSource__Sequence source_sequence = {sources, 2, 2};
static bool constructed = false;
if (!constructed) {
sources[0] = *tutorial_interfaces__msg__Sphere__get_individual_type_description_source(NULL),
sources[1] = *geometry_msgs__msg__Point__get_individual_type_description_source(NULL);
constructed = true;
}
return &source_sequence;
}

View File

@@ -0,0 +1,259 @@
// generated from rosidl_generator_c/resource/idl__functions.c.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
#include "tutorial_interfaces/msg/detail/sphere__functions.h"
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "rcutils/allocator.h"
// Include directives for member types
// Member `center`
#include "geometry_msgs/msg/detail/point__functions.h"
bool
tutorial_interfaces__msg__Sphere__init(tutorial_interfaces__msg__Sphere * msg)
{
if (!msg) {
return false;
}
// center
if (!geometry_msgs__msg__Point__init(&msg->center)) {
tutorial_interfaces__msg__Sphere__fini(msg);
return false;
}
// radius
return true;
}
void
tutorial_interfaces__msg__Sphere__fini(tutorial_interfaces__msg__Sphere * msg)
{
if (!msg) {
return;
}
// center
geometry_msgs__msg__Point__fini(&msg->center);
// radius
}
bool
tutorial_interfaces__msg__Sphere__are_equal(const tutorial_interfaces__msg__Sphere * lhs, const tutorial_interfaces__msg__Sphere * rhs)
{
if (!lhs || !rhs) {
return false;
}
// center
if (!geometry_msgs__msg__Point__are_equal(
&(lhs->center), &(rhs->center)))
{
return false;
}
// radius
if (lhs->radius != rhs->radius) {
return false;
}
return true;
}
bool
tutorial_interfaces__msg__Sphere__copy(
const tutorial_interfaces__msg__Sphere * input,
tutorial_interfaces__msg__Sphere * output)
{
if (!input || !output) {
return false;
}
// center
if (!geometry_msgs__msg__Point__copy(
&(input->center), &(output->center)))
{
return false;
}
// radius
output->radius = input->radius;
return true;
}
tutorial_interfaces__msg__Sphere *
tutorial_interfaces__msg__Sphere__create(void)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__msg__Sphere * msg = (tutorial_interfaces__msg__Sphere *)allocator.allocate(sizeof(tutorial_interfaces__msg__Sphere), allocator.state);
if (!msg) {
return NULL;
}
memset(msg, 0, sizeof(tutorial_interfaces__msg__Sphere));
bool success = tutorial_interfaces__msg__Sphere__init(msg);
if (!success) {
allocator.deallocate(msg, allocator.state);
return NULL;
}
return msg;
}
void
tutorial_interfaces__msg__Sphere__destroy(tutorial_interfaces__msg__Sphere * msg)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
if (msg) {
tutorial_interfaces__msg__Sphere__fini(msg);
}
allocator.deallocate(msg, allocator.state);
}
bool
tutorial_interfaces__msg__Sphere__Sequence__init(tutorial_interfaces__msg__Sphere__Sequence * array, size_t size)
{
if (!array) {
return false;
}
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__msg__Sphere * data = NULL;
if (size) {
data = (tutorial_interfaces__msg__Sphere *)allocator.zero_allocate(size, sizeof(tutorial_interfaces__msg__Sphere), allocator.state);
if (!data) {
return false;
}
// initialize all array elements
size_t i;
for (i = 0; i < size; ++i) {
bool success = tutorial_interfaces__msg__Sphere__init(&data[i]);
if (!success) {
break;
}
}
if (i < size) {
// if initialization failed finalize the already initialized array elements
for (; i > 0; --i) {
tutorial_interfaces__msg__Sphere__fini(&data[i - 1]);
}
allocator.deallocate(data, allocator.state);
return false;
}
}
array->data = data;
array->size = size;
array->capacity = size;
return true;
}
void
tutorial_interfaces__msg__Sphere__Sequence__fini(tutorial_interfaces__msg__Sphere__Sequence * array)
{
if (!array) {
return;
}
rcutils_allocator_t allocator = rcutils_get_default_allocator();
if (array->data) {
// ensure that data and capacity values are consistent
assert(array->capacity > 0);
// finalize all array elements
for (size_t i = 0; i < array->capacity; ++i) {
tutorial_interfaces__msg__Sphere__fini(&array->data[i]);
}
allocator.deallocate(array->data, allocator.state);
array->data = NULL;
array->size = 0;
array->capacity = 0;
} else {
// ensure that data, size, and capacity values are consistent
assert(0 == array->size);
assert(0 == array->capacity);
}
}
tutorial_interfaces__msg__Sphere__Sequence *
tutorial_interfaces__msg__Sphere__Sequence__create(size_t size)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__msg__Sphere__Sequence * array = (tutorial_interfaces__msg__Sphere__Sequence *)allocator.allocate(sizeof(tutorial_interfaces__msg__Sphere__Sequence), allocator.state);
if (!array) {
return NULL;
}
bool success = tutorial_interfaces__msg__Sphere__Sequence__init(array, size);
if (!success) {
allocator.deallocate(array, allocator.state);
return NULL;
}
return array;
}
void
tutorial_interfaces__msg__Sphere__Sequence__destroy(tutorial_interfaces__msg__Sphere__Sequence * array)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
if (array) {
tutorial_interfaces__msg__Sphere__Sequence__fini(array);
}
allocator.deallocate(array, allocator.state);
}
bool
tutorial_interfaces__msg__Sphere__Sequence__are_equal(const tutorial_interfaces__msg__Sphere__Sequence * lhs, const tutorial_interfaces__msg__Sphere__Sequence * rhs)
{
if (!lhs || !rhs) {
return false;
}
if (lhs->size != rhs->size) {
return false;
}
for (size_t i = 0; i < lhs->size; ++i) {
if (!tutorial_interfaces__msg__Sphere__are_equal(&(lhs->data[i]), &(rhs->data[i]))) {
return false;
}
}
return true;
}
bool
tutorial_interfaces__msg__Sphere__Sequence__copy(
const tutorial_interfaces__msg__Sphere__Sequence * input,
tutorial_interfaces__msg__Sphere__Sequence * output)
{
if (!input || !output) {
return false;
}
if (output->capacity < input->size) {
const size_t allocation_size =
input->size * sizeof(tutorial_interfaces__msg__Sphere);
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__msg__Sphere * data =
(tutorial_interfaces__msg__Sphere *)allocator.reallocate(
output->data, allocation_size, allocator.state);
if (!data) {
return false;
}
// If reallocation succeeded, memory may or may not have been moved
// to fulfill the allocation request, invalidating output->data.
output->data = data;
for (size_t i = output->capacity; i < input->size; ++i) {
if (!tutorial_interfaces__msg__Sphere__init(&output->data[i])) {
// If initialization of any new item fails, roll back
// all previously initialized items. Existing items
// in output are to be left unmodified.
for (; i-- > output->capacity; ) {
tutorial_interfaces__msg__Sphere__fini(&output->data[i]);
}
return false;
}
}
output->capacity = input->size;
}
output->size = input->size;
for (size_t i = 0; i < input->size; ++i) {
if (!tutorial_interfaces__msg__Sphere__copy(
&(input->data[i]), &(output->data[i])))
{
return false;
}
}
return true;
}

View File

@@ -0,0 +1,210 @@
// generated from rosidl_generator_c/resource/idl__functions.h.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/msg/sphere.h"
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__FUNCTIONS_H_
#define TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__FUNCTIONS_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdbool.h>
#include <stdlib.h>
#include "rosidl_runtime_c/action_type_support_struct.h"
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_runtime_c/service_type_support_struct.h"
#include "rosidl_runtime_c/type_description/type_description__struct.h"
#include "rosidl_runtime_c/type_description/type_source__struct.h"
#include "rosidl_runtime_c/type_hash.h"
#include "rosidl_runtime_c/visibility_control.h"
#include "tutorial_interfaces/msg/rosidl_generator_c__visibility_control.h"
#include "tutorial_interfaces/msg/detail/sphere__struct.h"
/// Initialize msg/Sphere message.
/**
* If the init function is called twice for the same message without
* calling fini inbetween previously allocated memory will be leaked.
* \param[in,out] msg The previously allocated message pointer.
* Fields without a default value will not be initialized by this function.
* You might want to call memset(msg, 0, sizeof(
* tutorial_interfaces__msg__Sphere
* )) before or use
* tutorial_interfaces__msg__Sphere__create()
* to allocate and initialize the message.
* \return true if initialization was successful, otherwise false
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__msg__Sphere__init(tutorial_interfaces__msg__Sphere * msg);
/// Finalize msg/Sphere message.
/**
* \param[in,out] msg The allocated message pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__msg__Sphere__fini(tutorial_interfaces__msg__Sphere * msg);
/// Create msg/Sphere message.
/**
* It allocates the memory for the message, sets the memory to zero, and
* calls
* tutorial_interfaces__msg__Sphere__init().
* \return The pointer to the initialized message if successful,
* otherwise NULL
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
tutorial_interfaces__msg__Sphere *
tutorial_interfaces__msg__Sphere__create(void);
/// Destroy msg/Sphere message.
/**
* It calls
* tutorial_interfaces__msg__Sphere__fini()
* and frees the memory of the message.
* \param[in,out] msg The allocated message pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__msg__Sphere__destroy(tutorial_interfaces__msg__Sphere * msg);
/// Check for msg/Sphere message equality.
/**
* \param[in] lhs The message on the left hand size of the equality operator.
* \param[in] rhs The message on the right hand size of the equality operator.
* \return true if messages are equal, otherwise false.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__msg__Sphere__are_equal(const tutorial_interfaces__msg__Sphere * lhs, const tutorial_interfaces__msg__Sphere * rhs);
/// Copy a msg/Sphere message.
/**
* This functions performs a deep copy, as opposed to the shallow copy that
* plain assignment yields.
*
* \param[in] input The source message pointer.
* \param[out] output The target message pointer, which must
* have been initialized before calling this function.
* \return true if successful, or false if either pointer is null
* or memory allocation fails.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__msg__Sphere__copy(
const tutorial_interfaces__msg__Sphere * input,
tutorial_interfaces__msg__Sphere * output);
/// Retrieve pointer to the hash of the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_type_hash_t *
tutorial_interfaces__msg__Sphere__get_type_hash(
const rosidl_message_type_support_t * type_support);
/// Retrieve pointer to the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeDescription *
tutorial_interfaces__msg__Sphere__get_type_description(
const rosidl_message_type_support_t * type_support);
/// Retrieve pointer to the single raw source text that defined this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeSource *
tutorial_interfaces__msg__Sphere__get_individual_type_description_source(
const rosidl_message_type_support_t * type_support);
/// Retrieve pointer to the recursive raw sources that defined the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeSource__Sequence *
tutorial_interfaces__msg__Sphere__get_type_description_sources(
const rosidl_message_type_support_t * type_support);
/// Initialize array of msg/Sphere messages.
/**
* It allocates the memory for the number of elements and calls
* tutorial_interfaces__msg__Sphere__init()
* for each element of the array.
* \param[in,out] array The allocated array pointer.
* \param[in] size The size / capacity of the array.
* \return true if initialization was successful, otherwise false
* If the array pointer is valid and the size is zero it is guaranteed
# to return true.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__msg__Sphere__Sequence__init(tutorial_interfaces__msg__Sphere__Sequence * array, size_t size);
/// Finalize array of msg/Sphere messages.
/**
* It calls
* tutorial_interfaces__msg__Sphere__fini()
* for each element of the array and frees the memory for the number of
* elements.
* \param[in,out] array The initialized array pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__msg__Sphere__Sequence__fini(tutorial_interfaces__msg__Sphere__Sequence * array);
/// Create array of msg/Sphere messages.
/**
* It allocates the memory for the array and calls
* tutorial_interfaces__msg__Sphere__Sequence__init().
* \param[in] size The size / capacity of the array.
* \return The pointer to the initialized array if successful, otherwise NULL
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
tutorial_interfaces__msg__Sphere__Sequence *
tutorial_interfaces__msg__Sphere__Sequence__create(size_t size);
/// Destroy array of msg/Sphere messages.
/**
* It calls
* tutorial_interfaces__msg__Sphere__Sequence__fini()
* on the array,
* and frees the memory of the array.
* \param[in,out] array The initialized array pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__msg__Sphere__Sequence__destroy(tutorial_interfaces__msg__Sphere__Sequence * array);
/// Check for msg/Sphere message array equality.
/**
* \param[in] lhs The message array on the left hand size of the equality operator.
* \param[in] rhs The message array on the right hand size of the equality operator.
* \return true if message arrays are equal in size and content, otherwise false.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__msg__Sphere__Sequence__are_equal(const tutorial_interfaces__msg__Sphere__Sequence * lhs, const tutorial_interfaces__msg__Sphere__Sequence * rhs);
/// Copy an array of msg/Sphere messages.
/**
* This functions performs a deep copy, as opposed to the shallow copy that
* plain assignment yields.
*
* \param[in] input The source array pointer.
* \param[out] output The target array pointer, which must
* have been initialized before calling this function.
* \return true if successful, or false if either pointer
* is null or memory allocation fails.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__msg__Sphere__Sequence__copy(
const tutorial_interfaces__msg__Sphere__Sequence * input,
tutorial_interfaces__msg__Sphere__Sequence * output);
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__FUNCTIONS_H_

View File

@@ -0,0 +1,65 @@
// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_
#define TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_
#include <stddef.h>
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h"
#include "tutorial_interfaces/msg/detail/sphere__struct.h"
#include "fastcdr/Cdr.h"
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
bool cdr_serialize_tutorial_interfaces__msg__Sphere(
const tutorial_interfaces__msg__Sphere * ros_message,
eprosima::fastcdr::Cdr & cdr);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
bool cdr_deserialize_tutorial_interfaces__msg__Sphere(
eprosima::fastcdr::Cdr &,
tutorial_interfaces__msg__Sphere * ros_message);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t get_serialized_size_tutorial_interfaces__msg__Sphere(
const void * untyped_ros_message,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t max_serialized_size_tutorial_interfaces__msg__Sphere(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
bool cdr_serialize_key_tutorial_interfaces__msg__Sphere(
const tutorial_interfaces__msg__Sphere * ros_message,
eprosima::fastcdr::Cdr & cdr);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t get_serialized_size_key_tutorial_interfaces__msg__Sphere(
const void * untyped_ros_message,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t max_serialized_size_key_tutorial_interfaces__msg__Sphere(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, tutorial_interfaces, msg, Sphere)();
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_

View File

@@ -0,0 +1,100 @@
// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_
#define TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_
#include <cstddef>
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h"
#include "tutorial_interfaces/msg/detail/sphere__struct.hpp"
#ifndef _WIN32
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
# ifdef __clang__
# pragma clang diagnostic ignored "-Wdeprecated-register"
# pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
# endif
#endif
#ifndef _WIN32
# pragma GCC diagnostic pop
#endif
#include "fastcdr/Cdr.h"
namespace tutorial_interfaces
{
namespace msg
{
namespace typesupport_fastrtps_cpp
{
bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
cdr_serialize(
const tutorial_interfaces::msg::Sphere & ros_message,
eprosima::fastcdr::Cdr & cdr);
bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
cdr_deserialize(
eprosima::fastcdr::Cdr & cdr,
tutorial_interfaces::msg::Sphere & ros_message);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
get_serialized_size(
const tutorial_interfaces::msg::Sphere & ros_message,
size_t current_alignment);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
max_serialized_size_Sphere(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
cdr_serialize_key(
const tutorial_interfaces::msg::Sphere & ros_message,
eprosima::fastcdr::Cdr &);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
get_serialized_size_key(
const tutorial_interfaces::msg::Sphere & ros_message,
size_t current_alignment);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
max_serialized_size_key_Sphere(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
} // namespace typesupport_fastrtps_cpp
} // namespace msg
} // namespace tutorial_interfaces
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, tutorial_interfaces, msg, Sphere)();
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_

View File

@@ -0,0 +1,26 @@
// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_
#define TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h"
ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tutorial_interfaces, msg, Sphere)();
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_

View File

@@ -0,0 +1,27 @@
// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_
#define TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_typesupport_interface/macros.h"
#include "rosidl_typesupport_introspection_cpp/visibility_control.h"
#ifdef __cplusplus
extern "C"
{
#endif
// TODO(dirk-thomas) these visibility macros should be message package specific
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, tutorial_interfaces, msg, Sphere)();
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_

View File

@@ -0,0 +1,47 @@
// generated from rosidl_generator_c/resource/idl__struct.h.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/msg/sphere.h"
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__STRUCT_H_
#define TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__STRUCT_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
// Constants defined in the message
// Include directives for member types
// Member 'center'
#include "geometry_msgs/msg/detail/point__struct.h"
/// Struct defined in msg/Sphere in the package tutorial_interfaces.
typedef struct tutorial_interfaces__msg__Sphere
{
geometry_msgs__msg__Point center;
double radius;
} tutorial_interfaces__msg__Sphere;
// Struct for a sequence of tutorial_interfaces__msg__Sphere.
typedef struct tutorial_interfaces__msg__Sphere__Sequence
{
tutorial_interfaces__msg__Sphere * data;
/// The number of valid items in data
size_t size;
/// The number of allocated items in data
size_t capacity;
} tutorial_interfaces__msg__Sphere__Sequence;
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__STRUCT_H_

View File

@@ -0,0 +1,151 @@
// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/msg/sphere.hpp"
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__STRUCT_HPP_
#define TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__STRUCT_HPP_
#include <algorithm>
#include <array>
#include <memory>
#include <string>
#include <vector>
#include "rosidl_runtime_cpp/bounded_vector.hpp"
#include "rosidl_runtime_cpp/message_initialization.hpp"
// Include directives for member types
// Member 'center'
#include "geometry_msgs/msg/detail/point__struct.hpp"
#ifndef _WIN32
# define DEPRECATED__tutorial_interfaces__msg__Sphere __attribute__((deprecated))
#else
# define DEPRECATED__tutorial_interfaces__msg__Sphere __declspec(deprecated)
#endif
namespace tutorial_interfaces
{
namespace msg
{
// message struct
template<class ContainerAllocator>
struct Sphere_
{
using Type = Sphere_<ContainerAllocator>;
explicit Sphere_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL)
: center(_init)
{
if (rosidl_runtime_cpp::MessageInitialization::ALL == _init ||
rosidl_runtime_cpp::MessageInitialization::ZERO == _init)
{
this->radius = 0.0;
}
}
explicit Sphere_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL)
: center(_alloc, _init)
{
if (rosidl_runtime_cpp::MessageInitialization::ALL == _init ||
rosidl_runtime_cpp::MessageInitialization::ZERO == _init)
{
this->radius = 0.0;
}
}
// field types and members
using _center_type =
geometry_msgs::msg::Point_<ContainerAllocator>;
_center_type center;
using _radius_type =
double;
_radius_type radius;
// setters for named parameter idiom
Type & set__center(
const geometry_msgs::msg::Point_<ContainerAllocator> & _arg)
{
this->center = _arg;
return *this;
}
Type & set__radius(
const double & _arg)
{
this->radius = _arg;
return *this;
}
// constant declarations
// pointer types
using RawPtr =
tutorial_interfaces::msg::Sphere_<ContainerAllocator> *;
using ConstRawPtr =
const tutorial_interfaces::msg::Sphere_<ContainerAllocator> *;
using SharedPtr =
std::shared_ptr<tutorial_interfaces::msg::Sphere_<ContainerAllocator>>;
using ConstSharedPtr =
std::shared_ptr<tutorial_interfaces::msg::Sphere_<ContainerAllocator> const>;
template<typename Deleter = std::default_delete<
tutorial_interfaces::msg::Sphere_<ContainerAllocator>>>
using UniquePtrWithDeleter =
std::unique_ptr<tutorial_interfaces::msg::Sphere_<ContainerAllocator>, Deleter>;
using UniquePtr = UniquePtrWithDeleter<>;
template<typename Deleter = std::default_delete<
tutorial_interfaces::msg::Sphere_<ContainerAllocator>>>
using ConstUniquePtrWithDeleter =
std::unique_ptr<tutorial_interfaces::msg::Sphere_<ContainerAllocator> const, Deleter>;
using ConstUniquePtr = ConstUniquePtrWithDeleter<>;
using WeakPtr =
std::weak_ptr<tutorial_interfaces::msg::Sphere_<ContainerAllocator>>;
using ConstWeakPtr =
std::weak_ptr<tutorial_interfaces::msg::Sphere_<ContainerAllocator> const>;
// pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead
// NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly
typedef DEPRECATED__tutorial_interfaces__msg__Sphere
std::shared_ptr<tutorial_interfaces::msg::Sphere_<ContainerAllocator>>
Ptr;
typedef DEPRECATED__tutorial_interfaces__msg__Sphere
std::shared_ptr<tutorial_interfaces::msg::Sphere_<ContainerAllocator> const>
ConstPtr;
// comparison operators
bool operator==(const Sphere_ & other) const
{
if (this->center != other.center) {
return false;
}
if (this->radius != other.radius) {
return false;
}
return true;
}
bool operator!=(const Sphere_ & other) const
{
return !this->operator==(other);
}
}; // struct Sphere_
// alias to use template instance with default allocator
using Sphere =
tutorial_interfaces::msg::Sphere_<std::allocator<void>>;
// constant definitions
} // namespace msg
} // namespace tutorial_interfaces
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__STRUCT_HPP_

View File

@@ -0,0 +1,132 @@
// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/msg/sphere.hpp"
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__TRAITS_HPP_
#define TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__TRAITS_HPP_
#include <stdint.h>
#include <sstream>
#include <string>
#include <type_traits>
#include "tutorial_interfaces/msg/detail/sphere__struct.hpp"
#include "rosidl_runtime_cpp/traits.hpp"
// Include directives for member types
// Member 'center'
#include "geometry_msgs/msg/detail/point__traits.hpp"
namespace tutorial_interfaces
{
namespace msg
{
inline void to_flow_style_yaml(
const Sphere & msg,
std::ostream & out)
{
out << "{";
// member: center
{
out << "center: ";
to_flow_style_yaml(msg.center, out);
out << ", ";
}
// member: radius
{
out << "radius: ";
rosidl_generator_traits::value_to_yaml(msg.radius, out);
}
out << "}";
} // NOLINT(readability/fn_size)
inline void to_block_style_yaml(
const Sphere & msg,
std::ostream & out, size_t indentation = 0)
{
// member: center
{
if (indentation > 0) {
out << std::string(indentation, ' ');
}
out << "center:\n";
to_block_style_yaml(msg.center, out, indentation + 2);
}
// member: radius
{
if (indentation > 0) {
out << std::string(indentation, ' ');
}
out << "radius: ";
rosidl_generator_traits::value_to_yaml(msg.radius, out);
out << "\n";
}
} // NOLINT(readability/fn_size)
inline std::string to_yaml(const Sphere & msg, bool use_flow_style = false)
{
std::ostringstream out;
if (use_flow_style) {
to_flow_style_yaml(msg, out);
} else {
to_block_style_yaml(msg, out);
}
return out.str();
}
} // namespace msg
} // namespace tutorial_interfaces
namespace rosidl_generator_traits
{
[[deprecated("use tutorial_interfaces::msg::to_block_style_yaml() instead")]]
inline void to_yaml(
const tutorial_interfaces::msg::Sphere & msg,
std::ostream & out, size_t indentation = 0)
{
tutorial_interfaces::msg::to_block_style_yaml(msg, out, indentation);
}
[[deprecated("use tutorial_interfaces::msg::to_yaml() instead")]]
inline std::string to_yaml(const tutorial_interfaces::msg::Sphere & msg)
{
return tutorial_interfaces::msg::to_yaml(msg);
}
template<>
inline const char * data_type<tutorial_interfaces::msg::Sphere>()
{
return "tutorial_interfaces::msg::Sphere";
}
template<>
inline const char * name<tutorial_interfaces::msg::Sphere>()
{
return "tutorial_interfaces/msg/Sphere";
}
template<>
struct has_fixed_size<tutorial_interfaces::msg::Sphere>
: std::integral_constant<bool, has_fixed_size<geometry_msgs::msg::Point>::value> {};
template<>
struct has_bounded_size<tutorial_interfaces::msg::Sphere>
: std::integral_constant<bool, has_bounded_size<geometry_msgs::msg::Point>::value> {};
template<>
struct is_message<tutorial_interfaces::msg::Sphere>
: std::true_type {};
} // namespace rosidl_generator_traits
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__TRAITS_HPP_

View File

@@ -0,0 +1,19 @@
// generated from rosidl_generator_c/resource/idl__type_support.c.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
#include <string.h>
#include "tutorial_interfaces/msg/detail/sphere__functions.h"
#include "tutorial_interfaces/msg/detail/sphere__type_support.h"
#include "tutorial_interfaces/msg/detail/sphere__struct.h"
#include "rosidl_typesupport_interface/macros.h"
#ifdef __cplusplus
extern "C"
{
#endif
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,133 @@
// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
#include "array"
#include "cstddef"
#include "string"
#include "vector"
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_typesupport_cpp/message_type_support.hpp"
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/detail/sphere__functions.h"
#include "tutorial_interfaces/msg/detail/sphere__struct.hpp"
#include "rosidl_typesupport_introspection_cpp/field_types.hpp"
#include "rosidl_typesupport_introspection_cpp/identifier.hpp"
#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp"
#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp"
#include "rosidl_typesupport_introspection_cpp/visibility_control.h"
namespace tutorial_interfaces
{
namespace msg
{
namespace rosidl_typesupport_introspection_cpp
{
void Sphere_init_function(
void * message_memory, rosidl_runtime_cpp::MessageInitialization _init)
{
new (message_memory) tutorial_interfaces::msg::Sphere(_init);
}
void Sphere_fini_function(void * message_memory)
{
auto typed_message = static_cast<tutorial_interfaces::msg::Sphere *>(message_memory);
typed_message->~Sphere();
}
static const ::rosidl_typesupport_introspection_cpp::MessageMember Sphere_message_member_array[2] = {
{
"center", // name
::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type
0, // upper bound of string
::rosidl_typesupport_introspection_cpp::get_message_type_support_handle<geometry_msgs::msg::Point>(), // members of sub message
false, // is key
false, // is array
0, // array size
false, // is upper bound
offsetof(tutorial_interfaces::msg::Sphere, center), // bytes offset in struct
nullptr, // default value
nullptr, // size() function pointer
nullptr, // get_const(index) function pointer
nullptr, // get(index) function pointer
nullptr, // fetch(index, &value) function pointer
nullptr, // assign(index, value) function pointer
nullptr // resize(index) function pointer
},
{
"radius", // name
::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type
0, // upper bound of string
nullptr, // members of sub message
false, // is key
false, // is array
0, // array size
false, // is upper bound
offsetof(tutorial_interfaces::msg::Sphere, radius), // bytes offset in struct
nullptr, // default value
nullptr, // size() function pointer
nullptr, // get_const(index) function pointer
nullptr, // get(index) function pointer
nullptr, // fetch(index, &value) function pointer
nullptr, // assign(index, value) function pointer
nullptr // resize(index) function pointer
}
};
static const ::rosidl_typesupport_introspection_cpp::MessageMembers Sphere_message_members = {
"tutorial_interfaces::msg", // message namespace
"Sphere", // message name
2, // number of fields
sizeof(tutorial_interfaces::msg::Sphere),
false, // has_any_key_member_
Sphere_message_member_array, // message members
Sphere_init_function, // function to initialize message memory (memory has to be allocated)
Sphere_fini_function // function to terminate message instance (will not free memory)
};
static const rosidl_message_type_support_t Sphere_message_type_support_handle = {
::rosidl_typesupport_introspection_cpp::typesupport_identifier,
&Sphere_message_members,
get_message_typesupport_handle_function,
&tutorial_interfaces__msg__Sphere__get_type_hash,
&tutorial_interfaces__msg__Sphere__get_type_description,
&tutorial_interfaces__msg__Sphere__get_type_description_sources,
};
} // namespace rosidl_typesupport_introspection_cpp
} // namespace msg
} // namespace tutorial_interfaces
namespace rosidl_typesupport_introspection_cpp
{
template<>
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_message_type_support_t *
get_message_type_support_handle<tutorial_interfaces::msg::Sphere>()
{
return &::tutorial_interfaces::msg::rosidl_typesupport_introspection_cpp::Sphere_message_type_support_handle;
}
} // namespace rosidl_typesupport_introspection_cpp
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, tutorial_interfaces, msg, Sphere)() {
return &::tutorial_interfaces::msg::rosidl_typesupport_introspection_cpp::Sphere_message_type_support_handle;
}
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,36 @@
// generated from rosidl_generator_c/resource/idl__type_support.h.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/msg/sphere.h"
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__TYPE_SUPPORT_H_
#define TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__TYPE_SUPPORT_H_
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/rosidl_generator_c__visibility_control.h"
#ifdef __cplusplus
extern "C"
{
#endif
#include "rosidl_runtime_c/message_type_support_struct.h"
// Forward declare the get type support functions for this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_c,
tutorial_interfaces,
msg,
Sphere
)(void);
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__TYPE_SUPPORT_H_

View File

@@ -0,0 +1,31 @@
// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__TYPE_SUPPORT_HPP_
#define TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__TYPE_SUPPORT_HPP_
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp"
#include "rosidl_typesupport_cpp/message_type_support.hpp"
#ifdef __cplusplus
extern "C"
{
#endif
// Forward declare the get type support functions for this type.
ROSIDL_GENERATOR_CPP_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_cpp,
tutorial_interfaces,
msg,
Sphere
)();
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__DETAIL__SPHERE__TYPE_SUPPORT_HPP_

View File

@@ -0,0 +1,12 @@
// generated from rosidl_generator_c/resource/idl.h.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__NUM_H_
#define TUTORIAL_INTERFACES__MSG__NUM_H_
#include "tutorial_interfaces/msg/detail/num__struct.h"
#include "tutorial_interfaces/msg/detail/num__functions.h"
#include "tutorial_interfaces/msg/detail/num__type_support.h"
#endif // TUTORIAL_INTERFACES__MSG__NUM_H_

View File

@@ -0,0 +1,12 @@
// generated from rosidl_generator_cpp/resource/idl.hpp.em
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__NUM_HPP_
#define TUTORIAL_INTERFACES__MSG__NUM_HPP_
#include "tutorial_interfaces/msg/detail/num__struct.hpp"
#include "tutorial_interfaces/msg/detail/num__builder.hpp"
#include "tutorial_interfaces/msg/detail/num__traits.hpp"
#include "tutorial_interfaces/msg/detail/num__type_support.hpp"
#endif // TUTORIAL_INTERFACES__MSG__NUM_HPP_

View File

@@ -0,0 +1,42 @@
// generated from rosidl_generator_c/resource/rosidl_generator_c__visibility_control.h.in
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__ROSIDL_GENERATOR_C__VISIBILITY_CONTROL_H_
#define TUTORIAL_INTERFACES__MSG__ROSIDL_GENERATOR_C__VISIBILITY_CONTROL_H_
#ifdef __cplusplus
extern "C"
{
#endif
// This logic was borrowed (then namespaced) from the examples on the gcc wiki:
// https://gcc.gnu.org/wiki/Visibility
#if defined _WIN32 || defined __CYGWIN__
#ifdef __GNUC__
#define ROSIDL_GENERATOR_C_EXPORT_tutorial_interfaces __attribute__ ((dllexport))
#define ROSIDL_GENERATOR_C_IMPORT_tutorial_interfaces __attribute__ ((dllimport))
#else
#define ROSIDL_GENERATOR_C_EXPORT_tutorial_interfaces __declspec(dllexport)
#define ROSIDL_GENERATOR_C_IMPORT_tutorial_interfaces __declspec(dllimport)
#endif
#ifdef ROSIDL_GENERATOR_C_BUILDING_DLL_tutorial_interfaces
#define ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces ROSIDL_GENERATOR_C_EXPORT_tutorial_interfaces
#else
#define ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces ROSIDL_GENERATOR_C_IMPORT_tutorial_interfaces
#endif
#else
#define ROSIDL_GENERATOR_C_EXPORT_tutorial_interfaces __attribute__ ((visibility("default")))
#define ROSIDL_GENERATOR_C_IMPORT_tutorial_interfaces
#if __GNUC__ >= 4
#define ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces __attribute__ ((visibility("default")))
#else
#define ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__ROSIDL_GENERATOR_C__VISIBILITY_CONTROL_H_

View File

@@ -0,0 +1,42 @@
// generated from rosidl_generator_cpp/resource/rosidl_generator_cpp__visibility_control.hpp.in
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_
#define TUTORIAL_INTERFACES__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_
#ifdef __cplusplus
extern "C"
{
#endif
// This logic was borrowed (then namespaced) from the examples on the gcc wiki:
// https://gcc.gnu.org/wiki/Visibility
#if defined _WIN32 || defined __CYGWIN__
#ifdef __GNUC__
#define ROSIDL_GENERATOR_CPP_EXPORT_tutorial_interfaces __attribute__ ((dllexport))
#define ROSIDL_GENERATOR_CPP_IMPORT_tutorial_interfaces __attribute__ ((dllimport))
#else
#define ROSIDL_GENERATOR_CPP_EXPORT_tutorial_interfaces __declspec(dllexport)
#define ROSIDL_GENERATOR_CPP_IMPORT_tutorial_interfaces __declspec(dllimport)
#endif
#ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_tutorial_interfaces
#define ROSIDL_GENERATOR_CPP_PUBLIC_tutorial_interfaces ROSIDL_GENERATOR_CPP_EXPORT_tutorial_interfaces
#else
#define ROSIDL_GENERATOR_CPP_PUBLIC_tutorial_interfaces ROSIDL_GENERATOR_CPP_IMPORT_tutorial_interfaces
#endif
#else
#define ROSIDL_GENERATOR_CPP_EXPORT_tutorial_interfaces __attribute__ ((visibility("default")))
#define ROSIDL_GENERATOR_CPP_IMPORT_tutorial_interfaces
#if __GNUC__ >= 4
#define ROSIDL_GENERATOR_CPP_PUBLIC_tutorial_interfaces __attribute__ ((visibility("default")))
#else
#define ROSIDL_GENERATOR_CPP_PUBLIC_tutorial_interfaces
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_

View File

@@ -0,0 +1,43 @@
// generated from
// rosidl_typesupport_fastrtps_c/resource/rosidl_typesupport_fastrtps_c__visibility_control.h.in
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_C__VISIBILITY_CONTROL_H_
#define TUTORIAL_INTERFACES__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_C__VISIBILITY_CONTROL_H_
#if __cplusplus
extern "C"
{
#endif
// This logic was borrowed (then namespaced) from the examples on the gcc wiki:
// https://gcc.gnu.org/wiki/Visibility
#if defined _WIN32 || defined __CYGWIN__
#ifdef __GNUC__
#define ROSIDL_TYPESUPPORT_FASTRTPS_C_EXPORT_tutorial_interfaces __attribute__ ((dllexport))
#define ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_tutorial_interfaces __attribute__ ((dllimport))
#else
#define ROSIDL_TYPESUPPORT_FASTRTPS_C_EXPORT_tutorial_interfaces __declspec(dllexport)
#define ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_tutorial_interfaces __declspec(dllimport)
#endif
#ifdef ROSIDL_TYPESUPPORT_FASTRTPS_C_BUILDING_DLL_tutorial_interfaces
#define ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces ROSIDL_TYPESUPPORT_FASTRTPS_C_EXPORT_tutorial_interfaces
#else
#define ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_tutorial_interfaces
#endif
#else
#define ROSIDL_TYPESUPPORT_FASTRTPS_C_EXPORT_tutorial_interfaces __attribute__ ((visibility("default")))
#define ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_tutorial_interfaces
#if __GNUC__ >= 4
#define ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces __attribute__ ((visibility("default")))
#else
#define ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
#endif
#endif
#if __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_C__VISIBILITY_CONTROL_H_

View File

@@ -0,0 +1,43 @@
// generated from
// rosidl_typesupport_fastrtps_cpp/resource/rosidl_typesupport_fastrtps_cpp__visibility_control.h.in
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_CPP__VISIBILITY_CONTROL_H_
#define TUTORIAL_INTERFACES__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_CPP__VISIBILITY_CONTROL_H_
#if __cplusplus
extern "C"
{
#endif
// This logic was borrowed (then namespaced) from the examples on the gcc wiki:
// https://gcc.gnu.org/wiki/Visibility
#if defined _WIN32 || defined __CYGWIN__
#ifdef __GNUC__
#define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_EXPORT_tutorial_interfaces __attribute__ ((dllexport))
#define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_IMPORT_tutorial_interfaces __attribute__ ((dllimport))
#else
#define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_EXPORT_tutorial_interfaces __declspec(dllexport)
#define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_IMPORT_tutorial_interfaces __declspec(dllimport)
#endif
#ifdef ROSIDL_TYPESUPPORT_FASTRTPS_CPP_BUILDING_DLL_tutorial_interfaces
#define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces ROSIDL_TYPESUPPORT_FASTRTPS_CPP_EXPORT_tutorial_interfaces
#else
#define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces ROSIDL_TYPESUPPORT_FASTRTPS_CPP_IMPORT_tutorial_interfaces
#endif
#else
#define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_EXPORT_tutorial_interfaces __attribute__ ((visibility("default")))
#define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_IMPORT_tutorial_interfaces
#if __GNUC__ >= 4
#define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces __attribute__ ((visibility("default")))
#else
#define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
#endif
#endif
#if __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_CPP__VISIBILITY_CONTROL_H_

View File

@@ -0,0 +1,43 @@
// generated from
// rosidl_typesupport_introspection_c/resource/rosidl_typesupport_introspection_c__visibility_control.h.in
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__ROSIDL_TYPESUPPORT_INTROSPECTION_C__VISIBILITY_CONTROL_H_
#define TUTORIAL_INTERFACES__MSG__ROSIDL_TYPESUPPORT_INTROSPECTION_C__VISIBILITY_CONTROL_H_
#ifdef __cplusplus
extern "C"
{
#endif
// This logic was borrowed (then namespaced) from the examples on the gcc wiki:
// https://gcc.gnu.org/wiki/Visibility
#if defined _WIN32 || defined __CYGWIN__
#ifdef __GNUC__
#define ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tutorial_interfaces __attribute__ ((dllexport))
#define ROSIDL_TYPESUPPORT_INTROSPECTION_C_IMPORT_tutorial_interfaces __attribute__ ((dllimport))
#else
#define ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tutorial_interfaces __declspec(dllexport)
#define ROSIDL_TYPESUPPORT_INTROSPECTION_C_IMPORT_tutorial_interfaces __declspec(dllimport)
#endif
#ifdef ROSIDL_TYPESUPPORT_INTROSPECTION_C_BUILDING_DLL_tutorial_interfaces
#define ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_tutorial_interfaces ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tutorial_interfaces
#else
#define ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_tutorial_interfaces ROSIDL_TYPESUPPORT_INTROSPECTION_C_IMPORT_tutorial_interfaces
#endif
#else
#define ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tutorial_interfaces __attribute__ ((visibility("default")))
#define ROSIDL_TYPESUPPORT_INTROSPECTION_C_IMPORT_tutorial_interfaces
#if __GNUC__ >= 4
#define ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_tutorial_interfaces __attribute__ ((visibility("default")))
#else
#define ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_tutorial_interfaces
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__MSG__ROSIDL_TYPESUPPORT_INTROSPECTION_C__VISIBILITY_CONTROL_H_

View File

@@ -0,0 +1,12 @@
// generated from rosidl_generator_c/resource/idl.h.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__SPHERE_H_
#define TUTORIAL_INTERFACES__MSG__SPHERE_H_
#include "tutorial_interfaces/msg/detail/sphere__struct.h"
#include "tutorial_interfaces/msg/detail/sphere__functions.h"
#include "tutorial_interfaces/msg/detail/sphere__type_support.h"
#endif // TUTORIAL_INTERFACES__MSG__SPHERE_H_

View File

@@ -0,0 +1,12 @@
// generated from rosidl_generator_cpp/resource/idl.hpp.em
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__MSG__SPHERE_HPP_
#define TUTORIAL_INTERFACES__MSG__SPHERE_HPP_
#include "tutorial_interfaces/msg/detail/sphere__struct.hpp"
#include "tutorial_interfaces/msg/detail/sphere__builder.hpp"
#include "tutorial_interfaces/msg/detail/sphere__traits.hpp"
#include "tutorial_interfaces/msg/detail/sphere__type_support.hpp"
#endif // TUTORIAL_INTERFACES__MSG__SPHERE_HPP_

View File

@@ -0,0 +1,12 @@
// generated from rosidl_generator_c/resource/idl.h.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__SRV__ADD_THREE_INTS_H_
#define TUTORIAL_INTERFACES__SRV__ADD_THREE_INTS_H_
#include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__type_support.h"
#endif // TUTORIAL_INTERFACES__SRV__ADD_THREE_INTS_H_

View File

@@ -0,0 +1,12 @@
// generated from rosidl_generator_cpp/resource/idl.hpp.em
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__SRV__ADD_THREE_INTS_HPP_
#define TUTORIAL_INTERFACES__SRV__ADD_THREE_INTS_HPP_
#include "tutorial_interfaces/srv/detail/add_three_ints__struct.hpp"
#include "tutorial_interfaces/srv/detail/add_three_ints__builder.hpp"
#include "tutorial_interfaces/srv/detail/add_three_ints__traits.hpp"
#include "tutorial_interfaces/srv/detail/add_three_ints__type_support.hpp"
#endif // TUTORIAL_INTERFACES__SRV__ADD_THREE_INTS_HPP_

View File

@@ -0,0 +1,207 @@
// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/srv/add_three_ints.hpp"
#ifndef TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__BUILDER_HPP_
#define TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__BUILDER_HPP_
#include <algorithm>
#include <utility>
#include "tutorial_interfaces/srv/detail/add_three_ints__struct.hpp"
#include "rosidl_runtime_cpp/message_initialization.hpp"
namespace tutorial_interfaces
{
namespace srv
{
namespace builder
{
class Init_AddThreeInts_Request_c
{
public:
explicit Init_AddThreeInts_Request_c(::tutorial_interfaces::srv::AddThreeInts_Request & msg)
: msg_(msg)
{}
::tutorial_interfaces::srv::AddThreeInts_Request c(::tutorial_interfaces::srv::AddThreeInts_Request::_c_type arg)
{
msg_.c = std::move(arg);
return std::move(msg_);
}
private:
::tutorial_interfaces::srv::AddThreeInts_Request msg_;
};
class Init_AddThreeInts_Request_b
{
public:
explicit Init_AddThreeInts_Request_b(::tutorial_interfaces::srv::AddThreeInts_Request & msg)
: msg_(msg)
{}
Init_AddThreeInts_Request_c b(::tutorial_interfaces::srv::AddThreeInts_Request::_b_type arg)
{
msg_.b = std::move(arg);
return Init_AddThreeInts_Request_c(msg_);
}
private:
::tutorial_interfaces::srv::AddThreeInts_Request msg_;
};
class Init_AddThreeInts_Request_a
{
public:
Init_AddThreeInts_Request_a()
: msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP)
{}
Init_AddThreeInts_Request_b a(::tutorial_interfaces::srv::AddThreeInts_Request::_a_type arg)
{
msg_.a = std::move(arg);
return Init_AddThreeInts_Request_b(msg_);
}
private:
::tutorial_interfaces::srv::AddThreeInts_Request msg_;
};
} // namespace builder
} // namespace srv
template<typename MessageType>
auto build();
template<>
inline
auto build<::tutorial_interfaces::srv::AddThreeInts_Request>()
{
return tutorial_interfaces::srv::builder::Init_AddThreeInts_Request_a();
}
} // namespace tutorial_interfaces
namespace tutorial_interfaces
{
namespace srv
{
namespace builder
{
class Init_AddThreeInts_Response_sum
{
public:
Init_AddThreeInts_Response_sum()
: msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP)
{}
::tutorial_interfaces::srv::AddThreeInts_Response sum(::tutorial_interfaces::srv::AddThreeInts_Response::_sum_type arg)
{
msg_.sum = std::move(arg);
return std::move(msg_);
}
private:
::tutorial_interfaces::srv::AddThreeInts_Response msg_;
};
} // namespace builder
} // namespace srv
template<typename MessageType>
auto build();
template<>
inline
auto build<::tutorial_interfaces::srv::AddThreeInts_Response>()
{
return tutorial_interfaces::srv::builder::Init_AddThreeInts_Response_sum();
}
} // namespace tutorial_interfaces
namespace tutorial_interfaces
{
namespace srv
{
namespace builder
{
class Init_AddThreeInts_Event_response
{
public:
explicit Init_AddThreeInts_Event_response(::tutorial_interfaces::srv::AddThreeInts_Event & msg)
: msg_(msg)
{}
::tutorial_interfaces::srv::AddThreeInts_Event response(::tutorial_interfaces::srv::AddThreeInts_Event::_response_type arg)
{
msg_.response = std::move(arg);
return std::move(msg_);
}
private:
::tutorial_interfaces::srv::AddThreeInts_Event msg_;
};
class Init_AddThreeInts_Event_request
{
public:
explicit Init_AddThreeInts_Event_request(::tutorial_interfaces::srv::AddThreeInts_Event & msg)
: msg_(msg)
{}
Init_AddThreeInts_Event_response request(::tutorial_interfaces::srv::AddThreeInts_Event::_request_type arg)
{
msg_.request = std::move(arg);
return Init_AddThreeInts_Event_response(msg_);
}
private:
::tutorial_interfaces::srv::AddThreeInts_Event msg_;
};
class Init_AddThreeInts_Event_info
{
public:
Init_AddThreeInts_Event_info()
: msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP)
{}
Init_AddThreeInts_Event_request info(::tutorial_interfaces::srv::AddThreeInts_Event::_info_type arg)
{
msg_.info = std::move(arg);
return Init_AddThreeInts_Event_request(msg_);
}
private:
::tutorial_interfaces::srv::AddThreeInts_Event msg_;
};
} // namespace builder
} // namespace srv
template<typename MessageType>
auto build();
template<>
inline
auto build<::tutorial_interfaces::srv::AddThreeInts_Event>()
{
return tutorial_interfaces::srv::builder::Init_AddThreeInts_Event_info();
}
} // namespace tutorial_interfaces
#endif // TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__BUILDER_HPP_

View File

@@ -0,0 +1,486 @@
// generated from rosidl_generator_c/resource/idl__description.c.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
#include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_type_hash_t *
tutorial_interfaces__srv__AddThreeInts__get_type_hash(
const rosidl_service_type_support_t * type_support)
{
(void)type_support;
static rosidl_type_hash_t hash = {1, {
0x78, 0x95, 0x4e, 0xef, 0xb5, 0xc5, 0xcb, 0x50,
0xde, 0x7c, 0xc8, 0x34, 0x9d, 0x84, 0x48, 0xd4,
0x6a, 0x9c, 0x4c, 0xef, 0x56, 0x5d, 0x76, 0x73,
0xf5, 0xb6, 0x1f, 0x7c, 0xac, 0x7d, 0x64, 0xd5,
}};
return &hash;
}
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_type_hash_t *
tutorial_interfaces__srv__AddThreeInts_Request__get_type_hash(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static rosidl_type_hash_t hash = {1, {
0xcf, 0x5f, 0x51, 0xeb, 0xcd, 0xd9, 0x40, 0x6b,
0xf9, 0x89, 0xb8, 0x85, 0xee, 0x7a, 0x78, 0x28,
0x1f, 0x05, 0x08, 0xb7, 0x3d, 0x67, 0x8e, 0xda,
0x7f, 0x14, 0x4d, 0x09, 0x30, 0x24, 0x2f, 0xf7,
}};
return &hash;
}
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_type_hash_t *
tutorial_interfaces__srv__AddThreeInts_Response__get_type_hash(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static rosidl_type_hash_t hash = {1, {
0xef, 0x95, 0x79, 0x7c, 0x0b, 0xb0, 0x72, 0xa6,
0x96, 0x46, 0xec, 0xfe, 0x51, 0xea, 0x3d, 0xa3,
0xa7, 0x74, 0x22, 0x56, 0xe4, 0xe5, 0xa7, 0xd6,
0x58, 0xeb, 0xe4, 0xc8, 0x84, 0x8f, 0xc8, 0xa4,
}};
return &hash;
}
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_type_hash_t *
tutorial_interfaces__srv__AddThreeInts_Event__get_type_hash(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static rosidl_type_hash_t hash = {1, {
0x39, 0x4d, 0x7c, 0xa6, 0x7e, 0x34, 0xe6, 0xe2,
0x7f, 0x45, 0x70, 0x82, 0x38, 0xcd, 0xa4, 0x1f,
0xdd, 0x65, 0xab, 0x39, 0xfa, 0xe4, 0x0a, 0xe0,
0x7c, 0xa8, 0x46, 0xc9, 0xd7, 0xcd, 0xf6, 0x19,
}};
return &hash;
}
#include <assert.h>
#include <string.h>
// Include directives for referenced types
#include "service_msgs/msg/detail/service_event_info__functions.h"
#include "builtin_interfaces/msg/detail/time__functions.h"
// Hashes for external referenced types
#ifndef NDEBUG
static const rosidl_type_hash_t builtin_interfaces__msg__Time__EXPECTED_HASH = {1, {
0xb1, 0x06, 0x23, 0x5e, 0x25, 0xa4, 0xc5, 0xed,
0x35, 0x09, 0x8a, 0xa0, 0xa6, 0x1a, 0x3e, 0xe9,
0xc9, 0xb1, 0x8d, 0x19, 0x7f, 0x39, 0x8b, 0x0e,
0x42, 0x06, 0xce, 0xa9, 0xac, 0xf9, 0xc1, 0x97,
}};
static const rosidl_type_hash_t service_msgs__msg__ServiceEventInfo__EXPECTED_HASH = {1, {
0x41, 0xbc, 0xbb, 0xe0, 0x7a, 0x75, 0xc9, 0xb5,
0x2b, 0xc9, 0x6b, 0xfd, 0x5c, 0x24, 0xd7, 0xf0,
0xfc, 0x0a, 0x08, 0xc0, 0xcb, 0x79, 0x21, 0xb3,
0x37, 0x3c, 0x57, 0x32, 0x34, 0x5a, 0x6f, 0x45,
}};
#endif
static char tutorial_interfaces__srv__AddThreeInts__TYPE_NAME[] = "tutorial_interfaces/srv/AddThreeInts";
static char builtin_interfaces__msg__Time__TYPE_NAME[] = "builtin_interfaces/msg/Time";
static char service_msgs__msg__ServiceEventInfo__TYPE_NAME[] = "service_msgs/msg/ServiceEventInfo";
static char tutorial_interfaces__srv__AddThreeInts_Event__TYPE_NAME[] = "tutorial_interfaces/srv/AddThreeInts_Event";
static char tutorial_interfaces__srv__AddThreeInts_Request__TYPE_NAME[] = "tutorial_interfaces/srv/AddThreeInts_Request";
static char tutorial_interfaces__srv__AddThreeInts_Response__TYPE_NAME[] = "tutorial_interfaces/srv/AddThreeInts_Response";
// Define type names, field names, and default values
static char tutorial_interfaces__srv__AddThreeInts__FIELD_NAME__request_message[] = "request_message";
static char tutorial_interfaces__srv__AddThreeInts__FIELD_NAME__response_message[] = "response_message";
static char tutorial_interfaces__srv__AddThreeInts__FIELD_NAME__event_message[] = "event_message";
static rosidl_runtime_c__type_description__Field tutorial_interfaces__srv__AddThreeInts__FIELDS[] = {
{
{tutorial_interfaces__srv__AddThreeInts__FIELD_NAME__request_message, 15, 15},
{
rosidl_runtime_c__type_description__FieldType__FIELD_TYPE_NESTED_TYPE,
0,
0,
{tutorial_interfaces__srv__AddThreeInts_Request__TYPE_NAME, 44, 44},
},
{NULL, 0, 0},
},
{
{tutorial_interfaces__srv__AddThreeInts__FIELD_NAME__response_message, 16, 16},
{
rosidl_runtime_c__type_description__FieldType__FIELD_TYPE_NESTED_TYPE,
0,
0,
{tutorial_interfaces__srv__AddThreeInts_Response__TYPE_NAME, 45, 45},
},
{NULL, 0, 0},
},
{
{tutorial_interfaces__srv__AddThreeInts__FIELD_NAME__event_message, 13, 13},
{
rosidl_runtime_c__type_description__FieldType__FIELD_TYPE_NESTED_TYPE,
0,
0,
{tutorial_interfaces__srv__AddThreeInts_Event__TYPE_NAME, 42, 42},
},
{NULL, 0, 0},
},
};
static rosidl_runtime_c__type_description__IndividualTypeDescription tutorial_interfaces__srv__AddThreeInts__REFERENCED_TYPE_DESCRIPTIONS[] = {
{
{builtin_interfaces__msg__Time__TYPE_NAME, 27, 27},
{NULL, 0, 0},
},
{
{service_msgs__msg__ServiceEventInfo__TYPE_NAME, 33, 33},
{NULL, 0, 0},
},
{
{tutorial_interfaces__srv__AddThreeInts_Event__TYPE_NAME, 42, 42},
{NULL, 0, 0},
},
{
{tutorial_interfaces__srv__AddThreeInts_Request__TYPE_NAME, 44, 44},
{NULL, 0, 0},
},
{
{tutorial_interfaces__srv__AddThreeInts_Response__TYPE_NAME, 45, 45},
{NULL, 0, 0},
},
};
const rosidl_runtime_c__type_description__TypeDescription *
tutorial_interfaces__srv__AddThreeInts__get_type_description(
const rosidl_service_type_support_t * type_support)
{
(void)type_support;
static bool constructed = false;
static const rosidl_runtime_c__type_description__TypeDescription description = {
{
{tutorial_interfaces__srv__AddThreeInts__TYPE_NAME, 36, 36},
{tutorial_interfaces__srv__AddThreeInts__FIELDS, 3, 3},
},
{tutorial_interfaces__srv__AddThreeInts__REFERENCED_TYPE_DESCRIPTIONS, 5, 5},
};
if (!constructed) {
assert(0 == memcmp(&builtin_interfaces__msg__Time__EXPECTED_HASH, builtin_interfaces__msg__Time__get_type_hash(NULL), sizeof(rosidl_type_hash_t)));
description.referenced_type_descriptions.data[0].fields = builtin_interfaces__msg__Time__get_type_description(NULL)->type_description.fields;
assert(0 == memcmp(&service_msgs__msg__ServiceEventInfo__EXPECTED_HASH, service_msgs__msg__ServiceEventInfo__get_type_hash(NULL), sizeof(rosidl_type_hash_t)));
description.referenced_type_descriptions.data[1].fields = service_msgs__msg__ServiceEventInfo__get_type_description(NULL)->type_description.fields;
description.referenced_type_descriptions.data[2].fields = tutorial_interfaces__srv__AddThreeInts_Event__get_type_description(NULL)->type_description.fields;
description.referenced_type_descriptions.data[3].fields = tutorial_interfaces__srv__AddThreeInts_Request__get_type_description(NULL)->type_description.fields;
description.referenced_type_descriptions.data[4].fields = tutorial_interfaces__srv__AddThreeInts_Response__get_type_description(NULL)->type_description.fields;
constructed = true;
}
return &description;
}
// Define type names, field names, and default values
static char tutorial_interfaces__srv__AddThreeInts_Request__FIELD_NAME__a[] = "a";
static char tutorial_interfaces__srv__AddThreeInts_Request__FIELD_NAME__b[] = "b";
static char tutorial_interfaces__srv__AddThreeInts_Request__FIELD_NAME__c[] = "c";
static rosidl_runtime_c__type_description__Field tutorial_interfaces__srv__AddThreeInts_Request__FIELDS[] = {
{
{tutorial_interfaces__srv__AddThreeInts_Request__FIELD_NAME__a, 1, 1},
{
rosidl_runtime_c__type_description__FieldType__FIELD_TYPE_INT64,
0,
0,
{NULL, 0, 0},
},
{NULL, 0, 0},
},
{
{tutorial_interfaces__srv__AddThreeInts_Request__FIELD_NAME__b, 1, 1},
{
rosidl_runtime_c__type_description__FieldType__FIELD_TYPE_INT64,
0,
0,
{NULL, 0, 0},
},
{NULL, 0, 0},
},
{
{tutorial_interfaces__srv__AddThreeInts_Request__FIELD_NAME__c, 1, 1},
{
rosidl_runtime_c__type_description__FieldType__FIELD_TYPE_INT64,
0,
0,
{NULL, 0, 0},
},
{NULL, 0, 0},
},
};
const rosidl_runtime_c__type_description__TypeDescription *
tutorial_interfaces__srv__AddThreeInts_Request__get_type_description(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static bool constructed = false;
static const rosidl_runtime_c__type_description__TypeDescription description = {
{
{tutorial_interfaces__srv__AddThreeInts_Request__TYPE_NAME, 44, 44},
{tutorial_interfaces__srv__AddThreeInts_Request__FIELDS, 3, 3},
},
{NULL, 0, 0},
};
if (!constructed) {
constructed = true;
}
return &description;
}
// Define type names, field names, and default values
static char tutorial_interfaces__srv__AddThreeInts_Response__FIELD_NAME__sum[] = "sum";
static rosidl_runtime_c__type_description__Field tutorial_interfaces__srv__AddThreeInts_Response__FIELDS[] = {
{
{tutorial_interfaces__srv__AddThreeInts_Response__FIELD_NAME__sum, 3, 3},
{
rosidl_runtime_c__type_description__FieldType__FIELD_TYPE_INT64,
0,
0,
{NULL, 0, 0},
},
{NULL, 0, 0},
},
};
const rosidl_runtime_c__type_description__TypeDescription *
tutorial_interfaces__srv__AddThreeInts_Response__get_type_description(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static bool constructed = false;
static const rosidl_runtime_c__type_description__TypeDescription description = {
{
{tutorial_interfaces__srv__AddThreeInts_Response__TYPE_NAME, 45, 45},
{tutorial_interfaces__srv__AddThreeInts_Response__FIELDS, 1, 1},
},
{NULL, 0, 0},
};
if (!constructed) {
constructed = true;
}
return &description;
}
// Define type names, field names, and default values
static char tutorial_interfaces__srv__AddThreeInts_Event__FIELD_NAME__info[] = "info";
static char tutorial_interfaces__srv__AddThreeInts_Event__FIELD_NAME__request[] = "request";
static char tutorial_interfaces__srv__AddThreeInts_Event__FIELD_NAME__response[] = "response";
static rosidl_runtime_c__type_description__Field tutorial_interfaces__srv__AddThreeInts_Event__FIELDS[] = {
{
{tutorial_interfaces__srv__AddThreeInts_Event__FIELD_NAME__info, 4, 4},
{
rosidl_runtime_c__type_description__FieldType__FIELD_TYPE_NESTED_TYPE,
0,
0,
{service_msgs__msg__ServiceEventInfo__TYPE_NAME, 33, 33},
},
{NULL, 0, 0},
},
{
{tutorial_interfaces__srv__AddThreeInts_Event__FIELD_NAME__request, 7, 7},
{
rosidl_runtime_c__type_description__FieldType__FIELD_TYPE_NESTED_TYPE_BOUNDED_SEQUENCE,
1,
0,
{tutorial_interfaces__srv__AddThreeInts_Request__TYPE_NAME, 44, 44},
},
{NULL, 0, 0},
},
{
{tutorial_interfaces__srv__AddThreeInts_Event__FIELD_NAME__response, 8, 8},
{
rosidl_runtime_c__type_description__FieldType__FIELD_TYPE_NESTED_TYPE_BOUNDED_SEQUENCE,
1,
0,
{tutorial_interfaces__srv__AddThreeInts_Response__TYPE_NAME, 45, 45},
},
{NULL, 0, 0},
},
};
static rosidl_runtime_c__type_description__IndividualTypeDescription tutorial_interfaces__srv__AddThreeInts_Event__REFERENCED_TYPE_DESCRIPTIONS[] = {
{
{builtin_interfaces__msg__Time__TYPE_NAME, 27, 27},
{NULL, 0, 0},
},
{
{service_msgs__msg__ServiceEventInfo__TYPE_NAME, 33, 33},
{NULL, 0, 0},
},
{
{tutorial_interfaces__srv__AddThreeInts_Request__TYPE_NAME, 44, 44},
{NULL, 0, 0},
},
{
{tutorial_interfaces__srv__AddThreeInts_Response__TYPE_NAME, 45, 45},
{NULL, 0, 0},
},
};
const rosidl_runtime_c__type_description__TypeDescription *
tutorial_interfaces__srv__AddThreeInts_Event__get_type_description(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static bool constructed = false;
static const rosidl_runtime_c__type_description__TypeDescription description = {
{
{tutorial_interfaces__srv__AddThreeInts_Event__TYPE_NAME, 42, 42},
{tutorial_interfaces__srv__AddThreeInts_Event__FIELDS, 3, 3},
},
{tutorial_interfaces__srv__AddThreeInts_Event__REFERENCED_TYPE_DESCRIPTIONS, 4, 4},
};
if (!constructed) {
assert(0 == memcmp(&builtin_interfaces__msg__Time__EXPECTED_HASH, builtin_interfaces__msg__Time__get_type_hash(NULL), sizeof(rosidl_type_hash_t)));
description.referenced_type_descriptions.data[0].fields = builtin_interfaces__msg__Time__get_type_description(NULL)->type_description.fields;
assert(0 == memcmp(&service_msgs__msg__ServiceEventInfo__EXPECTED_HASH, service_msgs__msg__ServiceEventInfo__get_type_hash(NULL), sizeof(rosidl_type_hash_t)));
description.referenced_type_descriptions.data[1].fields = service_msgs__msg__ServiceEventInfo__get_type_description(NULL)->type_description.fields;
description.referenced_type_descriptions.data[2].fields = tutorial_interfaces__srv__AddThreeInts_Request__get_type_description(NULL)->type_description.fields;
description.referenced_type_descriptions.data[3].fields = tutorial_interfaces__srv__AddThreeInts_Response__get_type_description(NULL)->type_description.fields;
constructed = true;
}
return &description;
}
static char toplevel_type_raw_source[] =
"int64 a\n"
"int64 b\n"
"int64 c\n"
"---\n"
"int64 sum";
static char srv_encoding[] = "srv";
static char implicit_encoding[] = "implicit";
// Define all individual source functions
const rosidl_runtime_c__type_description__TypeSource *
tutorial_interfaces__srv__AddThreeInts__get_individual_type_description_source(
const rosidl_service_type_support_t * type_support)
{
(void)type_support;
static const rosidl_runtime_c__type_description__TypeSource source = {
{tutorial_interfaces__srv__AddThreeInts__TYPE_NAME, 36, 36},
{srv_encoding, 3, 3},
{toplevel_type_raw_source, 37, 37},
};
return &source;
}
const rosidl_runtime_c__type_description__TypeSource *
tutorial_interfaces__srv__AddThreeInts_Request__get_individual_type_description_source(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static const rosidl_runtime_c__type_description__TypeSource source = {
{tutorial_interfaces__srv__AddThreeInts_Request__TYPE_NAME, 44, 44},
{implicit_encoding, 8, 8},
{NULL, 0, 0},
};
return &source;
}
const rosidl_runtime_c__type_description__TypeSource *
tutorial_interfaces__srv__AddThreeInts_Response__get_individual_type_description_source(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static const rosidl_runtime_c__type_description__TypeSource source = {
{tutorial_interfaces__srv__AddThreeInts_Response__TYPE_NAME, 45, 45},
{implicit_encoding, 8, 8},
{NULL, 0, 0},
};
return &source;
}
const rosidl_runtime_c__type_description__TypeSource *
tutorial_interfaces__srv__AddThreeInts_Event__get_individual_type_description_source(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static const rosidl_runtime_c__type_description__TypeSource source = {
{tutorial_interfaces__srv__AddThreeInts_Event__TYPE_NAME, 42, 42},
{implicit_encoding, 8, 8},
{NULL, 0, 0},
};
return &source;
}
const rosidl_runtime_c__type_description__TypeSource__Sequence *
tutorial_interfaces__srv__AddThreeInts__get_type_description_sources(
const rosidl_service_type_support_t * type_support)
{
(void)type_support;
static rosidl_runtime_c__type_description__TypeSource sources[6];
static const rosidl_runtime_c__type_description__TypeSource__Sequence source_sequence = {sources, 6, 6};
static bool constructed = false;
if (!constructed) {
sources[0] = *tutorial_interfaces__srv__AddThreeInts__get_individual_type_description_source(NULL),
sources[1] = *builtin_interfaces__msg__Time__get_individual_type_description_source(NULL);
sources[2] = *service_msgs__msg__ServiceEventInfo__get_individual_type_description_source(NULL);
sources[3] = *tutorial_interfaces__srv__AddThreeInts_Event__get_individual_type_description_source(NULL);
sources[4] = *tutorial_interfaces__srv__AddThreeInts_Request__get_individual_type_description_source(NULL);
sources[5] = *tutorial_interfaces__srv__AddThreeInts_Response__get_individual_type_description_source(NULL);
constructed = true;
}
return &source_sequence;
}
const rosidl_runtime_c__type_description__TypeSource__Sequence *
tutorial_interfaces__srv__AddThreeInts_Request__get_type_description_sources(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static rosidl_runtime_c__type_description__TypeSource sources[1];
static const rosidl_runtime_c__type_description__TypeSource__Sequence source_sequence = {sources, 1, 1};
static bool constructed = false;
if (!constructed) {
sources[0] = *tutorial_interfaces__srv__AddThreeInts_Request__get_individual_type_description_source(NULL),
constructed = true;
}
return &source_sequence;
}
const rosidl_runtime_c__type_description__TypeSource__Sequence *
tutorial_interfaces__srv__AddThreeInts_Response__get_type_description_sources(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static rosidl_runtime_c__type_description__TypeSource sources[1];
static const rosidl_runtime_c__type_description__TypeSource__Sequence source_sequence = {sources, 1, 1};
static bool constructed = false;
if (!constructed) {
sources[0] = *tutorial_interfaces__srv__AddThreeInts_Response__get_individual_type_description_source(NULL),
constructed = true;
}
return &source_sequence;
}
const rosidl_runtime_c__type_description__TypeSource__Sequence *
tutorial_interfaces__srv__AddThreeInts_Event__get_type_description_sources(
const rosidl_message_type_support_t * type_support)
{
(void)type_support;
static rosidl_runtime_c__type_description__TypeSource sources[5];
static const rosidl_runtime_c__type_description__TypeSource__Sequence source_sequence = {sources, 5, 5};
static bool constructed = false;
if (!constructed) {
sources[0] = *tutorial_interfaces__srv__AddThreeInts_Event__get_individual_type_description_source(NULL),
sources[1] = *builtin_interfaces__msg__Time__get_individual_type_description_source(NULL);
sources[2] = *service_msgs__msg__ServiceEventInfo__get_individual_type_description_source(NULL);
sources[3] = *tutorial_interfaces__srv__AddThreeInts_Request__get_individual_type_description_source(NULL);
sources[4] = *tutorial_interfaces__srv__AddThreeInts_Response__get_individual_type_description_source(NULL);
constructed = true;
}
return &source_sequence;
}

View File

@@ -0,0 +1,758 @@
// generated from rosidl_generator_c/resource/idl__functions.c.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
#include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "rcutils/allocator.h"
bool
tutorial_interfaces__srv__AddThreeInts_Request__init(tutorial_interfaces__srv__AddThreeInts_Request * msg)
{
if (!msg) {
return false;
}
// a
// b
// c
return true;
}
void
tutorial_interfaces__srv__AddThreeInts_Request__fini(tutorial_interfaces__srv__AddThreeInts_Request * msg)
{
if (!msg) {
return;
}
// a
// b
// c
}
bool
tutorial_interfaces__srv__AddThreeInts_Request__are_equal(const tutorial_interfaces__srv__AddThreeInts_Request * lhs, const tutorial_interfaces__srv__AddThreeInts_Request * rhs)
{
if (!lhs || !rhs) {
return false;
}
// a
if (lhs->a != rhs->a) {
return false;
}
// b
if (lhs->b != rhs->b) {
return false;
}
// c
if (lhs->c != rhs->c) {
return false;
}
return true;
}
bool
tutorial_interfaces__srv__AddThreeInts_Request__copy(
const tutorial_interfaces__srv__AddThreeInts_Request * input,
tutorial_interfaces__srv__AddThreeInts_Request * output)
{
if (!input || !output) {
return false;
}
// a
output->a = input->a;
// b
output->b = input->b;
// c
output->c = input->c;
return true;
}
tutorial_interfaces__srv__AddThreeInts_Request *
tutorial_interfaces__srv__AddThreeInts_Request__create(void)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__srv__AddThreeInts_Request * msg = (tutorial_interfaces__srv__AddThreeInts_Request *)allocator.allocate(sizeof(tutorial_interfaces__srv__AddThreeInts_Request), allocator.state);
if (!msg) {
return NULL;
}
memset(msg, 0, sizeof(tutorial_interfaces__srv__AddThreeInts_Request));
bool success = tutorial_interfaces__srv__AddThreeInts_Request__init(msg);
if (!success) {
allocator.deallocate(msg, allocator.state);
return NULL;
}
return msg;
}
void
tutorial_interfaces__srv__AddThreeInts_Request__destroy(tutorial_interfaces__srv__AddThreeInts_Request * msg)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
if (msg) {
tutorial_interfaces__srv__AddThreeInts_Request__fini(msg);
}
allocator.deallocate(msg, allocator.state);
}
bool
tutorial_interfaces__srv__AddThreeInts_Request__Sequence__init(tutorial_interfaces__srv__AddThreeInts_Request__Sequence * array, size_t size)
{
if (!array) {
return false;
}
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__srv__AddThreeInts_Request * data = NULL;
if (size) {
data = (tutorial_interfaces__srv__AddThreeInts_Request *)allocator.zero_allocate(size, sizeof(tutorial_interfaces__srv__AddThreeInts_Request), allocator.state);
if (!data) {
return false;
}
// initialize all array elements
size_t i;
for (i = 0; i < size; ++i) {
bool success = tutorial_interfaces__srv__AddThreeInts_Request__init(&data[i]);
if (!success) {
break;
}
}
if (i < size) {
// if initialization failed finalize the already initialized array elements
for (; i > 0; --i) {
tutorial_interfaces__srv__AddThreeInts_Request__fini(&data[i - 1]);
}
allocator.deallocate(data, allocator.state);
return false;
}
}
array->data = data;
array->size = size;
array->capacity = size;
return true;
}
void
tutorial_interfaces__srv__AddThreeInts_Request__Sequence__fini(tutorial_interfaces__srv__AddThreeInts_Request__Sequence * array)
{
if (!array) {
return;
}
rcutils_allocator_t allocator = rcutils_get_default_allocator();
if (array->data) {
// ensure that data and capacity values are consistent
assert(array->capacity > 0);
// finalize all array elements
for (size_t i = 0; i < array->capacity; ++i) {
tutorial_interfaces__srv__AddThreeInts_Request__fini(&array->data[i]);
}
allocator.deallocate(array->data, allocator.state);
array->data = NULL;
array->size = 0;
array->capacity = 0;
} else {
// ensure that data, size, and capacity values are consistent
assert(0 == array->size);
assert(0 == array->capacity);
}
}
tutorial_interfaces__srv__AddThreeInts_Request__Sequence *
tutorial_interfaces__srv__AddThreeInts_Request__Sequence__create(size_t size)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__srv__AddThreeInts_Request__Sequence * array = (tutorial_interfaces__srv__AddThreeInts_Request__Sequence *)allocator.allocate(sizeof(tutorial_interfaces__srv__AddThreeInts_Request__Sequence), allocator.state);
if (!array) {
return NULL;
}
bool success = tutorial_interfaces__srv__AddThreeInts_Request__Sequence__init(array, size);
if (!success) {
allocator.deallocate(array, allocator.state);
return NULL;
}
return array;
}
void
tutorial_interfaces__srv__AddThreeInts_Request__Sequence__destroy(tutorial_interfaces__srv__AddThreeInts_Request__Sequence * array)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
if (array) {
tutorial_interfaces__srv__AddThreeInts_Request__Sequence__fini(array);
}
allocator.deallocate(array, allocator.state);
}
bool
tutorial_interfaces__srv__AddThreeInts_Request__Sequence__are_equal(const tutorial_interfaces__srv__AddThreeInts_Request__Sequence * lhs, const tutorial_interfaces__srv__AddThreeInts_Request__Sequence * rhs)
{
if (!lhs || !rhs) {
return false;
}
if (lhs->size != rhs->size) {
return false;
}
for (size_t i = 0; i < lhs->size; ++i) {
if (!tutorial_interfaces__srv__AddThreeInts_Request__are_equal(&(lhs->data[i]), &(rhs->data[i]))) {
return false;
}
}
return true;
}
bool
tutorial_interfaces__srv__AddThreeInts_Request__Sequence__copy(
const tutorial_interfaces__srv__AddThreeInts_Request__Sequence * input,
tutorial_interfaces__srv__AddThreeInts_Request__Sequence * output)
{
if (!input || !output) {
return false;
}
if (output->capacity < input->size) {
const size_t allocation_size =
input->size * sizeof(tutorial_interfaces__srv__AddThreeInts_Request);
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__srv__AddThreeInts_Request * data =
(tutorial_interfaces__srv__AddThreeInts_Request *)allocator.reallocate(
output->data, allocation_size, allocator.state);
if (!data) {
return false;
}
// If reallocation succeeded, memory may or may not have been moved
// to fulfill the allocation request, invalidating output->data.
output->data = data;
for (size_t i = output->capacity; i < input->size; ++i) {
if (!tutorial_interfaces__srv__AddThreeInts_Request__init(&output->data[i])) {
// If initialization of any new item fails, roll back
// all previously initialized items. Existing items
// in output are to be left unmodified.
for (; i-- > output->capacity; ) {
tutorial_interfaces__srv__AddThreeInts_Request__fini(&output->data[i]);
}
return false;
}
}
output->capacity = input->size;
}
output->size = input->size;
for (size_t i = 0; i < input->size; ++i) {
if (!tutorial_interfaces__srv__AddThreeInts_Request__copy(
&(input->data[i]), &(output->data[i])))
{
return false;
}
}
return true;
}
bool
tutorial_interfaces__srv__AddThreeInts_Response__init(tutorial_interfaces__srv__AddThreeInts_Response * msg)
{
if (!msg) {
return false;
}
// sum
return true;
}
void
tutorial_interfaces__srv__AddThreeInts_Response__fini(tutorial_interfaces__srv__AddThreeInts_Response * msg)
{
if (!msg) {
return;
}
// sum
}
bool
tutorial_interfaces__srv__AddThreeInts_Response__are_equal(const tutorial_interfaces__srv__AddThreeInts_Response * lhs, const tutorial_interfaces__srv__AddThreeInts_Response * rhs)
{
if (!lhs || !rhs) {
return false;
}
// sum
if (lhs->sum != rhs->sum) {
return false;
}
return true;
}
bool
tutorial_interfaces__srv__AddThreeInts_Response__copy(
const tutorial_interfaces__srv__AddThreeInts_Response * input,
tutorial_interfaces__srv__AddThreeInts_Response * output)
{
if (!input || !output) {
return false;
}
// sum
output->sum = input->sum;
return true;
}
tutorial_interfaces__srv__AddThreeInts_Response *
tutorial_interfaces__srv__AddThreeInts_Response__create(void)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__srv__AddThreeInts_Response * msg = (tutorial_interfaces__srv__AddThreeInts_Response *)allocator.allocate(sizeof(tutorial_interfaces__srv__AddThreeInts_Response), allocator.state);
if (!msg) {
return NULL;
}
memset(msg, 0, sizeof(tutorial_interfaces__srv__AddThreeInts_Response));
bool success = tutorial_interfaces__srv__AddThreeInts_Response__init(msg);
if (!success) {
allocator.deallocate(msg, allocator.state);
return NULL;
}
return msg;
}
void
tutorial_interfaces__srv__AddThreeInts_Response__destroy(tutorial_interfaces__srv__AddThreeInts_Response * msg)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
if (msg) {
tutorial_interfaces__srv__AddThreeInts_Response__fini(msg);
}
allocator.deallocate(msg, allocator.state);
}
bool
tutorial_interfaces__srv__AddThreeInts_Response__Sequence__init(tutorial_interfaces__srv__AddThreeInts_Response__Sequence * array, size_t size)
{
if (!array) {
return false;
}
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__srv__AddThreeInts_Response * data = NULL;
if (size) {
data = (tutorial_interfaces__srv__AddThreeInts_Response *)allocator.zero_allocate(size, sizeof(tutorial_interfaces__srv__AddThreeInts_Response), allocator.state);
if (!data) {
return false;
}
// initialize all array elements
size_t i;
for (i = 0; i < size; ++i) {
bool success = tutorial_interfaces__srv__AddThreeInts_Response__init(&data[i]);
if (!success) {
break;
}
}
if (i < size) {
// if initialization failed finalize the already initialized array elements
for (; i > 0; --i) {
tutorial_interfaces__srv__AddThreeInts_Response__fini(&data[i - 1]);
}
allocator.deallocate(data, allocator.state);
return false;
}
}
array->data = data;
array->size = size;
array->capacity = size;
return true;
}
void
tutorial_interfaces__srv__AddThreeInts_Response__Sequence__fini(tutorial_interfaces__srv__AddThreeInts_Response__Sequence * array)
{
if (!array) {
return;
}
rcutils_allocator_t allocator = rcutils_get_default_allocator();
if (array->data) {
// ensure that data and capacity values are consistent
assert(array->capacity > 0);
// finalize all array elements
for (size_t i = 0; i < array->capacity; ++i) {
tutorial_interfaces__srv__AddThreeInts_Response__fini(&array->data[i]);
}
allocator.deallocate(array->data, allocator.state);
array->data = NULL;
array->size = 0;
array->capacity = 0;
} else {
// ensure that data, size, and capacity values are consistent
assert(0 == array->size);
assert(0 == array->capacity);
}
}
tutorial_interfaces__srv__AddThreeInts_Response__Sequence *
tutorial_interfaces__srv__AddThreeInts_Response__Sequence__create(size_t size)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__srv__AddThreeInts_Response__Sequence * array = (tutorial_interfaces__srv__AddThreeInts_Response__Sequence *)allocator.allocate(sizeof(tutorial_interfaces__srv__AddThreeInts_Response__Sequence), allocator.state);
if (!array) {
return NULL;
}
bool success = tutorial_interfaces__srv__AddThreeInts_Response__Sequence__init(array, size);
if (!success) {
allocator.deallocate(array, allocator.state);
return NULL;
}
return array;
}
void
tutorial_interfaces__srv__AddThreeInts_Response__Sequence__destroy(tutorial_interfaces__srv__AddThreeInts_Response__Sequence * array)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
if (array) {
tutorial_interfaces__srv__AddThreeInts_Response__Sequence__fini(array);
}
allocator.deallocate(array, allocator.state);
}
bool
tutorial_interfaces__srv__AddThreeInts_Response__Sequence__are_equal(const tutorial_interfaces__srv__AddThreeInts_Response__Sequence * lhs, const tutorial_interfaces__srv__AddThreeInts_Response__Sequence * rhs)
{
if (!lhs || !rhs) {
return false;
}
if (lhs->size != rhs->size) {
return false;
}
for (size_t i = 0; i < lhs->size; ++i) {
if (!tutorial_interfaces__srv__AddThreeInts_Response__are_equal(&(lhs->data[i]), &(rhs->data[i]))) {
return false;
}
}
return true;
}
bool
tutorial_interfaces__srv__AddThreeInts_Response__Sequence__copy(
const tutorial_interfaces__srv__AddThreeInts_Response__Sequence * input,
tutorial_interfaces__srv__AddThreeInts_Response__Sequence * output)
{
if (!input || !output) {
return false;
}
if (output->capacity < input->size) {
const size_t allocation_size =
input->size * sizeof(tutorial_interfaces__srv__AddThreeInts_Response);
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__srv__AddThreeInts_Response * data =
(tutorial_interfaces__srv__AddThreeInts_Response *)allocator.reallocate(
output->data, allocation_size, allocator.state);
if (!data) {
return false;
}
// If reallocation succeeded, memory may or may not have been moved
// to fulfill the allocation request, invalidating output->data.
output->data = data;
for (size_t i = output->capacity; i < input->size; ++i) {
if (!tutorial_interfaces__srv__AddThreeInts_Response__init(&output->data[i])) {
// If initialization of any new item fails, roll back
// all previously initialized items. Existing items
// in output are to be left unmodified.
for (; i-- > output->capacity; ) {
tutorial_interfaces__srv__AddThreeInts_Response__fini(&output->data[i]);
}
return false;
}
}
output->capacity = input->size;
}
output->size = input->size;
for (size_t i = 0; i < input->size; ++i) {
if (!tutorial_interfaces__srv__AddThreeInts_Response__copy(
&(input->data[i]), &(output->data[i])))
{
return false;
}
}
return true;
}
// Include directives for member types
// Member `info`
#include "service_msgs/msg/detail/service_event_info__functions.h"
// Member `request`
// Member `response`
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
bool
tutorial_interfaces__srv__AddThreeInts_Event__init(tutorial_interfaces__srv__AddThreeInts_Event * msg)
{
if (!msg) {
return false;
}
// info
if (!service_msgs__msg__ServiceEventInfo__init(&msg->info)) {
tutorial_interfaces__srv__AddThreeInts_Event__fini(msg);
return false;
}
// request
if (!tutorial_interfaces__srv__AddThreeInts_Request__Sequence__init(&msg->request, 0)) {
tutorial_interfaces__srv__AddThreeInts_Event__fini(msg);
return false;
}
// response
if (!tutorial_interfaces__srv__AddThreeInts_Response__Sequence__init(&msg->response, 0)) {
tutorial_interfaces__srv__AddThreeInts_Event__fini(msg);
return false;
}
return true;
}
void
tutorial_interfaces__srv__AddThreeInts_Event__fini(tutorial_interfaces__srv__AddThreeInts_Event * msg)
{
if (!msg) {
return;
}
// info
service_msgs__msg__ServiceEventInfo__fini(&msg->info);
// request
tutorial_interfaces__srv__AddThreeInts_Request__Sequence__fini(&msg->request);
// response
tutorial_interfaces__srv__AddThreeInts_Response__Sequence__fini(&msg->response);
}
bool
tutorial_interfaces__srv__AddThreeInts_Event__are_equal(const tutorial_interfaces__srv__AddThreeInts_Event * lhs, const tutorial_interfaces__srv__AddThreeInts_Event * rhs)
{
if (!lhs || !rhs) {
return false;
}
// info
if (!service_msgs__msg__ServiceEventInfo__are_equal(
&(lhs->info), &(rhs->info)))
{
return false;
}
// request
if (!tutorial_interfaces__srv__AddThreeInts_Request__Sequence__are_equal(
&(lhs->request), &(rhs->request)))
{
return false;
}
// response
if (!tutorial_interfaces__srv__AddThreeInts_Response__Sequence__are_equal(
&(lhs->response), &(rhs->response)))
{
return false;
}
return true;
}
bool
tutorial_interfaces__srv__AddThreeInts_Event__copy(
const tutorial_interfaces__srv__AddThreeInts_Event * input,
tutorial_interfaces__srv__AddThreeInts_Event * output)
{
if (!input || !output) {
return false;
}
// info
if (!service_msgs__msg__ServiceEventInfo__copy(
&(input->info), &(output->info)))
{
return false;
}
// request
if (!tutorial_interfaces__srv__AddThreeInts_Request__Sequence__copy(
&(input->request), &(output->request)))
{
return false;
}
// response
if (!tutorial_interfaces__srv__AddThreeInts_Response__Sequence__copy(
&(input->response), &(output->response)))
{
return false;
}
return true;
}
tutorial_interfaces__srv__AddThreeInts_Event *
tutorial_interfaces__srv__AddThreeInts_Event__create(void)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__srv__AddThreeInts_Event * msg = (tutorial_interfaces__srv__AddThreeInts_Event *)allocator.allocate(sizeof(tutorial_interfaces__srv__AddThreeInts_Event), allocator.state);
if (!msg) {
return NULL;
}
memset(msg, 0, sizeof(tutorial_interfaces__srv__AddThreeInts_Event));
bool success = tutorial_interfaces__srv__AddThreeInts_Event__init(msg);
if (!success) {
allocator.deallocate(msg, allocator.state);
return NULL;
}
return msg;
}
void
tutorial_interfaces__srv__AddThreeInts_Event__destroy(tutorial_interfaces__srv__AddThreeInts_Event * msg)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
if (msg) {
tutorial_interfaces__srv__AddThreeInts_Event__fini(msg);
}
allocator.deallocate(msg, allocator.state);
}
bool
tutorial_interfaces__srv__AddThreeInts_Event__Sequence__init(tutorial_interfaces__srv__AddThreeInts_Event__Sequence * array, size_t size)
{
if (!array) {
return false;
}
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__srv__AddThreeInts_Event * data = NULL;
if (size) {
data = (tutorial_interfaces__srv__AddThreeInts_Event *)allocator.zero_allocate(size, sizeof(tutorial_interfaces__srv__AddThreeInts_Event), allocator.state);
if (!data) {
return false;
}
// initialize all array elements
size_t i;
for (i = 0; i < size; ++i) {
bool success = tutorial_interfaces__srv__AddThreeInts_Event__init(&data[i]);
if (!success) {
break;
}
}
if (i < size) {
// if initialization failed finalize the already initialized array elements
for (; i > 0; --i) {
tutorial_interfaces__srv__AddThreeInts_Event__fini(&data[i - 1]);
}
allocator.deallocate(data, allocator.state);
return false;
}
}
array->data = data;
array->size = size;
array->capacity = size;
return true;
}
void
tutorial_interfaces__srv__AddThreeInts_Event__Sequence__fini(tutorial_interfaces__srv__AddThreeInts_Event__Sequence * array)
{
if (!array) {
return;
}
rcutils_allocator_t allocator = rcutils_get_default_allocator();
if (array->data) {
// ensure that data and capacity values are consistent
assert(array->capacity > 0);
// finalize all array elements
for (size_t i = 0; i < array->capacity; ++i) {
tutorial_interfaces__srv__AddThreeInts_Event__fini(&array->data[i]);
}
allocator.deallocate(array->data, allocator.state);
array->data = NULL;
array->size = 0;
array->capacity = 0;
} else {
// ensure that data, size, and capacity values are consistent
assert(0 == array->size);
assert(0 == array->capacity);
}
}
tutorial_interfaces__srv__AddThreeInts_Event__Sequence *
tutorial_interfaces__srv__AddThreeInts_Event__Sequence__create(size_t size)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__srv__AddThreeInts_Event__Sequence * array = (tutorial_interfaces__srv__AddThreeInts_Event__Sequence *)allocator.allocate(sizeof(tutorial_interfaces__srv__AddThreeInts_Event__Sequence), allocator.state);
if (!array) {
return NULL;
}
bool success = tutorial_interfaces__srv__AddThreeInts_Event__Sequence__init(array, size);
if (!success) {
allocator.deallocate(array, allocator.state);
return NULL;
}
return array;
}
void
tutorial_interfaces__srv__AddThreeInts_Event__Sequence__destroy(tutorial_interfaces__srv__AddThreeInts_Event__Sequence * array)
{
rcutils_allocator_t allocator = rcutils_get_default_allocator();
if (array) {
tutorial_interfaces__srv__AddThreeInts_Event__Sequence__fini(array);
}
allocator.deallocate(array, allocator.state);
}
bool
tutorial_interfaces__srv__AddThreeInts_Event__Sequence__are_equal(const tutorial_interfaces__srv__AddThreeInts_Event__Sequence * lhs, const tutorial_interfaces__srv__AddThreeInts_Event__Sequence * rhs)
{
if (!lhs || !rhs) {
return false;
}
if (lhs->size != rhs->size) {
return false;
}
for (size_t i = 0; i < lhs->size; ++i) {
if (!tutorial_interfaces__srv__AddThreeInts_Event__are_equal(&(lhs->data[i]), &(rhs->data[i]))) {
return false;
}
}
return true;
}
bool
tutorial_interfaces__srv__AddThreeInts_Event__Sequence__copy(
const tutorial_interfaces__srv__AddThreeInts_Event__Sequence * input,
tutorial_interfaces__srv__AddThreeInts_Event__Sequence * output)
{
if (!input || !output) {
return false;
}
if (output->capacity < input->size) {
const size_t allocation_size =
input->size * sizeof(tutorial_interfaces__srv__AddThreeInts_Event);
rcutils_allocator_t allocator = rcutils_get_default_allocator();
tutorial_interfaces__srv__AddThreeInts_Event * data =
(tutorial_interfaces__srv__AddThreeInts_Event *)allocator.reallocate(
output->data, allocation_size, allocator.state);
if (!data) {
return false;
}
// If reallocation succeeded, memory may or may not have been moved
// to fulfill the allocation request, invalidating output->data.
output->data = data;
for (size_t i = output->capacity; i < input->size; ++i) {
if (!tutorial_interfaces__srv__AddThreeInts_Event__init(&output->data[i])) {
// If initialization of any new item fails, roll back
// all previously initialized items. Existing items
// in output are to be left unmodified.
for (; i-- > output->capacity; ) {
tutorial_interfaces__srv__AddThreeInts_Event__fini(&output->data[i]);
}
return false;
}
}
output->capacity = input->size;
}
output->size = input->size;
for (size_t i = 0; i < input->size; ++i) {
if (!tutorial_interfaces__srv__AddThreeInts_Event__copy(
&(input->data[i]), &(output->data[i])))
{
return false;
}
}
return true;
}

View File

@@ -0,0 +1,585 @@
// generated from rosidl_generator_c/resource/idl__functions.h.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/srv/add_three_ints.h"
#ifndef TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__FUNCTIONS_H_
#define TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__FUNCTIONS_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdbool.h>
#include <stdlib.h>
#include "rosidl_runtime_c/action_type_support_struct.h"
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_runtime_c/service_type_support_struct.h"
#include "rosidl_runtime_c/type_description/type_description__struct.h"
#include "rosidl_runtime_c/type_description/type_source__struct.h"
#include "rosidl_runtime_c/type_hash.h"
#include "rosidl_runtime_c/visibility_control.h"
#include "tutorial_interfaces/msg/rosidl_generator_c__visibility_control.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
/// Retrieve pointer to the hash of the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_type_hash_t *
tutorial_interfaces__srv__AddThreeInts__get_type_hash(
const rosidl_service_type_support_t * type_support);
/// Retrieve pointer to the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeDescription *
tutorial_interfaces__srv__AddThreeInts__get_type_description(
const rosidl_service_type_support_t * type_support);
/// Retrieve pointer to the single raw source text that defined this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeSource *
tutorial_interfaces__srv__AddThreeInts__get_individual_type_description_source(
const rosidl_service_type_support_t * type_support);
/// Retrieve pointer to the recursive raw sources that defined the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeSource__Sequence *
tutorial_interfaces__srv__AddThreeInts__get_type_description_sources(
const rosidl_service_type_support_t * type_support);
/// Initialize srv/AddThreeInts message.
/**
* If the init function is called twice for the same message without
* calling fini inbetween previously allocated memory will be leaked.
* \param[in,out] msg The previously allocated message pointer.
* Fields without a default value will not be initialized by this function.
* You might want to call memset(msg, 0, sizeof(
* tutorial_interfaces__srv__AddThreeInts_Request
* )) before or use
* tutorial_interfaces__srv__AddThreeInts_Request__create()
* to allocate and initialize the message.
* \return true if initialization was successful, otherwise false
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Request__init(tutorial_interfaces__srv__AddThreeInts_Request * msg);
/// Finalize srv/AddThreeInts message.
/**
* \param[in,out] msg The allocated message pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__srv__AddThreeInts_Request__fini(tutorial_interfaces__srv__AddThreeInts_Request * msg);
/// Create srv/AddThreeInts message.
/**
* It allocates the memory for the message, sets the memory to zero, and
* calls
* tutorial_interfaces__srv__AddThreeInts_Request__init().
* \return The pointer to the initialized message if successful,
* otherwise NULL
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
tutorial_interfaces__srv__AddThreeInts_Request *
tutorial_interfaces__srv__AddThreeInts_Request__create(void);
/// Destroy srv/AddThreeInts message.
/**
* It calls
* tutorial_interfaces__srv__AddThreeInts_Request__fini()
* and frees the memory of the message.
* \param[in,out] msg The allocated message pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__srv__AddThreeInts_Request__destroy(tutorial_interfaces__srv__AddThreeInts_Request * msg);
/// Check for srv/AddThreeInts message equality.
/**
* \param[in] lhs The message on the left hand size of the equality operator.
* \param[in] rhs The message on the right hand size of the equality operator.
* \return true if messages are equal, otherwise false.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Request__are_equal(const tutorial_interfaces__srv__AddThreeInts_Request * lhs, const tutorial_interfaces__srv__AddThreeInts_Request * rhs);
/// Copy a srv/AddThreeInts message.
/**
* This functions performs a deep copy, as opposed to the shallow copy that
* plain assignment yields.
*
* \param[in] input The source message pointer.
* \param[out] output The target message pointer, which must
* have been initialized before calling this function.
* \return true if successful, or false if either pointer is null
* or memory allocation fails.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Request__copy(
const tutorial_interfaces__srv__AddThreeInts_Request * input,
tutorial_interfaces__srv__AddThreeInts_Request * output);
/// Retrieve pointer to the hash of the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_type_hash_t *
tutorial_interfaces__srv__AddThreeInts_Request__get_type_hash(
const rosidl_message_type_support_t * type_support);
/// Retrieve pointer to the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeDescription *
tutorial_interfaces__srv__AddThreeInts_Request__get_type_description(
const rosidl_message_type_support_t * type_support);
/// Retrieve pointer to the single raw source text that defined this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeSource *
tutorial_interfaces__srv__AddThreeInts_Request__get_individual_type_description_source(
const rosidl_message_type_support_t * type_support);
/// Retrieve pointer to the recursive raw sources that defined the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeSource__Sequence *
tutorial_interfaces__srv__AddThreeInts_Request__get_type_description_sources(
const rosidl_message_type_support_t * type_support);
/// Initialize array of srv/AddThreeInts messages.
/**
* It allocates the memory for the number of elements and calls
* tutorial_interfaces__srv__AddThreeInts_Request__init()
* for each element of the array.
* \param[in,out] array The allocated array pointer.
* \param[in] size The size / capacity of the array.
* \return true if initialization was successful, otherwise false
* If the array pointer is valid and the size is zero it is guaranteed
# to return true.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Request__Sequence__init(tutorial_interfaces__srv__AddThreeInts_Request__Sequence * array, size_t size);
/// Finalize array of srv/AddThreeInts messages.
/**
* It calls
* tutorial_interfaces__srv__AddThreeInts_Request__fini()
* for each element of the array and frees the memory for the number of
* elements.
* \param[in,out] array The initialized array pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__srv__AddThreeInts_Request__Sequence__fini(tutorial_interfaces__srv__AddThreeInts_Request__Sequence * array);
/// Create array of srv/AddThreeInts messages.
/**
* It allocates the memory for the array and calls
* tutorial_interfaces__srv__AddThreeInts_Request__Sequence__init().
* \param[in] size The size / capacity of the array.
* \return The pointer to the initialized array if successful, otherwise NULL
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
tutorial_interfaces__srv__AddThreeInts_Request__Sequence *
tutorial_interfaces__srv__AddThreeInts_Request__Sequence__create(size_t size);
/// Destroy array of srv/AddThreeInts messages.
/**
* It calls
* tutorial_interfaces__srv__AddThreeInts_Request__Sequence__fini()
* on the array,
* and frees the memory of the array.
* \param[in,out] array The initialized array pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__srv__AddThreeInts_Request__Sequence__destroy(tutorial_interfaces__srv__AddThreeInts_Request__Sequence * array);
/// Check for srv/AddThreeInts message array equality.
/**
* \param[in] lhs The message array on the left hand size of the equality operator.
* \param[in] rhs The message array on the right hand size of the equality operator.
* \return true if message arrays are equal in size and content, otherwise false.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Request__Sequence__are_equal(const tutorial_interfaces__srv__AddThreeInts_Request__Sequence * lhs, const tutorial_interfaces__srv__AddThreeInts_Request__Sequence * rhs);
/// Copy an array of srv/AddThreeInts messages.
/**
* This functions performs a deep copy, as opposed to the shallow copy that
* plain assignment yields.
*
* \param[in] input The source array pointer.
* \param[out] output The target array pointer, which must
* have been initialized before calling this function.
* \return true if successful, or false if either pointer
* is null or memory allocation fails.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Request__Sequence__copy(
const tutorial_interfaces__srv__AddThreeInts_Request__Sequence * input,
tutorial_interfaces__srv__AddThreeInts_Request__Sequence * output);
/// Initialize srv/AddThreeInts message.
/**
* If the init function is called twice for the same message without
* calling fini inbetween previously allocated memory will be leaked.
* \param[in,out] msg The previously allocated message pointer.
* Fields without a default value will not be initialized by this function.
* You might want to call memset(msg, 0, sizeof(
* tutorial_interfaces__srv__AddThreeInts_Response
* )) before or use
* tutorial_interfaces__srv__AddThreeInts_Response__create()
* to allocate and initialize the message.
* \return true if initialization was successful, otherwise false
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Response__init(tutorial_interfaces__srv__AddThreeInts_Response * msg);
/// Finalize srv/AddThreeInts message.
/**
* \param[in,out] msg The allocated message pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__srv__AddThreeInts_Response__fini(tutorial_interfaces__srv__AddThreeInts_Response * msg);
/// Create srv/AddThreeInts message.
/**
* It allocates the memory for the message, sets the memory to zero, and
* calls
* tutorial_interfaces__srv__AddThreeInts_Response__init().
* \return The pointer to the initialized message if successful,
* otherwise NULL
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
tutorial_interfaces__srv__AddThreeInts_Response *
tutorial_interfaces__srv__AddThreeInts_Response__create(void);
/// Destroy srv/AddThreeInts message.
/**
* It calls
* tutorial_interfaces__srv__AddThreeInts_Response__fini()
* and frees the memory of the message.
* \param[in,out] msg The allocated message pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__srv__AddThreeInts_Response__destroy(tutorial_interfaces__srv__AddThreeInts_Response * msg);
/// Check for srv/AddThreeInts message equality.
/**
* \param[in] lhs The message on the left hand size of the equality operator.
* \param[in] rhs The message on the right hand size of the equality operator.
* \return true if messages are equal, otherwise false.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Response__are_equal(const tutorial_interfaces__srv__AddThreeInts_Response * lhs, const tutorial_interfaces__srv__AddThreeInts_Response * rhs);
/// Copy a srv/AddThreeInts message.
/**
* This functions performs a deep copy, as opposed to the shallow copy that
* plain assignment yields.
*
* \param[in] input The source message pointer.
* \param[out] output The target message pointer, which must
* have been initialized before calling this function.
* \return true if successful, or false if either pointer is null
* or memory allocation fails.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Response__copy(
const tutorial_interfaces__srv__AddThreeInts_Response * input,
tutorial_interfaces__srv__AddThreeInts_Response * output);
/// Retrieve pointer to the hash of the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_type_hash_t *
tutorial_interfaces__srv__AddThreeInts_Response__get_type_hash(
const rosidl_message_type_support_t * type_support);
/// Retrieve pointer to the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeDescription *
tutorial_interfaces__srv__AddThreeInts_Response__get_type_description(
const rosidl_message_type_support_t * type_support);
/// Retrieve pointer to the single raw source text that defined this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeSource *
tutorial_interfaces__srv__AddThreeInts_Response__get_individual_type_description_source(
const rosidl_message_type_support_t * type_support);
/// Retrieve pointer to the recursive raw sources that defined the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeSource__Sequence *
tutorial_interfaces__srv__AddThreeInts_Response__get_type_description_sources(
const rosidl_message_type_support_t * type_support);
/// Initialize array of srv/AddThreeInts messages.
/**
* It allocates the memory for the number of elements and calls
* tutorial_interfaces__srv__AddThreeInts_Response__init()
* for each element of the array.
* \param[in,out] array The allocated array pointer.
* \param[in] size The size / capacity of the array.
* \return true if initialization was successful, otherwise false
* If the array pointer is valid and the size is zero it is guaranteed
# to return true.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Response__Sequence__init(tutorial_interfaces__srv__AddThreeInts_Response__Sequence * array, size_t size);
/// Finalize array of srv/AddThreeInts messages.
/**
* It calls
* tutorial_interfaces__srv__AddThreeInts_Response__fini()
* for each element of the array and frees the memory for the number of
* elements.
* \param[in,out] array The initialized array pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__srv__AddThreeInts_Response__Sequence__fini(tutorial_interfaces__srv__AddThreeInts_Response__Sequence * array);
/// Create array of srv/AddThreeInts messages.
/**
* It allocates the memory for the array and calls
* tutorial_interfaces__srv__AddThreeInts_Response__Sequence__init().
* \param[in] size The size / capacity of the array.
* \return The pointer to the initialized array if successful, otherwise NULL
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
tutorial_interfaces__srv__AddThreeInts_Response__Sequence *
tutorial_interfaces__srv__AddThreeInts_Response__Sequence__create(size_t size);
/// Destroy array of srv/AddThreeInts messages.
/**
* It calls
* tutorial_interfaces__srv__AddThreeInts_Response__Sequence__fini()
* on the array,
* and frees the memory of the array.
* \param[in,out] array The initialized array pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__srv__AddThreeInts_Response__Sequence__destroy(tutorial_interfaces__srv__AddThreeInts_Response__Sequence * array);
/// Check for srv/AddThreeInts message array equality.
/**
* \param[in] lhs The message array on the left hand size of the equality operator.
* \param[in] rhs The message array on the right hand size of the equality operator.
* \return true if message arrays are equal in size and content, otherwise false.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Response__Sequence__are_equal(const tutorial_interfaces__srv__AddThreeInts_Response__Sequence * lhs, const tutorial_interfaces__srv__AddThreeInts_Response__Sequence * rhs);
/// Copy an array of srv/AddThreeInts messages.
/**
* This functions performs a deep copy, as opposed to the shallow copy that
* plain assignment yields.
*
* \param[in] input The source array pointer.
* \param[out] output The target array pointer, which must
* have been initialized before calling this function.
* \return true if successful, or false if either pointer
* is null or memory allocation fails.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Response__Sequence__copy(
const tutorial_interfaces__srv__AddThreeInts_Response__Sequence * input,
tutorial_interfaces__srv__AddThreeInts_Response__Sequence * output);
/// Initialize srv/AddThreeInts message.
/**
* If the init function is called twice for the same message without
* calling fini inbetween previously allocated memory will be leaked.
* \param[in,out] msg The previously allocated message pointer.
* Fields without a default value will not be initialized by this function.
* You might want to call memset(msg, 0, sizeof(
* tutorial_interfaces__srv__AddThreeInts_Event
* )) before or use
* tutorial_interfaces__srv__AddThreeInts_Event__create()
* to allocate and initialize the message.
* \return true if initialization was successful, otherwise false
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Event__init(tutorial_interfaces__srv__AddThreeInts_Event * msg);
/// Finalize srv/AddThreeInts message.
/**
* \param[in,out] msg The allocated message pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__srv__AddThreeInts_Event__fini(tutorial_interfaces__srv__AddThreeInts_Event * msg);
/// Create srv/AddThreeInts message.
/**
* It allocates the memory for the message, sets the memory to zero, and
* calls
* tutorial_interfaces__srv__AddThreeInts_Event__init().
* \return The pointer to the initialized message if successful,
* otherwise NULL
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
tutorial_interfaces__srv__AddThreeInts_Event *
tutorial_interfaces__srv__AddThreeInts_Event__create(void);
/// Destroy srv/AddThreeInts message.
/**
* It calls
* tutorial_interfaces__srv__AddThreeInts_Event__fini()
* and frees the memory of the message.
* \param[in,out] msg The allocated message pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__srv__AddThreeInts_Event__destroy(tutorial_interfaces__srv__AddThreeInts_Event * msg);
/// Check for srv/AddThreeInts message equality.
/**
* \param[in] lhs The message on the left hand size of the equality operator.
* \param[in] rhs The message on the right hand size of the equality operator.
* \return true if messages are equal, otherwise false.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Event__are_equal(const tutorial_interfaces__srv__AddThreeInts_Event * lhs, const tutorial_interfaces__srv__AddThreeInts_Event * rhs);
/// Copy a srv/AddThreeInts message.
/**
* This functions performs a deep copy, as opposed to the shallow copy that
* plain assignment yields.
*
* \param[in] input The source message pointer.
* \param[out] output The target message pointer, which must
* have been initialized before calling this function.
* \return true if successful, or false if either pointer is null
* or memory allocation fails.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Event__copy(
const tutorial_interfaces__srv__AddThreeInts_Event * input,
tutorial_interfaces__srv__AddThreeInts_Event * output);
/// Retrieve pointer to the hash of the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_type_hash_t *
tutorial_interfaces__srv__AddThreeInts_Event__get_type_hash(
const rosidl_message_type_support_t * type_support);
/// Retrieve pointer to the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeDescription *
tutorial_interfaces__srv__AddThreeInts_Event__get_type_description(
const rosidl_message_type_support_t * type_support);
/// Retrieve pointer to the single raw source text that defined this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeSource *
tutorial_interfaces__srv__AddThreeInts_Event__get_individual_type_description_source(
const rosidl_message_type_support_t * type_support);
/// Retrieve pointer to the recursive raw sources that defined the description of this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_runtime_c__type_description__TypeSource__Sequence *
tutorial_interfaces__srv__AddThreeInts_Event__get_type_description_sources(
const rosidl_message_type_support_t * type_support);
/// Initialize array of srv/AddThreeInts messages.
/**
* It allocates the memory for the number of elements and calls
* tutorial_interfaces__srv__AddThreeInts_Event__init()
* for each element of the array.
* \param[in,out] array The allocated array pointer.
* \param[in] size The size / capacity of the array.
* \return true if initialization was successful, otherwise false
* If the array pointer is valid and the size is zero it is guaranteed
# to return true.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Event__Sequence__init(tutorial_interfaces__srv__AddThreeInts_Event__Sequence * array, size_t size);
/// Finalize array of srv/AddThreeInts messages.
/**
* It calls
* tutorial_interfaces__srv__AddThreeInts_Event__fini()
* for each element of the array and frees the memory for the number of
* elements.
* \param[in,out] array The initialized array pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__srv__AddThreeInts_Event__Sequence__fini(tutorial_interfaces__srv__AddThreeInts_Event__Sequence * array);
/// Create array of srv/AddThreeInts messages.
/**
* It allocates the memory for the array and calls
* tutorial_interfaces__srv__AddThreeInts_Event__Sequence__init().
* \param[in] size The size / capacity of the array.
* \return The pointer to the initialized array if successful, otherwise NULL
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
tutorial_interfaces__srv__AddThreeInts_Event__Sequence *
tutorial_interfaces__srv__AddThreeInts_Event__Sequence__create(size_t size);
/// Destroy array of srv/AddThreeInts messages.
/**
* It calls
* tutorial_interfaces__srv__AddThreeInts_Event__Sequence__fini()
* on the array,
* and frees the memory of the array.
* \param[in,out] array The initialized array pointer.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void
tutorial_interfaces__srv__AddThreeInts_Event__Sequence__destroy(tutorial_interfaces__srv__AddThreeInts_Event__Sequence * array);
/// Check for srv/AddThreeInts message array equality.
/**
* \param[in] lhs The message array on the left hand size of the equality operator.
* \param[in] rhs The message array on the right hand size of the equality operator.
* \return true if message arrays are equal in size and content, otherwise false.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Event__Sequence__are_equal(const tutorial_interfaces__srv__AddThreeInts_Event__Sequence * lhs, const tutorial_interfaces__srv__AddThreeInts_Event__Sequence * rhs);
/// Copy an array of srv/AddThreeInts messages.
/**
* This functions performs a deep copy, as opposed to the shallow copy that
* plain assignment yields.
*
* \param[in] input The source array pointer.
* \param[out] output The target array pointer, which must
* have been initialized before calling this function.
* \return true if successful, or false if either pointer
* is null or memory allocation fails.
*/
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
tutorial_interfaces__srv__AddThreeInts_Event__Sequence__copy(
const tutorial_interfaces__srv__AddThreeInts_Event__Sequence * input,
tutorial_interfaces__srv__AddThreeInts_Event__Sequence * output);
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__FUNCTIONS_H_

View File

@@ -0,0 +1,210 @@
// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_
#define TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_
#include <stddef.h>
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
#include "fastcdr/Cdr.h"
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
bool cdr_serialize_tutorial_interfaces__srv__AddThreeInts_Request(
const tutorial_interfaces__srv__AddThreeInts_Request * ros_message,
eprosima::fastcdr::Cdr & cdr);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
bool cdr_deserialize_tutorial_interfaces__srv__AddThreeInts_Request(
eprosima::fastcdr::Cdr &,
tutorial_interfaces__srv__AddThreeInts_Request * ros_message);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t get_serialized_size_tutorial_interfaces__srv__AddThreeInts_Request(
const void * untyped_ros_message,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t max_serialized_size_tutorial_interfaces__srv__AddThreeInts_Request(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
bool cdr_serialize_key_tutorial_interfaces__srv__AddThreeInts_Request(
const tutorial_interfaces__srv__AddThreeInts_Request * ros_message,
eprosima::fastcdr::Cdr & cdr);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t get_serialized_size_key_tutorial_interfaces__srv__AddThreeInts_Request(
const void * untyped_ros_message,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t max_serialized_size_key_tutorial_interfaces__srv__AddThreeInts_Request(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, tutorial_interfaces, srv, AddThreeInts_Request)();
#ifdef __cplusplus
}
#endif
// already included above
// #include <stddef.h>
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_typesupport_interface/macros.h"
// already included above
// #include "tutorial_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
// already included above
// #include "fastcdr/Cdr.h"
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
bool cdr_serialize_tutorial_interfaces__srv__AddThreeInts_Response(
const tutorial_interfaces__srv__AddThreeInts_Response * ros_message,
eprosima::fastcdr::Cdr & cdr);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
bool cdr_deserialize_tutorial_interfaces__srv__AddThreeInts_Response(
eprosima::fastcdr::Cdr &,
tutorial_interfaces__srv__AddThreeInts_Response * ros_message);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t get_serialized_size_tutorial_interfaces__srv__AddThreeInts_Response(
const void * untyped_ros_message,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t max_serialized_size_tutorial_interfaces__srv__AddThreeInts_Response(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
bool cdr_serialize_key_tutorial_interfaces__srv__AddThreeInts_Response(
const tutorial_interfaces__srv__AddThreeInts_Response * ros_message,
eprosima::fastcdr::Cdr & cdr);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t get_serialized_size_key_tutorial_interfaces__srv__AddThreeInts_Response(
const void * untyped_ros_message,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t max_serialized_size_key_tutorial_interfaces__srv__AddThreeInts_Response(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, tutorial_interfaces, srv, AddThreeInts_Response)();
#ifdef __cplusplus
}
#endif
// already included above
// #include <stddef.h>
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_typesupport_interface/macros.h"
// already included above
// #include "tutorial_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
// already included above
// #include "fastcdr/Cdr.h"
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
bool cdr_serialize_tutorial_interfaces__srv__AddThreeInts_Event(
const tutorial_interfaces__srv__AddThreeInts_Event * ros_message,
eprosima::fastcdr::Cdr & cdr);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
bool cdr_deserialize_tutorial_interfaces__srv__AddThreeInts_Event(
eprosima::fastcdr::Cdr &,
tutorial_interfaces__srv__AddThreeInts_Event * ros_message);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t get_serialized_size_tutorial_interfaces__srv__AddThreeInts_Event(
const void * untyped_ros_message,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t max_serialized_size_tutorial_interfaces__srv__AddThreeInts_Event(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
bool cdr_serialize_key_tutorial_interfaces__srv__AddThreeInts_Event(
const tutorial_interfaces__srv__AddThreeInts_Event * ros_message,
eprosima::fastcdr::Cdr & cdr);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t get_serialized_size_key_tutorial_interfaces__srv__AddThreeInts_Event(
const void * untyped_ros_message,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
size_t max_serialized_size_key_tutorial_interfaces__srv__AddThreeInts_Event(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, tutorial_interfaces, srv, AddThreeInts_Event)();
#ifdef __cplusplus
}
#endif
#include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_typesupport_interface/macros.h"
// already included above
// #include "tutorial_interfaces/msg/rosidl_typesupport_fastrtps_c__visibility_control.h"
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_tutorial_interfaces
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, tutorial_interfaces, srv, AddThreeInts)();
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_

View File

@@ -0,0 +1,316 @@
// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_
#define TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_
#include <cstddef>
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__struct.hpp"
#ifndef _WIN32
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
# ifdef __clang__
# pragma clang diagnostic ignored "-Wdeprecated-register"
# pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
# endif
#endif
#ifndef _WIN32
# pragma GCC diagnostic pop
#endif
#include "fastcdr/Cdr.h"
namespace tutorial_interfaces
{
namespace srv
{
namespace typesupport_fastrtps_cpp
{
bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
cdr_serialize(
const tutorial_interfaces::srv::AddThreeInts_Request & ros_message,
eprosima::fastcdr::Cdr & cdr);
bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
cdr_deserialize(
eprosima::fastcdr::Cdr & cdr,
tutorial_interfaces::srv::AddThreeInts_Request & ros_message);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
get_serialized_size(
const tutorial_interfaces::srv::AddThreeInts_Request & ros_message,
size_t current_alignment);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
max_serialized_size_AddThreeInts_Request(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
cdr_serialize_key(
const tutorial_interfaces::srv::AddThreeInts_Request & ros_message,
eprosima::fastcdr::Cdr &);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
get_serialized_size_key(
const tutorial_interfaces::srv::AddThreeInts_Request & ros_message,
size_t current_alignment);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
max_serialized_size_key_AddThreeInts_Request(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
} // namespace typesupport_fastrtps_cpp
} // namespace srv
} // namespace tutorial_interfaces
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, tutorial_interfaces, srv, AddThreeInts_Request)();
#ifdef __cplusplus
}
#endif
// already included above
// #include <cstddef>
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_typesupport_interface/macros.h"
// already included above
// #include "tutorial_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__struct.hpp"
#ifndef _WIN32
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
# ifdef __clang__
# pragma clang diagnostic ignored "-Wdeprecated-register"
# pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
# endif
#endif
#ifndef _WIN32
# pragma GCC diagnostic pop
#endif
// already included above
// #include "fastcdr/Cdr.h"
namespace tutorial_interfaces
{
namespace srv
{
namespace typesupport_fastrtps_cpp
{
bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
cdr_serialize(
const tutorial_interfaces::srv::AddThreeInts_Response & ros_message,
eprosima::fastcdr::Cdr & cdr);
bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
cdr_deserialize(
eprosima::fastcdr::Cdr & cdr,
tutorial_interfaces::srv::AddThreeInts_Response & ros_message);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
get_serialized_size(
const tutorial_interfaces::srv::AddThreeInts_Response & ros_message,
size_t current_alignment);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
max_serialized_size_AddThreeInts_Response(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
cdr_serialize_key(
const tutorial_interfaces::srv::AddThreeInts_Response & ros_message,
eprosima::fastcdr::Cdr &);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
get_serialized_size_key(
const tutorial_interfaces::srv::AddThreeInts_Response & ros_message,
size_t current_alignment);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
max_serialized_size_key_AddThreeInts_Response(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
} // namespace typesupport_fastrtps_cpp
} // namespace srv
} // namespace tutorial_interfaces
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, tutorial_interfaces, srv, AddThreeInts_Response)();
#ifdef __cplusplus
}
#endif
// already included above
// #include <cstddef>
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_typesupport_interface/macros.h"
// already included above
// #include "tutorial_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__struct.hpp"
#ifndef _WIN32
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
# ifdef __clang__
# pragma clang diagnostic ignored "-Wdeprecated-register"
# pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
# endif
#endif
#ifndef _WIN32
# pragma GCC diagnostic pop
#endif
// already included above
// #include "fastcdr/Cdr.h"
namespace tutorial_interfaces
{
namespace srv
{
namespace typesupport_fastrtps_cpp
{
bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
cdr_serialize(
const tutorial_interfaces::srv::AddThreeInts_Event & ros_message,
eprosima::fastcdr::Cdr & cdr);
bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
cdr_deserialize(
eprosima::fastcdr::Cdr & cdr,
tutorial_interfaces::srv::AddThreeInts_Event & ros_message);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
get_serialized_size(
const tutorial_interfaces::srv::AddThreeInts_Event & ros_message,
size_t current_alignment);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
max_serialized_size_AddThreeInts_Event(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
bool
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
cdr_serialize_key(
const tutorial_interfaces::srv::AddThreeInts_Event & ros_message,
eprosima::fastcdr::Cdr &);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
get_serialized_size_key(
const tutorial_interfaces::srv::AddThreeInts_Event & ros_message,
size_t current_alignment);
size_t
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
max_serialized_size_key_AddThreeInts_Event(
bool & full_bounded,
bool & is_plain,
size_t current_alignment);
} // namespace typesupport_fastrtps_cpp
} // namespace srv
} // namespace tutorial_interfaces
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, tutorial_interfaces, srv, AddThreeInts_Event)();
#ifdef __cplusplus
}
#endif
#include "rmw/types.h"
#include "rosidl_typesupport_cpp/service_type_support.hpp"
// already included above
// #include "rosidl_typesupport_interface/macros.h"
// already included above
// #include "tutorial_interfaces/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h"
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_tutorial_interfaces
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, tutorial_interfaces, srv, AddThreeInts)();
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_

View File

@@ -0,0 +1,58 @@
// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_
#define TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h"
ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tutorial_interfaces, srv, AddThreeInts_Request)();
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_typesupport_interface/macros.h"
// already included above
// #include "tutorial_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h"
ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tutorial_interfaces, srv, AddThreeInts_Response)();
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_typesupport_interface/macros.h"
// already included above
// #include "tutorial_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h"
ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tutorial_interfaces, srv, AddThreeInts_Event)();
#include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_typesupport_interface/macros.h"
// already included above
// #include "tutorial_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h"
ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_tutorial_interfaces
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tutorial_interfaces, srv, AddThreeInts)();
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_

View File

@@ -0,0 +1,88 @@
// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_
#define TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_typesupport_interface/macros.h"
#include "rosidl_typesupport_introspection_cpp/visibility_control.h"
#ifdef __cplusplus
extern "C"
{
#endif
// TODO(dirk-thomas) these visibility macros should be message package specific
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, tutorial_interfaces, srv, AddThreeInts_Request)();
#ifdef __cplusplus
}
#endif
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_typesupport_interface/macros.h"
// already included above
// #include "rosidl_typesupport_introspection_cpp/visibility_control.h"
#ifdef __cplusplus
extern "C"
{
#endif
// TODO(dirk-thomas) these visibility macros should be message package specific
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, tutorial_interfaces, srv, AddThreeInts_Response)();
#ifdef __cplusplus
}
#endif
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_typesupport_interface/macros.h"
// already included above
// #include "rosidl_typesupport_introspection_cpp/visibility_control.h"
#ifdef __cplusplus
extern "C"
{
#endif
// TODO(dirk-thomas) these visibility macros should be message package specific
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, tutorial_interfaces, srv, AddThreeInts_Event)();
#ifdef __cplusplus
}
#endif
#include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_typesupport_interface/macros.h"
// already included above
// #include "rosidl_typesupport_introspection_cpp/visibility_control.h"
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, tutorial_interfaces, srv, AddThreeInts)();
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_

View File

@@ -0,0 +1,99 @@
// generated from rosidl_generator_c/resource/idl__struct.h.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/srv/add_three_ints.h"
#ifndef TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__STRUCT_H_
#define TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__STRUCT_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
// Constants defined in the message
/// Struct defined in srv/AddThreeInts in the package tutorial_interfaces.
typedef struct tutorial_interfaces__srv__AddThreeInts_Request
{
int64_t a;
int64_t b;
int64_t c;
} tutorial_interfaces__srv__AddThreeInts_Request;
// Struct for a sequence of tutorial_interfaces__srv__AddThreeInts_Request.
typedef struct tutorial_interfaces__srv__AddThreeInts_Request__Sequence
{
tutorial_interfaces__srv__AddThreeInts_Request * data;
/// The number of valid items in data
size_t size;
/// The number of allocated items in data
size_t capacity;
} tutorial_interfaces__srv__AddThreeInts_Request__Sequence;
// Constants defined in the message
/// Struct defined in srv/AddThreeInts in the package tutorial_interfaces.
typedef struct tutorial_interfaces__srv__AddThreeInts_Response
{
int64_t sum;
} tutorial_interfaces__srv__AddThreeInts_Response;
// Struct for a sequence of tutorial_interfaces__srv__AddThreeInts_Response.
typedef struct tutorial_interfaces__srv__AddThreeInts_Response__Sequence
{
tutorial_interfaces__srv__AddThreeInts_Response * data;
/// The number of valid items in data
size_t size;
/// The number of allocated items in data
size_t capacity;
} tutorial_interfaces__srv__AddThreeInts_Response__Sequence;
// Constants defined in the message
// Include directives for member types
// Member 'info'
#include "service_msgs/msg/detail/service_event_info__struct.h"
// constants for array fields with an upper bound
// request
enum
{
tutorial_interfaces__srv__AddThreeInts_Event__request__MAX_SIZE = 1
};
// response
enum
{
tutorial_interfaces__srv__AddThreeInts_Event__response__MAX_SIZE = 1
};
/// Struct defined in srv/AddThreeInts in the package tutorial_interfaces.
typedef struct tutorial_interfaces__srv__AddThreeInts_Event
{
service_msgs__msg__ServiceEventInfo info;
tutorial_interfaces__srv__AddThreeInts_Request__Sequence request;
tutorial_interfaces__srv__AddThreeInts_Response__Sequence response;
} tutorial_interfaces__srv__AddThreeInts_Event;
// Struct for a sequence of tutorial_interfaces__srv__AddThreeInts_Event.
typedef struct tutorial_interfaces__srv__AddThreeInts_Event__Sequence
{
tutorial_interfaces__srv__AddThreeInts_Event * data;
/// The number of valid items in data
size_t size;
/// The number of allocated items in data
size_t capacity;
} tutorial_interfaces__srv__AddThreeInts_Event__Sequence;
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__STRUCT_H_

View File

@@ -0,0 +1,428 @@
// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/srv/add_three_ints.hpp"
#ifndef TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__STRUCT_HPP_
#define TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__STRUCT_HPP_
#include <algorithm>
#include <array>
#include <memory>
#include <string>
#include <vector>
#include "rosidl_runtime_cpp/bounded_vector.hpp"
#include "rosidl_runtime_cpp/message_initialization.hpp"
#ifndef _WIN32
# define DEPRECATED__tutorial_interfaces__srv__AddThreeInts_Request __attribute__((deprecated))
#else
# define DEPRECATED__tutorial_interfaces__srv__AddThreeInts_Request __declspec(deprecated)
#endif
namespace tutorial_interfaces
{
namespace srv
{
// message struct
template<class ContainerAllocator>
struct AddThreeInts_Request_
{
using Type = AddThreeInts_Request_<ContainerAllocator>;
explicit AddThreeInts_Request_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL)
{
if (rosidl_runtime_cpp::MessageInitialization::ALL == _init ||
rosidl_runtime_cpp::MessageInitialization::ZERO == _init)
{
this->a = 0ll;
this->b = 0ll;
this->c = 0ll;
}
}
explicit AddThreeInts_Request_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL)
{
(void)_alloc;
if (rosidl_runtime_cpp::MessageInitialization::ALL == _init ||
rosidl_runtime_cpp::MessageInitialization::ZERO == _init)
{
this->a = 0ll;
this->b = 0ll;
this->c = 0ll;
}
}
// field types and members
using _a_type =
int64_t;
_a_type a;
using _b_type =
int64_t;
_b_type b;
using _c_type =
int64_t;
_c_type c;
// setters for named parameter idiom
Type & set__a(
const int64_t & _arg)
{
this->a = _arg;
return *this;
}
Type & set__b(
const int64_t & _arg)
{
this->b = _arg;
return *this;
}
Type & set__c(
const int64_t & _arg)
{
this->c = _arg;
return *this;
}
// constant declarations
// pointer types
using RawPtr =
tutorial_interfaces::srv::AddThreeInts_Request_<ContainerAllocator> *;
using ConstRawPtr =
const tutorial_interfaces::srv::AddThreeInts_Request_<ContainerAllocator> *;
using SharedPtr =
std::shared_ptr<tutorial_interfaces::srv::AddThreeInts_Request_<ContainerAllocator>>;
using ConstSharedPtr =
std::shared_ptr<tutorial_interfaces::srv::AddThreeInts_Request_<ContainerAllocator> const>;
template<typename Deleter = std::default_delete<
tutorial_interfaces::srv::AddThreeInts_Request_<ContainerAllocator>>>
using UniquePtrWithDeleter =
std::unique_ptr<tutorial_interfaces::srv::AddThreeInts_Request_<ContainerAllocator>, Deleter>;
using UniquePtr = UniquePtrWithDeleter<>;
template<typename Deleter = std::default_delete<
tutorial_interfaces::srv::AddThreeInts_Request_<ContainerAllocator>>>
using ConstUniquePtrWithDeleter =
std::unique_ptr<tutorial_interfaces::srv::AddThreeInts_Request_<ContainerAllocator> const, Deleter>;
using ConstUniquePtr = ConstUniquePtrWithDeleter<>;
using WeakPtr =
std::weak_ptr<tutorial_interfaces::srv::AddThreeInts_Request_<ContainerAllocator>>;
using ConstWeakPtr =
std::weak_ptr<tutorial_interfaces::srv::AddThreeInts_Request_<ContainerAllocator> const>;
// pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead
// NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly
typedef DEPRECATED__tutorial_interfaces__srv__AddThreeInts_Request
std::shared_ptr<tutorial_interfaces::srv::AddThreeInts_Request_<ContainerAllocator>>
Ptr;
typedef DEPRECATED__tutorial_interfaces__srv__AddThreeInts_Request
std::shared_ptr<tutorial_interfaces::srv::AddThreeInts_Request_<ContainerAllocator> const>
ConstPtr;
// comparison operators
bool operator==(const AddThreeInts_Request_ & other) const
{
if (this->a != other.a) {
return false;
}
if (this->b != other.b) {
return false;
}
if (this->c != other.c) {
return false;
}
return true;
}
bool operator!=(const AddThreeInts_Request_ & other) const
{
return !this->operator==(other);
}
}; // struct AddThreeInts_Request_
// alias to use template instance with default allocator
using AddThreeInts_Request =
tutorial_interfaces::srv::AddThreeInts_Request_<std::allocator<void>>;
// constant definitions
} // namespace srv
} // namespace tutorial_interfaces
#ifndef _WIN32
# define DEPRECATED__tutorial_interfaces__srv__AddThreeInts_Response __attribute__((deprecated))
#else
# define DEPRECATED__tutorial_interfaces__srv__AddThreeInts_Response __declspec(deprecated)
#endif
namespace tutorial_interfaces
{
namespace srv
{
// message struct
template<class ContainerAllocator>
struct AddThreeInts_Response_
{
using Type = AddThreeInts_Response_<ContainerAllocator>;
explicit AddThreeInts_Response_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL)
{
if (rosidl_runtime_cpp::MessageInitialization::ALL == _init ||
rosidl_runtime_cpp::MessageInitialization::ZERO == _init)
{
this->sum = 0ll;
}
}
explicit AddThreeInts_Response_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL)
{
(void)_alloc;
if (rosidl_runtime_cpp::MessageInitialization::ALL == _init ||
rosidl_runtime_cpp::MessageInitialization::ZERO == _init)
{
this->sum = 0ll;
}
}
// field types and members
using _sum_type =
int64_t;
_sum_type sum;
// setters for named parameter idiom
Type & set__sum(
const int64_t & _arg)
{
this->sum = _arg;
return *this;
}
// constant declarations
// pointer types
using RawPtr =
tutorial_interfaces::srv::AddThreeInts_Response_<ContainerAllocator> *;
using ConstRawPtr =
const tutorial_interfaces::srv::AddThreeInts_Response_<ContainerAllocator> *;
using SharedPtr =
std::shared_ptr<tutorial_interfaces::srv::AddThreeInts_Response_<ContainerAllocator>>;
using ConstSharedPtr =
std::shared_ptr<tutorial_interfaces::srv::AddThreeInts_Response_<ContainerAllocator> const>;
template<typename Deleter = std::default_delete<
tutorial_interfaces::srv::AddThreeInts_Response_<ContainerAllocator>>>
using UniquePtrWithDeleter =
std::unique_ptr<tutorial_interfaces::srv::AddThreeInts_Response_<ContainerAllocator>, Deleter>;
using UniquePtr = UniquePtrWithDeleter<>;
template<typename Deleter = std::default_delete<
tutorial_interfaces::srv::AddThreeInts_Response_<ContainerAllocator>>>
using ConstUniquePtrWithDeleter =
std::unique_ptr<tutorial_interfaces::srv::AddThreeInts_Response_<ContainerAllocator> const, Deleter>;
using ConstUniquePtr = ConstUniquePtrWithDeleter<>;
using WeakPtr =
std::weak_ptr<tutorial_interfaces::srv::AddThreeInts_Response_<ContainerAllocator>>;
using ConstWeakPtr =
std::weak_ptr<tutorial_interfaces::srv::AddThreeInts_Response_<ContainerAllocator> const>;
// pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead
// NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly
typedef DEPRECATED__tutorial_interfaces__srv__AddThreeInts_Response
std::shared_ptr<tutorial_interfaces::srv::AddThreeInts_Response_<ContainerAllocator>>
Ptr;
typedef DEPRECATED__tutorial_interfaces__srv__AddThreeInts_Response
std::shared_ptr<tutorial_interfaces::srv::AddThreeInts_Response_<ContainerAllocator> const>
ConstPtr;
// comparison operators
bool operator==(const AddThreeInts_Response_ & other) const
{
if (this->sum != other.sum) {
return false;
}
return true;
}
bool operator!=(const AddThreeInts_Response_ & other) const
{
return !this->operator==(other);
}
}; // struct AddThreeInts_Response_
// alias to use template instance with default allocator
using AddThreeInts_Response =
tutorial_interfaces::srv::AddThreeInts_Response_<std::allocator<void>>;
// constant definitions
} // namespace srv
} // namespace tutorial_interfaces
// Include directives for member types
// Member 'info'
#include "service_msgs/msg/detail/service_event_info__struct.hpp"
#ifndef _WIN32
# define DEPRECATED__tutorial_interfaces__srv__AddThreeInts_Event __attribute__((deprecated))
#else
# define DEPRECATED__tutorial_interfaces__srv__AddThreeInts_Event __declspec(deprecated)
#endif
namespace tutorial_interfaces
{
namespace srv
{
// message struct
template<class ContainerAllocator>
struct AddThreeInts_Event_
{
using Type = AddThreeInts_Event_<ContainerAllocator>;
explicit AddThreeInts_Event_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL)
: info(_init)
{
(void)_init;
}
explicit AddThreeInts_Event_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL)
: info(_alloc, _init)
{
(void)_init;
}
// field types and members
using _info_type =
service_msgs::msg::ServiceEventInfo_<ContainerAllocator>;
_info_type info;
using _request_type =
rosidl_runtime_cpp::BoundedVector<tutorial_interfaces::srv::AddThreeInts_Request_<ContainerAllocator>, 1, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<tutorial_interfaces::srv::AddThreeInts_Request_<ContainerAllocator>>>;
_request_type request;
using _response_type =
rosidl_runtime_cpp::BoundedVector<tutorial_interfaces::srv::AddThreeInts_Response_<ContainerAllocator>, 1, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<tutorial_interfaces::srv::AddThreeInts_Response_<ContainerAllocator>>>;
_response_type response;
// setters for named parameter idiom
Type & set__info(
const service_msgs::msg::ServiceEventInfo_<ContainerAllocator> & _arg)
{
this->info = _arg;
return *this;
}
Type & set__request(
const rosidl_runtime_cpp::BoundedVector<tutorial_interfaces::srv::AddThreeInts_Request_<ContainerAllocator>, 1, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<tutorial_interfaces::srv::AddThreeInts_Request_<ContainerAllocator>>> & _arg)
{
this->request = _arg;
return *this;
}
Type & set__response(
const rosidl_runtime_cpp::BoundedVector<tutorial_interfaces::srv::AddThreeInts_Response_<ContainerAllocator>, 1, typename std::allocator_traits<ContainerAllocator>::template rebind_alloc<tutorial_interfaces::srv::AddThreeInts_Response_<ContainerAllocator>>> & _arg)
{
this->response = _arg;
return *this;
}
// constant declarations
// pointer types
using RawPtr =
tutorial_interfaces::srv::AddThreeInts_Event_<ContainerAllocator> *;
using ConstRawPtr =
const tutorial_interfaces::srv::AddThreeInts_Event_<ContainerAllocator> *;
using SharedPtr =
std::shared_ptr<tutorial_interfaces::srv::AddThreeInts_Event_<ContainerAllocator>>;
using ConstSharedPtr =
std::shared_ptr<tutorial_interfaces::srv::AddThreeInts_Event_<ContainerAllocator> const>;
template<typename Deleter = std::default_delete<
tutorial_interfaces::srv::AddThreeInts_Event_<ContainerAllocator>>>
using UniquePtrWithDeleter =
std::unique_ptr<tutorial_interfaces::srv::AddThreeInts_Event_<ContainerAllocator>, Deleter>;
using UniquePtr = UniquePtrWithDeleter<>;
template<typename Deleter = std::default_delete<
tutorial_interfaces::srv::AddThreeInts_Event_<ContainerAllocator>>>
using ConstUniquePtrWithDeleter =
std::unique_ptr<tutorial_interfaces::srv::AddThreeInts_Event_<ContainerAllocator> const, Deleter>;
using ConstUniquePtr = ConstUniquePtrWithDeleter<>;
using WeakPtr =
std::weak_ptr<tutorial_interfaces::srv::AddThreeInts_Event_<ContainerAllocator>>;
using ConstWeakPtr =
std::weak_ptr<tutorial_interfaces::srv::AddThreeInts_Event_<ContainerAllocator> const>;
// pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead
// NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly
typedef DEPRECATED__tutorial_interfaces__srv__AddThreeInts_Event
std::shared_ptr<tutorial_interfaces::srv::AddThreeInts_Event_<ContainerAllocator>>
Ptr;
typedef DEPRECATED__tutorial_interfaces__srv__AddThreeInts_Event
std::shared_ptr<tutorial_interfaces::srv::AddThreeInts_Event_<ContainerAllocator> const>
ConstPtr;
// comparison operators
bool operator==(const AddThreeInts_Event_ & other) const
{
if (this->info != other.info) {
return false;
}
if (this->request != other.request) {
return false;
}
if (this->response != other.response) {
return false;
}
return true;
}
bool operator!=(const AddThreeInts_Event_ & other) const
{
return !this->operator==(other);
}
}; // struct AddThreeInts_Event_
// alias to use template instance with default allocator
using AddThreeInts_Event =
tutorial_interfaces::srv::AddThreeInts_Event_<std::allocator<void>>;
// constant definitions
} // namespace srv
} // namespace tutorial_interfaces
namespace tutorial_interfaces
{
namespace srv
{
struct AddThreeInts
{
using Request = tutorial_interfaces::srv::AddThreeInts_Request;
using Response = tutorial_interfaces::srv::AddThreeInts_Response;
using Event = tutorial_interfaces::srv::AddThreeInts_Event;
};
} // namespace srv
} // namespace tutorial_interfaces
#endif // TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__STRUCT_HPP_

View File

@@ -0,0 +1,462 @@
// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/srv/add_three_ints.hpp"
#ifndef TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__TRAITS_HPP_
#define TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__TRAITS_HPP_
#include <stdint.h>
#include <sstream>
#include <string>
#include <type_traits>
#include "tutorial_interfaces/srv/detail/add_three_ints__struct.hpp"
#include "rosidl_runtime_cpp/traits.hpp"
namespace tutorial_interfaces
{
namespace srv
{
inline void to_flow_style_yaml(
const AddThreeInts_Request & msg,
std::ostream & out)
{
out << "{";
// member: a
{
out << "a: ";
rosidl_generator_traits::value_to_yaml(msg.a, out);
out << ", ";
}
// member: b
{
out << "b: ";
rosidl_generator_traits::value_to_yaml(msg.b, out);
out << ", ";
}
// member: c
{
out << "c: ";
rosidl_generator_traits::value_to_yaml(msg.c, out);
}
out << "}";
} // NOLINT(readability/fn_size)
inline void to_block_style_yaml(
const AddThreeInts_Request & msg,
std::ostream & out, size_t indentation = 0)
{
// member: a
{
if (indentation > 0) {
out << std::string(indentation, ' ');
}
out << "a: ";
rosidl_generator_traits::value_to_yaml(msg.a, out);
out << "\n";
}
// member: b
{
if (indentation > 0) {
out << std::string(indentation, ' ');
}
out << "b: ";
rosidl_generator_traits::value_to_yaml(msg.b, out);
out << "\n";
}
// member: c
{
if (indentation > 0) {
out << std::string(indentation, ' ');
}
out << "c: ";
rosidl_generator_traits::value_to_yaml(msg.c, out);
out << "\n";
}
} // NOLINT(readability/fn_size)
inline std::string to_yaml(const AddThreeInts_Request & msg, bool use_flow_style = false)
{
std::ostringstream out;
if (use_flow_style) {
to_flow_style_yaml(msg, out);
} else {
to_block_style_yaml(msg, out);
}
return out.str();
}
} // namespace srv
} // namespace tutorial_interfaces
namespace rosidl_generator_traits
{
[[deprecated("use tutorial_interfaces::srv::to_block_style_yaml() instead")]]
inline void to_yaml(
const tutorial_interfaces::srv::AddThreeInts_Request & msg,
std::ostream & out, size_t indentation = 0)
{
tutorial_interfaces::srv::to_block_style_yaml(msg, out, indentation);
}
[[deprecated("use tutorial_interfaces::srv::to_yaml() instead")]]
inline std::string to_yaml(const tutorial_interfaces::srv::AddThreeInts_Request & msg)
{
return tutorial_interfaces::srv::to_yaml(msg);
}
template<>
inline const char * data_type<tutorial_interfaces::srv::AddThreeInts_Request>()
{
return "tutorial_interfaces::srv::AddThreeInts_Request";
}
template<>
inline const char * name<tutorial_interfaces::srv::AddThreeInts_Request>()
{
return "tutorial_interfaces/srv/AddThreeInts_Request";
}
template<>
struct has_fixed_size<tutorial_interfaces::srv::AddThreeInts_Request>
: std::integral_constant<bool, true> {};
template<>
struct has_bounded_size<tutorial_interfaces::srv::AddThreeInts_Request>
: std::integral_constant<bool, true> {};
template<>
struct is_message<tutorial_interfaces::srv::AddThreeInts_Request>
: std::true_type {};
} // namespace rosidl_generator_traits
namespace tutorial_interfaces
{
namespace srv
{
inline void to_flow_style_yaml(
const AddThreeInts_Response & msg,
std::ostream & out)
{
out << "{";
// member: sum
{
out << "sum: ";
rosidl_generator_traits::value_to_yaml(msg.sum, out);
}
out << "}";
} // NOLINT(readability/fn_size)
inline void to_block_style_yaml(
const AddThreeInts_Response & msg,
std::ostream & out, size_t indentation = 0)
{
// member: sum
{
if (indentation > 0) {
out << std::string(indentation, ' ');
}
out << "sum: ";
rosidl_generator_traits::value_to_yaml(msg.sum, out);
out << "\n";
}
} // NOLINT(readability/fn_size)
inline std::string to_yaml(const AddThreeInts_Response & msg, bool use_flow_style = false)
{
std::ostringstream out;
if (use_flow_style) {
to_flow_style_yaml(msg, out);
} else {
to_block_style_yaml(msg, out);
}
return out.str();
}
} // namespace srv
} // namespace tutorial_interfaces
namespace rosidl_generator_traits
{
[[deprecated("use tutorial_interfaces::srv::to_block_style_yaml() instead")]]
inline void to_yaml(
const tutorial_interfaces::srv::AddThreeInts_Response & msg,
std::ostream & out, size_t indentation = 0)
{
tutorial_interfaces::srv::to_block_style_yaml(msg, out, indentation);
}
[[deprecated("use tutorial_interfaces::srv::to_yaml() instead")]]
inline std::string to_yaml(const tutorial_interfaces::srv::AddThreeInts_Response & msg)
{
return tutorial_interfaces::srv::to_yaml(msg);
}
template<>
inline const char * data_type<tutorial_interfaces::srv::AddThreeInts_Response>()
{
return "tutorial_interfaces::srv::AddThreeInts_Response";
}
template<>
inline const char * name<tutorial_interfaces::srv::AddThreeInts_Response>()
{
return "tutorial_interfaces/srv/AddThreeInts_Response";
}
template<>
struct has_fixed_size<tutorial_interfaces::srv::AddThreeInts_Response>
: std::integral_constant<bool, true> {};
template<>
struct has_bounded_size<tutorial_interfaces::srv::AddThreeInts_Response>
: std::integral_constant<bool, true> {};
template<>
struct is_message<tutorial_interfaces::srv::AddThreeInts_Response>
: std::true_type {};
} // namespace rosidl_generator_traits
// Include directives for member types
// Member 'info'
#include "service_msgs/msg/detail/service_event_info__traits.hpp"
namespace tutorial_interfaces
{
namespace srv
{
inline void to_flow_style_yaml(
const AddThreeInts_Event & msg,
std::ostream & out)
{
out << "{";
// member: info
{
out << "info: ";
to_flow_style_yaml(msg.info, out);
out << ", ";
}
// member: request
{
if (msg.request.size() == 0) {
out << "request: []";
} else {
out << "request: [";
size_t pending_items = msg.request.size();
for (auto item : msg.request) {
to_flow_style_yaml(item, out);
if (--pending_items > 0) {
out << ", ";
}
}
out << "]";
}
out << ", ";
}
// member: response
{
if (msg.response.size() == 0) {
out << "response: []";
} else {
out << "response: [";
size_t pending_items = msg.response.size();
for (auto item : msg.response) {
to_flow_style_yaml(item, out);
if (--pending_items > 0) {
out << ", ";
}
}
out << "]";
}
}
out << "}";
} // NOLINT(readability/fn_size)
inline void to_block_style_yaml(
const AddThreeInts_Event & msg,
std::ostream & out, size_t indentation = 0)
{
// member: info
{
if (indentation > 0) {
out << std::string(indentation, ' ');
}
out << "info:\n";
to_block_style_yaml(msg.info, out, indentation + 2);
}
// member: request
{
if (indentation > 0) {
out << std::string(indentation, ' ');
}
if (msg.request.size() == 0) {
out << "request: []\n";
} else {
out << "request:\n";
for (auto item : msg.request) {
if (indentation > 0) {
out << std::string(indentation, ' ');
}
out << "-\n";
to_block_style_yaml(item, out, indentation + 2);
}
}
}
// member: response
{
if (indentation > 0) {
out << std::string(indentation, ' ');
}
if (msg.response.size() == 0) {
out << "response: []\n";
} else {
out << "response:\n";
for (auto item : msg.response) {
if (indentation > 0) {
out << std::string(indentation, ' ');
}
out << "-\n";
to_block_style_yaml(item, out, indentation + 2);
}
}
}
} // NOLINT(readability/fn_size)
inline std::string to_yaml(const AddThreeInts_Event & msg, bool use_flow_style = false)
{
std::ostringstream out;
if (use_flow_style) {
to_flow_style_yaml(msg, out);
} else {
to_block_style_yaml(msg, out);
}
return out.str();
}
} // namespace srv
} // namespace tutorial_interfaces
namespace rosidl_generator_traits
{
[[deprecated("use tutorial_interfaces::srv::to_block_style_yaml() instead")]]
inline void to_yaml(
const tutorial_interfaces::srv::AddThreeInts_Event & msg,
std::ostream & out, size_t indentation = 0)
{
tutorial_interfaces::srv::to_block_style_yaml(msg, out, indentation);
}
[[deprecated("use tutorial_interfaces::srv::to_yaml() instead")]]
inline std::string to_yaml(const tutorial_interfaces::srv::AddThreeInts_Event & msg)
{
return tutorial_interfaces::srv::to_yaml(msg);
}
template<>
inline const char * data_type<tutorial_interfaces::srv::AddThreeInts_Event>()
{
return "tutorial_interfaces::srv::AddThreeInts_Event";
}
template<>
inline const char * name<tutorial_interfaces::srv::AddThreeInts_Event>()
{
return "tutorial_interfaces/srv/AddThreeInts_Event";
}
template<>
struct has_fixed_size<tutorial_interfaces::srv::AddThreeInts_Event>
: std::integral_constant<bool, false> {};
template<>
struct has_bounded_size<tutorial_interfaces::srv::AddThreeInts_Event>
: std::integral_constant<bool, has_bounded_size<service_msgs::msg::ServiceEventInfo>::value && has_bounded_size<tutorial_interfaces::srv::AddThreeInts_Request>::value && has_bounded_size<tutorial_interfaces::srv::AddThreeInts_Response>::value> {};
template<>
struct is_message<tutorial_interfaces::srv::AddThreeInts_Event>
: std::true_type {};
} // namespace rosidl_generator_traits
namespace rosidl_generator_traits
{
template<>
inline const char * data_type<tutorial_interfaces::srv::AddThreeInts>()
{
return "tutorial_interfaces::srv::AddThreeInts";
}
template<>
inline const char * name<tutorial_interfaces::srv::AddThreeInts>()
{
return "tutorial_interfaces/srv/AddThreeInts";
}
template<>
struct has_fixed_size<tutorial_interfaces::srv::AddThreeInts>
: std::integral_constant<
bool,
has_fixed_size<tutorial_interfaces::srv::AddThreeInts_Request>::value &&
has_fixed_size<tutorial_interfaces::srv::AddThreeInts_Response>::value
>
{
};
template<>
struct has_bounded_size<tutorial_interfaces::srv::AddThreeInts>
: std::integral_constant<
bool,
has_bounded_size<tutorial_interfaces::srv::AddThreeInts_Request>::value &&
has_bounded_size<tutorial_interfaces::srv::AddThreeInts_Response>::value
>
{
};
template<>
struct is_service<tutorial_interfaces::srv::AddThreeInts>
: std::true_type
{
};
template<>
struct is_service_request<tutorial_interfaces::srv::AddThreeInts_Request>
: std::true_type
{
};
template<>
struct is_service_response<tutorial_interfaces::srv::AddThreeInts_Response>
: std::true_type
{
};
} // namespace rosidl_generator_traits
#endif // TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__TRAITS_HPP_

View File

@@ -0,0 +1,97 @@
// generated from rosidl_generator_c/resource/idl__type_support.c.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
#include <string.h>
#include "tutorial_interfaces/srv/detail/add_three_ints__type_support.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
#include "rosidl_typesupport_interface/macros.h"
#ifdef __cplusplus
extern "C"
{
#endif
void *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_CREATE_EVENT_MESSAGE_SYMBOL_NAME(
rosidl_typesupport_c,
tutorial_interfaces,
srv,
AddThreeInts
)(
const rosidl_service_introspection_info_t * info,
rcutils_allocator_t * allocator,
const void * request_message,
const void * response_message)
{
if (!allocator || !info) {
return NULL;
}
tutorial_interfaces__srv__AddThreeInts_Event * event_msg = (tutorial_interfaces__srv__AddThreeInts_Event *)(allocator->allocate(sizeof(tutorial_interfaces__srv__AddThreeInts_Event), allocator->state));
if (!tutorial_interfaces__srv__AddThreeInts_Event__init(event_msg)) {
allocator->deallocate(event_msg, allocator->state);
return NULL;
}
event_msg->info.event_type = info->event_type;
event_msg->info.sequence_number = info->sequence_number;
event_msg->info.stamp.sec = info->stamp_sec;
event_msg->info.stamp.nanosec = info->stamp_nanosec;
memcpy(event_msg->info.client_gid, info->client_gid, 16);
if (request_message) {
tutorial_interfaces__srv__AddThreeInts_Request__Sequence__init(
&event_msg->request,
1);
if (!tutorial_interfaces__srv__AddThreeInts_Request__copy((const tutorial_interfaces__srv__AddThreeInts_Request *)(request_message), event_msg->request.data)) {
allocator->deallocate(event_msg, allocator->state);
return NULL;
}
}
if (response_message) {
tutorial_interfaces__srv__AddThreeInts_Response__Sequence__init(
&event_msg->response,
1);
if (!tutorial_interfaces__srv__AddThreeInts_Response__copy((const tutorial_interfaces__srv__AddThreeInts_Response *)(response_message), event_msg->response.data)) {
allocator->deallocate(event_msg, allocator->state);
return NULL;
}
}
return event_msg;
}
// Forward declare the get type support functions for this type.
bool
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_DESTROY_EVENT_MESSAGE_SYMBOL_NAME(
rosidl_typesupport_c,
tutorial_interfaces,
srv,
AddThreeInts
)(
void * event_msg,
rcutils_allocator_t * allocator)
{
if (!allocator) {
return false;
}
if (NULL == event_msg) {
return false;
}
tutorial_interfaces__srv__AddThreeInts_Event * _event_msg = (tutorial_interfaces__srv__AddThreeInts_Event *)(event_msg);
tutorial_interfaces__srv__AddThreeInts_Event__fini((tutorial_interfaces__srv__AddThreeInts_Event *)(_event_msg));
if (_event_msg->request.data) {
allocator->deallocate(_event_msg->request.data, allocator->state);
}
if (_event_msg->response.data) {
allocator->deallocate(_event_msg->response.data, allocator->state);
}
allocator->deallocate(_event_msg, allocator->state);
return true;
}
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,656 @@
// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
#include "array"
#include "cstddef"
#include "string"
#include "vector"
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_typesupport_cpp/message_type_support.hpp"
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__struct.hpp"
#include "rosidl_typesupport_introspection_cpp/field_types.hpp"
#include "rosidl_typesupport_introspection_cpp/identifier.hpp"
#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp"
#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp"
#include "rosidl_typesupport_introspection_cpp/visibility_control.h"
namespace tutorial_interfaces
{
namespace srv
{
namespace rosidl_typesupport_introspection_cpp
{
void AddThreeInts_Request_init_function(
void * message_memory, rosidl_runtime_cpp::MessageInitialization _init)
{
new (message_memory) tutorial_interfaces::srv::AddThreeInts_Request(_init);
}
void AddThreeInts_Request_fini_function(void * message_memory)
{
auto typed_message = static_cast<tutorial_interfaces::srv::AddThreeInts_Request *>(message_memory);
typed_message->~AddThreeInts_Request();
}
static const ::rosidl_typesupport_introspection_cpp::MessageMember AddThreeInts_Request_message_member_array[3] = {
{
"a", // name
::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT64, // type
0, // upper bound of string
nullptr, // members of sub message
false, // is key
false, // is array
0, // array size
false, // is upper bound
offsetof(tutorial_interfaces::srv::AddThreeInts_Request, a), // bytes offset in struct
nullptr, // default value
nullptr, // size() function pointer
nullptr, // get_const(index) function pointer
nullptr, // get(index) function pointer
nullptr, // fetch(index, &value) function pointer
nullptr, // assign(index, value) function pointer
nullptr // resize(index) function pointer
},
{
"b", // name
::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT64, // type
0, // upper bound of string
nullptr, // members of sub message
false, // is key
false, // is array
0, // array size
false, // is upper bound
offsetof(tutorial_interfaces::srv::AddThreeInts_Request, b), // bytes offset in struct
nullptr, // default value
nullptr, // size() function pointer
nullptr, // get_const(index) function pointer
nullptr, // get(index) function pointer
nullptr, // fetch(index, &value) function pointer
nullptr, // assign(index, value) function pointer
nullptr // resize(index) function pointer
},
{
"c", // name
::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT64, // type
0, // upper bound of string
nullptr, // members of sub message
false, // is key
false, // is array
0, // array size
false, // is upper bound
offsetof(tutorial_interfaces::srv::AddThreeInts_Request, c), // bytes offset in struct
nullptr, // default value
nullptr, // size() function pointer
nullptr, // get_const(index) function pointer
nullptr, // get(index) function pointer
nullptr, // fetch(index, &value) function pointer
nullptr, // assign(index, value) function pointer
nullptr // resize(index) function pointer
}
};
static const ::rosidl_typesupport_introspection_cpp::MessageMembers AddThreeInts_Request_message_members = {
"tutorial_interfaces::srv", // message namespace
"AddThreeInts_Request", // message name
3, // number of fields
sizeof(tutorial_interfaces::srv::AddThreeInts_Request),
false, // has_any_key_member_
AddThreeInts_Request_message_member_array, // message members
AddThreeInts_Request_init_function, // function to initialize message memory (memory has to be allocated)
AddThreeInts_Request_fini_function // function to terminate message instance (will not free memory)
};
static const rosidl_message_type_support_t AddThreeInts_Request_message_type_support_handle = {
::rosidl_typesupport_introspection_cpp::typesupport_identifier,
&AddThreeInts_Request_message_members,
get_message_typesupport_handle_function,
&tutorial_interfaces__srv__AddThreeInts_Request__get_type_hash,
&tutorial_interfaces__srv__AddThreeInts_Request__get_type_description,
&tutorial_interfaces__srv__AddThreeInts_Request__get_type_description_sources,
};
} // namespace rosidl_typesupport_introspection_cpp
} // namespace srv
} // namespace tutorial_interfaces
namespace rosidl_typesupport_introspection_cpp
{
template<>
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_message_type_support_t *
get_message_type_support_handle<tutorial_interfaces::srv::AddThreeInts_Request>()
{
return &::tutorial_interfaces::srv::rosidl_typesupport_introspection_cpp::AddThreeInts_Request_message_type_support_handle;
}
} // namespace rosidl_typesupport_introspection_cpp
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, tutorial_interfaces, srv, AddThreeInts_Request)() {
return &::tutorial_interfaces::srv::rosidl_typesupport_introspection_cpp::AddThreeInts_Request_message_type_support_handle;
}
#ifdef __cplusplus
}
#endif
// already included above
// #include "array"
// already included above
// #include "cstddef"
// already included above
// #include "string"
// already included above
// #include "vector"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_typesupport_cpp/message_type_support.hpp"
// already included above
// #include "rosidl_typesupport_interface/macros.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__struct.hpp"
// already included above
// #include "rosidl_typesupport_introspection_cpp/field_types.hpp"
// already included above
// #include "rosidl_typesupport_introspection_cpp/identifier.hpp"
// already included above
// #include "rosidl_typesupport_introspection_cpp/message_introspection.hpp"
// already included above
// #include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp"
// already included above
// #include "rosidl_typesupport_introspection_cpp/visibility_control.h"
namespace tutorial_interfaces
{
namespace srv
{
namespace rosidl_typesupport_introspection_cpp
{
void AddThreeInts_Response_init_function(
void * message_memory, rosidl_runtime_cpp::MessageInitialization _init)
{
new (message_memory) tutorial_interfaces::srv::AddThreeInts_Response(_init);
}
void AddThreeInts_Response_fini_function(void * message_memory)
{
auto typed_message = static_cast<tutorial_interfaces::srv::AddThreeInts_Response *>(message_memory);
typed_message->~AddThreeInts_Response();
}
static const ::rosidl_typesupport_introspection_cpp::MessageMember AddThreeInts_Response_message_member_array[1] = {
{
"sum", // name
::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT64, // type
0, // upper bound of string
nullptr, // members of sub message
false, // is key
false, // is array
0, // array size
false, // is upper bound
offsetof(tutorial_interfaces::srv::AddThreeInts_Response, sum), // bytes offset in struct
nullptr, // default value
nullptr, // size() function pointer
nullptr, // get_const(index) function pointer
nullptr, // get(index) function pointer
nullptr, // fetch(index, &value) function pointer
nullptr, // assign(index, value) function pointer
nullptr // resize(index) function pointer
}
};
static const ::rosidl_typesupport_introspection_cpp::MessageMembers AddThreeInts_Response_message_members = {
"tutorial_interfaces::srv", // message namespace
"AddThreeInts_Response", // message name
1, // number of fields
sizeof(tutorial_interfaces::srv::AddThreeInts_Response),
false, // has_any_key_member_
AddThreeInts_Response_message_member_array, // message members
AddThreeInts_Response_init_function, // function to initialize message memory (memory has to be allocated)
AddThreeInts_Response_fini_function // function to terminate message instance (will not free memory)
};
static const rosidl_message_type_support_t AddThreeInts_Response_message_type_support_handle = {
::rosidl_typesupport_introspection_cpp::typesupport_identifier,
&AddThreeInts_Response_message_members,
get_message_typesupport_handle_function,
&tutorial_interfaces__srv__AddThreeInts_Response__get_type_hash,
&tutorial_interfaces__srv__AddThreeInts_Response__get_type_description,
&tutorial_interfaces__srv__AddThreeInts_Response__get_type_description_sources,
};
} // namespace rosidl_typesupport_introspection_cpp
} // namespace srv
} // namespace tutorial_interfaces
namespace rosidl_typesupport_introspection_cpp
{
template<>
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_message_type_support_t *
get_message_type_support_handle<tutorial_interfaces::srv::AddThreeInts_Response>()
{
return &::tutorial_interfaces::srv::rosidl_typesupport_introspection_cpp::AddThreeInts_Response_message_type_support_handle;
}
} // namespace rosidl_typesupport_introspection_cpp
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, tutorial_interfaces, srv, AddThreeInts_Response)() {
return &::tutorial_interfaces::srv::rosidl_typesupport_introspection_cpp::AddThreeInts_Response_message_type_support_handle;
}
#ifdef __cplusplus
}
#endif
// already included above
// #include "array"
// already included above
// #include "cstddef"
// already included above
// #include "string"
// already included above
// #include "vector"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_typesupport_cpp/message_type_support.hpp"
// already included above
// #include "rosidl_typesupport_interface/macros.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__struct.hpp"
// already included above
// #include "rosidl_typesupport_introspection_cpp/field_types.hpp"
// already included above
// #include "rosidl_typesupport_introspection_cpp/identifier.hpp"
// already included above
// #include "rosidl_typesupport_introspection_cpp/message_introspection.hpp"
// already included above
// #include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp"
// already included above
// #include "rosidl_typesupport_introspection_cpp/visibility_control.h"
namespace tutorial_interfaces
{
namespace srv
{
namespace rosidl_typesupport_introspection_cpp
{
void AddThreeInts_Event_init_function(
void * message_memory, rosidl_runtime_cpp::MessageInitialization _init)
{
new (message_memory) tutorial_interfaces::srv::AddThreeInts_Event(_init);
}
void AddThreeInts_Event_fini_function(void * message_memory)
{
auto typed_message = static_cast<tutorial_interfaces::srv::AddThreeInts_Event *>(message_memory);
typed_message->~AddThreeInts_Event();
}
size_t size_function__AddThreeInts_Event__request(const void * untyped_member)
{
const auto * member = reinterpret_cast<const std::vector<tutorial_interfaces::srv::AddThreeInts_Request> *>(untyped_member);
return member->size();
}
const void * get_const_function__AddThreeInts_Event__request(const void * untyped_member, size_t index)
{
const auto & member =
*reinterpret_cast<const std::vector<tutorial_interfaces::srv::AddThreeInts_Request> *>(untyped_member);
return &member[index];
}
void * get_function__AddThreeInts_Event__request(void * untyped_member, size_t index)
{
auto & member =
*reinterpret_cast<std::vector<tutorial_interfaces::srv::AddThreeInts_Request> *>(untyped_member);
return &member[index];
}
void fetch_function__AddThreeInts_Event__request(
const void * untyped_member, size_t index, void * untyped_value)
{
const auto & item = *reinterpret_cast<const tutorial_interfaces::srv::AddThreeInts_Request *>(
get_const_function__AddThreeInts_Event__request(untyped_member, index));
auto & value = *reinterpret_cast<tutorial_interfaces::srv::AddThreeInts_Request *>(untyped_value);
value = item;
}
void assign_function__AddThreeInts_Event__request(
void * untyped_member, size_t index, const void * untyped_value)
{
auto & item = *reinterpret_cast<tutorial_interfaces::srv::AddThreeInts_Request *>(
get_function__AddThreeInts_Event__request(untyped_member, index));
const auto & value = *reinterpret_cast<const tutorial_interfaces::srv::AddThreeInts_Request *>(untyped_value);
item = value;
}
void resize_function__AddThreeInts_Event__request(void * untyped_member, size_t size)
{
auto * member =
reinterpret_cast<std::vector<tutorial_interfaces::srv::AddThreeInts_Request> *>(untyped_member);
member->resize(size);
}
size_t size_function__AddThreeInts_Event__response(const void * untyped_member)
{
const auto * member = reinterpret_cast<const std::vector<tutorial_interfaces::srv::AddThreeInts_Response> *>(untyped_member);
return member->size();
}
const void * get_const_function__AddThreeInts_Event__response(const void * untyped_member, size_t index)
{
const auto & member =
*reinterpret_cast<const std::vector<tutorial_interfaces::srv::AddThreeInts_Response> *>(untyped_member);
return &member[index];
}
void * get_function__AddThreeInts_Event__response(void * untyped_member, size_t index)
{
auto & member =
*reinterpret_cast<std::vector<tutorial_interfaces::srv::AddThreeInts_Response> *>(untyped_member);
return &member[index];
}
void fetch_function__AddThreeInts_Event__response(
const void * untyped_member, size_t index, void * untyped_value)
{
const auto & item = *reinterpret_cast<const tutorial_interfaces::srv::AddThreeInts_Response *>(
get_const_function__AddThreeInts_Event__response(untyped_member, index));
auto & value = *reinterpret_cast<tutorial_interfaces::srv::AddThreeInts_Response *>(untyped_value);
value = item;
}
void assign_function__AddThreeInts_Event__response(
void * untyped_member, size_t index, const void * untyped_value)
{
auto & item = *reinterpret_cast<tutorial_interfaces::srv::AddThreeInts_Response *>(
get_function__AddThreeInts_Event__response(untyped_member, index));
const auto & value = *reinterpret_cast<const tutorial_interfaces::srv::AddThreeInts_Response *>(untyped_value);
item = value;
}
void resize_function__AddThreeInts_Event__response(void * untyped_member, size_t size)
{
auto * member =
reinterpret_cast<std::vector<tutorial_interfaces::srv::AddThreeInts_Response> *>(untyped_member);
member->resize(size);
}
static const ::rosidl_typesupport_introspection_cpp::MessageMember AddThreeInts_Event_message_member_array[3] = {
{
"info", // name
::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type
0, // upper bound of string
::rosidl_typesupport_introspection_cpp::get_message_type_support_handle<service_msgs::msg::ServiceEventInfo>(), // members of sub message
false, // is key
false, // is array
0, // array size
false, // is upper bound
offsetof(tutorial_interfaces::srv::AddThreeInts_Event, info), // bytes offset in struct
nullptr, // default value
nullptr, // size() function pointer
nullptr, // get_const(index) function pointer
nullptr, // get(index) function pointer
nullptr, // fetch(index, &value) function pointer
nullptr, // assign(index, value) function pointer
nullptr // resize(index) function pointer
},
{
"request", // name
::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type
0, // upper bound of string
::rosidl_typesupport_introspection_cpp::get_message_type_support_handle<tutorial_interfaces::srv::AddThreeInts_Request>(), // members of sub message
false, // is key
true, // is array
1, // array size
true, // is upper bound
offsetof(tutorial_interfaces::srv::AddThreeInts_Event, request), // bytes offset in struct
nullptr, // default value
size_function__AddThreeInts_Event__request, // size() function pointer
get_const_function__AddThreeInts_Event__request, // get_const(index) function pointer
get_function__AddThreeInts_Event__request, // get(index) function pointer
fetch_function__AddThreeInts_Event__request, // fetch(index, &value) function pointer
assign_function__AddThreeInts_Event__request, // assign(index, value) function pointer
resize_function__AddThreeInts_Event__request // resize(index) function pointer
},
{
"response", // name
::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type
0, // upper bound of string
::rosidl_typesupport_introspection_cpp::get_message_type_support_handle<tutorial_interfaces::srv::AddThreeInts_Response>(), // members of sub message
false, // is key
true, // is array
1, // array size
true, // is upper bound
offsetof(tutorial_interfaces::srv::AddThreeInts_Event, response), // bytes offset in struct
nullptr, // default value
size_function__AddThreeInts_Event__response, // size() function pointer
get_const_function__AddThreeInts_Event__response, // get_const(index) function pointer
get_function__AddThreeInts_Event__response, // get(index) function pointer
fetch_function__AddThreeInts_Event__response, // fetch(index, &value) function pointer
assign_function__AddThreeInts_Event__response, // assign(index, value) function pointer
resize_function__AddThreeInts_Event__response // resize(index) function pointer
}
};
static const ::rosidl_typesupport_introspection_cpp::MessageMembers AddThreeInts_Event_message_members = {
"tutorial_interfaces::srv", // message namespace
"AddThreeInts_Event", // message name
3, // number of fields
sizeof(tutorial_interfaces::srv::AddThreeInts_Event),
false, // has_any_key_member_
AddThreeInts_Event_message_member_array, // message members
AddThreeInts_Event_init_function, // function to initialize message memory (memory has to be allocated)
AddThreeInts_Event_fini_function // function to terminate message instance (will not free memory)
};
static const rosidl_message_type_support_t AddThreeInts_Event_message_type_support_handle = {
::rosidl_typesupport_introspection_cpp::typesupport_identifier,
&AddThreeInts_Event_message_members,
get_message_typesupport_handle_function,
&tutorial_interfaces__srv__AddThreeInts_Event__get_type_hash,
&tutorial_interfaces__srv__AddThreeInts_Event__get_type_description,
&tutorial_interfaces__srv__AddThreeInts_Event__get_type_description_sources,
};
} // namespace rosidl_typesupport_introspection_cpp
} // namespace srv
} // namespace tutorial_interfaces
namespace rosidl_typesupport_introspection_cpp
{
template<>
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_message_type_support_t *
get_message_type_support_handle<tutorial_interfaces::srv::AddThreeInts_Event>()
{
return &::tutorial_interfaces::srv::rosidl_typesupport_introspection_cpp::AddThreeInts_Event_message_type_support_handle;
}
} // namespace rosidl_typesupport_introspection_cpp
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, tutorial_interfaces, srv, AddThreeInts_Event)() {
return &::tutorial_interfaces::srv::rosidl_typesupport_introspection_cpp::AddThreeInts_Event_message_type_support_handle;
}
#ifdef __cplusplus
}
#endif
// already included above
// #include "rosidl_typesupport_cpp/message_type_support.hpp"
#include "rosidl_typesupport_cpp/service_type_support.hpp"
// already included above
// #include "rosidl_typesupport_interface/macros.h"
// already included above
// #include "rosidl_typesupport_introspection_cpp/visibility_control.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__struct.hpp"
// already included above
// #include "rosidl_typesupport_introspection_cpp/identifier.hpp"
// already included above
// #include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp"
#include "rosidl_typesupport_introspection_cpp/service_introspection.hpp"
#include "rosidl_typesupport_introspection_cpp/service_type_support_decl.hpp"
namespace tutorial_interfaces
{
namespace srv
{
namespace rosidl_typesupport_introspection_cpp
{
// this is intentionally not const to allow initialization later to prevent an initialization race
static ::rosidl_typesupport_introspection_cpp::ServiceMembers AddThreeInts_service_members = {
"tutorial_interfaces::srv", // service namespace
"AddThreeInts", // service name
// the following fields are initialized below on first access
// see get_service_type_support_handle<tutorial_interfaces::srv::AddThreeInts>()
nullptr, // request message
nullptr, // response message
nullptr, // event message
};
static const rosidl_service_type_support_t AddThreeInts_service_type_support_handle = {
::rosidl_typesupport_introspection_cpp::typesupport_identifier,
&AddThreeInts_service_members,
get_service_typesupport_handle_function,
::rosidl_typesupport_introspection_cpp::get_message_type_support_handle<tutorial_interfaces::srv::AddThreeInts_Request>(),
::rosidl_typesupport_introspection_cpp::get_message_type_support_handle<tutorial_interfaces::srv::AddThreeInts_Response>(),
::rosidl_typesupport_introspection_cpp::get_message_type_support_handle<tutorial_interfaces::srv::AddThreeInts_Event>(),
&::rosidl_typesupport_cpp::service_create_event_message<tutorial_interfaces::srv::AddThreeInts>,
&::rosidl_typesupport_cpp::service_destroy_event_message<tutorial_interfaces::srv::AddThreeInts>,
&tutorial_interfaces__srv__AddThreeInts__get_type_hash,
&tutorial_interfaces__srv__AddThreeInts__get_type_description,
&tutorial_interfaces__srv__AddThreeInts__get_type_description_sources,
};
} // namespace rosidl_typesupport_introspection_cpp
} // namespace srv
} // namespace tutorial_interfaces
namespace rosidl_typesupport_introspection_cpp
{
template<>
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_service_type_support_t *
get_service_type_support_handle<tutorial_interfaces::srv::AddThreeInts>()
{
// get a handle to the value to be returned
auto service_type_support =
&::tutorial_interfaces::srv::rosidl_typesupport_introspection_cpp::AddThreeInts_service_type_support_handle;
// get a non-const and properly typed version of the data void *
auto service_members = const_cast<::rosidl_typesupport_introspection_cpp::ServiceMembers *>(
static_cast<const ::rosidl_typesupport_introspection_cpp::ServiceMembers *>(
service_type_support->data));
// make sure all of the service_members are initialized
// if they are not, initialize them
if (
service_members->request_members_ == nullptr ||
service_members->response_members_ == nullptr ||
service_members->event_members_ == nullptr)
{
// initialize the request_members_ with the static function from the external library
service_members->request_members_ = static_cast<
const ::rosidl_typesupport_introspection_cpp::MessageMembers *
>(
::rosidl_typesupport_introspection_cpp::get_message_type_support_handle<
::tutorial_interfaces::srv::AddThreeInts_Request
>()->data
);
// initialize the response_members_ with the static function from the external library
service_members->response_members_ = static_cast<
const ::rosidl_typesupport_introspection_cpp::MessageMembers *
>(
::rosidl_typesupport_introspection_cpp::get_message_type_support_handle<
::tutorial_interfaces::srv::AddThreeInts_Response
>()->data
);
// initialize the event_members_ with the static function from the external library
service_members->event_members_ = static_cast<
const ::rosidl_typesupport_introspection_cpp::MessageMembers *
>(
::rosidl_typesupport_introspection_cpp::get_message_type_support_handle<
::tutorial_interfaces::srv::AddThreeInts_Event
>()->data
);
}
// finally return the properly initialized service_type_support handle
return service_type_support;
}
} // namespace rosidl_typesupport_introspection_cpp
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, tutorial_interfaces, srv, AddThreeInts)() {
return ::rosidl_typesupport_introspection_cpp::get_service_type_support_handle<tutorial_interfaces::srv::AddThreeInts>();
}
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,100 @@
// generated from rosidl_generator_c/resource/idl__type_support.h.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
// IWYU pragma: private, include "tutorial_interfaces/srv/add_three_ints.h"
#ifndef TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__TYPE_SUPPORT_H_
#define TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__TYPE_SUPPORT_H_
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/rosidl_generator_c__visibility_control.h"
#ifdef __cplusplus
extern "C"
{
#endif
#include "rosidl_runtime_c/message_type_support_struct.h"
// Forward declare the get type support functions for this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_c,
tutorial_interfaces,
srv,
AddThreeInts_Request
)(void);
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// Forward declare the get type support functions for this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_c,
tutorial_interfaces,
srv,
AddThreeInts_Response
)(void);
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// Forward declare the get type support functions for this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_c,
tutorial_interfaces,
srv,
AddThreeInts_Event
)(void);
#include "rosidl_runtime_c/service_type_support_struct.h"
// Forward declare the get type support functions for this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(
rosidl_typesupport_c,
tutorial_interfaces,
srv,
AddThreeInts
)(void);
// Forward declare the function to create a service event message for this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
void *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_CREATE_EVENT_MESSAGE_SYMBOL_NAME(
rosidl_typesupport_c,
tutorial_interfaces,
srv,
AddThreeInts
)(
const rosidl_service_introspection_info_t * info,
rcutils_allocator_t * allocator,
const void * request_message,
const void * response_message);
// Forward declare the function to destroy a service event message for this type.
ROSIDL_GENERATOR_C_PUBLIC_tutorial_interfaces
bool
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_DESTROY_EVENT_MESSAGE_SYMBOL_NAME(
rosidl_typesupport_c,
tutorial_interfaces,
srv,
AddThreeInts
)(
void * event_msg,
rcutils_allocator_t * allocator);
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__TYPE_SUPPORT_H_

View File

@@ -0,0 +1,71 @@
// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
#ifndef TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__TYPE_SUPPORT_HPP_
#define TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__TYPE_SUPPORT_HPP_
#include "rosidl_typesupport_interface/macros.h"
#include "tutorial_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp"
#include "rosidl_typesupport_cpp/service_type_support.hpp"
#ifdef __cplusplus
extern "C"
{
#endif
// Forward declare the get type support functions for this type.
ROSIDL_GENERATOR_CPP_PUBLIC_tutorial_interfaces
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(
rosidl_typesupport_cpp,
tutorial_interfaces,
srv,
AddThreeInts
)();
#ifdef __cplusplus
}
#endif
#include "rosidl_typesupport_cpp/message_type_support.hpp"
#ifdef __cplusplus
extern "C"
{
#endif
// Forward declare the get type support functions for this type.
ROSIDL_GENERATOR_CPP_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_cpp,
tutorial_interfaces,
srv,
AddThreeInts_Request
)();
#ifdef __cplusplus
}
#endif
// already included above
// #include "rosidl_typesupport_cpp/message_type_support.hpp"
#ifdef __cplusplus
extern "C"
{
#endif
// Forward declare the get type support functions for this type.
ROSIDL_GENERATOR_CPP_PUBLIC_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_cpp,
tutorial_interfaces,
srv,
AddThreeInts_Response
)();
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__TYPE_SUPPORT_HPP_

View File

@@ -0,0 +1,3 @@
Metadata-Version: 2.1
Name: tutorial-interfaces
Version: 0.0.0

View File

@@ -0,0 +1,11 @@
setup.py
tutorial_interfaces/__init__.py
tutorial_interfaces.egg-info/PKG-INFO
tutorial_interfaces.egg-info/SOURCES.txt
tutorial_interfaces.egg-info/dependency_links.txt
tutorial_interfaces.egg-info/top_level.txt
tutorial_interfaces/msg/__init__.py
tutorial_interfaces/msg/_num.py
tutorial_interfaces/msg/_sphere.py
tutorial_interfaces/srv/__init__.py
tutorial_interfaces/srv/_add_three_ints.py

View File

@@ -0,0 +1,792 @@
// generated from rosidl_generator_py/resource/_idl_pkg_typesupport_entry_point.c.em
// generated code does not contain a copyright notice
#include <Python.h>
static PyMethodDef tutorial_interfaces__methods[] = {
{NULL, NULL, 0, NULL} /* sentinel */
};
static struct PyModuleDef tutorial_interfaces__module = {
PyModuleDef_HEAD_INIT,
"_tutorial_interfaces_support",
"_tutorial_interfaces_doc",
-1, /* -1 means that the module keeps state in global variables */
tutorial_interfaces__methods,
NULL,
NULL,
NULL,
NULL,
};
#include <stdbool.h>
#include <stdint.h>
#include "rosidl_runtime_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/action_type_support_struct.h"
#include "tutorial_interfaces/msg/detail/num__type_support.h"
#include "tutorial_interfaces/msg/detail/num__struct.h"
#include "tutorial_interfaces/msg/detail/num__functions.h"
static void * tutorial_interfaces__msg__num__create_ros_message(void)
{
return tutorial_interfaces__msg__Num__create();
}
static void tutorial_interfaces__msg__num__destroy_ros_message(void * raw_ros_message)
{
tutorial_interfaces__msg__Num * ros_message = (tutorial_interfaces__msg__Num *)raw_ros_message;
tutorial_interfaces__msg__Num__destroy(ros_message);
}
ROSIDL_GENERATOR_C_IMPORT
bool tutorial_interfaces__msg__num__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * tutorial_interfaces__msg__num__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, msg, Num);
int8_t
_register_msg_type__msg__num(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__msg__num__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__msg__num",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__msg__num__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__msg__num",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&tutorial_interfaces__msg__num__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__msg__num",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&tutorial_interfaces__msg__num__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__msg__num",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, msg, Num),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__msg__num",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
// already included above
// #include <stdbool.h>
// already included above
// #include <stdint.h>
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/action_type_support_struct.h"
#include "tutorial_interfaces/msg/detail/sphere__type_support.h"
#include "tutorial_interfaces/msg/detail/sphere__struct.h"
#include "tutorial_interfaces/msg/detail/sphere__functions.h"
static void * tutorial_interfaces__msg__sphere__create_ros_message(void)
{
return tutorial_interfaces__msg__Sphere__create();
}
static void tutorial_interfaces__msg__sphere__destroy_ros_message(void * raw_ros_message)
{
tutorial_interfaces__msg__Sphere * ros_message = (tutorial_interfaces__msg__Sphere *)raw_ros_message;
tutorial_interfaces__msg__Sphere__destroy(ros_message);
}
ROSIDL_GENERATOR_C_IMPORT
bool tutorial_interfaces__msg__sphere__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * tutorial_interfaces__msg__sphere__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, msg, Sphere);
int8_t
_register_msg_type__msg__sphere(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__msg__sphere__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__msg__sphere",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__msg__sphere__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__msg__sphere",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&tutorial_interfaces__msg__sphere__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__msg__sphere",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&tutorial_interfaces__msg__sphere__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__msg__sphere",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, msg, Sphere),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__msg__sphere",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
// already included above
// #include <stdbool.h>
// already included above
// #include <stdint.h>
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/action_type_support_struct.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__type_support.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
static void * tutorial_interfaces__srv__add_three_ints__request__create_ros_message(void)
{
return tutorial_interfaces__srv__AddThreeInts_Request__create();
}
static void tutorial_interfaces__srv__add_three_ints__request__destroy_ros_message(void * raw_ros_message)
{
tutorial_interfaces__srv__AddThreeInts_Request * ros_message = (tutorial_interfaces__srv__AddThreeInts_Request *)raw_ros_message;
tutorial_interfaces__srv__AddThreeInts_Request__destroy(ros_message);
}
ROSIDL_GENERATOR_C_IMPORT
bool tutorial_interfaces__srv__add_three_ints__request__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * tutorial_interfaces__srv__add_three_ints__request__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Request);
int8_t
_register_msg_type__srv__add_three_ints__request(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__request__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__srv__add_three_ints__request",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__request__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__srv__add_three_ints__request",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__request__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__srv__add_three_ints__request",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__request__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__srv__add_three_ints__request",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Request),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__srv__add_three_ints__request",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
// already included above
// #include <stdbool.h>
// already included above
// #include <stdint.h>
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/action_type_support_struct.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__type_support.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
static void * tutorial_interfaces__srv__add_three_ints__response__create_ros_message(void)
{
return tutorial_interfaces__srv__AddThreeInts_Response__create();
}
static void tutorial_interfaces__srv__add_three_ints__response__destroy_ros_message(void * raw_ros_message)
{
tutorial_interfaces__srv__AddThreeInts_Response * ros_message = (tutorial_interfaces__srv__AddThreeInts_Response *)raw_ros_message;
tutorial_interfaces__srv__AddThreeInts_Response__destroy(ros_message);
}
ROSIDL_GENERATOR_C_IMPORT
bool tutorial_interfaces__srv__add_three_ints__response__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * tutorial_interfaces__srv__add_three_ints__response__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Response);
int8_t
_register_msg_type__srv__add_three_ints__response(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__response__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__srv__add_three_ints__response",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__response__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__srv__add_three_ints__response",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__response__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__srv__add_three_ints__response",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__response__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__srv__add_three_ints__response",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Response),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__srv__add_three_ints__response",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
// already included above
// #include <stdbool.h>
// already included above
// #include <stdint.h>
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/action_type_support_struct.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__type_support.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
static void * tutorial_interfaces__srv__add_three_ints__event__create_ros_message(void)
{
return tutorial_interfaces__srv__AddThreeInts_Event__create();
}
static void tutorial_interfaces__srv__add_three_ints__event__destroy_ros_message(void * raw_ros_message)
{
tutorial_interfaces__srv__AddThreeInts_Event * ros_message = (tutorial_interfaces__srv__AddThreeInts_Event *)raw_ros_message;
tutorial_interfaces__srv__AddThreeInts_Event__destroy(ros_message);
}
ROSIDL_GENERATOR_C_IMPORT
bool tutorial_interfaces__srv__add_three_ints__event__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * tutorial_interfaces__srv__add_three_ints__event__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Event);
int8_t
_register_msg_type__srv__add_three_ints__event(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__event__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__srv__add_three_ints__event",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__event__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__srv__add_three_ints__event",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__event__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__srv__add_three_ints__event",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__event__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__srv__add_three_ints__event",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Event),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__srv__add_three_ints__event",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
ROSIDL_GENERATOR_C_IMPORT
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_c, tutorial_interfaces, srv, AddThreeInts)();
int8_t
_register_srv_type__srv__add_three_ints(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_c, tutorial_interfaces, srv, AddThreeInts)(),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_srv__srv__add_three_ints",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
PyMODINIT_FUNC
PyInit_tutorial_interfaces_s__rosidl_typesupport_c(void)
{
PyObject * pymodule = NULL;
pymodule = PyModule_Create(&tutorial_interfaces__module);
if (!pymodule) {
return NULL;
}
int8_t err;
err = _register_msg_type__msg__num(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
err = _register_msg_type__msg__sphere(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
err = _register_msg_type__srv__add_three_ints__request(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
err = _register_msg_type__srv__add_three_ints__response(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
err = _register_msg_type__srv__add_three_ints__event(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
err = _register_srv_type__srv__add_three_ints(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
return pymodule;
}

View File

@@ -0,0 +1,792 @@
// generated from rosidl_generator_py/resource/_idl_pkg_typesupport_entry_point.c.em
// generated code does not contain a copyright notice
#include <Python.h>
static PyMethodDef tutorial_interfaces__methods[] = {
{NULL, NULL, 0, NULL} /* sentinel */
};
static struct PyModuleDef tutorial_interfaces__module = {
PyModuleDef_HEAD_INIT,
"_tutorial_interfaces_support",
"_tutorial_interfaces_doc",
-1, /* -1 means that the module keeps state in global variables */
tutorial_interfaces__methods,
NULL,
NULL,
NULL,
NULL,
};
#include <stdbool.h>
#include <stdint.h>
#include "rosidl_runtime_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/action_type_support_struct.h"
#include "tutorial_interfaces/msg/detail/num__type_support.h"
#include "tutorial_interfaces/msg/detail/num__struct.h"
#include "tutorial_interfaces/msg/detail/num__functions.h"
static void * tutorial_interfaces__msg__num__create_ros_message(void)
{
return tutorial_interfaces__msg__Num__create();
}
static void tutorial_interfaces__msg__num__destroy_ros_message(void * raw_ros_message)
{
tutorial_interfaces__msg__Num * ros_message = (tutorial_interfaces__msg__Num *)raw_ros_message;
tutorial_interfaces__msg__Num__destroy(ros_message);
}
ROSIDL_GENERATOR_C_IMPORT
bool tutorial_interfaces__msg__num__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * tutorial_interfaces__msg__num__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, msg, Num);
int8_t
_register_msg_type__msg__num(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__msg__num__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__msg__num",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__msg__num__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__msg__num",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&tutorial_interfaces__msg__num__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__msg__num",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&tutorial_interfaces__msg__num__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__msg__num",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, msg, Num),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__msg__num",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
// already included above
// #include <stdbool.h>
// already included above
// #include <stdint.h>
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/action_type_support_struct.h"
#include "tutorial_interfaces/msg/detail/sphere__type_support.h"
#include "tutorial_interfaces/msg/detail/sphere__struct.h"
#include "tutorial_interfaces/msg/detail/sphere__functions.h"
static void * tutorial_interfaces__msg__sphere__create_ros_message(void)
{
return tutorial_interfaces__msg__Sphere__create();
}
static void tutorial_interfaces__msg__sphere__destroy_ros_message(void * raw_ros_message)
{
tutorial_interfaces__msg__Sphere * ros_message = (tutorial_interfaces__msg__Sphere *)raw_ros_message;
tutorial_interfaces__msg__Sphere__destroy(ros_message);
}
ROSIDL_GENERATOR_C_IMPORT
bool tutorial_interfaces__msg__sphere__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * tutorial_interfaces__msg__sphere__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, msg, Sphere);
int8_t
_register_msg_type__msg__sphere(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__msg__sphere__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__msg__sphere",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__msg__sphere__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__msg__sphere",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&tutorial_interfaces__msg__sphere__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__msg__sphere",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&tutorial_interfaces__msg__sphere__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__msg__sphere",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, msg, Sphere),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__msg__sphere",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
// already included above
// #include <stdbool.h>
// already included above
// #include <stdint.h>
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/action_type_support_struct.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__type_support.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
static void * tutorial_interfaces__srv__add_three_ints__request__create_ros_message(void)
{
return tutorial_interfaces__srv__AddThreeInts_Request__create();
}
static void tutorial_interfaces__srv__add_three_ints__request__destroy_ros_message(void * raw_ros_message)
{
tutorial_interfaces__srv__AddThreeInts_Request * ros_message = (tutorial_interfaces__srv__AddThreeInts_Request *)raw_ros_message;
tutorial_interfaces__srv__AddThreeInts_Request__destroy(ros_message);
}
ROSIDL_GENERATOR_C_IMPORT
bool tutorial_interfaces__srv__add_three_ints__request__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * tutorial_interfaces__srv__add_three_ints__request__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Request);
int8_t
_register_msg_type__srv__add_three_ints__request(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__request__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__srv__add_three_ints__request",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__request__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__srv__add_three_ints__request",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__request__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__srv__add_three_ints__request",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__request__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__srv__add_three_ints__request",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Request),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__srv__add_three_ints__request",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
// already included above
// #include <stdbool.h>
// already included above
// #include <stdint.h>
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/action_type_support_struct.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__type_support.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
static void * tutorial_interfaces__srv__add_three_ints__response__create_ros_message(void)
{
return tutorial_interfaces__srv__AddThreeInts_Response__create();
}
static void tutorial_interfaces__srv__add_three_ints__response__destroy_ros_message(void * raw_ros_message)
{
tutorial_interfaces__srv__AddThreeInts_Response * ros_message = (tutorial_interfaces__srv__AddThreeInts_Response *)raw_ros_message;
tutorial_interfaces__srv__AddThreeInts_Response__destroy(ros_message);
}
ROSIDL_GENERATOR_C_IMPORT
bool tutorial_interfaces__srv__add_three_ints__response__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * tutorial_interfaces__srv__add_three_ints__response__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Response);
int8_t
_register_msg_type__srv__add_three_ints__response(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__response__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__srv__add_three_ints__response",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__response__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__srv__add_three_ints__response",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__response__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__srv__add_three_ints__response",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__response__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__srv__add_three_ints__response",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Response),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__srv__add_three_ints__response",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
// already included above
// #include <stdbool.h>
// already included above
// #include <stdint.h>
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/action_type_support_struct.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__type_support.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
static void * tutorial_interfaces__srv__add_three_ints__event__create_ros_message(void)
{
return tutorial_interfaces__srv__AddThreeInts_Event__create();
}
static void tutorial_interfaces__srv__add_three_ints__event__destroy_ros_message(void * raw_ros_message)
{
tutorial_interfaces__srv__AddThreeInts_Event * ros_message = (tutorial_interfaces__srv__AddThreeInts_Event *)raw_ros_message;
tutorial_interfaces__srv__AddThreeInts_Event__destroy(ros_message);
}
ROSIDL_GENERATOR_C_IMPORT
bool tutorial_interfaces__srv__add_three_ints__event__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * tutorial_interfaces__srv__add_three_ints__event__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Event);
int8_t
_register_msg_type__srv__add_three_ints__event(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__event__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__srv__add_three_ints__event",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__event__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__srv__add_three_ints__event",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__event__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__srv__add_three_ints__event",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__event__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__srv__add_three_ints__event",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Event),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__srv__add_three_ints__event",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
ROSIDL_GENERATOR_C_IMPORT
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_c, tutorial_interfaces, srv, AddThreeInts)();
int8_t
_register_srv_type__srv__add_three_ints(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_c, tutorial_interfaces, srv, AddThreeInts)(),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_srv__srv__add_three_ints",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
PyMODINIT_FUNC
PyInit_tutorial_interfaces_s__rosidl_typesupport_fastrtps_c(void)
{
PyObject * pymodule = NULL;
pymodule = PyModule_Create(&tutorial_interfaces__module);
if (!pymodule) {
return NULL;
}
int8_t err;
err = _register_msg_type__msg__num(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
err = _register_msg_type__msg__sphere(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
err = _register_msg_type__srv__add_three_ints__request(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
err = _register_msg_type__srv__add_three_ints__response(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
err = _register_msg_type__srv__add_three_ints__event(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
err = _register_srv_type__srv__add_three_ints(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
return pymodule;
}

View File

@@ -0,0 +1,792 @@
// generated from rosidl_generator_py/resource/_idl_pkg_typesupport_entry_point.c.em
// generated code does not contain a copyright notice
#include <Python.h>
static PyMethodDef tutorial_interfaces__methods[] = {
{NULL, NULL, 0, NULL} /* sentinel */
};
static struct PyModuleDef tutorial_interfaces__module = {
PyModuleDef_HEAD_INIT,
"_tutorial_interfaces_support",
"_tutorial_interfaces_doc",
-1, /* -1 means that the module keeps state in global variables */
tutorial_interfaces__methods,
NULL,
NULL,
NULL,
NULL,
};
#include <stdbool.h>
#include <stdint.h>
#include "rosidl_runtime_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/action_type_support_struct.h"
#include "tutorial_interfaces/msg/detail/num__type_support.h"
#include "tutorial_interfaces/msg/detail/num__struct.h"
#include "tutorial_interfaces/msg/detail/num__functions.h"
static void * tutorial_interfaces__msg__num__create_ros_message(void)
{
return tutorial_interfaces__msg__Num__create();
}
static void tutorial_interfaces__msg__num__destroy_ros_message(void * raw_ros_message)
{
tutorial_interfaces__msg__Num * ros_message = (tutorial_interfaces__msg__Num *)raw_ros_message;
tutorial_interfaces__msg__Num__destroy(ros_message);
}
ROSIDL_GENERATOR_C_IMPORT
bool tutorial_interfaces__msg__num__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * tutorial_interfaces__msg__num__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, msg, Num);
int8_t
_register_msg_type__msg__num(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__msg__num__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__msg__num",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__msg__num__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__msg__num",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&tutorial_interfaces__msg__num__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__msg__num",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&tutorial_interfaces__msg__num__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__msg__num",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, msg, Num),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__msg__num",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
// already included above
// #include <stdbool.h>
// already included above
// #include <stdint.h>
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/action_type_support_struct.h"
#include "tutorial_interfaces/msg/detail/sphere__type_support.h"
#include "tutorial_interfaces/msg/detail/sphere__struct.h"
#include "tutorial_interfaces/msg/detail/sphere__functions.h"
static void * tutorial_interfaces__msg__sphere__create_ros_message(void)
{
return tutorial_interfaces__msg__Sphere__create();
}
static void tutorial_interfaces__msg__sphere__destroy_ros_message(void * raw_ros_message)
{
tutorial_interfaces__msg__Sphere * ros_message = (tutorial_interfaces__msg__Sphere *)raw_ros_message;
tutorial_interfaces__msg__Sphere__destroy(ros_message);
}
ROSIDL_GENERATOR_C_IMPORT
bool tutorial_interfaces__msg__sphere__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * tutorial_interfaces__msg__sphere__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, msg, Sphere);
int8_t
_register_msg_type__msg__sphere(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__msg__sphere__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__msg__sphere",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__msg__sphere__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__msg__sphere",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&tutorial_interfaces__msg__sphere__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__msg__sphere",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&tutorial_interfaces__msg__sphere__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__msg__sphere",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, msg, Sphere),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__msg__sphere",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
// already included above
// #include <stdbool.h>
// already included above
// #include <stdint.h>
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/action_type_support_struct.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__type_support.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
static void * tutorial_interfaces__srv__add_three_ints__request__create_ros_message(void)
{
return tutorial_interfaces__srv__AddThreeInts_Request__create();
}
static void tutorial_interfaces__srv__add_three_ints__request__destroy_ros_message(void * raw_ros_message)
{
tutorial_interfaces__srv__AddThreeInts_Request * ros_message = (tutorial_interfaces__srv__AddThreeInts_Request *)raw_ros_message;
tutorial_interfaces__srv__AddThreeInts_Request__destroy(ros_message);
}
ROSIDL_GENERATOR_C_IMPORT
bool tutorial_interfaces__srv__add_three_ints__request__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * tutorial_interfaces__srv__add_three_ints__request__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Request);
int8_t
_register_msg_type__srv__add_three_ints__request(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__request__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__srv__add_three_ints__request",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__request__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__srv__add_three_ints__request",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__request__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__srv__add_three_ints__request",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__request__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__srv__add_three_ints__request",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Request),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__srv__add_three_ints__request",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
// already included above
// #include <stdbool.h>
// already included above
// #include <stdint.h>
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/action_type_support_struct.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__type_support.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
static void * tutorial_interfaces__srv__add_three_ints__response__create_ros_message(void)
{
return tutorial_interfaces__srv__AddThreeInts_Response__create();
}
static void tutorial_interfaces__srv__add_three_ints__response__destroy_ros_message(void * raw_ros_message)
{
tutorial_interfaces__srv__AddThreeInts_Response * ros_message = (tutorial_interfaces__srv__AddThreeInts_Response *)raw_ros_message;
tutorial_interfaces__srv__AddThreeInts_Response__destroy(ros_message);
}
ROSIDL_GENERATOR_C_IMPORT
bool tutorial_interfaces__srv__add_three_ints__response__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * tutorial_interfaces__srv__add_three_ints__response__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Response);
int8_t
_register_msg_type__srv__add_three_ints__response(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__response__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__srv__add_three_ints__response",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__response__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__srv__add_three_ints__response",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__response__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__srv__add_three_ints__response",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__response__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__srv__add_three_ints__response",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Response),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__srv__add_three_ints__response",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
// already included above
// #include <stdbool.h>
// already included above
// #include <stdint.h>
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/action_type_support_struct.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__type_support.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
static void * tutorial_interfaces__srv__add_three_ints__event__create_ros_message(void)
{
return tutorial_interfaces__srv__AddThreeInts_Event__create();
}
static void tutorial_interfaces__srv__add_three_ints__event__destroy_ros_message(void * raw_ros_message)
{
tutorial_interfaces__srv__AddThreeInts_Event * ros_message = (tutorial_interfaces__srv__AddThreeInts_Event *)raw_ros_message;
tutorial_interfaces__srv__AddThreeInts_Event__destroy(ros_message);
}
ROSIDL_GENERATOR_C_IMPORT
bool tutorial_interfaces__srv__add_three_ints__event__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * tutorial_interfaces__srv__add_three_ints__event__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Event);
int8_t
_register_msg_type__srv__add_three_ints__event(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__event__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__srv__add_three_ints__event",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__event__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__srv__add_three_ints__event",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__event__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__srv__add_three_ints__event",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&tutorial_interfaces__srv__add_three_ints__event__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__srv__add_three_ints__event",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(tutorial_interfaces, srv, AddThreeInts_Event),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__srv__add_three_ints__event",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
ROSIDL_GENERATOR_C_IMPORT
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_c, tutorial_interfaces, srv, AddThreeInts)();
int8_t
_register_srv_type__srv__add_three_ints(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_c, tutorial_interfaces, srv, AddThreeInts)(),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_srv__srv__add_three_ints",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}
PyMODINIT_FUNC
PyInit_tutorial_interfaces_s__rosidl_typesupport_introspection_c(void)
{
PyObject * pymodule = NULL;
pymodule = PyModule_Create(&tutorial_interfaces__module);
if (!pymodule) {
return NULL;
}
int8_t err;
err = _register_msg_type__msg__num(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
err = _register_msg_type__msg__sphere(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
err = _register_msg_type__srv__add_three_ints__request(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
err = _register_msg_type__srv__add_three_ints__response(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
err = _register_msg_type__srv__add_three_ints__event(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
err = _register_srv_type__srv__add_three_ints(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
return pymodule;
}

View File

@@ -0,0 +1,2 @@
from tutorial_interfaces.msg._num import Num # noqa: F401
from tutorial_interfaces.msg._sphere import Sphere # noqa: F401

View File

@@ -0,0 +1,142 @@
# generated from rosidl_generator_py/resource/_idl.py.em
# with input from tutorial_interfaces:msg/Num.idl
# generated code does not contain a copyright notice
# This is being done at the module level and not on the instance level to avoid looking
# for the same variable multiple times on each instance. This variable is not supposed to
# change during runtime so it makes sense to only look for it once.
from os import getenv
ros_python_check_fields = getenv('ROS_PYTHON_CHECK_FIELDS', default='')
# Import statements for member types
import builtins # noqa: E402, I100
import rosidl_parser.definition # noqa: E402, I100
class Metaclass_Num(type):
"""Metaclass of message 'Num'."""
_CREATE_ROS_MESSAGE = None
_CONVERT_FROM_PY = None
_CONVERT_TO_PY = None
_DESTROY_ROS_MESSAGE = None
_TYPE_SUPPORT = None
__constants = {
}
@classmethod
def __import_type_support__(cls):
try:
from rosidl_generator_py import import_type_support
module = import_type_support('tutorial_interfaces')
except ImportError:
import logging
import traceback
logger = logging.getLogger(
'tutorial_interfaces.msg.Num')
logger.debug(
'Failed to import needed modules for type support:\n' +
traceback.format_exc())
else:
cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__num
cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__num
cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__num
cls._TYPE_SUPPORT = module.type_support_msg__msg__num
cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__num
@classmethod
def __prepare__(cls, name, bases, **kwargs):
# list constant names here so that they appear in the help text of
# the message class under "Data and other attributes defined here:"
# as well as populate each message instance
return {
}
class Num(metaclass=Metaclass_Num):
"""Message class 'Num'."""
__slots__ = [
'_num',
'_check_fields',
]
_fields_and_field_types = {
'num': 'int64',
}
# This attribute is used to store an rosidl_parser.definition variable
# related to the data type of each of the components the message.
SLOT_TYPES = (
rosidl_parser.definition.BasicType('int64'), # noqa: E501
)
def __init__(self, **kwargs):
if 'check_fields' in kwargs:
self._check_fields = kwargs['check_fields']
else:
self._check_fields = ros_python_check_fields == '1'
if self._check_fields:
assert all('_' + key in self.__slots__ for key in kwargs.keys()), \
'Invalid arguments passed to constructor: %s' % \
', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__))
self.num = kwargs.get('num', int())
def __repr__(self):
typename = self.__class__.__module__.split('.')
typename.pop()
typename.append(self.__class__.__name__)
args = []
for s, t in zip(self.get_fields_and_field_types().keys(), self.SLOT_TYPES):
field = getattr(self, s)
fieldstr = repr(field)
# We use Python array type for fields that can be directly stored
# in them, and "normal" sequences for everything else. If it is
# a type that we store in an array, strip off the 'array' portion.
if (
isinstance(t, rosidl_parser.definition.AbstractSequence) and
isinstance(t.value_type, rosidl_parser.definition.BasicType) and
t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64']
):
if len(field) == 0:
fieldstr = '[]'
else:
if self._check_fields:
assert fieldstr.startswith('array(')
prefix = "array('X', "
suffix = ')'
fieldstr = fieldstr[len(prefix):-len(suffix)]
args.append(s + '=' + fieldstr)
return '%s(%s)' % ('.'.join(typename), ', '.join(args))
def __eq__(self, other):
if not isinstance(other, self.__class__):
return False
if self.num != other.num:
return False
return True
@classmethod
def get_fields_and_field_types(cls):
from copy import copy
return copy(cls._fields_and_field_types)
@builtins.property
def num(self):
"""Message field 'num'."""
return self._num
@num.setter
def num(self, value):
if self._check_fields:
assert \
isinstance(value, int), \
"The 'num' field must be of type 'int'"
assert value >= -9223372036854775808 and value < 9223372036854775808, \
"The 'num' field must be an integer in [-9223372036854775808, 9223372036854775807]"
self._num = value

View File

@@ -0,0 +1,98 @@
// generated from rosidl_generator_py/resource/_idl_support.c.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <Python.h>
#include <stdbool.h>
#ifndef _WIN32
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-function"
#endif
#include "numpy/ndarrayobject.h"
#ifndef _WIN32
# pragma GCC diagnostic pop
#endif
#include "rosidl_runtime_c/visibility_control.h"
#include "tutorial_interfaces/msg/detail/num__struct.h"
#include "tutorial_interfaces/msg/detail/num__functions.h"
ROSIDL_GENERATOR_C_EXPORT
bool tutorial_interfaces__msg__num__convert_from_py(PyObject * _pymsg, void * _ros_message)
{
// check that the passed message is of the expected Python class
{
char full_classname_dest[33];
{
char * class_name = NULL;
char * module_name = NULL;
{
PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__");
if (class_attr) {
PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__");
if (name_attr) {
class_name = (char *)PyUnicode_1BYTE_DATA(name_attr);
Py_DECREF(name_attr);
}
PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__");
if (module_attr) {
module_name = (char *)PyUnicode_1BYTE_DATA(module_attr);
Py_DECREF(module_attr);
}
Py_DECREF(class_attr);
}
}
if (!class_name || !module_name) {
return false;
}
snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name);
}
assert(strncmp("tutorial_interfaces.msg._num.Num", full_classname_dest, 32) == 0);
}
tutorial_interfaces__msg__Num * ros_message = _ros_message;
{ // num
PyObject * field = PyObject_GetAttrString(_pymsg, "num");
if (!field) {
return false;
}
assert(PyLong_Check(field));
ros_message->num = PyLong_AsLongLong(field);
Py_DECREF(field);
}
return true;
}
ROSIDL_GENERATOR_C_EXPORT
PyObject * tutorial_interfaces__msg__num__convert_to_py(void * raw_ros_message)
{
/* NOTE(esteve): Call constructor of Num */
PyObject * _pymessage = NULL;
{
PyObject * pymessage_module = PyImport_ImportModule("tutorial_interfaces.msg._num");
assert(pymessage_module);
PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "Num");
assert(pymessage_class);
Py_DECREF(pymessage_module);
_pymessage = PyObject_CallObject(pymessage_class, NULL);
Py_DECREF(pymessage_class);
if (!_pymessage) {
return NULL;
}
}
tutorial_interfaces__msg__Num * ros_message = (tutorial_interfaces__msg__Num *)raw_ros_message;
{ // num
PyObject * field = NULL;
field = PyLong_FromLongLong(ros_message->num);
{
int rc = PyObject_SetAttrString(_pymessage, "num", field);
Py_DECREF(field);
if (rc) {
return NULL;
}
}
}
// ownership of _pymessage is transferred to the caller
return _pymessage;
}

View File

@@ -0,0 +1,169 @@
# generated from rosidl_generator_py/resource/_idl.py.em
# with input from tutorial_interfaces:msg/Sphere.idl
# generated code does not contain a copyright notice
# This is being done at the module level and not on the instance level to avoid looking
# for the same variable multiple times on each instance. This variable is not supposed to
# change during runtime so it makes sense to only look for it once.
from os import getenv
ros_python_check_fields = getenv('ROS_PYTHON_CHECK_FIELDS', default='')
# Import statements for member types
import builtins # noqa: E402, I100
import math # noqa: E402, I100
import rosidl_parser.definition # noqa: E402, I100
class Metaclass_Sphere(type):
"""Metaclass of message 'Sphere'."""
_CREATE_ROS_MESSAGE = None
_CONVERT_FROM_PY = None
_CONVERT_TO_PY = None
_DESTROY_ROS_MESSAGE = None
_TYPE_SUPPORT = None
__constants = {
}
@classmethod
def __import_type_support__(cls):
try:
from rosidl_generator_py import import_type_support
module = import_type_support('tutorial_interfaces')
except ImportError:
import logging
import traceback
logger = logging.getLogger(
'tutorial_interfaces.msg.Sphere')
logger.debug(
'Failed to import needed modules for type support:\n' +
traceback.format_exc())
else:
cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__sphere
cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__sphere
cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__sphere
cls._TYPE_SUPPORT = module.type_support_msg__msg__sphere
cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__sphere
from geometry_msgs.msg import Point
if Point.__class__._TYPE_SUPPORT is None:
Point.__class__.__import_type_support__()
@classmethod
def __prepare__(cls, name, bases, **kwargs):
# list constant names here so that they appear in the help text of
# the message class under "Data and other attributes defined here:"
# as well as populate each message instance
return {
}
class Sphere(metaclass=Metaclass_Sphere):
"""Message class 'Sphere'."""
__slots__ = [
'_center',
'_radius',
'_check_fields',
]
_fields_and_field_types = {
'center': 'geometry_msgs/Point',
'radius': 'double',
}
# This attribute is used to store an rosidl_parser.definition variable
# related to the data type of each of the components the message.
SLOT_TYPES = (
rosidl_parser.definition.NamespacedType(['geometry_msgs', 'msg'], 'Point'), # noqa: E501
rosidl_parser.definition.BasicType('double'), # noqa: E501
)
def __init__(self, **kwargs):
if 'check_fields' in kwargs:
self._check_fields = kwargs['check_fields']
else:
self._check_fields = ros_python_check_fields == '1'
if self._check_fields:
assert all('_' + key in self.__slots__ for key in kwargs.keys()), \
'Invalid arguments passed to constructor: %s' % \
', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__))
from geometry_msgs.msg import Point
self.center = kwargs.get('center', Point())
self.radius = kwargs.get('radius', float())
def __repr__(self):
typename = self.__class__.__module__.split('.')
typename.pop()
typename.append(self.__class__.__name__)
args = []
for s, t in zip(self.get_fields_and_field_types().keys(), self.SLOT_TYPES):
field = getattr(self, s)
fieldstr = repr(field)
# We use Python array type for fields that can be directly stored
# in them, and "normal" sequences for everything else. If it is
# a type that we store in an array, strip off the 'array' portion.
if (
isinstance(t, rosidl_parser.definition.AbstractSequence) and
isinstance(t.value_type, rosidl_parser.definition.BasicType) and
t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64']
):
if len(field) == 0:
fieldstr = '[]'
else:
if self._check_fields:
assert fieldstr.startswith('array(')
prefix = "array('X', "
suffix = ')'
fieldstr = fieldstr[len(prefix):-len(suffix)]
args.append(s + '=' + fieldstr)
return '%s(%s)' % ('.'.join(typename), ', '.join(args))
def __eq__(self, other):
if not isinstance(other, self.__class__):
return False
if self.center != other.center:
return False
if self.radius != other.radius:
return False
return True
@classmethod
def get_fields_and_field_types(cls):
from copy import copy
return copy(cls._fields_and_field_types)
@builtins.property
def center(self):
"""Message field 'center'."""
return self._center
@center.setter
def center(self, value):
if self._check_fields:
from geometry_msgs.msg import Point
assert \
isinstance(value, Point), \
"The 'center' field must be a sub message of type 'Point'"
self._center = value
@builtins.property
def radius(self):
"""Message field 'radius'."""
return self._radius
@radius.setter
def radius(self, value):
if self._check_fields:
assert \
isinstance(value, float), \
"The 'radius' field must be of type 'float'"
assert not (value < -1.7976931348623157e+308 or value > 1.7976931348623157e+308) or math.isinf(value), \
"The 'radius' field must be a double in [-1.7976931348623157e+308, 1.7976931348623157e+308]"
self._radius = value

View File

@@ -0,0 +1,127 @@
// generated from rosidl_generator_py/resource/_idl_support.c.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <Python.h>
#include <stdbool.h>
#ifndef _WIN32
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-function"
#endif
#include "numpy/ndarrayobject.h"
#ifndef _WIN32
# pragma GCC diagnostic pop
#endif
#include "rosidl_runtime_c/visibility_control.h"
#include "tutorial_interfaces/msg/detail/sphere__struct.h"
#include "tutorial_interfaces/msg/detail/sphere__functions.h"
ROSIDL_GENERATOR_C_IMPORT
bool geometry_msgs__msg__point__convert_from_py(PyObject * _pymsg, void * _ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * geometry_msgs__msg__point__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_EXPORT
bool tutorial_interfaces__msg__sphere__convert_from_py(PyObject * _pymsg, void * _ros_message)
{
// check that the passed message is of the expected Python class
{
char full_classname_dest[39];
{
char * class_name = NULL;
char * module_name = NULL;
{
PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__");
if (class_attr) {
PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__");
if (name_attr) {
class_name = (char *)PyUnicode_1BYTE_DATA(name_attr);
Py_DECREF(name_attr);
}
PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__");
if (module_attr) {
module_name = (char *)PyUnicode_1BYTE_DATA(module_attr);
Py_DECREF(module_attr);
}
Py_DECREF(class_attr);
}
}
if (!class_name || !module_name) {
return false;
}
snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name);
}
assert(strncmp("tutorial_interfaces.msg._sphere.Sphere", full_classname_dest, 38) == 0);
}
tutorial_interfaces__msg__Sphere * ros_message = _ros_message;
{ // center
PyObject * field = PyObject_GetAttrString(_pymsg, "center");
if (!field) {
return false;
}
if (!geometry_msgs__msg__point__convert_from_py(field, &ros_message->center)) {
Py_DECREF(field);
return false;
}
Py_DECREF(field);
}
{ // radius
PyObject * field = PyObject_GetAttrString(_pymsg, "radius");
if (!field) {
return false;
}
assert(PyFloat_Check(field));
ros_message->radius = PyFloat_AS_DOUBLE(field);
Py_DECREF(field);
}
return true;
}
ROSIDL_GENERATOR_C_EXPORT
PyObject * tutorial_interfaces__msg__sphere__convert_to_py(void * raw_ros_message)
{
/* NOTE(esteve): Call constructor of Sphere */
PyObject * _pymessage = NULL;
{
PyObject * pymessage_module = PyImport_ImportModule("tutorial_interfaces.msg._sphere");
assert(pymessage_module);
PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "Sphere");
assert(pymessage_class);
Py_DECREF(pymessage_module);
_pymessage = PyObject_CallObject(pymessage_class, NULL);
Py_DECREF(pymessage_class);
if (!_pymessage) {
return NULL;
}
}
tutorial_interfaces__msg__Sphere * ros_message = (tutorial_interfaces__msg__Sphere *)raw_ros_message;
{ // center
PyObject * field = NULL;
field = geometry_msgs__msg__point__convert_to_py(&ros_message->center);
if (!field) {
return NULL;
}
{
int rc = PyObject_SetAttrString(_pymessage, "center", field);
Py_DECREF(field);
if (rc) {
return NULL;
}
}
}
{ // radius
PyObject * field = NULL;
field = PyFloat_FromDouble(ros_message->radius);
{
int rc = PyObject_SetAttrString(_pymessage, "radius", field);
Py_DECREF(field);
if (rc) {
return NULL;
}
}
}
// ownership of _pymessage is transferred to the caller
return _pymessage;
}

View File

@@ -0,0 +1,4 @@
from tutorial_interfaces.srv._add_three_ints import AddThreeInts # noqa: F401
from tutorial_interfaces.srv._add_three_ints import AddThreeInts_Event # noqa: F401
from tutorial_interfaces.srv._add_three_ints import AddThreeInts_Request # noqa: F401
from tutorial_interfaces.srv._add_three_ints import AddThreeInts_Response # noqa: F401

View File

@@ -0,0 +1,557 @@
# generated from rosidl_generator_py/resource/_idl.py.em
# with input from tutorial_interfaces:srv/AddThreeInts.idl
# generated code does not contain a copyright notice
# This is being done at the module level and not on the instance level to avoid looking
# for the same variable multiple times on each instance. This variable is not supposed to
# change during runtime so it makes sense to only look for it once.
from os import getenv
ros_python_check_fields = getenv('ROS_PYTHON_CHECK_FIELDS', default='')
# Import statements for member types
import builtins # noqa: E402, I100
import rosidl_parser.definition # noqa: E402, I100
class Metaclass_AddThreeInts_Request(type):
"""Metaclass of message 'AddThreeInts_Request'."""
_CREATE_ROS_MESSAGE = None
_CONVERT_FROM_PY = None
_CONVERT_TO_PY = None
_DESTROY_ROS_MESSAGE = None
_TYPE_SUPPORT = None
__constants = {
}
@classmethod
def __import_type_support__(cls):
try:
from rosidl_generator_py import import_type_support
module = import_type_support('tutorial_interfaces')
except ImportError:
import logging
import traceback
logger = logging.getLogger(
'tutorial_interfaces.srv.AddThreeInts_Request')
logger.debug(
'Failed to import needed modules for type support:\n' +
traceback.format_exc())
else:
cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__srv__add_three_ints__request
cls._CONVERT_FROM_PY = module.convert_from_py_msg__srv__add_three_ints__request
cls._CONVERT_TO_PY = module.convert_to_py_msg__srv__add_three_ints__request
cls._TYPE_SUPPORT = module.type_support_msg__srv__add_three_ints__request
cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__srv__add_three_ints__request
@classmethod
def __prepare__(cls, name, bases, **kwargs):
# list constant names here so that they appear in the help text of
# the message class under "Data and other attributes defined here:"
# as well as populate each message instance
return {
}
class AddThreeInts_Request(metaclass=Metaclass_AddThreeInts_Request):
"""Message class 'AddThreeInts_Request'."""
__slots__ = [
'_a',
'_b',
'_c',
'_check_fields',
]
_fields_and_field_types = {
'a': 'int64',
'b': 'int64',
'c': 'int64',
}
# This attribute is used to store an rosidl_parser.definition variable
# related to the data type of each of the components the message.
SLOT_TYPES = (
rosidl_parser.definition.BasicType('int64'), # noqa: E501
rosidl_parser.definition.BasicType('int64'), # noqa: E501
rosidl_parser.definition.BasicType('int64'), # noqa: E501
)
def __init__(self, **kwargs):
if 'check_fields' in kwargs:
self._check_fields = kwargs['check_fields']
else:
self._check_fields = ros_python_check_fields == '1'
if self._check_fields:
assert all('_' + key in self.__slots__ for key in kwargs.keys()), \
'Invalid arguments passed to constructor: %s' % \
', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__))
self.a = kwargs.get('a', int())
self.b = kwargs.get('b', int())
self.c = kwargs.get('c', int())
def __repr__(self):
typename = self.__class__.__module__.split('.')
typename.pop()
typename.append(self.__class__.__name__)
args = []
for s, t in zip(self.get_fields_and_field_types().keys(), self.SLOT_TYPES):
field = getattr(self, s)
fieldstr = repr(field)
# We use Python array type for fields that can be directly stored
# in them, and "normal" sequences for everything else. If it is
# a type that we store in an array, strip off the 'array' portion.
if (
isinstance(t, rosidl_parser.definition.AbstractSequence) and
isinstance(t.value_type, rosidl_parser.definition.BasicType) and
t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64']
):
if len(field) == 0:
fieldstr = '[]'
else:
if self._check_fields:
assert fieldstr.startswith('array(')
prefix = "array('X', "
suffix = ')'
fieldstr = fieldstr[len(prefix):-len(suffix)]
args.append(s + '=' + fieldstr)
return '%s(%s)' % ('.'.join(typename), ', '.join(args))
def __eq__(self, other):
if not isinstance(other, self.__class__):
return False
if self.a != other.a:
return False
if self.b != other.b:
return False
if self.c != other.c:
return False
return True
@classmethod
def get_fields_and_field_types(cls):
from copy import copy
return copy(cls._fields_and_field_types)
@builtins.property
def a(self):
"""Message field 'a'."""
return self._a
@a.setter
def a(self, value):
if self._check_fields:
assert \
isinstance(value, int), \
"The 'a' field must be of type 'int'"
assert value >= -9223372036854775808 and value < 9223372036854775808, \
"The 'a' field must be an integer in [-9223372036854775808, 9223372036854775807]"
self._a = value
@builtins.property
def b(self):
"""Message field 'b'."""
return self._b
@b.setter
def b(self, value):
if self._check_fields:
assert \
isinstance(value, int), \
"The 'b' field must be of type 'int'"
assert value >= -9223372036854775808 and value < 9223372036854775808, \
"The 'b' field must be an integer in [-9223372036854775808, 9223372036854775807]"
self._b = value
@builtins.property
def c(self):
"""Message field 'c'."""
return self._c
@c.setter
def c(self, value):
if self._check_fields:
assert \
isinstance(value, int), \
"The 'c' field must be of type 'int'"
assert value >= -9223372036854775808 and value < 9223372036854775808, \
"The 'c' field must be an integer in [-9223372036854775808, 9223372036854775807]"
self._c = value
# Import statements for member types
# already imported above
# import builtins
# already imported above
# import rosidl_parser.definition
class Metaclass_AddThreeInts_Response(type):
"""Metaclass of message 'AddThreeInts_Response'."""
_CREATE_ROS_MESSAGE = None
_CONVERT_FROM_PY = None
_CONVERT_TO_PY = None
_DESTROY_ROS_MESSAGE = None
_TYPE_SUPPORT = None
__constants = {
}
@classmethod
def __import_type_support__(cls):
try:
from rosidl_generator_py import import_type_support
module = import_type_support('tutorial_interfaces')
except ImportError:
import logging
import traceback
logger = logging.getLogger(
'tutorial_interfaces.srv.AddThreeInts_Response')
logger.debug(
'Failed to import needed modules for type support:\n' +
traceback.format_exc())
else:
cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__srv__add_three_ints__response
cls._CONVERT_FROM_PY = module.convert_from_py_msg__srv__add_three_ints__response
cls._CONVERT_TO_PY = module.convert_to_py_msg__srv__add_three_ints__response
cls._TYPE_SUPPORT = module.type_support_msg__srv__add_three_ints__response
cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__srv__add_three_ints__response
@classmethod
def __prepare__(cls, name, bases, **kwargs):
# list constant names here so that they appear in the help text of
# the message class under "Data and other attributes defined here:"
# as well as populate each message instance
return {
}
class AddThreeInts_Response(metaclass=Metaclass_AddThreeInts_Response):
"""Message class 'AddThreeInts_Response'."""
__slots__ = [
'_sum',
'_check_fields',
]
_fields_and_field_types = {
'sum': 'int64',
}
# This attribute is used to store an rosidl_parser.definition variable
# related to the data type of each of the components the message.
SLOT_TYPES = (
rosidl_parser.definition.BasicType('int64'), # noqa: E501
)
def __init__(self, **kwargs):
if 'check_fields' in kwargs:
self._check_fields = kwargs['check_fields']
else:
self._check_fields = ros_python_check_fields == '1'
if self._check_fields:
assert all('_' + key in self.__slots__ for key in kwargs.keys()), \
'Invalid arguments passed to constructor: %s' % \
', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__))
self.sum = kwargs.get('sum', int())
def __repr__(self):
typename = self.__class__.__module__.split('.')
typename.pop()
typename.append(self.__class__.__name__)
args = []
for s, t in zip(self.get_fields_and_field_types().keys(), self.SLOT_TYPES):
field = getattr(self, s)
fieldstr = repr(field)
# We use Python array type for fields that can be directly stored
# in them, and "normal" sequences for everything else. If it is
# a type that we store in an array, strip off the 'array' portion.
if (
isinstance(t, rosidl_parser.definition.AbstractSequence) and
isinstance(t.value_type, rosidl_parser.definition.BasicType) and
t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64']
):
if len(field) == 0:
fieldstr = '[]'
else:
if self._check_fields:
assert fieldstr.startswith('array(')
prefix = "array('X', "
suffix = ')'
fieldstr = fieldstr[len(prefix):-len(suffix)]
args.append(s + '=' + fieldstr)
return '%s(%s)' % ('.'.join(typename), ', '.join(args))
def __eq__(self, other):
if not isinstance(other, self.__class__):
return False
if self.sum != other.sum:
return False
return True
@classmethod
def get_fields_and_field_types(cls):
from copy import copy
return copy(cls._fields_and_field_types)
@builtins.property # noqa: A003
def sum(self): # noqa: A003
"""Message field 'sum'."""
return self._sum
@sum.setter # noqa: A003
def sum(self, value): # noqa: A003
if self._check_fields:
assert \
isinstance(value, int), \
"The 'sum' field must be of type 'int'"
assert value >= -9223372036854775808 and value < 9223372036854775808, \
"The 'sum' field must be an integer in [-9223372036854775808, 9223372036854775807]"
self._sum = value
# Import statements for member types
# already imported above
# import builtins
# already imported above
# import rosidl_parser.definition
class Metaclass_AddThreeInts_Event(type):
"""Metaclass of message 'AddThreeInts_Event'."""
_CREATE_ROS_MESSAGE = None
_CONVERT_FROM_PY = None
_CONVERT_TO_PY = None
_DESTROY_ROS_MESSAGE = None
_TYPE_SUPPORT = None
__constants = {
}
@classmethod
def __import_type_support__(cls):
try:
from rosidl_generator_py import import_type_support
module = import_type_support('tutorial_interfaces')
except ImportError:
import logging
import traceback
logger = logging.getLogger(
'tutorial_interfaces.srv.AddThreeInts_Event')
logger.debug(
'Failed to import needed modules for type support:\n' +
traceback.format_exc())
else:
cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__srv__add_three_ints__event
cls._CONVERT_FROM_PY = module.convert_from_py_msg__srv__add_three_ints__event
cls._CONVERT_TO_PY = module.convert_to_py_msg__srv__add_three_ints__event
cls._TYPE_SUPPORT = module.type_support_msg__srv__add_three_ints__event
cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__srv__add_three_ints__event
from service_msgs.msg import ServiceEventInfo
if ServiceEventInfo.__class__._TYPE_SUPPORT is None:
ServiceEventInfo.__class__.__import_type_support__()
@classmethod
def __prepare__(cls, name, bases, **kwargs):
# list constant names here so that they appear in the help text of
# the message class under "Data and other attributes defined here:"
# as well as populate each message instance
return {
}
class AddThreeInts_Event(metaclass=Metaclass_AddThreeInts_Event):
"""Message class 'AddThreeInts_Event'."""
__slots__ = [
'_info',
'_request',
'_response',
'_check_fields',
]
_fields_and_field_types = {
'info': 'service_msgs/ServiceEventInfo',
'request': 'sequence<tutorial_interfaces/AddThreeInts_Request, 1>',
'response': 'sequence<tutorial_interfaces/AddThreeInts_Response, 1>',
}
# This attribute is used to store an rosidl_parser.definition variable
# related to the data type of each of the components the message.
SLOT_TYPES = (
rosidl_parser.definition.NamespacedType(['service_msgs', 'msg'], 'ServiceEventInfo'), # noqa: E501
rosidl_parser.definition.BoundedSequence(rosidl_parser.definition.NamespacedType(['tutorial_interfaces', 'srv'], 'AddThreeInts_Request'), 1), # noqa: E501
rosidl_parser.definition.BoundedSequence(rosidl_parser.definition.NamespacedType(['tutorial_interfaces', 'srv'], 'AddThreeInts_Response'), 1), # noqa: E501
)
def __init__(self, **kwargs):
if 'check_fields' in kwargs:
self._check_fields = kwargs['check_fields']
else:
self._check_fields = ros_python_check_fields == '1'
if self._check_fields:
assert all('_' + key in self.__slots__ for key in kwargs.keys()), \
'Invalid arguments passed to constructor: %s' % \
', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__))
from service_msgs.msg import ServiceEventInfo
self.info = kwargs.get('info', ServiceEventInfo())
self.request = kwargs.get('request', [])
self.response = kwargs.get('response', [])
def __repr__(self):
typename = self.__class__.__module__.split('.')
typename.pop()
typename.append(self.__class__.__name__)
args = []
for s, t in zip(self.get_fields_and_field_types().keys(), self.SLOT_TYPES):
field = getattr(self, s)
fieldstr = repr(field)
# We use Python array type for fields that can be directly stored
# in them, and "normal" sequences for everything else. If it is
# a type that we store in an array, strip off the 'array' portion.
if (
isinstance(t, rosidl_parser.definition.AbstractSequence) and
isinstance(t.value_type, rosidl_parser.definition.BasicType) and
t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64']
):
if len(field) == 0:
fieldstr = '[]'
else:
if self._check_fields:
assert fieldstr.startswith('array(')
prefix = "array('X', "
suffix = ')'
fieldstr = fieldstr[len(prefix):-len(suffix)]
args.append(s + '=' + fieldstr)
return '%s(%s)' % ('.'.join(typename), ', '.join(args))
def __eq__(self, other):
if not isinstance(other, self.__class__):
return False
if self.info != other.info:
return False
if self.request != other.request:
return False
if self.response != other.response:
return False
return True
@classmethod
def get_fields_and_field_types(cls):
from copy import copy
return copy(cls._fields_and_field_types)
@builtins.property
def info(self):
"""Message field 'info'."""
return self._info
@info.setter
def info(self, value):
if self._check_fields:
from service_msgs.msg import ServiceEventInfo
assert \
isinstance(value, ServiceEventInfo), \
"The 'info' field must be a sub message of type 'ServiceEventInfo'"
self._info = value
@builtins.property
def request(self):
"""Message field 'request'."""
return self._request
@request.setter
def request(self, value):
if self._check_fields:
from tutorial_interfaces.srv import AddThreeInts_Request
from collections.abc import Sequence
from collections.abc import Set
from collections import UserList
from collections import UserString
assert \
((isinstance(value, Sequence) or
isinstance(value, Set) or
isinstance(value, UserList)) and
not isinstance(value, str) and
not isinstance(value, UserString) and
len(value) <= 1 and
all(isinstance(v, AddThreeInts_Request) for v in value) and
True), \
"The 'request' field must be a set or sequence with length <= 1 and each value of type 'AddThreeInts_Request'"
self._request = value
@builtins.property
def response(self):
"""Message field 'response'."""
return self._response
@response.setter
def response(self, value):
if self._check_fields:
from tutorial_interfaces.srv import AddThreeInts_Response
from collections.abc import Sequence
from collections.abc import Set
from collections import UserList
from collections import UserString
assert \
((isinstance(value, Sequence) or
isinstance(value, Set) or
isinstance(value, UserList)) and
not isinstance(value, str) and
not isinstance(value, UserString) and
len(value) <= 1 and
all(isinstance(v, AddThreeInts_Response) for v in value) and
True), \
"The 'response' field must be a set or sequence with length <= 1 and each value of type 'AddThreeInts_Response'"
self._response = value
class Metaclass_AddThreeInts(type):
"""Metaclass of service 'AddThreeInts'."""
_TYPE_SUPPORT = None
@classmethod
def __import_type_support__(cls):
try:
from rosidl_generator_py import import_type_support
module = import_type_support('tutorial_interfaces')
except ImportError:
import logging
import traceback
logger = logging.getLogger(
'tutorial_interfaces.srv.AddThreeInts')
logger.debug(
'Failed to import needed modules for type support:\n' +
traceback.format_exc())
else:
cls._TYPE_SUPPORT = module.type_support_srv__srv__add_three_ints
from tutorial_interfaces.srv import _add_three_ints
if _add_three_ints.Metaclass_AddThreeInts_Request._TYPE_SUPPORT is None:
_add_three_ints.Metaclass_AddThreeInts_Request.__import_type_support__()
if _add_three_ints.Metaclass_AddThreeInts_Response._TYPE_SUPPORT is None:
_add_three_ints.Metaclass_AddThreeInts_Response.__import_type_support__()
if _add_three_ints.Metaclass_AddThreeInts_Event._TYPE_SUPPORT is None:
_add_three_ints.Metaclass_AddThreeInts_Event.__import_type_support__()
class AddThreeInts(metaclass=Metaclass_AddThreeInts):
from tutorial_interfaces.srv._add_three_ints import AddThreeInts_Request as Request
from tutorial_interfaces.srv._add_three_ints import AddThreeInts_Response as Response
from tutorial_interfaces.srv._add_three_ints import AddThreeInts_Event as Event
def __init__(self):
raise NotImplementedError('Service classes can not be instantiated')

View File

@@ -0,0 +1,470 @@
// generated from rosidl_generator_py/resource/_idl_support.c.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <Python.h>
#include <stdbool.h>
#ifndef _WIN32
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-function"
#endif
#include "numpy/ndarrayobject.h"
#ifndef _WIN32
# pragma GCC diagnostic pop
#endif
#include "rosidl_runtime_c/visibility_control.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
ROSIDL_GENERATOR_C_EXPORT
bool tutorial_interfaces__srv__add_three_ints__request__convert_from_py(PyObject * _pymsg, void * _ros_message)
{
// check that the passed message is of the expected Python class
{
char full_classname_dest[61];
{
char * class_name = NULL;
char * module_name = NULL;
{
PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__");
if (class_attr) {
PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__");
if (name_attr) {
class_name = (char *)PyUnicode_1BYTE_DATA(name_attr);
Py_DECREF(name_attr);
}
PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__");
if (module_attr) {
module_name = (char *)PyUnicode_1BYTE_DATA(module_attr);
Py_DECREF(module_attr);
}
Py_DECREF(class_attr);
}
}
if (!class_name || !module_name) {
return false;
}
snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name);
}
assert(strncmp("tutorial_interfaces.srv._add_three_ints.AddThreeInts_Request", full_classname_dest, 60) == 0);
}
tutorial_interfaces__srv__AddThreeInts_Request * ros_message = _ros_message;
{ // a
PyObject * field = PyObject_GetAttrString(_pymsg, "a");
if (!field) {
return false;
}
assert(PyLong_Check(field));
ros_message->a = PyLong_AsLongLong(field);
Py_DECREF(field);
}
{ // b
PyObject * field = PyObject_GetAttrString(_pymsg, "b");
if (!field) {
return false;
}
assert(PyLong_Check(field));
ros_message->b = PyLong_AsLongLong(field);
Py_DECREF(field);
}
{ // c
PyObject * field = PyObject_GetAttrString(_pymsg, "c");
if (!field) {
return false;
}
assert(PyLong_Check(field));
ros_message->c = PyLong_AsLongLong(field);
Py_DECREF(field);
}
return true;
}
ROSIDL_GENERATOR_C_EXPORT
PyObject * tutorial_interfaces__srv__add_three_ints__request__convert_to_py(void * raw_ros_message)
{
/* NOTE(esteve): Call constructor of AddThreeInts_Request */
PyObject * _pymessage = NULL;
{
PyObject * pymessage_module = PyImport_ImportModule("tutorial_interfaces.srv._add_three_ints");
assert(pymessage_module);
PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "AddThreeInts_Request");
assert(pymessage_class);
Py_DECREF(pymessage_module);
_pymessage = PyObject_CallObject(pymessage_class, NULL);
Py_DECREF(pymessage_class);
if (!_pymessage) {
return NULL;
}
}
tutorial_interfaces__srv__AddThreeInts_Request * ros_message = (tutorial_interfaces__srv__AddThreeInts_Request *)raw_ros_message;
{ // a
PyObject * field = NULL;
field = PyLong_FromLongLong(ros_message->a);
{
int rc = PyObject_SetAttrString(_pymessage, "a", field);
Py_DECREF(field);
if (rc) {
return NULL;
}
}
}
{ // b
PyObject * field = NULL;
field = PyLong_FromLongLong(ros_message->b);
{
int rc = PyObject_SetAttrString(_pymessage, "b", field);
Py_DECREF(field);
if (rc) {
return NULL;
}
}
}
{ // c
PyObject * field = NULL;
field = PyLong_FromLongLong(ros_message->c);
{
int rc = PyObject_SetAttrString(_pymessage, "c", field);
Py_DECREF(field);
if (rc) {
return NULL;
}
}
}
// ownership of _pymessage is transferred to the caller
return _pymessage;
}
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
// already included above
// #include <Python.h>
// already included above
// #include <stdbool.h>
// already included above
// #include "numpy/ndarrayobject.h"
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
ROSIDL_GENERATOR_C_EXPORT
bool tutorial_interfaces__srv__add_three_ints__response__convert_from_py(PyObject * _pymsg, void * _ros_message)
{
// check that the passed message is of the expected Python class
{
char full_classname_dest[62];
{
char * class_name = NULL;
char * module_name = NULL;
{
PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__");
if (class_attr) {
PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__");
if (name_attr) {
class_name = (char *)PyUnicode_1BYTE_DATA(name_attr);
Py_DECREF(name_attr);
}
PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__");
if (module_attr) {
module_name = (char *)PyUnicode_1BYTE_DATA(module_attr);
Py_DECREF(module_attr);
}
Py_DECREF(class_attr);
}
}
if (!class_name || !module_name) {
return false;
}
snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name);
}
assert(strncmp("tutorial_interfaces.srv._add_three_ints.AddThreeInts_Response", full_classname_dest, 61) == 0);
}
tutorial_interfaces__srv__AddThreeInts_Response * ros_message = _ros_message;
{ // sum
PyObject * field = PyObject_GetAttrString(_pymsg, "sum");
if (!field) {
return false;
}
assert(PyLong_Check(field));
ros_message->sum = PyLong_AsLongLong(field);
Py_DECREF(field);
}
return true;
}
ROSIDL_GENERATOR_C_EXPORT
PyObject * tutorial_interfaces__srv__add_three_ints__response__convert_to_py(void * raw_ros_message)
{
/* NOTE(esteve): Call constructor of AddThreeInts_Response */
PyObject * _pymessage = NULL;
{
PyObject * pymessage_module = PyImport_ImportModule("tutorial_interfaces.srv._add_three_ints");
assert(pymessage_module);
PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "AddThreeInts_Response");
assert(pymessage_class);
Py_DECREF(pymessage_module);
_pymessage = PyObject_CallObject(pymessage_class, NULL);
Py_DECREF(pymessage_class);
if (!_pymessage) {
return NULL;
}
}
tutorial_interfaces__srv__AddThreeInts_Response * ros_message = (tutorial_interfaces__srv__AddThreeInts_Response *)raw_ros_message;
{ // sum
PyObject * field = NULL;
field = PyLong_FromLongLong(ros_message->sum);
{
int rc = PyObject_SetAttrString(_pymessage, "sum", field);
Py_DECREF(field);
if (rc) {
return NULL;
}
}
}
// ownership of _pymessage is transferred to the caller
return _pymessage;
}
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
// already included above
// #include <Python.h>
// already included above
// #include <stdbool.h>
// already included above
// #include "numpy/ndarrayobject.h"
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
#include "rosidl_runtime_c/primitives_sequence.h"
#include "rosidl_runtime_c/primitives_sequence_functions.h"
// Nested array functions includes
// end nested array functions include
ROSIDL_GENERATOR_C_IMPORT
bool service_msgs__msg__service_event_info__convert_from_py(PyObject * _pymsg, void * _ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * service_msgs__msg__service_event_info__convert_to_py(void * raw_ros_message);
bool tutorial_interfaces__srv__add_three_ints__request__convert_from_py(PyObject * _pymsg, void * _ros_message);
PyObject * tutorial_interfaces__srv__add_three_ints__request__convert_to_py(void * raw_ros_message);
bool tutorial_interfaces__srv__add_three_ints__response__convert_from_py(PyObject * _pymsg, void * _ros_message);
PyObject * tutorial_interfaces__srv__add_three_ints__response__convert_to_py(void * raw_ros_message);
ROSIDL_GENERATOR_C_EXPORT
bool tutorial_interfaces__srv__add_three_ints__event__convert_from_py(PyObject * _pymsg, void * _ros_message)
{
// check that the passed message is of the expected Python class
{
char full_classname_dest[59];
{
char * class_name = NULL;
char * module_name = NULL;
{
PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__");
if (class_attr) {
PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__");
if (name_attr) {
class_name = (char *)PyUnicode_1BYTE_DATA(name_attr);
Py_DECREF(name_attr);
}
PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__");
if (module_attr) {
module_name = (char *)PyUnicode_1BYTE_DATA(module_attr);
Py_DECREF(module_attr);
}
Py_DECREF(class_attr);
}
}
if (!class_name || !module_name) {
return false;
}
snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name);
}
assert(strncmp("tutorial_interfaces.srv._add_three_ints.AddThreeInts_Event", full_classname_dest, 58) == 0);
}
tutorial_interfaces__srv__AddThreeInts_Event * ros_message = _ros_message;
{ // info
PyObject * field = PyObject_GetAttrString(_pymsg, "info");
if (!field) {
return false;
}
if (!service_msgs__msg__service_event_info__convert_from_py(field, &ros_message->info)) {
Py_DECREF(field);
return false;
}
Py_DECREF(field);
}
{ // request
PyObject * field = PyObject_GetAttrString(_pymsg, "request");
if (!field) {
return false;
}
PyObject * seq_field = PySequence_Fast(field, "expected a sequence in 'request'");
if (!seq_field) {
Py_DECREF(field);
return false;
}
Py_ssize_t size = PySequence_Size(field);
if (-1 == size) {
Py_DECREF(seq_field);
Py_DECREF(field);
return false;
}
if (!tutorial_interfaces__srv__AddThreeInts_Request__Sequence__init(&(ros_message->request), size)) {
PyErr_SetString(PyExc_RuntimeError, "unable to create tutorial_interfaces__srv__AddThreeInts_Request__Sequence ros_message");
Py_DECREF(seq_field);
Py_DECREF(field);
return false;
}
tutorial_interfaces__srv__AddThreeInts_Request * dest = ros_message->request.data;
for (Py_ssize_t i = 0; i < size; ++i) {
if (!tutorial_interfaces__srv__add_three_ints__request__convert_from_py(PySequence_Fast_GET_ITEM(seq_field, i), &dest[i])) {
Py_DECREF(seq_field);
Py_DECREF(field);
return false;
}
}
Py_DECREF(seq_field);
Py_DECREF(field);
}
{ // response
PyObject * field = PyObject_GetAttrString(_pymsg, "response");
if (!field) {
return false;
}
PyObject * seq_field = PySequence_Fast(field, "expected a sequence in 'response'");
if (!seq_field) {
Py_DECREF(field);
return false;
}
Py_ssize_t size = PySequence_Size(field);
if (-1 == size) {
Py_DECREF(seq_field);
Py_DECREF(field);
return false;
}
if (!tutorial_interfaces__srv__AddThreeInts_Response__Sequence__init(&(ros_message->response), size)) {
PyErr_SetString(PyExc_RuntimeError, "unable to create tutorial_interfaces__srv__AddThreeInts_Response__Sequence ros_message");
Py_DECREF(seq_field);
Py_DECREF(field);
return false;
}
tutorial_interfaces__srv__AddThreeInts_Response * dest = ros_message->response.data;
for (Py_ssize_t i = 0; i < size; ++i) {
if (!tutorial_interfaces__srv__add_three_ints__response__convert_from_py(PySequence_Fast_GET_ITEM(seq_field, i), &dest[i])) {
Py_DECREF(seq_field);
Py_DECREF(field);
return false;
}
}
Py_DECREF(seq_field);
Py_DECREF(field);
}
return true;
}
ROSIDL_GENERATOR_C_EXPORT
PyObject * tutorial_interfaces__srv__add_three_ints__event__convert_to_py(void * raw_ros_message)
{
/* NOTE(esteve): Call constructor of AddThreeInts_Event */
PyObject * _pymessage = NULL;
{
PyObject * pymessage_module = PyImport_ImportModule("tutorial_interfaces.srv._add_three_ints");
assert(pymessage_module);
PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "AddThreeInts_Event");
assert(pymessage_class);
Py_DECREF(pymessage_module);
_pymessage = PyObject_CallObject(pymessage_class, NULL);
Py_DECREF(pymessage_class);
if (!_pymessage) {
return NULL;
}
}
tutorial_interfaces__srv__AddThreeInts_Event * ros_message = (tutorial_interfaces__srv__AddThreeInts_Event *)raw_ros_message;
{ // info
PyObject * field = NULL;
field = service_msgs__msg__service_event_info__convert_to_py(&ros_message->info);
if (!field) {
return NULL;
}
{
int rc = PyObject_SetAttrString(_pymessage, "info", field);
Py_DECREF(field);
if (rc) {
return NULL;
}
}
}
{ // request
PyObject * field = NULL;
size_t size = ros_message->request.size;
field = PyList_New(size);
if (!field) {
return NULL;
}
tutorial_interfaces__srv__AddThreeInts_Request * item;
for (size_t i = 0; i < size; ++i) {
item = &(ros_message->request.data[i]);
PyObject * pyitem = tutorial_interfaces__srv__add_three_ints__request__convert_to_py(item);
if (!pyitem) {
Py_DECREF(field);
return NULL;
}
int rc = PyList_SetItem(field, i, pyitem);
(void)rc;
assert(rc == 0);
}
assert(PySequence_Check(field));
{
int rc = PyObject_SetAttrString(_pymessage, "request", field);
Py_DECREF(field);
if (rc) {
return NULL;
}
}
}
{ // response
PyObject * field = NULL;
size_t size = ros_message->response.size;
field = PyList_New(size);
if (!field) {
return NULL;
}
tutorial_interfaces__srv__AddThreeInts_Response * item;
for (size_t i = 0; i < size; ++i) {
item = &(ros_message->response.data[i]);
PyObject * pyitem = tutorial_interfaces__srv__add_three_ints__response__convert_to_py(item);
if (!pyitem) {
Py_DECREF(field);
return NULL;
}
int rc = PyList_SetItem(field, i, pyitem);
(void)rc;
assert(rc == 0);
}
assert(PySequence_Check(field));
{
int rc = PyObject_SetAttrString(_pymessage, "response", field);
Py_DECREF(field);
if (rc) {
return NULL;
}
}
}
// ownership of _pymessage is transferred to the caller
return _pymessage;
}

View File

@@ -0,0 +1 @@
geometry_msgs;rosidl_default_runtime;ament_lint_auto;ament_lint_common

View File

@@ -0,0 +1,6 @@
msg/Num.idl
msg/Num.msg
msg/Sphere.idl
msg/Sphere.msg
srv/AddThreeInts.idl
srv/AddThreeInts.srv

View File

@@ -0,0 +1 @@
geometry_msgs:rosidl_default_runtime

View File

@@ -0,0 +1,92 @@
# generated from ament_cmake_export_dependencies/cmake/ament_cmake_export_dependencies-extras.cmake.in
set(_exported_dependencies "geometry_msgs;service_msgs;rosidl_runtime_c;rosidl_typesupport_interface;rcutils;fastrtps_cmake_module;fastcdr;rosidl_runtime_c;rosidl_runtime_cpp;rosidl_typesupport_fastrtps_c;rosidl_typesupport_fastrtps_cpp;rosidl_typesupport_interface;rosidl_runtime_cpp;fastrtps_cmake_module;fastcdr;rmw;rosidl_runtime_c;rosidl_runtime_cpp;rosidl_typesupport_fastrtps_cpp;rosidl_typesupport_interface;rosidl_runtime_c;rosidl_typesupport_c;rosidl_typesupport_interface;rosidl_runtime_c;rosidl_runtime_cpp;rosidl_typesupport_c;rosidl_typesupport_cpp;rosidl_typesupport_interface")
find_package(ament_cmake_libraries QUIET REQUIRED)
# find_package() all dependencies
# and append their DEFINITIONS INCLUDE_DIRS, LIBRARIES, and LINK_FLAGS
# variables to tutorial_interfaces_DEFINITIONS, tutorial_interfaces_INCLUDE_DIRS,
# tutorial_interfaces_LIBRARIES, and tutorial_interfaces_LINK_FLAGS.
# Additionally collect the direct dependency names in
# tutorial_interfaces_DEPENDENCIES as well as the recursive dependency names
# in tutorial_interfaces_RECURSIVE_DEPENDENCIES.
if(NOT _exported_dependencies STREQUAL "")
find_package(ament_cmake_core QUIET REQUIRED)
set(tutorial_interfaces_DEPENDENCIES ${_exported_dependencies})
set(tutorial_interfaces_RECURSIVE_DEPENDENCIES ${_exported_dependencies})
set(_libraries)
foreach(_dep ${_exported_dependencies})
if(NOT ${_dep}_FOUND)
find_package("${_dep}" QUIET REQUIRED)
endif()
# if a package provides modern CMake interface targets use them
# exclusively assuming the classic CMake variables only exist for
# backward compatibility
set(use_modern_cmake FALSE)
if(NOT "${${_dep}_TARGETS}" STREQUAL "")
foreach(_target ${${_dep}_TARGETS})
# only use actual targets
# in case a package uses this variable for other content
if(TARGET "${_target}")
get_target_property(_include_dirs ${_target} INTERFACE_INCLUDE_DIRECTORIES)
if(_include_dirs)
list_append_unique(tutorial_interfaces_INCLUDE_DIRS "${_include_dirs}")
endif()
get_target_property(_imported_configurations ${_target} IMPORTED_CONFIGURATIONS)
if(_imported_configurations)
string(TOUPPER "${_imported_configurations}" _imported_configurations)
if(DEBUG_CONFIGURATIONS)
string(TOUPPER "${DEBUG_CONFIGURATIONS}" _debug_configurations_uppercase)
else()
set(_debug_configurations_uppercase "DEBUG")
endif()
foreach(_imported_config ${_imported_configurations})
get_target_property(_imported_implib ${_target} IMPORTED_IMPLIB_${_imported_config})
if(_imported_implib)
set(_imported_implib_config "optimized")
if(${_imported_config} IN_LIST _debug_configurations_uppercase)
set(_imported_implib_config "debug")
endif()
list(APPEND _libraries ${_imported_implib_config} ${_imported_implib})
else()
get_target_property(_imported_location ${_target} IMPORTED_LOCATION_${_imported_config})
if(_imported_location)
list(APPEND _libraries "${_imported_location}")
endif()
endif()
endforeach()
endif()
get_target_property(_link_libraries ${_target} INTERFACE_LINK_LIBRARIES)
if(_link_libraries)
list(APPEND _libraries "${_link_libraries}")
endif()
set(use_modern_cmake TRUE)
endif()
endforeach()
endif()
if(NOT use_modern_cmake)
if(${_dep}_DEFINITIONS)
list_append_unique(tutorial_interfaces_DEFINITIONS "${${_dep}_DEFINITIONS}")
endif()
if(${_dep}_INCLUDE_DIRS)
list_append_unique(tutorial_interfaces_INCLUDE_DIRS "${${_dep}_INCLUDE_DIRS}")
endif()
if(${_dep}_LIBRARIES)
list(APPEND _libraries "${${_dep}_LIBRARIES}")
endif()
if(${_dep}_LINK_FLAGS)
list_append_unique(tutorial_interfaces_LINK_FLAGS "${${_dep}_LINK_FLAGS}")
endif()
if(${_dep}_RECURSIVE_DEPENDENCIES)
list_append_unique(tutorial_interfaces_RECURSIVE_DEPENDENCIES "${${_dep}_RECURSIVE_DEPENDENCIES}")
endif()
endif()
if(_libraries)
ament_libraries_deduplicate(_libraries "${_libraries}")
list(APPEND tutorial_interfaces_LIBRARIES "${_libraries}")
endif()
endforeach()
endif()

View File

@@ -0,0 +1,16 @@
# generated from ament_cmake_export_include_directories/cmake/ament_cmake_export_include_directories-extras.cmake.in
set(_exported_include_dirs "${tutorial_interfaces_DIR}/../../../include/tutorial_interfaces")
# append include directories to tutorial_interfaces_INCLUDE_DIRS
# warn about not existing paths
if(NOT _exported_include_dirs STREQUAL "")
find_package(ament_cmake_core QUIET REQUIRED)
foreach(_exported_include_dir ${_exported_include_dirs})
if(NOT IS_DIRECTORY "${_exported_include_dir}")
message(WARNING "Package 'tutorial_interfaces' exports the include directory '${_exported_include_dir}' which doesn't exist")
endif()
normalize_path(_exported_include_dir "${_exported_include_dir}")
list(APPEND tutorial_interfaces_INCLUDE_DIRS "${_exported_include_dir}")
endforeach()
endif()

View File

@@ -0,0 +1,141 @@
# generated from ament_cmake_export_libraries/cmake/template/ament_cmake_export_libraries.cmake.in
set(_exported_libraries "tutorial_interfaces__rosidl_generator_c;tutorial_interfaces__rosidl_typesupport_c;tutorial_interfaces__rosidl_typesupport_cpp")
set(_exported_library_names "")
# populate tutorial_interfaces_LIBRARIES
if(NOT _exported_libraries STREQUAL "")
# loop over libraries, either target names or absolute paths
list(LENGTH _exported_libraries _length)
set(_i 0)
while(_i LESS _length)
list(GET _exported_libraries ${_i} _arg)
# pass linker flags along
if("${_arg}" MATCHES "^-" AND NOT "${_arg}" MATCHES "^-[l|framework]")
list(APPEND tutorial_interfaces_LIBRARIES "${_arg}")
math(EXPR _i "${_i} + 1")
continue()
endif()
if("${_arg}" MATCHES "^(debug|optimized|general)$")
# remember build configuration keyword
# and get following library
set(_cfg "${_arg}")
math(EXPR _i "${_i} + 1")
if(_i EQUAL _length)
message(FATAL_ERROR "Package 'tutorial_interfaces' passes the build configuration keyword '${_cfg}' as the last exported library")
endif()
list(GET _exported_libraries ${_i} _library)
else()
# the value is a library without a build configuration keyword
set(_cfg "")
set(_library "${_arg}")
endif()
math(EXPR _i "${_i} + 1")
if(NOT IS_ABSOLUTE "${_library}")
# search for library target relative to this CMake file
set(_lib "NOTFOUND")
find_library(
_lib NAMES "${_library}"
PATHS "${tutorial_interfaces_DIR}/../../../lib"
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
if(NOT _lib)
# warn about not existing library and ignore it
message(FATAL_ERROR "Package 'tutorial_interfaces' exports the library '${_library}' which couldn't be found")
elseif(NOT IS_ABSOLUTE "${_lib}")
# the found library must be an absolute path
message(FATAL_ERROR "Package 'tutorial_interfaces' found the library '${_library}' at '${_lib}' which is not an absolute path")
elseif(NOT EXISTS "${_lib}")
# the found library must exist
message(FATAL_ERROR "Package 'tutorial_interfaces' found the library '${_lib}' which doesn't exist")
else()
list(APPEND tutorial_interfaces_LIBRARIES ${_cfg} "${_lib}")
endif()
else()
if(NOT EXISTS "${_library}")
# the found library must exist
message(WARNING "Package 'tutorial_interfaces' exports the library '${_library}' which doesn't exist")
else()
list(APPEND tutorial_interfaces_LIBRARIES ${_cfg} "${_library}")
endif()
endif()
endwhile()
endif()
# find_library() library names with optional LIBRARY_DIRS
# and add the libraries to tutorial_interfaces_LIBRARIES
if(NOT _exported_library_names STREQUAL "")
# loop over library names
# but remember related build configuration keyword if available
list(LENGTH _exported_library_names _length)
set(_i 0)
while(_i LESS _length)
list(GET _exported_library_names ${_i} _arg)
# pass linker flags along
if("${_arg}" MATCHES "^-" AND NOT "${_arg}" MATCHES "^-[l|framework]")
list(APPEND tutorial_interfaces_LIBRARIES "${_arg}")
math(EXPR _i "${_i} + 1")
continue()
endif()
if("${_arg}" MATCHES "^(debug|optimized|general)$")
# remember build configuration keyword
# and get following library name
set(_cfg "${_arg}")
math(EXPR _i "${_i} + 1")
if(_i EQUAL _length)
message(FATAL_ERROR "Package 'tutorial_interfaces' passes the build configuration keyword '${_cfg}' as the last exported target")
endif()
list(GET _exported_library_names ${_i} _library)
else()
# the value is a library target without a build configuration keyword
set(_cfg "")
set(_library "${_arg}")
endif()
math(EXPR _i "${_i} + 1")
# extract optional LIBRARY_DIRS from library name
string(REPLACE ":" ";" _library_dirs "${_library}")
list(GET _library_dirs 0 _library_name)
list(REMOVE_AT _library_dirs 0)
set(_lib "NOTFOUND")
if(NOT _library_dirs)
# search for library in the common locations
find_library(
_lib
NAMES "${_library_name}"
)
if(NOT _lib)
# warn about not existing library and later ignore it
message(WARNING "Package 'tutorial_interfaces' exports library '${_library_name}' which couldn't be found")
endif()
else()
# search for library in the specified directories
find_library(
_lib
NAMES "${_library_name}"
PATHS ${_library_dirs}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
if(NOT _lib)
# warn about not existing library and later ignore it
message(WARNING
"Package 'tutorial_interfaces' exports library '${_library_name}' with LIBRARY_DIRS '${_library_dirs}' which couldn't be found")
endif()
endif()
if(_lib)
list(APPEND tutorial_interfaces_LIBRARIES ${_cfg} "${_lib}")
endif()
endwhile()
endif()
# TODO(dirk-thomas) deduplicate tutorial_interfaces_LIBRARIES
# while maintaining library order
# as well as build configuration keywords
# as well as linker flags

View File

@@ -0,0 +1,27 @@
# generated from ament_cmake_export_targets/cmake/ament_cmake_export_targets-extras.cmake.in
set(_exported_targets "export_tutorial_interfaces__rosidl_generator_c;export_tutorial_interfaces__rosidl_typesupport_fastrtps_c;export_tutorial_interfaces__rosidl_generator_cpp;export_tutorial_interfaces__rosidl_typesupport_fastrtps_cpp;tutorial_interfaces__rosidl_typesupport_introspection_c;tutorial_interfaces__rosidl_typesupport_c;tutorial_interfaces__rosidl_typesupport_introspection_cpp;tutorial_interfaces__rosidl_typesupport_cpp;export_tutorial_interfaces__rosidl_generator_py")
# include all exported targets
if(NOT _exported_targets STREQUAL "")
foreach(_target ${_exported_targets})
set(_export_file "${tutorial_interfaces_DIR}/${_target}Export.cmake")
include("${_export_file}")
# extract the target names associated with the export
set(_regex "foreach\\((_cmake)?_expected_?[Tt]arget (IN ITEMS )?(.+)\\)")
file(
STRINGS "${_export_file}" _foreach_targets
REGEX "${_regex}")
list(LENGTH _foreach_targets _matches)
if(NOT _matches EQUAL 1)
message(FATAL_ERROR
"Failed to find exported target names in '${_export_file}'")
endif()
string(REGEX REPLACE "${_regex}" "\\3" _targets "${_foreach_targets}")
string(REPLACE " " ";" _targets "${_targets}")
list(LENGTH _targets _length)
list(APPEND tutorial_interfaces_TARGETS ${_targets})
endforeach()
endif()

View File

@@ -0,0 +1,19 @@
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "tutorial_interfaces::tutorial_interfaces__rosidl_generator_c" for configuration ""
set_property(TARGET tutorial_interfaces::tutorial_interfaces__rosidl_generator_c APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG)
set_target_properties(tutorial_interfaces::tutorial_interfaces__rosidl_generator_c PROPERTIES
IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libtutorial_interfaces__rosidl_generator_c.so"
IMPORTED_SONAME_NOCONFIG "libtutorial_interfaces__rosidl_generator_c.so"
)
list(APPEND _cmake_import_check_targets tutorial_interfaces::tutorial_interfaces__rosidl_generator_c )
list(APPEND _cmake_import_check_files_for_tutorial_interfaces::tutorial_interfaces__rosidl_generator_c "${_IMPORT_PREFIX}/lib/libtutorial_interfaces__rosidl_generator_c.so" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)

View File

@@ -0,0 +1,107 @@
# Generated by CMake
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
message(FATAL_ERROR "CMake >= 2.8.0 required")
endif()
if(CMAKE_VERSION VERSION_LESS "2.8.3")
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.8.3...3.26)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_cmake_targets_defined "")
set(_cmake_targets_not_defined "")
set(_cmake_expected_targets "")
foreach(_cmake_expected_target IN ITEMS tutorial_interfaces::tutorial_interfaces__rosidl_generator_c)
list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
if(TARGET "${_cmake_expected_target}")
list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
else()
list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
endif()
endforeach()
unset(_cmake_expected_target)
if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
unset(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
return()
endif()
if(NOT _cmake_targets_defined STREQUAL "")
string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
endif()
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
# Compute the installation prefix relative to this file.
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
if(_IMPORT_PREFIX STREQUAL "/")
set(_IMPORT_PREFIX "")
endif()
# Create imported target tutorial_interfaces::tutorial_interfaces__rosidl_generator_c
add_library(tutorial_interfaces::tutorial_interfaces__rosidl_generator_c SHARED IMPORTED)
set_target_properties(tutorial_interfaces::tutorial_interfaces__rosidl_generator_c PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/tutorial_interfaces"
INTERFACE_LINK_LIBRARIES "geometry_msgs::geometry_msgs__rosidl_generator_c;std_msgs::std_msgs__rosidl_generator_c;service_msgs::service_msgs__rosidl_generator_c;builtin_interfaces::builtin_interfaces__rosidl_generator_c;rosidl_runtime_c::rosidl_runtime_c;rosidl_typesupport_interface::rosidl_typesupport_interface;rcutils::rcutils"
)
if(CMAKE_VERSION VERSION_LESS 2.8.12)
message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.")
endif()
# Load information for each installed configuration.
file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/export_tutorial_interfaces__rosidl_generator_cExport-*.cmake")
foreach(_cmake_config_file IN LISTS _cmake_config_files)
include("${_cmake_config_file}")
endforeach()
unset(_cmake_config_file)
unset(_cmake_config_files)
# Cleanup temporary variables.
set(_IMPORT_PREFIX)
# Loop over all imported files and verify that they actually exist
foreach(_cmake_target IN LISTS _cmake_import_check_targets)
foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
if(NOT EXISTS "${_cmake_file}")
message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
\"${_cmake_file}\"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
\"${CMAKE_CURRENT_LIST_FILE}\"
but not all the files it references.
")
endif()
endforeach()
unset(_cmake_file)
unset("_cmake_import_check_files_for_${_cmake_target}")
endforeach()
unset(_cmake_target)
unset(_cmake_import_check_targets)
# This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set.
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)

View File

@@ -0,0 +1,108 @@
# Generated by CMake
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
message(FATAL_ERROR "CMake >= 2.8.0 required")
endif()
if(CMAKE_VERSION VERSION_LESS "2.8.3")
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.8.3...3.26)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_cmake_targets_defined "")
set(_cmake_targets_not_defined "")
set(_cmake_expected_targets "")
foreach(_cmake_expected_target IN ITEMS tutorial_interfaces::tutorial_interfaces__rosidl_generator_cpp)
list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
if(TARGET "${_cmake_expected_target}")
list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
else()
list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
endif()
endforeach()
unset(_cmake_expected_target)
if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
unset(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
return()
endif()
if(NOT _cmake_targets_defined STREQUAL "")
string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
endif()
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
# Compute the installation prefix relative to this file.
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
if(_IMPORT_PREFIX STREQUAL "/")
set(_IMPORT_PREFIX "")
endif()
# Create imported target tutorial_interfaces::tutorial_interfaces__rosidl_generator_cpp
add_library(tutorial_interfaces::tutorial_interfaces__rosidl_generator_cpp INTERFACE IMPORTED)
set_target_properties(tutorial_interfaces::tutorial_interfaces__rosidl_generator_cpp PROPERTIES
INTERFACE_COMPILE_FEATURES "cxx_std_17"
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/tutorial_interfaces"
INTERFACE_LINK_LIBRARIES "geometry_msgs::geometry_msgs__rosidl_generator_cpp;std_msgs::std_msgs__rosidl_generator_cpp;service_msgs::service_msgs__rosidl_generator_cpp;builtin_interfaces::builtin_interfaces__rosidl_generator_cpp;rosidl_runtime_cpp::rosidl_runtime_cpp"
)
if(CMAKE_VERSION VERSION_LESS 3.0.0)
message(FATAL_ERROR "This file relies on consumers using CMake 3.0.0 or greater.")
endif()
# Load information for each installed configuration.
file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/export_tutorial_interfaces__rosidl_generator_cppExport-*.cmake")
foreach(_cmake_config_file IN LISTS _cmake_config_files)
include("${_cmake_config_file}")
endforeach()
unset(_cmake_config_file)
unset(_cmake_config_files)
# Cleanup temporary variables.
set(_IMPORT_PREFIX)
# Loop over all imported files and verify that they actually exist
foreach(_cmake_target IN LISTS _cmake_import_check_targets)
foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
if(NOT EXISTS "${_cmake_file}")
message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
\"${_cmake_file}\"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
\"${CMAKE_CURRENT_LIST_FILE}\"
but not all the files it references.
")
endif()
endforeach()
unset(_cmake_file)
unset("_cmake_import_check_files_for_${_cmake_target}")
endforeach()
unset(_cmake_target)
unset(_cmake_import_check_targets)
# This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set.
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)

View File

@@ -0,0 +1,20 @@
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "tutorial_interfaces::tutorial_interfaces__rosidl_generator_py" for configuration ""
set_property(TARGET tutorial_interfaces::tutorial_interfaces__rosidl_generator_py APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG)
set_target_properties(tutorial_interfaces::tutorial_interfaces__rosidl_generator_py PROPERTIES
IMPORTED_LINK_DEPENDENT_LIBRARIES_NOCONFIG "tutorial_interfaces::tutorial_interfaces__rosidl_generator_c;Python3::Python;tutorial_interfaces::tutorial_interfaces__rosidl_typesupport_c;geometry_msgs::geometry_msgs__rosidl_generator_c;geometry_msgs::geometry_msgs__rosidl_typesupport_fastrtps_c;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c;geometry_msgs::geometry_msgs__rosidl_typesupport_c;geometry_msgs::geometry_msgs__rosidl_typesupport_fastrtps_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_cpp;geometry_msgs::geometry_msgs__rosidl_generator_py;std_msgs::std_msgs__rosidl_generator_c;std_msgs::std_msgs__rosidl_typesupport_fastrtps_c;std_msgs::std_msgs__rosidl_typesupport_fastrtps_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_c;std_msgs::std_msgs__rosidl_typesupport_c;std_msgs::std_msgs__rosidl_typesupport_introspection_cpp;std_msgs::std_msgs__rosidl_typesupport_cpp;std_msgs::std_msgs__rosidl_generator_py;service_msgs::service_msgs__rosidl_generator_c;service_msgs::service_msgs__rosidl_typesupport_fastrtps_c;service_msgs::service_msgs__rosidl_typesupport_fastrtps_cpp;service_msgs::service_msgs__rosidl_typesupport_introspection_c;service_msgs::service_msgs__rosidl_typesupport_c;service_msgs::service_msgs__rosidl_typesupport_introspection_cpp;service_msgs::service_msgs__rosidl_typesupport_cpp;service_msgs::service_msgs__rosidl_generator_py;builtin_interfaces::builtin_interfaces__rosidl_generator_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_fastrtps_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_fastrtps_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_cpp;builtin_interfaces::builtin_interfaces__rosidl_generator_py"
IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libtutorial_interfaces__rosidl_generator_py.so"
IMPORTED_SONAME_NOCONFIG "libtutorial_interfaces__rosidl_generator_py.so"
)
list(APPEND _cmake_import_check_targets tutorial_interfaces::tutorial_interfaces__rosidl_generator_py )
list(APPEND _cmake_import_check_files_for_tutorial_interfaces::tutorial_interfaces__rosidl_generator_py "${_IMPORT_PREFIX}/lib/libtutorial_interfaces__rosidl_generator_py.so" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)

View File

@@ -0,0 +1,98 @@
# Generated by CMake
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
message(FATAL_ERROR "CMake >= 2.8.0 required")
endif()
if(CMAKE_VERSION VERSION_LESS "2.8.3")
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.8.3...3.26)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_cmake_targets_defined "")
set(_cmake_targets_not_defined "")
set(_cmake_expected_targets "")
foreach(_cmake_expected_target IN ITEMS tutorial_interfaces::tutorial_interfaces__rosidl_generator_py)
list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
if(TARGET "${_cmake_expected_target}")
list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
else()
list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
endif()
endforeach()
unset(_cmake_expected_target)
if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
unset(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
return()
endif()
if(NOT _cmake_targets_defined STREQUAL "")
string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
endif()
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
# Compute the installation prefix relative to this file.
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
if(_IMPORT_PREFIX STREQUAL "/")
set(_IMPORT_PREFIX "")
endif()
# Create imported target tutorial_interfaces::tutorial_interfaces__rosidl_generator_py
add_library(tutorial_interfaces::tutorial_interfaces__rosidl_generator_py SHARED IMPORTED)
# Load information for each installed configuration.
file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/export_tutorial_interfaces__rosidl_generator_pyExport-*.cmake")
foreach(_cmake_config_file IN LISTS _cmake_config_files)
include("${_cmake_config_file}")
endforeach()
unset(_cmake_config_file)
unset(_cmake_config_files)
# Cleanup temporary variables.
set(_IMPORT_PREFIX)
# Loop over all imported files and verify that they actually exist
foreach(_cmake_target IN LISTS _cmake_import_check_targets)
foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
if(NOT EXISTS "${_cmake_file}")
message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
\"${_cmake_file}\"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
\"${CMAKE_CURRENT_LIST_FILE}\"
but not all the files it references.
")
endif()
endforeach()
unset(_cmake_file)
unset("_cmake_import_check_files_for_${_cmake_target}")
endforeach()
unset(_cmake_target)
unset(_cmake_import_check_targets)
# This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set.
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)

View File

@@ -0,0 +1,19 @@
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "tutorial_interfaces::tutorial_interfaces__rosidl_typesupport_fastrtps_c" for configuration ""
set_property(TARGET tutorial_interfaces::tutorial_interfaces__rosidl_typesupport_fastrtps_c APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG)
set_target_properties(tutorial_interfaces::tutorial_interfaces__rosidl_typesupport_fastrtps_c PROPERTIES
IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libtutorial_interfaces__rosidl_typesupport_fastrtps_c.so"
IMPORTED_SONAME_NOCONFIG "libtutorial_interfaces__rosidl_typesupport_fastrtps_c.so"
)
list(APPEND _cmake_import_check_targets tutorial_interfaces::tutorial_interfaces__rosidl_typesupport_fastrtps_c )
list(APPEND _cmake_import_check_files_for_tutorial_interfaces::tutorial_interfaces__rosidl_typesupport_fastrtps_c "${_IMPORT_PREFIX}/lib/libtutorial_interfaces__rosidl_typesupport_fastrtps_c.so" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)

View File

@@ -0,0 +1,123 @@
# Generated by CMake
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
message(FATAL_ERROR "CMake >= 2.8.0 required")
endif()
if(CMAKE_VERSION VERSION_LESS "2.8.3")
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.8.3...3.26)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_cmake_targets_defined "")
set(_cmake_targets_not_defined "")
set(_cmake_expected_targets "")
foreach(_cmake_expected_target IN ITEMS tutorial_interfaces::tutorial_interfaces__rosidl_typesupport_fastrtps_c)
list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
if(TARGET "${_cmake_expected_target}")
list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
else()
list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
endif()
endforeach()
unset(_cmake_expected_target)
if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
unset(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
return()
endif()
if(NOT _cmake_targets_defined STREQUAL "")
string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
endif()
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
# Compute the installation prefix relative to this file.
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
if(_IMPORT_PREFIX STREQUAL "/")
set(_IMPORT_PREFIX "")
endif()
# Create imported target tutorial_interfaces::tutorial_interfaces__rosidl_typesupport_fastrtps_c
add_library(tutorial_interfaces::tutorial_interfaces__rosidl_typesupport_fastrtps_c SHARED IMPORTED)
set_target_properties(tutorial_interfaces::tutorial_interfaces__rosidl_typesupport_fastrtps_c PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/tutorial_interfaces"
INTERFACE_LINK_LIBRARIES "fastcdr;rosidl_runtime_c::rosidl_runtime_c;rosidl_runtime_cpp::rosidl_runtime_cpp;rosidl_typesupport_interface::rosidl_typesupport_interface;rosidl_typesupport_fastrtps_cpp::rosidl_typesupport_fastrtps_cpp;rosidl_typesupport_fastrtps_c::rosidl_typesupport_fastrtps_c;tutorial_interfaces::tutorial_interfaces__rosidl_generator_c;geometry_msgs::geometry_msgs__rosidl_typesupport_fastrtps_c;std_msgs::std_msgs__rosidl_typesupport_fastrtps_c;service_msgs::service_msgs__rosidl_typesupport_fastrtps_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_fastrtps_c"
)
if(CMAKE_VERSION VERSION_LESS 2.8.12)
message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.")
endif()
# Load information for each installed configuration.
file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/export_tutorial_interfaces__rosidl_typesupport_fastrtps_cExport-*.cmake")
foreach(_cmake_config_file IN LISTS _cmake_config_files)
include("${_cmake_config_file}")
endforeach()
unset(_cmake_config_file)
unset(_cmake_config_files)
# Cleanup temporary variables.
set(_IMPORT_PREFIX)
# Loop over all imported files and verify that they actually exist
foreach(_cmake_target IN LISTS _cmake_import_check_targets)
foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
if(NOT EXISTS "${_cmake_file}")
message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
\"${_cmake_file}\"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
\"${CMAKE_CURRENT_LIST_FILE}\"
but not all the files it references.
")
endif()
endforeach()
unset(_cmake_file)
unset("_cmake_import_check_files_for_${_cmake_target}")
endforeach()
unset(_cmake_target)
unset(_cmake_import_check_targets)
# Make sure the targets which have been exported in some other
# export set exist.
unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets)
foreach(_target "tutorial_interfaces::tutorial_interfaces__rosidl_generator_c" )
if(NOT TARGET "${_target}" )
set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets "${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets} ${_target}")
endif()
endforeach()
if(DEFINED ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets)
if(CMAKE_FIND_PACKAGE_NAME)
set( ${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE)
set( ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}")
else()
message(FATAL_ERROR "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}")
endif()
endif()
unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets)
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)

View File

@@ -0,0 +1,19 @@
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "tutorial_interfaces::tutorial_interfaces__rosidl_typesupport_fastrtps_cpp" for configuration ""
set_property(TARGET tutorial_interfaces::tutorial_interfaces__rosidl_typesupport_fastrtps_cpp APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG)
set_target_properties(tutorial_interfaces::tutorial_interfaces__rosidl_typesupport_fastrtps_cpp PROPERTIES
IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libtutorial_interfaces__rosidl_typesupport_fastrtps_cpp.so"
IMPORTED_SONAME_NOCONFIG "libtutorial_interfaces__rosidl_typesupport_fastrtps_cpp.so"
)
list(APPEND _cmake_import_check_targets tutorial_interfaces::tutorial_interfaces__rosidl_typesupport_fastrtps_cpp )
list(APPEND _cmake_import_check_files_for_tutorial_interfaces::tutorial_interfaces__rosidl_typesupport_fastrtps_cpp "${_IMPORT_PREFIX}/lib/libtutorial_interfaces__rosidl_typesupport_fastrtps_cpp.so" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)

Some files were not shown because too many files have changed in this diff Show More