-
Notifications
You must be signed in to change notification settings - Fork 92
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
Rename rcljava_common cpp headers to have .hpp suffix #93
Merged
Conversation
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
Before, we were not generating code for the messages and services that make up service and action interfaces. Due to issues with duplicate definitions caused by instantiating the msg.cpp.em template multiple times, I've opted to generate separate files for each service, action, and the interfaces that they are made of. This is similar to what we are doing with the generated Java code. I've added a test confirming that generated service code can be used. Adding a test for actions is difficult at the moment due to a circular dependency with action_msgs. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
This avoids name clashing with other generated files. Similar to what we do with generated Java files. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
…types For example, 'example_interfaces/srv/AddTwoInts_Request' should be mangled to 'example_1interfaces_srv_AddTwoInts_1Request'. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
This resolves a cppcheck linter error complaining about "is invalid C code". Changing the suffix causes cppcheck to treat the files as C++ code. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
jacobperron
changed the title
Rename rcljava_comomn cpp headers to have .hpp suffix
Rename rcljava_common cpp headers to have .hpp suffix
Mar 9, 2020
esteve
approved these changes
Mar 18, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jacobperron thanks!
jacobperron
added a commit
that referenced
this pull request
May 17, 2021
* Fix service and action interface generation Before, we were not generating code for the messages and services that make up service and action interfaces. Due to issues with duplicate definitions caused by instantiating the msg.cpp.em template multiple times, I've opted to generate separate files for each service, action, and the interfaces that they are made of. This is similar to what we are doing with the generated Java code. I've added a test confirming that generated service code can be used. Adding a test for actions is difficult at the moment due to a circular dependency with action_msgs. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Add missing header include Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Rename top level generated cpp file This avoids name clashing with other generated files. Similar to what we do with generated Java files. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Fix JNI name mangling function so it works for service and action subtypes For example, 'example_interfaces/srv/AddTwoInts_Request' should be mangled to 'example_1interfaces_srv_AddTwoInts_1Request'. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Remove vestigal references to jni_package_name Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Add comment about action and service headers Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Simplify include logic Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Rename cpp headers to have .hpp suffix Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Update files to reflect new header suffix This resolves a cppcheck linter error complaining about "is invalid C code". Changing the suffix causes cppcheck to treat the files as C++ code. Signed-off-by: Jacob Perron <jacob@openrobotics.org> Co-authored-by: Esteve Fernandez <esteve@apache.org>
jacobperron
added a commit
that referenced
this pull request
May 17, 2021
* Fix service and action interface generation Before, we were not generating code for the messages and services that make up service and action interfaces. Due to issues with duplicate definitions caused by instantiating the msg.cpp.em template multiple times, I've opted to generate separate files for each service, action, and the interfaces that they are made of. This is similar to what we are doing with the generated Java code. I've added a test confirming that generated service code can be used. Adding a test for actions is difficult at the moment due to a circular dependency with action_msgs. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Add missing header include Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Rename top level generated cpp file This avoids name clashing with other generated files. Similar to what we do with generated Java files. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Fix JNI name mangling function so it works for service and action subtypes For example, 'example_interfaces/srv/AddTwoInts_Request' should be mangled to 'example_1interfaces_srv_AddTwoInts_1Request'. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Remove vestigal references to jni_package_name Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Add comment about action and service headers Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Simplify include logic Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Rename cpp headers to have .hpp suffix Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Update files to reflect new header suffix This resolves a cppcheck linter error complaining about "is invalid C code". Changing the suffix causes cppcheck to treat the files as C++ code. Signed-off-by: Jacob Perron <jacob@openrobotics.org> Co-authored-by: Esteve Fernandez <esteve@apache.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Builds on top of (and depends on) #76. Opening for visibility.
Resolve a cppcheck error by changing the suffix of rcljava_common headers to
.hpp
. Before, cppcheck was assuming that the code was C, rather than C++.