AS: adding first phase of orientation

This commit is contained in:
Alexander Schaefer
2025-01-29 09:58:44 +00:00
parent 79001dc331
commit 45650caa1b
5106 changed files with 582827 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
// 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
#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,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()
{
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,177 @@
// 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
#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/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();
/// 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);
/// 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,37 @@
// 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"
#ifdef __cplusplus
extern "C"
{
#endif
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
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,80 @@
// 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 "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);
} // 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,40 @@
// 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
#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,131 @@
// 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
#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,109 @@
// 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
#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,83 @@
// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em
// with input from tutorial_interfaces:msg/Num.idl
// generated code does not contain a copyright notice
#include <stddef.h>
#include "tutorial_interfaces/msg/detail/num__rosidl_typesupport_introspection_c.h"
#include "tutorial_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h"
#include "rosidl_typesupport_introspection_c/field_types.h"
#include "rosidl_typesupport_introspection_c/identifier.h"
#include "rosidl_typesupport_introspection_c/message_introspection.h"
#include "tutorial_interfaces/msg/detail/num__functions.h"
#include "tutorial_interfaces/msg/detail/num__struct.h"
#ifdef __cplusplus
extern "C"
{
#endif
void tutorial_interfaces__msg__Num__rosidl_typesupport_introspection_c__Num_init_function(
void * message_memory, enum rosidl_runtime_c__message_initialization _init)
{
// TODO(karsten1987): initializers are not yet implemented for typesupport c
// see https://github.com/ros2/ros2/issues/397
(void) _init;
tutorial_interfaces__msg__Num__init(message_memory);
}
void tutorial_interfaces__msg__Num__rosidl_typesupport_introspection_c__Num_fini_function(void * message_memory)
{
tutorial_interfaces__msg__Num__fini(message_memory);
}
static rosidl_typesupport_introspection_c__MessageMember tutorial_interfaces__msg__Num__rosidl_typesupport_introspection_c__Num_message_member_array[1] = {
{
"num", // name
rosidl_typesupport_introspection_c__ROS_TYPE_INT64, // type
0, // upper bound of string
NULL, // members of sub message
false, // is array
0, // array size
false, // is upper bound
offsetof(tutorial_interfaces__msg__Num, num), // bytes offset in struct
NULL, // default value
NULL, // size() function pointer
NULL, // get_const(index) function pointer
NULL, // get(index) function pointer
NULL, // fetch(index, &value) function pointer
NULL, // assign(index, value) function pointer
NULL // resize(index) function pointer
}
};
static const rosidl_typesupport_introspection_c__MessageMembers tutorial_interfaces__msg__Num__rosidl_typesupport_introspection_c__Num_message_members = {
"tutorial_interfaces__msg", // message namespace
"Num", // message name
1, // number of fields
sizeof(tutorial_interfaces__msg__Num),
tutorial_interfaces__msg__Num__rosidl_typesupport_introspection_c__Num_message_member_array, // message members
tutorial_interfaces__msg__Num__rosidl_typesupport_introspection_c__Num_init_function, // function to initialize message memory (memory has to be allocated)
tutorial_interfaces__msg__Num__rosidl_typesupport_introspection_c__Num_fini_function // function to terminate message instance (will not free memory)
};
// this is not const since it must be initialized on first access
// since C does not allow non-integral compile-time constants
static rosidl_message_type_support_t tutorial_interfaces__msg__Num__rosidl_typesupport_introspection_c__Num_message_type_support_handle = {
0,
&tutorial_interfaces__msg__Num__rosidl_typesupport_introspection_c__Num_message_members,
get_message_typesupport_handle_function,
};
ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tutorial_interfaces, msg, Num)() {
if (!tutorial_interfaces__msg__Num__rosidl_typesupport_introspection_c__Num_message_type_support_handle.typesupport_identifier) {
tutorial_interfaces__msg__Num__rosidl_typesupport_introspection_c__Num_message_type_support_handle.typesupport_identifier =
rosidl_typesupport_introspection_c__identifier;
}
return &tutorial_interfaces__msg__Num__rosidl_typesupport_introspection_c__Num_message_type_support_handle;
}
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,109 @@
// 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__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 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),
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,
};
} // 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,33 @@
// 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
#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
)();
#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,72 @@
// 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
#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,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()
{
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,177 @@
// 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
#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/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();
/// 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);
/// 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,37 @@
// 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"
#ifdef __cplusplus
extern "C"
{
#endif
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
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,80 @@
// 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 "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);
} // 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,45 @@
// 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
#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,148 @@
// 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
#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,129 @@
// 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
#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,108 @@
// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em
// with input from tutorial_interfaces:msg/Sphere.idl
// generated code does not contain a copyright notice
#include <stddef.h>
#include "tutorial_interfaces/msg/detail/sphere__rosidl_typesupport_introspection_c.h"
#include "tutorial_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h"
#include "rosidl_typesupport_introspection_c/field_types.h"
#include "rosidl_typesupport_introspection_c/identifier.h"
#include "rosidl_typesupport_introspection_c/message_introspection.h"
#include "tutorial_interfaces/msg/detail/sphere__functions.h"
#include "tutorial_interfaces/msg/detail/sphere__struct.h"
// Include directives for member types
// Member `center`
#include "geometry_msgs/msg/point.h"
// Member `center`
#include "geometry_msgs/msg/detail/point__rosidl_typesupport_introspection_c.h"
#ifdef __cplusplus
extern "C"
{
#endif
void tutorial_interfaces__msg__Sphere__rosidl_typesupport_introspection_c__Sphere_init_function(
void * message_memory, enum rosidl_runtime_c__message_initialization _init)
{
// TODO(karsten1987): initializers are not yet implemented for typesupport c
// see https://github.com/ros2/ros2/issues/397
(void) _init;
tutorial_interfaces__msg__Sphere__init(message_memory);
}
void tutorial_interfaces__msg__Sphere__rosidl_typesupport_introspection_c__Sphere_fini_function(void * message_memory)
{
tutorial_interfaces__msg__Sphere__fini(message_memory);
}
static rosidl_typesupport_introspection_c__MessageMember tutorial_interfaces__msg__Sphere__rosidl_typesupport_introspection_c__Sphere_message_member_array[2] = {
{
"center", // name
rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type
0, // upper bound of string
NULL, // members of sub message (initialized later)
false, // is array
0, // array size
false, // is upper bound
offsetof(tutorial_interfaces__msg__Sphere, center), // bytes offset in struct
NULL, // default value
NULL, // size() function pointer
NULL, // get_const(index) function pointer
NULL, // get(index) function pointer
NULL, // fetch(index, &value) function pointer
NULL, // assign(index, value) function pointer
NULL // resize(index) function pointer
},
{
"radius", // name
rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type
0, // upper bound of string
NULL, // members of sub message
false, // is array
0, // array size
false, // is upper bound
offsetof(tutorial_interfaces__msg__Sphere, radius), // bytes offset in struct
NULL, // default value
NULL, // size() function pointer
NULL, // get_const(index) function pointer
NULL, // get(index) function pointer
NULL, // fetch(index, &value) function pointer
NULL, // assign(index, value) function pointer
NULL // resize(index) function pointer
}
};
static const rosidl_typesupport_introspection_c__MessageMembers tutorial_interfaces__msg__Sphere__rosidl_typesupport_introspection_c__Sphere_message_members = {
"tutorial_interfaces__msg", // message namespace
"Sphere", // message name
2, // number of fields
sizeof(tutorial_interfaces__msg__Sphere),
tutorial_interfaces__msg__Sphere__rosidl_typesupport_introspection_c__Sphere_message_member_array, // message members
tutorial_interfaces__msg__Sphere__rosidl_typesupport_introspection_c__Sphere_init_function, // function to initialize message memory (memory has to be allocated)
tutorial_interfaces__msg__Sphere__rosidl_typesupport_introspection_c__Sphere_fini_function // function to terminate message instance (will not free memory)
};
// this is not const since it must be initialized on first access
// since C does not allow non-integral compile-time constants
static rosidl_message_type_support_t tutorial_interfaces__msg__Sphere__rosidl_typesupport_introspection_c__Sphere_message_type_support_handle = {
0,
&tutorial_interfaces__msg__Sphere__rosidl_typesupport_introspection_c__Sphere_message_members,
get_message_typesupport_handle_function,
};
ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tutorial_interfaces, msg, Sphere)() {
tutorial_interfaces__msg__Sphere__rosidl_typesupport_introspection_c__Sphere_message_member_array[0].members_ =
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, geometry_msgs, msg, Point)();
if (!tutorial_interfaces__msg__Sphere__rosidl_typesupport_introspection_c__Sphere_message_type_support_handle.typesupport_identifier) {
tutorial_interfaces__msg__Sphere__rosidl_typesupport_introspection_c__Sphere_message_type_support_handle.typesupport_identifier =
rosidl_typesupport_introspection_c__identifier;
}
return &tutorial_interfaces__msg__Sphere__rosidl_typesupport_introspection_c__Sphere_message_type_support_handle;
}
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,126 @@
// 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__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 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 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),
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,
};
} // 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,33 @@
// 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
#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
)();
#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,130 @@
// 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
#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
#endif // TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__BUILDER_HPP_

View File

@@ -0,0 +1,476 @@
// 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()
{
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()
{
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;
}

View File

@@ -0,0 +1,329 @@
// 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
#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/visibility_control.h"
#include "tutorial_interfaces/msg/rosidl_generator_c__visibility_control.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
/// 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();
/// 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);
/// 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();
/// 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);
/// 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);
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__FUNCTIONS_H_

View File

@@ -0,0 +1,89 @@
// 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"
#ifdef __cplusplus
extern "C"
{
#endif
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
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"
#ifdef __cplusplus
extern "C"
{
#endif
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
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, tutorial_interfaces, srv, AddThreeInts_Response)();
#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,177 @@
// 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 "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);
} // 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 "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);
} // 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
#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,47 @@
// 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)();
#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,67 @@
// 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
#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,61 @@
// 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
#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;
#ifdef __cplusplus
}
#endif
#endif // TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__STRUCT_H_

View File

@@ -0,0 +1,289 @@
// 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
#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
namespace tutorial_interfaces
{
namespace srv
{
struct AddThreeInts
{
using Request = tutorial_interfaces::srv::AddThreeInts_Request;
using Response = tutorial_interfaces::srv::AddThreeInts_Response;
};
} // namespace srv
} // namespace tutorial_interfaces
#endif // TUTORIAL_INTERFACES__SRV__DETAIL__ADD_THREE_INTS__STRUCT_HPP_

View File

@@ -0,0 +1,290 @@
// 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
#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
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,262 @@
// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em
// with input from tutorial_interfaces:srv/AddThreeInts.idl
// generated code does not contain a copyright notice
#include <stddef.h>
#include "tutorial_interfaces/srv/detail/add_three_ints__rosidl_typesupport_introspection_c.h"
#include "tutorial_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h"
#include "rosidl_typesupport_introspection_c/field_types.h"
#include "rosidl_typesupport_introspection_c/identifier.h"
#include "rosidl_typesupport_introspection_c/message_introspection.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__functions.h"
#include "tutorial_interfaces/srv/detail/add_three_ints__struct.h"
#ifdef __cplusplus
extern "C"
{
#endif
void tutorial_interfaces__srv__AddThreeInts_Request__rosidl_typesupport_introspection_c__AddThreeInts_Request_init_function(
void * message_memory, enum rosidl_runtime_c__message_initialization _init)
{
// TODO(karsten1987): initializers are not yet implemented for typesupport c
// see https://github.com/ros2/ros2/issues/397
(void) _init;
tutorial_interfaces__srv__AddThreeInts_Request__init(message_memory);
}
void tutorial_interfaces__srv__AddThreeInts_Request__rosidl_typesupport_introspection_c__AddThreeInts_Request_fini_function(void * message_memory)
{
tutorial_interfaces__srv__AddThreeInts_Request__fini(message_memory);
}
static rosidl_typesupport_introspection_c__MessageMember tutorial_interfaces__srv__AddThreeInts_Request__rosidl_typesupport_introspection_c__AddThreeInts_Request_message_member_array[3] = {
{
"a", // name
rosidl_typesupport_introspection_c__ROS_TYPE_INT64, // type
0, // upper bound of string
NULL, // members of sub message
false, // is array
0, // array size
false, // is upper bound
offsetof(tutorial_interfaces__srv__AddThreeInts_Request, a), // bytes offset in struct
NULL, // default value
NULL, // size() function pointer
NULL, // get_const(index) function pointer
NULL, // get(index) function pointer
NULL, // fetch(index, &value) function pointer
NULL, // assign(index, value) function pointer
NULL // resize(index) function pointer
},
{
"b", // name
rosidl_typesupport_introspection_c__ROS_TYPE_INT64, // type
0, // upper bound of string
NULL, // members of sub message
false, // is array
0, // array size
false, // is upper bound
offsetof(tutorial_interfaces__srv__AddThreeInts_Request, b), // bytes offset in struct
NULL, // default value
NULL, // size() function pointer
NULL, // get_const(index) function pointer
NULL, // get(index) function pointer
NULL, // fetch(index, &value) function pointer
NULL, // assign(index, value) function pointer
NULL // resize(index) function pointer
},
{
"c", // name
rosidl_typesupport_introspection_c__ROS_TYPE_INT64, // type
0, // upper bound of string
NULL, // members of sub message
false, // is array
0, // array size
false, // is upper bound
offsetof(tutorial_interfaces__srv__AddThreeInts_Request, c), // bytes offset in struct
NULL, // default value
NULL, // size() function pointer
NULL, // get_const(index) function pointer
NULL, // get(index) function pointer
NULL, // fetch(index, &value) function pointer
NULL, // assign(index, value) function pointer
NULL // resize(index) function pointer
}
};
static const rosidl_typesupport_introspection_c__MessageMembers tutorial_interfaces__srv__AddThreeInts_Request__rosidl_typesupport_introspection_c__AddThreeInts_Request_message_members = {
"tutorial_interfaces__srv", // message namespace
"AddThreeInts_Request", // message name
3, // number of fields
sizeof(tutorial_interfaces__srv__AddThreeInts_Request),
tutorial_interfaces__srv__AddThreeInts_Request__rosidl_typesupport_introspection_c__AddThreeInts_Request_message_member_array, // message members
tutorial_interfaces__srv__AddThreeInts_Request__rosidl_typesupport_introspection_c__AddThreeInts_Request_init_function, // function to initialize message memory (memory has to be allocated)
tutorial_interfaces__srv__AddThreeInts_Request__rosidl_typesupport_introspection_c__AddThreeInts_Request_fini_function // function to terminate message instance (will not free memory)
};
// this is not const since it must be initialized on first access
// since C does not allow non-integral compile-time constants
static rosidl_message_type_support_t tutorial_interfaces__srv__AddThreeInts_Request__rosidl_typesupport_introspection_c__AddThreeInts_Request_message_type_support_handle = {
0,
&tutorial_interfaces__srv__AddThreeInts_Request__rosidl_typesupport_introspection_c__AddThreeInts_Request_message_members,
get_message_typesupport_handle_function,
};
ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tutorial_interfaces, srv, AddThreeInts_Request)() {
if (!tutorial_interfaces__srv__AddThreeInts_Request__rosidl_typesupport_introspection_c__AddThreeInts_Request_message_type_support_handle.typesupport_identifier) {
tutorial_interfaces__srv__AddThreeInts_Request__rosidl_typesupport_introspection_c__AddThreeInts_Request_message_type_support_handle.typesupport_identifier =
rosidl_typesupport_introspection_c__identifier;
}
return &tutorial_interfaces__srv__AddThreeInts_Request__rosidl_typesupport_introspection_c__AddThreeInts_Request_message_type_support_handle;
}
#ifdef __cplusplus
}
#endif
// already included above
// #include <stddef.h>
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__rosidl_typesupport_introspection_c.h"
// already included above
// #include "tutorial_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h"
// already included above
// #include "rosidl_typesupport_introspection_c/field_types.h"
// already included above
// #include "rosidl_typesupport_introspection_c/identifier.h"
// already included above
// #include "rosidl_typesupport_introspection_c/message_introspection.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.h"
#ifdef __cplusplus
extern "C"
{
#endif
void tutorial_interfaces__srv__AddThreeInts_Response__rosidl_typesupport_introspection_c__AddThreeInts_Response_init_function(
void * message_memory, enum rosidl_runtime_c__message_initialization _init)
{
// TODO(karsten1987): initializers are not yet implemented for typesupport c
// see https://github.com/ros2/ros2/issues/397
(void) _init;
tutorial_interfaces__srv__AddThreeInts_Response__init(message_memory);
}
void tutorial_interfaces__srv__AddThreeInts_Response__rosidl_typesupport_introspection_c__AddThreeInts_Response_fini_function(void * message_memory)
{
tutorial_interfaces__srv__AddThreeInts_Response__fini(message_memory);
}
static rosidl_typesupport_introspection_c__MessageMember tutorial_interfaces__srv__AddThreeInts_Response__rosidl_typesupport_introspection_c__AddThreeInts_Response_message_member_array[1] = {
{
"sum", // name
rosidl_typesupport_introspection_c__ROS_TYPE_INT64, // type
0, // upper bound of string
NULL, // members of sub message
false, // is array
0, // array size
false, // is upper bound
offsetof(tutorial_interfaces__srv__AddThreeInts_Response, sum), // bytes offset in struct
NULL, // default value
NULL, // size() function pointer
NULL, // get_const(index) function pointer
NULL, // get(index) function pointer
NULL, // fetch(index, &value) function pointer
NULL, // assign(index, value) function pointer
NULL // resize(index) function pointer
}
};
static const rosidl_typesupport_introspection_c__MessageMembers tutorial_interfaces__srv__AddThreeInts_Response__rosidl_typesupport_introspection_c__AddThreeInts_Response_message_members = {
"tutorial_interfaces__srv", // message namespace
"AddThreeInts_Response", // message name
1, // number of fields
sizeof(tutorial_interfaces__srv__AddThreeInts_Response),
tutorial_interfaces__srv__AddThreeInts_Response__rosidl_typesupport_introspection_c__AddThreeInts_Response_message_member_array, // message members
tutorial_interfaces__srv__AddThreeInts_Response__rosidl_typesupport_introspection_c__AddThreeInts_Response_init_function, // function to initialize message memory (memory has to be allocated)
tutorial_interfaces__srv__AddThreeInts_Response__rosidl_typesupport_introspection_c__AddThreeInts_Response_fini_function // function to terminate message instance (will not free memory)
};
// this is not const since it must be initialized on first access
// since C does not allow non-integral compile-time constants
static rosidl_message_type_support_t tutorial_interfaces__srv__AddThreeInts_Response__rosidl_typesupport_introspection_c__AddThreeInts_Response_message_type_support_handle = {
0,
&tutorial_interfaces__srv__AddThreeInts_Response__rosidl_typesupport_introspection_c__AddThreeInts_Response_message_members,
get_message_typesupport_handle_function,
};
ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tutorial_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tutorial_interfaces, srv, AddThreeInts_Response)() {
if (!tutorial_interfaces__srv__AddThreeInts_Response__rosidl_typesupport_introspection_c__AddThreeInts_Response_message_type_support_handle.typesupport_identifier) {
tutorial_interfaces__srv__AddThreeInts_Response__rosidl_typesupport_introspection_c__AddThreeInts_Response_message_type_support_handle.typesupport_identifier =
rosidl_typesupport_introspection_c__identifier;
}
return &tutorial_interfaces__srv__AddThreeInts_Response__rosidl_typesupport_introspection_c__AddThreeInts_Response_message_type_support_handle;
}
#ifdef __cplusplus
}
#endif
#include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "tutorial_interfaces/msg/rosidl_typesupport_introspection_c__visibility_control.h"
// already included above
// #include "tutorial_interfaces/srv/detail/add_three_ints__rosidl_typesupport_introspection_c.h"
// already included above
// #include "rosidl_typesupport_introspection_c/identifier.h"
#include "rosidl_typesupport_introspection_c/service_introspection.h"
// this is intentionally not const to allow initialization later to prevent an initialization race
static rosidl_typesupport_introspection_c__ServiceMembers tutorial_interfaces__srv__detail__add_three_ints__rosidl_typesupport_introspection_c__AddThreeInts_service_members = {
"tutorial_interfaces__srv", // service namespace
"AddThreeInts", // service name
// these two fields are initialized below on the first access
NULL, // request message
// tutorial_interfaces__srv__detail__add_three_ints__rosidl_typesupport_introspection_c__AddThreeInts_Request_message_type_support_handle,
NULL // response message
// tutorial_interfaces__srv__detail__add_three_ints__rosidl_typesupport_introspection_c__AddThreeInts_Response_message_type_support_handle
};
static rosidl_service_type_support_t tutorial_interfaces__srv__detail__add_three_ints__rosidl_typesupport_introspection_c__AddThreeInts_service_type_support_handle = {
0,
&tutorial_interfaces__srv__detail__add_three_ints__rosidl_typesupport_introspection_c__AddThreeInts_service_members,
get_service_typesupport_handle_function,
};
// Forward declaration of request/response type support functions
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tutorial_interfaces, srv, AddThreeInts_Request)();
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tutorial_interfaces, srv, AddThreeInts_Response)();
ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_tutorial_interfaces
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tutorial_interfaces, srv, AddThreeInts)() {
if (!tutorial_interfaces__srv__detail__add_three_ints__rosidl_typesupport_introspection_c__AddThreeInts_service_type_support_handle.typesupport_identifier) {
tutorial_interfaces__srv__detail__add_three_ints__rosidl_typesupport_introspection_c__AddThreeInts_service_type_support_handle.typesupport_identifier =
rosidl_typesupport_introspection_c__identifier;
}
rosidl_typesupport_introspection_c__ServiceMembers * service_members =
(rosidl_typesupport_introspection_c__ServiceMembers *)tutorial_interfaces__srv__detail__add_three_ints__rosidl_typesupport_introspection_c__AddThreeInts_service_type_support_handle.data;
if (!service_members->request_members_) {
service_members->request_members_ =
(const rosidl_typesupport_introspection_c__MessageMembers *)
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tutorial_interfaces, srv, AddThreeInts_Request)()->data;
}
if (!service_members->response_members_) {
service_members->response_members_ =
(const rosidl_typesupport_introspection_c__MessageMembers *)
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, tutorial_interfaces, srv, AddThreeInts_Response)()->data;
}
return &tutorial_interfaces__srv__detail__add_three_ints__rosidl_typesupport_introspection_c__AddThreeInts_service_type_support_handle;
}

View File

@@ -0,0 +1,370 @@
// 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__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 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 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 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),
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,
};
} // 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__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 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),
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,
};
} // 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
#include "rosidl_runtime_c/service_type_support_struct.h"
// 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__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
// these two fields are initialized below on the first access
// see get_service_type_support_handle<tutorial_interfaces::srv::AddThreeInts>()
nullptr, // request message
nullptr // response 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,
};
} // 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 that both the request_members_ and the response_members_ are initialized
// if they are not, initialize them
if (
service_members->request_members_ == nullptr ||
service_members->response_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
);
}
// 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,58 @@
// 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
#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
)();
// 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
)();
#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
)();
#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,10 @@
Metadata-Version: 2.1
Name: tutorial-interfaces
Version: 0.0.0
Summary: UNKNOWN
Home-page: UNKNOWN
License: UNKNOWN
Platform: UNKNOWN
UNKNOWN

View File

@@ -0,0 +1,6 @@
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

View File

@@ -0,0 +1,644 @@
// 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;
}
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_srv_type__srv__add_three_ints(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
return pymodule;
}

View File

@@ -0,0 +1,644 @@
// 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;
}
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_srv_type__srv__add_three_ints(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}
return pymodule;
}

View File

@@ -0,0 +1,644 @@
// 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;
}
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_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,126 @@
# 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
# 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',
]
_fields_and_field_types = {
'num': 'int64',
}
SLOT_TYPES = (
rosidl_parser.definition.BasicType('int64'), # noqa: E501
)
def __init__(self, **kwargs):
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.__slots__, 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:
assert fieldstr.startswith('array(')
prefix = "array('X', "
suffix = ')'
fieldstr = fieldstr[len(prefix):-len(suffix)]
args.append(s[1:] + '=' + 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 __debug__:
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,153 @@
# 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
# 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',
]
_fields_and_field_types = {
'center': 'geometry_msgs/Point',
'radius': 'double',
}
SLOT_TYPES = (
rosidl_parser.definition.NamespacedType(['geometry_msgs', 'msg'], 'Point'), # noqa: E501
rosidl_parser.definition.BasicType('double'), # noqa: E501
)
def __init__(self, **kwargs):
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.__slots__, 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:
assert fieldstr.startswith('array(')
prefix = "array('X', "
suffix = ')'
fieldstr = fieldstr[len(prefix):-len(suffix)]
args.append(s[1:] + '=' + 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 __debug__:
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 __debug__:
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 @@
from tutorial_interfaces.srv._add_three_ints import AddThreeInts # noqa: F401

View File

@@ -0,0 +1,329 @@
# 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
# 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',
]
_fields_and_field_types = {
'a': 'int64',
'b': 'int64',
'c': 'int64',
}
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):
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.__slots__, 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:
assert fieldstr.startswith('array(')
prefix = "array('X', "
suffix = ')'
fieldstr = fieldstr[len(prefix):-len(suffix)]
args.append(s[1:] + '=' + 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 __debug__:
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 __debug__:
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 __debug__:
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',
]
_fields_and_field_types = {
'sum': 'int64',
}
SLOT_TYPES = (
rosidl_parser.definition.BasicType('int64'), # noqa: E501
)
def __init__(self, **kwargs):
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.__slots__, 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:
assert fieldstr.startswith('array(')
prefix = "array('X', "
suffix = ')'
fieldstr = fieldstr[len(prefix):-len(suffix)]
args.append(s[1:] + '=' + 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 __debug__:
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
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__()
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
def __init__(self):
raise NotImplementedError('Service classes can not be instantiated')

View File

@@ -0,0 +1,233 @@
// 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;
}

View File

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

View File

@@ -0,0 +1 @@
/root/ros2_ws/install/py_srvcli:/root/ros2_ws/install/py_pubsub:/root/ros2_ws/install/turtlesim:/root/ros2_ws/install/launch_testing_examples:/root/ros2_ws/install/examples_rclpy_pointcloud_publisher:/root/ros2_ws/install/examples_rclpy_minimal_subscriber:/root/ros2_ws/install/examples_rclpy_minimal_service:/root/ros2_ws/install/examples_rclpy_minimal_publisher:/root/ros2_ws/install/examples_rclpy_minimal_client:/root/ros2_ws/install/examples_rclpy_minimal_action_server:/root/ros2_ws/install/examples_rclpy_minimal_action_client:/root/ros2_ws/install/examples_rclpy_guard_conditions:/root/ros2_ws/install/examples_rclpy_executors:/root/ros2_ws/install/examples_rclcpp_wait_set:/root/ros2_ws/install/examples_rclcpp_multithreaded_executor:/root/ros2_ws/install/examples_rclcpp_minimal_timer:/root/ros2_ws/install/examples_rclcpp_minimal_subscriber:/root/ros2_ws/install/examples_rclcpp_minimal_service:/root/ros2_ws/install/examples_rclcpp_minimal_publisher:/root/ros2_ws/install/examples_rclcpp_minimal_composition:/root/ros2_ws/install/examples_rclcpp_minimal_client:/root/ros2_ws/install/examples_rclcpp_minimal_action_server:/root/ros2_ws/install/examples_rclcpp_minimal_action_client:/root/ros2_ws/install/examples_rclcpp_cbg_executor:/root/ros2_ws/install/examples_rclcpp_async_client:/opt/ros/humble

View File

@@ -0,0 +1,8 @@
msg/Num.idl
msg/Num.msg
msg/Sphere.idl
msg/Sphere.msg
srv/AddThreeInts.idl
srv/AddThreeInts.srv
srv/AddThreeInts_Request.msg
srv/AddThreeInts_Response.msg

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;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 _IMPORT_CHECK_TARGETS tutorial_interfaces::tutorial_interfaces__rosidl_generator_c )
list(APPEND _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,99 @@
# Generated by CMake
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.6)
message(FATAL_ERROR "CMake >= 2.6.0 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.6...3.20)
#----------------------------------------------------------------
# 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(_targetsDefined)
set(_targetsNotDefined)
set(_expectedTargets)
foreach(_expectedTarget tutorial_interfaces::tutorial_interfaces__rosidl_generator_c)
list(APPEND _expectedTargets ${_expectedTarget})
if(NOT TARGET ${_expectedTarget})
list(APPEND _targetsNotDefined ${_expectedTarget})
endif()
if(TARGET ${_expectedTarget})
list(APPEND _targetsDefined ${_expectedTarget})
endif()
endforeach()
if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
unset(_targetsDefined)
unset(_targetsNotDefined)
unset(_expectedTargets)
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
return()
endif()
if(NOT "${_targetsDefined}" STREQUAL "")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n")
endif()
unset(_targetsDefined)
unset(_targetsNotDefined)
unset(_expectedTargets)
# 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;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.
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
file(GLOB CONFIG_FILES "${_DIR}/export_tutorial_interfaces__rosidl_generator_cExport-*.cmake")
foreach(f ${CONFIG_FILES})
include(${f})
endforeach()
# Cleanup temporary variables.
set(_IMPORT_PREFIX)
# Loop over all imported files and verify that they actually exist
foreach(target ${_IMPORT_CHECK_TARGETS} )
foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
if(NOT EXISTS "${file}" )
message(FATAL_ERROR "The imported target \"${target}\" references the file
\"${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(_IMPORT_CHECK_FILES_FOR_${target})
endforeach()
unset(_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,99 @@
# Generated by CMake
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.6)
message(FATAL_ERROR "CMake >= 2.6.0 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.6...3.20)
#----------------------------------------------------------------
# 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(_targetsDefined)
set(_targetsNotDefined)
set(_expectedTargets)
foreach(_expectedTarget tutorial_interfaces::tutorial_interfaces__rosidl_generator_cpp)
list(APPEND _expectedTargets ${_expectedTarget})
if(NOT TARGET ${_expectedTarget})
list(APPEND _targetsNotDefined ${_expectedTarget})
endif()
if(TARGET ${_expectedTarget})
list(APPEND _targetsDefined ${_expectedTarget})
endif()
endforeach()
if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
unset(_targetsDefined)
unset(_targetsNotDefined)
unset(_expectedTargets)
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
return()
endif()
if(NOT "${_targetsDefined}" STREQUAL "")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n")
endif()
unset(_targetsDefined)
unset(_targetsNotDefined)
unset(_expectedTargets)
# 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_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/tutorial_interfaces"
INTERFACE_LINK_LIBRARIES "geometry_msgs::geometry_msgs__rosidl_generator_cpp;std_msgs::std_msgs__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.
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
file(GLOB CONFIG_FILES "${_DIR}/export_tutorial_interfaces__rosidl_generator_cppExport-*.cmake")
foreach(f ${CONFIG_FILES})
include(${f})
endforeach()
# Cleanup temporary variables.
set(_IMPORT_PREFIX)
# Loop over all imported files and verify that they actually exist
foreach(target ${_IMPORT_CHECK_TARGETS} )
foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
if(NOT EXISTS "${file}" )
message(FATAL_ERROR "The imported target \"${target}\" references the file
\"${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(_IMPORT_CHECK_FILES_FOR_${target})
endforeach()
unset(_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_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_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libtutorial_interfaces__rosidl_generator_py.so"
IMPORTED_SONAME_NOCONFIG "libtutorial_interfaces__rosidl_generator_py.so"
)
list(APPEND _IMPORT_CHECK_TARGETS tutorial_interfaces::tutorial_interfaces__rosidl_generator_py )
list(APPEND _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)

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