Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message namespace to MessageMembers struct #355

Merged
merged 4 commits into from May 8, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -42,7 +42,7 @@ typedef struct rosidl_typesupport_introspection_c__MessageMember

typedef struct rosidl_typesupport_introspection_c__MessageMembers
{
const char * package_name_;
const char * message_namespace_;
This conversation was marked as resolved by jacobperron

This comment has been minimized.

Copy link
@dirk-thomas

dirk-thomas May 3, 2019

Member

Shouldn't the package_name_ field be removed?

This comment has been minimized.

Copy link
@jacobperron

jacobperron May 3, 2019

Author Member

Yes, I thought I did that. Oops.
Done, also updated service structs: f5a5db0

const char * message_name_;
uint32_t member_count_;
size_t size_of_;
@@ -25,7 +25,7 @@

typedef struct rosidl_typesupport_introspection_c__ServiceMembers
{
const char * package_name_;
const char * service_namespace_;
const char * service_name_;
const rosidl_typesupport_introspection_c__MessageMembers * request_members_;
const rosidl_typesupport_introspection_c__MessageMembers * response_members_;
@@ -235,7 +235,7 @@ for index, member in enumerate(message.structure.members):
};

static const rosidl_typesupport_introspection_c__MessageMembers @(function_prefix)__@(message.structure.namespaced_type.name)_message_members = {
"@(package_name)", // package name
"@('__'.join([package_name] + list(interface_path.parents[0].parts)))", // message namespace
"@(message.structure.namespaced_type.name)", // message name
@(len(message.structure.members)), // number of fields
sizeof(@('__'.join([package_name] + list(interface_path.parents[0].parts) + [message.structure.namespaced_type.name]))),
@@ -41,7 +41,7 @@ function_prefix = '__'.join(include_parts) + '__rosidl_typesupport_introspection

// this is intentionally not const to allow initialization later to prevent an initialization race
static rosidl_typesupport_introspection_c__ServiceMembers @(function_prefix)__@(service.namespaced_type.name)_service_members = {
"@(package_name)", // package name
"@('__'.join([package_name] + list(interface_path.parents[0].parts)))", // service namespace
"@(service.namespaced_type.name)", // service name
// these two fields are initialized below on the first access
NULL, // request message
@@ -44,7 +44,7 @@ typedef struct ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC MessageMember

typedef struct ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC MessageMembers
{
const char * package_name_;
const char * message_namespace_;
const char * message_name_;
uint32_t member_count_;
size_t size_of_;
@@ -28,7 +28,7 @@ namespace rosidl_typesupport_introspection_cpp

typedef struct ServiceMembers
{
const char * package_name_;
const char * service_namespace_;
const char * service_name_;
const MessageMembers * request_members_;
const MessageMembers * response_members_;
@@ -182,7 +182,7 @@ for index, member in enumerate(message.structure.members):
};

static const ::rosidl_typesupport_introspection_cpp::MessageMembers @(message.structure.namespaced_type.name)_message_members = {
"@(package_name)", // package name
"@('::'.join([package_name] + list(interface_path.parents[0].parts)))", // message namespace
"@(message.structure.namespaced_type.name)", // message name
@(len(message.structure.members)), // number of fields
sizeof(@('::'.join([package_name] + list(interface_path.parents[0].parts) + [message.structure.namespaced_type.name]))),
@@ -52,7 +52,7 @@ 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 @(service.namespaced_type.name)_service_members = {
"@(package_name)", // package name
"@('::'.join([package_name] + list(interface_path.parents[0].parts)))", // service namespace
"@(service.namespaced_type.name)", // service name
// these two fields are initialized below on the first access
// see get_service_type_support_handle<@('::'.join([package_name] + list(interface_path.parents[0].parts) + [service.namespaced_type.name]))>()
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.