-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[service introspection] generate service_event messages (#700)
* add service event message Signed-off-by: Brian Chen <brian.chen@openrobotics.org> Signed-off-by: Jacob Perron <jacob@openrobotics.org> Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com> Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
- Loading branch information
Showing
31 changed files
with
582 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@# Included from rosidl_generator_c/resource/idl__type_support.c.em | ||
@{ | ||
TEMPLATE( | ||
'srv__type_support.c.em', | ||
package_name=package_name, service=action.send_goal_service, | ||
interface_path=interface_path, include_directives=include_directives) | ||
}@ | ||
|
||
@{ | ||
TEMPLATE( | ||
'srv__type_support.c.em', | ||
package_name=package_name, service=action.get_result_service, | ||
interface_path=interface_path, include_directives=include_directives) | ||
}@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// generated from rosidl_generator_c/resource/idl__type_support.c.em | ||
// with input from @(package_name):@(interface_path) | ||
// generated code does not contain a copyright notice | ||
@ | ||
@####################################################################### | ||
@# EmPy template for generating <idl>__type_support.c files | ||
@# | ||
@# Context: | ||
@# - package_name (string) | ||
@# - interface_path (Path relative to the directory named after the package) | ||
@# - content (IdlContent, list of elements, e.g. Messages or Services) | ||
@####################################################################### | ||
@{ | ||
from rosidl_pycommon import convert_camel_case_to_lower_case_underscore | ||
include_parts = [package_name] + list(interface_path.parents[0].parts) + [ | ||
'detail', convert_camel_case_to_lower_case_underscore(interface_path.stem)] | ||
include_base = '/'.join(include_parts) | ||
|
||
include_directives = { | ||
'rosidl_typesupport_interface/macros.h', | ||
include_base + '__type_support.h', | ||
include_base + '__struct.h', | ||
include_base + '__functions.h'} | ||
}@ | ||
|
||
#include <string.h> | ||
|
||
@[for header_file in include_directives]@ | ||
#include "@(header_file)" | ||
@[end for]@ | ||
|
||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif | ||
|
||
@####################################################################### | ||
@# Handle service | ||
@####################################################################### | ||
@{ | ||
from rosidl_parser.definition import Service | ||
}@ | ||
@[for service in content.get_elements_of_type(Service)]@ | ||
@{ | ||
TEMPLATE( | ||
'srv__type_support.c.em', | ||
package_name=package_name, service=service, | ||
interface_path=interface_path, include_directives=include_directives) | ||
}@ | ||
|
||
@[end for]@ | ||
@ | ||
@####################################################################### | ||
@# Handle action | ||
@####################################################################### | ||
@{ | ||
from rosidl_parser.definition import Action | ||
}@ | ||
@[for action in content.get_elements_of_type(Action)]@ | ||
@{ | ||
TEMPLATE( | ||
'action__type_support.c.em', | ||
package_name=package_name, action=action, | ||
interface_path=interface_path, include_directives=include_directives) | ||
}@ | ||
|
||
@[end for]@ | ||
#ifdef __cplusplus | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.